@vaadin/master-detail-layout 25.1.0-rc1 → 25.2.0-alpha1

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.
@@ -23,29 +23,9 @@
23
23
  "declarations": [
24
24
  {
25
25
  "kind": "class",
26
- "description": "`<vaadin-master-detail-layout>` is a web component for building UIs with a master\n(or primary) area and a detail (or secondary) area that is displayed next to, or\noverlaid on top of, the master area, depending on configuration and viewport size.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------|----------------------\n`backdrop` | Backdrop covering the master area in the drawer mode\n`master` | The master area\n`detail` | The detail area\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------| -----------\n`containment` | Set to `layout` or `viewport` depending on the containment.\n`orientation` | Set to `horizontal` or `vertical` depending on the orientation.\n`has-detail` | Set when the detail content is provided.\n`drawer` | Set when the layout is using the drawer mode.\n`stack` | Set when the layout is using the stack mode.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:----------------------------------------------------|\n| `--vaadin-master-detail-layout-border-color` |\n| `--vaadin-master-detail-layout-border-width` |\n| `--vaadin-master-detail-layout-detail-background` |\n| `--vaadin-master-detail-layout-detail-shadow` |\n| `--vaadin-overlay-backdrop-background` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
26
+ "description": "`<vaadin-master-detail-layout>` is a web component for building UIs with a master\n(or primary) area and a detail (or secondary) area that is displayed next to, or\noverlaid on top of, the master area, depending on configuration and viewport size.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------|----------------------\n`backdrop` | Backdrop covering the master area in the overlay mode\n`master` | The master area\n`detail` | The detail area\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n----------------------|----------------------\n`expand` | Set to `master`, `detail`, or `both`.\n`orientation` | Set to `horizontal` or `vertical` depending on the orientation.\n`has-detail` | Set when the detail content is provided and visible.\n`overflow` | Set when columns don't fit and the detail is shown as an overlay.\n`overlay-containment` | Set to `layout` or `viewport`.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:----------------------------------------------------|\n| `--vaadin-master-detail-layout-border-color` |\n| `--vaadin-master-detail-layout-border-width` |\n| `--vaadin-master-detail-layout-detail-background` |\n| `--vaadin-master-detail-layout-detail-shadow` |\n| `--vaadin-overlay-backdrop-background` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
27
27
  "name": "MasterDetailLayout",
28
28
  "members": [
29
- {
30
- "kind": "field",
31
- "name": "containment",
32
- "privacy": "public",
33
- "type": {
34
- "text": "string"
35
- },
36
- "description": "Defines the containment of the detail area when the layout is in\noverlay mode. When set to `layout`, the overlay is confined to the\nlayout. When set to `viewport`, the overlay is confined to the\nbrowser's viewport. Defaults to `layout`.",
37
- "attribute": "containment"
38
- },
39
- {
40
- "kind": "field",
41
- "name": "detailMinSize",
42
- "privacy": "public",
43
- "type": {
44
- "text": "string"
45
- },
46
- "description": "Minimum size (in CSS length units) to be set on the detail area.\nWhen specified, it prevents the detail area from shrinking below\nthis size. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
47
- "attribute": "detail-min-size"
48
- },
49
29
  {
50
30
  "kind": "field",
51
31
  "name": "detailSize",
@@ -53,28 +33,18 @@
53
33
  "type": {
54
34
  "text": "string"
55
35
  },
56
- "description": "Fixed size (in CSS length units) to be set on the detail area.\nWhen specified, it prevents the detail area from growing or\nshrinking. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
36
+ "description": "Size (in CSS length units) to be set on the detail area in\nthe CSS grid layout. If there is not enough space to show\nmaster and detail areas next to each other, the detail area\nis shown as an overlay. Defaults to 15em.",
57
37
  "attribute": "detail-size"
58
38
  },
59
39
  {
60
40
  "kind": "field",
61
- "name": "forceOverlay",
62
- "privacy": "public",
63
- "type": {
64
- "text": "boolean"
65
- },
66
- "description": "When specified, forces the details to be shown as an overlay\n(either as drawer or stack), even if there is enough space for\nmaster and detail to be shown next to each other using the default\n(split) mode.\n\nIn order to enforce the stack mode, use this property together with\n`stackOverlay` property and set both to `true`.",
67
- "attribute": "force-overlay"
68
- },
69
- {
70
- "kind": "field",
71
- "name": "masterMinSize",
41
+ "name": "expand",
72
42
  "privacy": "public",
73
43
  "type": {
74
44
  "text": "string"
75
45
  },
76
- "description": "Minimum size (in CSS length units) to be set on the master area.\nWhen specified, it prevents the master area from shrinking below\nthis size. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
77
- "attribute": "master-min-size"
46
+ "description": "Controls which column(s) expand to fill available space.\nPossible values: `'master'`, `'detail'`, `'both'`.\nDefaults to `'both'`.",
47
+ "attribute": "expand"
78
48
  },
79
49
  {
80
50
  "kind": "field",
@@ -83,7 +53,7 @@
83
53
  "type": {
84
54
  "text": "string"
85
55
  },
86
- "description": "Fixed size (in CSS length units) to be set on the master area.\nWhen specified, it prevents the master area from growing or\nshrinking. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
56
+ "description": "Size (in CSS length units) to be set on the master area in\nthe CSS grid layout. If there is not enough space to show\nmaster and detail areas next to each other, the detail area\nis shown as an overlay. Defaults to 30em.",
87
57
  "attribute": "master-size"
88
58
  },
89
59
  {
@@ -108,18 +78,33 @@
108
78
  },
109
79
  {
110
80
  "kind": "field",
111
- "name": "slotStyles",
112
- "readonly": true
81
+ "name": "overlayContainment",
82
+ "privacy": "public",
83
+ "type": {
84
+ "text": "string"
85
+ },
86
+ "description": "Defines the containment of the detail area when the layout is in\noverlay mode. When set to `layout`, the overlay is confined to the\nlayout. When set to `viewport`, the overlay is confined to the\nbrowser's viewport. Defaults to `layout`.",
87
+ "attribute": "overlay-containment"
113
88
  },
114
89
  {
115
90
  "kind": "field",
116
- "name": "stackOverlay",
91
+ "name": "overlaySize",
117
92
  "privacy": "public",
118
93
  "type": {
119
- "text": "boolean"
94
+ "text": "string"
120
95
  },
121
- "description": "When true, the layout in the overlay mode is rendered as a stack,\nmaking detail area fully cover the master area. Otherwise, it is\nrendered as a drawer and has a visual backdrop.\n\nIn order to enforce the stack mode, use this property together with\n`forceOverlay` property and set both to `true`.",
122
- "attribute": "stack-overlay"
96
+ "description": "Size (in CSS length units) for the detail area when shown as an\noverlay. When not set, falls back to `detailSize`. Set to `100%`\nto make the detail cover the full layout.",
97
+ "attribute": "overlay-size"
98
+ },
99
+ {
100
+ "kind": "field",
101
+ "name": "slotStyles",
102
+ "return": {
103
+ "type": {
104
+ "text": "!Array<!CSSResult>"
105
+ }
106
+ },
107
+ "readonly": true
123
108
  }
124
109
  ],
125
110
  "events": [
@@ -128,7 +113,7 @@
128
113
  "type": {
129
114
  "text": "CustomEvent"
130
115
  },
131
- "description": "Fired when the user clicks the backdrop in the drawer mode."
116
+ "description": "Fired when the user clicks the backdrop in the overlay mode."
132
117
  },
133
118
  {
134
119
  "name": "detail-escape-press",
@@ -139,52 +124,28 @@
139
124
  }
140
125
  ],
141
126
  "attributes": [
142
- {
143
- "name": "containment",
144
- "type": {
145
- "text": "string"
146
- },
147
- "description": "Defines the containment of the detail area when the layout is in\noverlay mode. When set to `layout`, the overlay is confined to the\nlayout. When set to `viewport`, the overlay is confined to the\nbrowser's viewport. Defaults to `layout`.",
148
- "fieldName": "containment"
149
- },
150
- {
151
- "name": "detail-min-size",
152
- "type": {
153
- "text": "string"
154
- },
155
- "description": "Minimum size (in CSS length units) to be set on the detail area.\nWhen specified, it prevents the detail area from shrinking below\nthis size. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
156
- "fieldName": "detailMinSize"
157
- },
158
127
  {
159
128
  "name": "detail-size",
160
129
  "type": {
161
130
  "text": "string"
162
131
  },
163
- "description": "Fixed size (in CSS length units) to be set on the detail area.\nWhen specified, it prevents the detail area from growing or\nshrinking. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
132
+ "description": "Size (in CSS length units) to be set on the detail area in\nthe CSS grid layout. If there is not enough space to show\nmaster and detail areas next to each other, the detail area\nis shown as an overlay. Defaults to 15em.",
164
133
  "fieldName": "detailSize"
165
134
  },
166
135
  {
167
- "name": "force-overlay",
168
- "type": {
169
- "text": "boolean"
170
- },
171
- "description": "When specified, forces the details to be shown as an overlay\n(either as drawer or stack), even if there is enough space for\nmaster and detail to be shown next to each other using the default\n(split) mode.\n\nIn order to enforce the stack mode, use this property together with\n`stackOverlay` property and set both to `true`.",
172
- "fieldName": "forceOverlay"
173
- },
174
- {
175
- "name": "master-min-size",
136
+ "name": "expand",
176
137
  "type": {
177
138
  "text": "string"
178
139
  },
179
- "description": "Minimum size (in CSS length units) to be set on the master area.\nWhen specified, it prevents the master area from shrinking below\nthis size. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
180
- "fieldName": "masterMinSize"
140
+ "description": "Controls which column(s) expand to fill available space.\nPossible values: `'master'`, `'detail'`, `'both'`.\nDefaults to `'both'`.",
141
+ "fieldName": "expand"
181
142
  },
182
143
  {
183
144
  "name": "master-size",
184
145
  "type": {
185
146
  "text": "string"
186
147
  },
187
- "description": "Fixed size (in CSS length units) to be set on the master area.\nWhen specified, it prevents the master area from growing or\nshrinking. If there is not enough space to show master and detail\nareas next to each other, the details are shown as an overlay:\neither as drawer or stack, depending on the `stackOverlay` property.",
148
+ "description": "Size (in CSS length units) to be set on the master area in\nthe CSS grid layout. If there is not enough space to show\nmaster and detail areas next to each other, the detail area\nis shown as an overlay. Defaults to 30em.",
188
149
  "fieldName": "masterSize"
189
150
  },
190
151
  {
@@ -204,12 +165,20 @@
204
165
  "fieldName": "orientation"
205
166
  },
206
167
  {
207
- "name": "stack-overlay",
168
+ "name": "overlay-containment",
208
169
  "type": {
209
- "text": "boolean"
170
+ "text": "string"
210
171
  },
211
- "description": "When true, the layout in the overlay mode is rendered as a stack,\nmaking detail area fully cover the master area. Otherwise, it is\nrendered as a drawer and has a visual backdrop.\n\nIn order to enforce the stack mode, use this property together with\n`forceOverlay` property and set both to `true`.",
212
- "fieldName": "stackOverlay"
172
+ "description": "Defines the containment of the detail area when the layout is in\noverlay mode. When set to `layout`, the overlay is confined to the\nlayout. When set to `viewport`, the overlay is confined to the\nbrowser's viewport. Defaults to `layout`.",
173
+ "fieldName": "overlayContainment"
174
+ },
175
+ {
176
+ "name": "overlay-size",
177
+ "type": {
178
+ "text": "string"
179
+ },
180
+ "description": "Size (in CSS length units) for the detail area when shown as an\noverlay. When not set, falls back to `detailSize`. Set to `100%`\nto make the detail cover the full layout.",
181
+ "fieldName": "overlaySize"
213
182
  }
214
183
  ],
215
184
  "mixins": [
@@ -217,10 +186,6 @@
217
186
  "name": "SlotStylesMixin",
218
187
  "package": "@vaadin/component-base/src/slot-styles-mixin.js"
219
188
  },
220
- {
221
- "name": "ResizeMixin",
222
- "package": "@vaadin/component-base/src/resize-mixin.js"
223
- },
224
189
  {
225
190
  "name": "ElementMixin",
226
191
  "package": "@vaadin/component-base/src/element-mixin.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/master-detail-layout",
3
- "version": "25.1.0-rc1",
3
+ "version": "25.2.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,16 +34,16 @@
34
34
  "web-component"
35
35
  ],
36
36
  "dependencies": {
37
- "@vaadin/a11y-base": "25.1.0-rc1",
38
- "@vaadin/component-base": "25.1.0-rc1",
39
- "@vaadin/vaadin-themable-mixin": "25.1.0-rc1",
37
+ "@vaadin/a11y-base": "25.2.0-alpha1",
38
+ "@vaadin/component-base": "25.2.0-alpha1",
39
+ "@vaadin/vaadin-themable-mixin": "25.2.0-alpha1",
40
40
  "lit": "^3.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@vaadin/aura": "25.1.0-rc1",
44
- "@vaadin/chai-plugins": "25.1.0-rc1",
43
+ "@vaadin/aura": "25.2.0-alpha1",
44
+ "@vaadin/chai-plugins": "25.2.0-alpha1",
45
45
  "@vaadin/testing-helpers": "^2.0.0",
46
- "@vaadin/vaadin-lumo-styles": "25.1.0-rc1",
46
+ "@vaadin/vaadin-lumo-styles": "25.2.0-alpha1",
47
47
  "sinon": "^21.0.2"
48
48
  },
49
49
  "customElements": "custom-elements.json",
@@ -51,5 +51,5 @@
51
51
  "web-types.json",
52
52
  "web-types.lit.json"
53
53
  ],
54
- "gitHead": "e440d69bd4034d7ab5faedbad8131515551befb0"
54
+ "gitHead": "866f813f89655a351cbd25328eba1fcb317e267d"
55
55
  }
@@ -7,17 +7,20 @@ import '@vaadin/component-base/src/styles/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const masterDetailLayoutStyles = css`
10
- /* Layout and positioning styles */
11
-
12
10
  :host {
13
- display: flex;
11
+ --_master-size: 30em;
12
+ --_detail-size: 15em;
13
+ --_master-column: var(--_master-size) 0;
14
+ --_detail-column: var(--_detail-size) 0;
15
+
16
+ display: grid;
14
17
  box-sizing: border-box;
15
18
  height: 100%;
16
- max-width: 100%;
17
- max-height: 100%;
18
- position: relative; /* Keep the positioning context stable across all modes */
19
- z-index: 0; /* Create a new stacking context, don't let "layout contained" detail element stack outside it */
19
+ position: relative;
20
+ z-index: 0;
20
21
  overflow: hidden;
22
+ grid-template-columns: [master-start] var(--_master-column) [detail-start] var(--_detail-column) [detail-end];
23
+ grid-template-rows: 100%;
21
24
  }
22
25
 
23
26
  :host([hidden]) {
@@ -25,171 +28,104 @@ export const masterDetailLayoutStyles = css`
25
28
  }
26
29
 
27
30
  :host([orientation='vertical']) {
28
- flex-direction: column;
29
- }
30
-
31
- [part='_detail-internal'] {
32
- display: contents;
33
- justify-content: end;
34
- /* Disable pointer events for the detail wrapper to allow clicks to pass through to the backdrop */
35
- pointer-events: none;
36
- }
37
-
38
- [part='detail'] {
39
- /* Re-enable pointer events for the actual detail content */
40
- pointer-events: auto;
41
- }
42
-
43
- :host([orientation='vertical']) [part='_detail-internal'] {
44
- align-items: end;
45
- }
46
-
47
- :host(:is([drawer], [stack])) [part='_detail-internal'],
48
- :host(:is([drawer], [stack])[has-detail]) [part='backdrop'] {
49
- display: flex;
50
- position: absolute;
51
- z-index: 1;
52
- inset: 0;
53
- overscroll-behavior: contain;
54
- }
55
-
56
- :host(:not([has-detail])) [part='_detail-internal'],
57
- [part='backdrop'] {
58
- display: none;
59
- }
60
-
61
- :host([orientation='horizontal'][drawer]) [part='detail'] {
62
- margin-inline-start: 50px;
63
- }
64
-
65
- :host([orientation='vertical'][drawer]) [part='detail'] {
66
- margin-top: 50px;
67
- }
68
-
69
- :host(:is([drawer], [stack])[containment='viewport']) :is([part='_detail-internal'], [part='backdrop']) {
70
- position: fixed;
31
+ grid-template-columns: 100%;
32
+ grid-template-rows: [master-start] var(--_master-column) [detail-start] var(--_detail-column) [detail-end];
71
33
  }
72
34
 
73
- :host(:is([drawer], [stack])[containment='viewport']) [part='detail'] {
74
- padding-top: var(--safe-area-inset-top);
75
- padding-bottom: var(--safe-area-inset-bottom);
76
- }
77
-
78
- :host([containment='viewport']:dir(ltr)) [part='detail'] {
79
- padding-right: var(--safe-area-inset-right);
80
- }
81
-
82
- :host([containment='viewport']:dir(rtl)) [part='detail'] {
83
- padding-left: var(--safe-area-inset-left);
84
- }
85
-
86
- :host([stack][containment='viewport']) [part='detail'] {
87
- padding-left: var(--safe-area-inset-left);
88
- padding-right: var(--safe-area-inset-right);
89
- }
90
-
91
- /* Sizing styles */
92
-
93
- [part] {
35
+ [part~='master'],
36
+ [part~='detail'] {
94
37
  box-sizing: border-box;
95
- max-width: 100%;
96
- max-height: 100%;
97
- }
98
-
99
- /* No fixed size */
100
- :host(:not([has-master-size])) [part='master'],
101
- :host(:not([has-detail-size]):not([drawer], [stack])) [part='detail'] {
102
- flex-grow: 1;
103
- flex-basis: 50%;
104
38
  }
105
39
 
106
- /* Fixed size */
107
- :host([has-master-size]) [part='master'],
108
- :host([has-detail-size]) [part='detail'] {
109
- flex-shrink: 0;
40
+ [part~='master'] {
41
+ grid-column: master-start / detail-start;
110
42
  }
111
43
 
112
- :host([orientation='horizontal'][has-master-size][has-detail]) [part='master'] {
113
- width: var(--_master-size);
44
+ [part~='detail'] {
45
+ grid-column: detail-start / detail-end;
114
46
  }
115
47
 
116
- :host([orientation='vertical'][has-master-size][has-detail]) [part='master'] {
117
- height: var(--_master-size);
48
+ :host([orientation='vertical']) [part~='master'] {
49
+ grid-column: auto;
50
+ grid-row: master-start / detail-start;
118
51
  }
119
52
 
120
- :host([orientation='horizontal'][has-detail-size]:not([stack])) [part='detail'] {
121
- width: var(--_detail-size);
53
+ :host([orientation='vertical']) [part~='detail'] {
54
+ grid-column: auto;
55
+ grid-row: detail-start / detail-end;
122
56
  }
123
57
 
124
- :host([orientation='vertical'][has-detail-size]:not([stack])) [part='detail'] {
125
- height: var(--_detail-size);
126
- }
127
-
128
- :host([has-master-size][has-detail-size]) [part='master'] {
129
- flex-grow: 1;
130
- flex-basis: var(--_master-size);
58
+ [part~='backdrop'] {
59
+ position: absolute;
60
+ inset: 0;
61
+ z-index: 1;
62
+ display: none;
63
+ background: var(--vaadin-overlay-backdrop-background, rgba(0, 0, 0, 0.2));
64
+ forced-color-adjust: none;
131
65
  }
132
66
 
133
- :host([has-master-size][has-detail-size]:not([drawer], [stack])) [part='detail'] {
134
- flex-grow: 1;
135
- flex-basis: var(--_detail-size);
67
+ :host([expand='both']),
68
+ :host([expand='master']) {
69
+ --_master-column: var(--_master-size) 1fr;
136
70
  }
137
71
 
138
- /* Min size */
139
- :host([orientation='horizontal'][has-master-min-size]) [part='master'] {
140
- min-width: min(100%, var(--_master-min-size));
72
+ :host(:not([has-detail])),
73
+ :host([keep-detail-column-offscreen]) {
74
+ --_master-column: var(--_master-size) calc(100% - var(--_master-size));
141
75
  }
142
76
 
143
- :host([orientation='vertical'][has-master-min-size]) [part='master'] {
144
- min-height: min(100%, var(--_master-min-size));
77
+ :host([expand='both']),
78
+ :host([expand='detail']) {
79
+ --_detail-column: var(--_detail-size) 1fr;
145
80
  }
146
81
 
147
- :host([orientation='horizontal'][has-detail-min-size]) [part='detail'] {
148
- min-width: min(100%, var(--_detail-min-size));
82
+ :host([orientation='horizontal'][has-detail]:not([overflow])) [part~='detail'] {
83
+ border-inline-start: var(--vaadin-master-detail-layout-border-width, 1px) solid
84
+ var(--vaadin-master-detail-layout-border-color, var(--vaadin-border-color-secondary));
149
85
  }
150
86
 
151
- :host([orientation='vertical'][has-detail-min-size]) [part='detail'] {
152
- min-height: min(100%, var(--_detail-min-size));
87
+ :host([orientation='vertical'][has-detail]:not([overflow])) [part~='detail'] {
88
+ border-top: var(--vaadin-master-detail-layout-border-width, 1px) solid
89
+ var(--vaadin-master-detail-layout-border-color, var(--vaadin-border-color-secondary));
153
90
  }
154
91
 
155
- :host([drawer]) [part='master'],
156
- :host([stack]) [part] {
157
- width: 100% !important;
158
- height: 100% !important;
159
- min-width: auto !important;
160
- min-height: auto !important;
161
- max-width: 100% !important;
162
- max-height: 100% !important;
92
+ :host([overflow]) [part~='detail'] {
93
+ position: absolute;
94
+ z-index: 2;
95
+ background: var(--vaadin-master-detail-layout-detail-background, var(--vaadin-background-color));
96
+ box-shadow: var(--vaadin-master-detail-layout-detail-shadow, 0 0 20px 0 rgba(0, 0, 0, 0.3));
97
+ grid-column: none;
163
98
  }
164
99
 
165
- /* Decorative/visual styles */
166
-
167
- [part='backdrop'] {
168
- background: var(--vaadin-overlay-backdrop-background, rgba(0, 0, 0, 0.2));
169
- forced-color-adjust: none;
100
+ :host([overflow]) [part~='backdrop'] {
101
+ display: block;
170
102
  }
171
103
 
172
- :host(:is([drawer], [stack])) [part='detail'] {
173
- background: var(--vaadin-master-detail-layout-detail-background, var(--vaadin-background-color));
174
- box-shadow: var(--vaadin-master-detail-layout-detail-shadow, 0 0 20px 0 rgba(0, 0, 0, 0.3));
104
+ :host([overflow]:not([orientation='vertical'])) [part~='detail'] {
105
+ inset-block: 0;
106
+ width: var(--_overlay-size, var(--_detail-size, min-content));
107
+ inset-inline-end: 0;
175
108
  }
176
109
 
177
- :host([orientation='horizontal']:not([drawer], [stack])) [part='detail'] {
178
- border-inline-start: var(--vaadin-master-detail-layout-border-width, 1px) solid
179
- var(--vaadin-master-detail-layout-border-color, var(--vaadin-border-color-secondary));
110
+ :host([overflow][orientation='vertical']) [part~='detail'] {
111
+ grid-column: auto;
112
+ grid-row: none;
113
+ inset-inline: 0;
114
+ height: var(--_overlay-size, var(--_detail-size, min-content));
115
+ inset-block-end: 0;
180
116
  }
181
117
 
182
- :host([orientation='vertical']:not([drawer], [stack])) [part='detail'] {
183
- border-top: var(--vaadin-master-detail-layout-border-width, 1px) solid
184
- var(--vaadin-master-detail-layout-border-color, var(--vaadin-border-color-secondary));
118
+ :host([overflow][overlay-containment='viewport']) [part~='detail'],
119
+ :host([overflow][overlay-containment='viewport']) [part~='backdrop'] {
120
+ position: fixed;
185
121
  }
186
122
 
187
123
  @media (forced-colors: active) {
188
- :host(:is([drawer], [stack])) [part='detail'] {
124
+ :host([overflow]) [part~='detail'] {
189
125
  outline: 3px solid !important;
190
126
  }
191
127
 
192
- [part='detail'] {
128
+ [part~='detail'] {
193
129
  background: Canvas !important;
194
130
  }
195
131
  }
@@ -9,14 +9,11 @@ export const masterDetailLayoutTransitionStyles = css`
9
9
  @media (prefers-reduced-motion: no-preference) {
10
10
  html {
11
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
12
  --_vaadin-mdl-easing: cubic-bezier(0.78, 0, 0.22, 1);
15
13
  }
16
14
 
17
15
  html[dir='rtl'] {
18
16
  --_vaadin-mdl-dir-multiplier: -1;
19
- --_vaadin-mdl-stack-master-clip-path: inset(0 var(--_vaadin-mdl-stack-master-offset) 0 0);
20
17
  }
21
18
 
22
19
  ::view-transition-group(vaadin-mdl-backdrop),
@@ -44,8 +41,8 @@ export const masterDetailLayoutTransitionStyles = css`
44
41
  view-transition-name: vaadin-mdl-backdrop;
45
42
  }
46
43
 
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) {
44
+ vaadin-master-detail-layout[transition][has-detail]:not([transition='replace']):not([overflow])::part(detail),
45
+ vaadin-master-detail-layout[transition][has-detail][overflow]::part(detail) {
49
46
  view-transition-name: vaadin-mdl-detail;
50
47
  }
51
48
 
@@ -68,23 +65,10 @@ export const masterDetailLayoutTransitionStyles = css`
68
65
  }
69
66
  }
70
67
 
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
68
  vaadin-master-detail-layout[transition]::part(master) {
77
69
  view-transition-name: vaadin-mdl-master;
78
70
  }
79
71
 
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
72
  ::view-transition-new(vaadin-mdl-master),
89
73
  ::view-transition-old(vaadin-mdl-master) {
90
74
  object-fit: none;
@@ -98,33 +82,9 @@ export const masterDetailLayoutTransitionStyles = css`
98
82
  object-position: 100% 0;
99
83
  }
100
84
 
101
- ::view-transition-new(vaadin-mdl-master.stack-remove),
102
- ::view-transition-old(vaadin-mdl-master.stack-remove) {
103
- animation-name: vaadin-mdl-master-stack-remove;
104
- clip-path: var(--_vaadin-mdl-stack-master-clip-path);
105
- }
106
-
107
- @keyframes vaadin-mdl-master-stack-remove {
108
- 100% {
109
- clip-path: inset(0);
110
- }
111
- }
112
-
113
- ::view-transition-new(vaadin-mdl-master.stack-add),
114
- ::view-transition-old(vaadin-mdl-master.stack-add) {
115
- animation-name: vaadin-mdl-master-stack-add;
116
- clip-path: inset(0);
117
- }
118
-
119
- @keyframes vaadin-mdl-master-stack-add {
120
- 100% {
121
- clip-path: var(--_vaadin-mdl-stack-master-clip-path);
122
- }
123
- }
124
-
125
85
  /* prettier-ignore */
126
- vaadin-master-detail-layout[orientation='vertical']:not([drawer], [stack])[transition]:not([transition='replace'])::part(detail),
127
- vaadin-master-detail-layout[orientation='vertical']:is([drawer], [stack])[transition]::part(_detail-internal) {
86
+ vaadin-master-detail-layout[orientation='vertical'][has-detail]:not([overflow])[transition]:not([transition='replace'])::part(detail),
87
+ vaadin-master-detail-layout[orientation='vertical'][has-detail][overflow][transition]::part(detail) {
128
88
  view-transition-name: vaadin-mdl-detail;
129
89
  view-transition-class: vertical;
130
90
  }