@vaadin/master-detail-layout 24.8.0-alpha4 → 24.8.0-alpha5

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": "24.8.0-alpha4",
3
+ "version": "24.8.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,15 +34,15 @@
34
34
  "web-component"
35
35
  ],
36
36
  "dependencies": {
37
- "@vaadin/a11y-base": "24.8.0-alpha4",
38
- "@vaadin/component-base": "24.8.0-alpha4",
39
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha4",
40
- "@vaadin/vaadin-material-styles": "24.8.0-alpha4",
41
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha4",
37
+ "@vaadin/a11y-base": "24.8.0-alpha5",
38
+ "@vaadin/component-base": "24.8.0-alpha5",
39
+ "@vaadin/vaadin-lumo-styles": "24.8.0-alpha5",
40
+ "@vaadin/vaadin-material-styles": "24.8.0-alpha5",
41
+ "@vaadin/vaadin-themable-mixin": "24.8.0-alpha5",
42
42
  "lit": "^3.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@vaadin/chai-plugins": "24.8.0-alpha4",
45
+ "@vaadin/chai-plugins": "24.8.0-alpha5",
46
46
  "@vaadin/testing-helpers": "^1.1.0",
47
47
  "sinon": "^18.0.0"
48
48
  },
@@ -50,5 +50,5 @@
50
50
  "web-types.json",
51
51
  "web-types.lit.json"
52
52
  ],
53
- "gitHead": "88251b4c84ebb8849dde982acb62cc2b20eeec31"
53
+ "gitHead": "3bb64b9ad9b00ac3adb94eb1bedd81b0f4ae574e"
54
54
  }
@@ -109,4 +109,108 @@ export const transitionStyles = css`
109
109
  opacity: 0;
110
110
  }
111
111
  }
112
+
113
+ /* Overlay - vertical - add */
114
+
115
+ vaadin-master-detail-layout[overlay][orientation='vertical'][transition='add']::part(detail) {
116
+ view-transition-name: vaadin-master-detail-layout-overlay-vertical-detail-add;
117
+ }
118
+
119
+ ::view-transition-group(vaadin-master-detail-layout-overlay-vertical-detail-add) {
120
+ clip-path: inset(0);
121
+ }
122
+
123
+ ::view-transition-new(vaadin-master-detail-layout-overlay-vertical-detail-add) {
124
+ animation: 300ms ease both vaadin-master-detail-layout-overlay-vertical-detail-add;
125
+ }
126
+
127
+ @keyframes vaadin-master-detail-layout-overlay-vertical-detail-add {
128
+ from {
129
+ transform: translateY(100%);
130
+ }
131
+ }
132
+
133
+ /* Overlay - vertical - remove */
134
+
135
+ vaadin-master-detail-layout[overlay][orientation='vertical'][transition='remove']::part(detail) {
136
+ view-transition-name: vaadin-master-detail-layout-overlay-vertical-detail-remove;
137
+ }
138
+
139
+ ::view-transition-group(vaadin-master-detail-layout-overlay-vertical-detail-remove) {
140
+ clip-path: inset(0);
141
+ }
142
+
143
+ ::view-transition-old(vaadin-master-detail-layout-overlay-vertical-detail-remove) {
144
+ animation: 300ms ease both vaadin-master-detail-layout-overlay-vertical-detail-remove;
145
+ }
146
+
147
+ @keyframes vaadin-master-detail-layout-overlay-vertical-detail-remove {
148
+ to {
149
+ transform: translateY(100%);
150
+ }
151
+ }
152
+
153
+ /* Stack - vertical - add */
154
+
155
+ vaadin-master-detail-layout[stack][orientation='vertical'][transition='add'] {
156
+ view-transition-name: vaadin-master-detail-layout-stack-vertical-add;
157
+ }
158
+
159
+ ::view-transition-group(vaadin-master-detail-layout-stack-vertical-add) {
160
+ clip-path: inset(0);
161
+ }
162
+
163
+ ::view-transition-new(vaadin-master-detail-layout-stack-vertical-add) {
164
+ animation: 300ms ease both vaadin-master-detail-layout-stack-vertical-add-new;
165
+ }
166
+
167
+ ::view-transition-old(vaadin-master-detail-layout-stack-vertical-add) {
168
+ animation: 300ms ease both vaadin-master-detail-layout-stack-vertical-add-old;
169
+ }
170
+
171
+ @keyframes vaadin-master-detail-layout-stack-vertical-add-new {
172
+ from {
173
+ transform: translateY(100px);
174
+ opacity: 0;
175
+ }
176
+ }
177
+
178
+ @keyframes vaadin-master-detail-layout-stack-vertical-add-old {
179
+ to {
180
+ transform: translateY(-100px);
181
+ opacity: 0;
182
+ }
183
+ }
184
+
185
+ /* Stack - vertical - remove */
186
+
187
+ vaadin-master-detail-layout[stack][orientation='vertical'][transition='remove'] {
188
+ view-transition-name: vaadin-master-detail-layout-stack-vertical-remove;
189
+ }
190
+
191
+ ::view-transition-group(vaadin-master-detail-layout-stack-vertical-remove) {
192
+ clip-path: inset(0);
193
+ }
194
+
195
+ ::view-transition-new(vaadin-master-detail-layout-stack-vertical-remove) {
196
+ animation: 300ms ease both vaadin-master-detail-layout-stack-vertical-remove-new;
197
+ }
198
+
199
+ ::view-transition-old(vaadin-master-detail-layout-stack-vertical-remove) {
200
+ animation: 300ms ease both vaadin-master-detail-layout-stack-vertical-remove-old;
201
+ }
202
+
203
+ @keyframes vaadin-master-detail-layout-stack-vertical-remove-new {
204
+ from {
205
+ transform: translateY(-100px);
206
+ opacity: 0;
207
+ }
208
+ }
209
+
210
+ @keyframes vaadin-master-detail-layout-stack-vertical-remove-old {
211
+ to {
212
+ transform: translateY(100px);
213
+ opacity: 0;
214
+ }
215
+ }
112
216
  `;
@@ -108,6 +108,13 @@ declare class MasterDetailLayout extends SlotStylesMixin(ResizeMixin(ThemableMix
108
108
  */
109
109
  stackThreshold: string | null | undefined;
110
110
 
111
+ /**
112
+ * When true, the layout does not use animated transitions for the detail area.
113
+ *
114
+ * @attr {boolean} no-animation
115
+ */
116
+ noAnimation: boolean;
117
+
111
118
  /**
112
119
  * Sets the detail element to be displayed in the detail area and starts a
113
120
  * view transition that animates adding, replacing or removing the detail
@@ -304,6 +304,16 @@ class MasterDetailLayout extends SlotStylesMixin(ResizeMixin(ElementMixin(Themab
304
304
  sync: true,
305
305
  },
306
306
 
307
+ /**
308
+ * When true, the layout does not use animated transitions for the detail area.
309
+ *
310
+ * @attr {boolean} no-animation
311
+ */
312
+ noAnimation: {
313
+ type: Boolean,
314
+ value: false,
315
+ },
316
+
307
317
  /**
308
318
  * When true, the component uses the overlay mode. This property is read-only.
309
319
  * In order to enforce the overlay mode, use `forceOverlay` property.
@@ -545,7 +555,7 @@ class MasterDetailLayout extends SlotStylesMixin(ResizeMixin(ElementMixin(Themab
545
555
  }
546
556
  };
547
557
 
548
- if (typeof document.startViewTransition === 'function') {
558
+ if (typeof document.startViewTransition === 'function' && !this.noAnimation) {
549
559
  const hasDetail = !!currentDetail;
550
560
  const transitionType = hasDetail && element ? 'replace' : hasDetail ? 'remove' : 'add';
551
561
  this.setAttribute('transition', transitionType);
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": "24.8.0-alpha4",
4
+ "version": "24.8.0-alpha5",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -98,6 +98,17 @@
98
98
  ]
99
99
  }
100
100
  },
101
+ {
102
+ "name": "no-animation",
103
+ "description": "When true, the layout does not use animated transitions for the detail area.",
104
+ "value": {
105
+ "type": [
106
+ "boolean",
107
+ "null",
108
+ "undefined"
109
+ ]
110
+ }
111
+ },
101
112
  {
102
113
  "name": "theme",
103
114
  "description": "The theme variants to apply to the component.",
@@ -199,6 +210,17 @@
199
210
  "undefined"
200
211
  ]
201
212
  }
213
+ },
214
+ {
215
+ "name": "noAnimation",
216
+ "description": "When true, the layout does not use animated transitions for the detail area.",
217
+ "value": {
218
+ "type": [
219
+ "boolean",
220
+ "null",
221
+ "undefined"
222
+ ]
223
+ }
202
224
  }
203
225
  ],
204
226
  "events": []
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/master-detail-layout",
4
- "version": "24.8.0-alpha4",
4
+ "version": "24.8.0-alpha5",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -26,6 +26,13 @@
26
26
  "kind": "expression"
27
27
  }
28
28
  },
29
+ {
30
+ "name": "?noAnimation",
31
+ "description": "When true, the layout does not use animated transitions for the detail area.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
29
36
  {
30
37
  "name": ".detailSize",
31
38
  "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 layout switches to the overlay mode.",