@vaadin/master-detail-layout 25.0.0-alpha10 → 25.0.0-alpha11

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/master-detail-layout",
3
- "version": "25.0.0-alpha10",
3
+ "version": "25.0.0-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,9 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "!src/styles/*-base-styles.d.ts",
25
- "!src/styles/*-base-styles.js",
26
- "theme",
27
24
  "vaadin-*.d.ts",
28
25
  "vaadin-*.js",
29
26
  "web-types.json",
@@ -36,20 +33,20 @@
36
33
  "web-component"
37
34
  ],
38
35
  "dependencies": {
39
- "@vaadin/a11y-base": "25.0.0-alpha10",
40
- "@vaadin/component-base": "25.0.0-alpha10",
41
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
42
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
36
+ "@vaadin/a11y-base": "25.0.0-alpha11",
37
+ "@vaadin/component-base": "25.0.0-alpha11",
38
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha11",
43
39
  "lit": "^3.0.0"
44
40
  },
45
41
  "devDependencies": {
46
- "@vaadin/chai-plugins": "25.0.0-alpha10",
42
+ "@vaadin/chai-plugins": "25.0.0-alpha11",
47
43
  "@vaadin/testing-helpers": "^2.0.0",
44
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha11",
48
45
  "sinon": "^18.0.0"
49
46
  },
50
47
  "web-types": [
51
48
  "web-types.json",
52
49
  "web-types.lit.json"
53
50
  ],
54
- "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
51
+ "gitHead": "abfd315ba5a7484a613e0768635a4e8fe945a44b"
55
52
  }
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2025 - 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 '@vaadin/component-base/src/style-props.js';
6
+ import '@vaadin/component-base/src/styles/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const masterDetailLayoutStyles = css`
@@ -11,8 +11,8 @@ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
11
  import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
12
12
  import { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';
13
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
- import { masterDetailLayoutStyles } from './styles/vaadin-master-detail-layout-core-styles.js';
15
- import { masterDetailLayoutTransitionStyles } from './styles/vaadin-master-detail-layout-transition-core-styles.js';
14
+ import { masterDetailLayoutStyles } from './styles/vaadin-master-detail-layout-base-styles.js';
15
+ import { masterDetailLayoutTransitionStyles } from './styles/vaadin-master-detail-layout-transition-base-styles.js';
16
16
 
17
17
  /**
18
18
  * `<vaadin-master-detail-layout>` is a web component for building UIs with a master
@@ -523,8 +523,10 @@ class MasterDetailLayout extends SlotStylesMixin(ResizeMixin(ElementMixin(Themab
523
523
  * @protected
524
524
  */
525
525
  async _finishTransition() {
526
- // Detect new layout mode after DOM has been updated
527
- this.__detectLayoutMode();
526
+ // Detect new layout mode after DOM has been updated.
527
+ // The detection is wrapped in queueMicroTask in order to allow custom Lit elements to render before measurement.
528
+ // https://github.com/vaadin/web-components/issues/8969
529
+ queueMicrotask(() => this.__detectLayoutMode());
528
530
 
529
531
  if (!this.__transition) {
530
532
  return Promise.resolve();
@@ -1,3 +1,3 @@
1
- import './theme/lumo/vaadin-master-detail-layout.js';
1
+ import './src/vaadin-master-detail-layout.js';
2
2
 
3
3
  export * from './src/vaadin-master-detail-layout.js';
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/master-detail-layout",
4
- "version": "25.0.0-alpha10",
4
+ "version": "25.0.0-alpha11",
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/master-detail-layout",
4
- "version": "25.0.0-alpha10",
4
+ "version": "25.0.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2025 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import type { CSSResult } from 'lit';
7
-
8
- export const masterDetailLayoutStyles: CSSResult;
@@ -1,159 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2025 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { css } from 'lit';
7
-
8
- export const masterDetailLayoutStyles = css`
9
- /* Layout and positioning styles */
10
-
11
- :host {
12
- display: flex;
13
- box-sizing: border-box;
14
- height: 100%;
15
- max-width: 100%;
16
- max-height: 100%;
17
- position: relative; /* Keep the positioning context stable across all modes */
18
- overflow: hidden;
19
- }
20
-
21
- :host([hidden]) {
22
- display: none !important;
23
- }
24
-
25
- :host([orientation='vertical']) {
26
- flex-direction: column;
27
- }
28
-
29
- [part='_detail-internal'] {
30
- display: contents;
31
- justify-content: end;
32
- }
33
-
34
- :host([orientation='vertical']) [part='_detail-internal'] {
35
- align-items: end;
36
- }
37
-
38
- :host(:is([drawer], [stack])) [part='_detail-internal'],
39
- :host(:is([drawer], [stack])[has-detail]) [part='backdrop'] {
40
- display: flex;
41
- position: absolute;
42
- z-index: 1;
43
- inset: 0;
44
- overscroll-behavior: contain;
45
- }
46
-
47
- :host(:not([has-detail])) [part='_detail-internal'],
48
- [part='backdrop'] {
49
- display: none;
50
- }
51
-
52
- :host([orientation='horizontal'][drawer]) [part='detail'] {
53
- margin-inline-start: 50px;
54
- }
55
-
56
- :host([orientation='vertical'][drawer]) [part='detail'] {
57
- margin-top: 50px;
58
- }
59
-
60
- :host(:is([drawer], [stack])[containment='viewport']) :is([part='_detail-internal'], [part='backdrop']) {
61
- position: fixed;
62
- }
63
-
64
- /* Sizing styles */
65
-
66
- [part] {
67
- box-sizing: border-box;
68
- max-width: 100%;
69
- max-height: 100%;
70
- }
71
-
72
- /* No fixed size */
73
- :host(:not([has-master-size])) [part='master'],
74
- :host(:not([has-detail-size]):not([drawer], [stack])) [part='detail'] {
75
- flex-grow: 1;
76
- flex-basis: 50%;
77
- }
78
-
79
- /* Fixed size */
80
- :host([has-master-size]) [part='master'],
81
- :host([has-detail-size]) [part='detail'] {
82
- flex-shrink: 0;
83
- }
84
-
85
- :host([orientation='horizontal'][has-master-size][has-detail]) [part='master'] {
86
- width: var(--_master-size);
87
- }
88
-
89
- :host([orientation='vertical'][has-master-size][has-detail]) [part='master'] {
90
- height: var(--_master-size);
91
- }
92
-
93
- :host([orientation='horizontal'][has-detail-size]:not([stack])) [part='detail'] {
94
- width: var(--_detail-size);
95
- }
96
-
97
- :host([orientation='vertical'][has-detail-size]:not([stack])) [part='detail'] {
98
- height: var(--_detail-size);
99
- }
100
-
101
- :host([has-master-size][has-detail-size]) [part='master'] {
102
- flex-grow: 1;
103
- flex-basis: var(--_master-size);
104
- }
105
-
106
- :host([has-master-size][has-detail-size]:not([drawer], [stack])) [part='detail'] {
107
- flex-grow: 1;
108
- flex-basis: var(--_detail-size);
109
- }
110
-
111
- /* Min size */
112
- :host([orientation='horizontal'][has-master-min-size]) [part='master'] {
113
- min-width: min(100%, var(--_master-min-size));
114
- }
115
-
116
- :host([orientation='vertical'][has-master-min-size]) [part='master'] {
117
- min-height: min(100%, var(--_master-min-size));
118
- }
119
-
120
- :host([orientation='horizontal'][has-detail-min-size]) [part='detail'] {
121
- min-width: min(100%, var(--_detail-min-size));
122
- }
123
-
124
- :host([orientation='vertical'][has-detail-min-size]) [part='detail'] {
125
- min-height: min(100%, var(--_detail-min-size));
126
- }
127
-
128
- :host([drawer]) [part='master'],
129
- :host([stack]) [part] {
130
- width: 100% !important;
131
- height: 100% !important;
132
- min-width: auto !important;
133
- min-height: auto !important;
134
- max-width: 100% !important;
135
- max-height: 100% !important;
136
- }
137
-
138
- /* Decorative/visual styles */
139
-
140
- [part='backdrop'] {
141
- background-color: rgba(0, 0, 0, 0.2);
142
- }
143
-
144
- [part='detail'] {
145
- background: #fff;
146
- }
147
-
148
- :host(:is([drawer], [stack])) [part='detail'] {
149
- box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
150
- }
151
-
152
- :host([orientation='horizontal']:not([drawer], [stack])) [part='detail'] {
153
- border-inline-start: 1px solid rgba(0, 0, 0, 0.1);
154
- }
155
-
156
- :host([orientation='vertical']:not([drawer], [stack])) [part='detail'] {
157
- border-top: 1px solid rgba(0, 0, 0, 0.1);
158
- }
159
- `;
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2025 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import type { CSSResult } from 'lit';
7
-
8
- export const masterDetailLayoutTransitionStyles: CSSResult;
@@ -1,140 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2025 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { css } from 'lit';
7
-
8
- export const masterDetailLayoutTransitionStyles = css`
9
- @media (prefers-reduced-motion: no-preference) {
10
- html {
11
- --_vaadin-mdl-dir-multiplier: 1;
12
- --_vaadin-mdl-stack-master-offset: 20%;
13
- --_vaadin-mdl-stack-master-clip-path: inset(0 0 0 var(--_vaadin-mdl-stack-master-offset));
14
- --_vaadin-mdl-easing: cubic-bezier(0.78, 0, 0.22, 1);
15
- }
16
-
17
- html[dir='rtl'] {
18
- --_vaadin-mdl-dir-multiplier: -1;
19
- --_vaadin-mdl-stack-master-clip-path: inset(0 var(--_vaadin-mdl-stack-master-offset) 0 0);
20
- }
21
-
22
- ::view-transition-group(vaadin-mdl-backdrop),
23
- ::view-transition-group(vaadin-mdl-master),
24
- ::view-transition-group(vaadin-mdl-detail) {
25
- animation-duration: 0.4s;
26
- }
27
-
28
- ::view-transition-group(vaadin-mdl-master),
29
- ::view-transition-group(vaadin-mdl-detail) {
30
- animation-timing-function: var(--_vaadin-mdl-easing);
31
- }
32
-
33
- ::view-transition-image-pair(vaadin-mdl-master),
34
- ::view-transition-image-pair(vaadin-mdl-detail),
35
- ::view-transition-new(vaadin-mdl-master),
36
- ::view-transition-new(vaadin-mdl-detail),
37
- ::view-transition-old(vaadin-mdl-master),
38
- ::view-transition-old(vaadin-mdl-detail) {
39
- animation-timing-function: inherit;
40
- }
41
-
42
- /* Needed to promote the backdrop on top the master during the transition */
43
- vaadin-master-detail-layout[transition]::part(backdrop) {
44
- view-transition-name: vaadin-mdl-backdrop;
45
- }
46
-
47
- vaadin-master-detail-layout[transition]:not([transition='replace']):not([drawer], [stack])::part(detail),
48
- vaadin-master-detail-layout[transition]:is([drawer], [stack])::part(_detail-internal) {
49
- view-transition-name: vaadin-mdl-detail;
50
- }
51
-
52
- ::view-transition-group(vaadin-mdl-detail) {
53
- clip-path: inset(0);
54
- }
55
-
56
- ::view-transition-new(vaadin-mdl-detail),
57
- ::view-transition-old(vaadin-mdl-detail) {
58
- animation-name: vaadin-mdl-detail-slide-in;
59
- }
60
-
61
- ::view-transition-old(vaadin-mdl-detail) {
62
- animation-direction: reverse;
63
- }
64
-
65
- @keyframes vaadin-mdl-detail-slide-in {
66
- 0% {
67
- translate: calc((100% + 30px) * var(--_vaadin-mdl-dir-multiplier));
68
- }
69
- }
70
-
71
- vaadin-master-detail-layout[orientation='horizontal'][stack][has-detail]::part(master) {
72
- translate: calc(var(--_vaadin-mdl-stack-master-offset) * var(--_vaadin-mdl-dir-multiplier) * -1);
73
- opacity: 0;
74
- }
75
-
76
- vaadin-master-detail-layout[transition]::part(master) {
77
- view-transition-name: vaadin-mdl-master;
78
- }
79
-
80
- vaadin-master-detail-layout[orientation='horizontal'][stack][transition='add']::part(master) {
81
- view-transition-class: stack-add;
82
- }
83
-
84
- vaadin-master-detail-layout[orientation='horizontal'][stack][transition='remove']::part(master) {
85
- view-transition-class: stack-remove;
86
- }
87
-
88
- ::view-transition-new(vaadin-mdl-master),
89
- ::view-transition-old(vaadin-mdl-master) {
90
- object-fit: none;
91
- object-position: max(0%, var(--_vaadin-mdl-dir-multiplier) * -100%) 0;
92
- }
93
-
94
- ::view-transition-new(vaadin-mdl-master.stack-remove),
95
- ::view-transition-old(vaadin-mdl-master.stack-remove) {
96
- animation-name: vaadin-mdl-master-stack-remove;
97
- clip-path: var(--_vaadin-mdl-stack-master-clip-path);
98
- }
99
-
100
- @keyframes vaadin-mdl-master-stack-remove {
101
- 100% {
102
- clip-path: inset(0);
103
- }
104
- }
105
-
106
- ::view-transition-new(vaadin-mdl-master.stack-add),
107
- ::view-transition-old(vaadin-mdl-master.stack-add) {
108
- animation-name: vaadin-mdl-master-stack-add;
109
- clip-path: inset(0);
110
- }
111
-
112
- @keyframes vaadin-mdl-master-stack-add {
113
- 100% {
114
- clip-path: var(--_vaadin-mdl-stack-master-clip-path);
115
- }
116
- }
117
-
118
- /* prettier-ignore */
119
- vaadin-master-detail-layout[orientation='vertical']:not([drawer], [stack])[transition]:not([transition='replace'])::part(detail),
120
- vaadin-master-detail-layout[orientation='vertical']:is([drawer], [stack])[transition]::part(_detail-internal) {
121
- view-transition-name: vaadin-mdl-detail;
122
- view-transition-class: vertical;
123
- }
124
-
125
- ::view-transition-new(vaadin-mdl-detail.vertical),
126
- ::view-transition-old(vaadin-mdl-detail.vertical) {
127
- animation-name: vaadin-mdl-vertical-detail-slide-in;
128
- }
129
-
130
- ::view-transition-old(vaadin-mdl-detail.vertical) {
131
- animation-direction: reverse;
132
- }
133
-
134
- @keyframes vaadin-mdl-vertical-detail-slide-in {
135
- 0% {
136
- transform: translateY(calc(100% + 30px));
137
- }
138
- }
139
- }
140
- `;
@@ -1,2 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/style.js';
@@ -1,24 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/style.js';
3
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
4
-
5
- registerStyles(
6
- 'vaadin-master-detail-layout',
7
- css`
8
- :host(:is([drawer], [stack])) [part='detail'] {
9
- background-color: var(--lumo-base-color);
10
- box-shadow:
11
- 0 0 0 1px var(--lumo-shade-5pct),
12
- var(--lumo-box-shadow-m);
13
- }
14
-
15
- [part='detail'] {
16
- border-color: var(--lumo-contrast-10pct);
17
- }
18
-
19
- [part='backdrop'] {
20
- background-color: var(--lumo-shade-20pct);
21
- }
22
- `,
23
- { moduleId: 'lumo-master-detail-layout' },
24
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-master-detail-layout-styles.js';
2
- import '../../src/vaadin-master-detail-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-master-detail-layout-styles.js';
2
- import '../../src/vaadin-master-detail-layout.js';