@vaadin/split-layout 23.4.0-alpha1 → 23.4.0-alpha3
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 +6 -6
- package/src/vaadin-split-layout.js +32 -11
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/split-layout",
|
|
3
|
-
"version": "23.4.0-
|
|
3
|
+
"version": "23.4.0-alpha3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "23.4.0-
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "23.4.0-
|
|
41
|
-
"@vaadin/vaadin-material-styles": "23.4.0-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "23.4.0-
|
|
39
|
+
"@vaadin/component-base": "23.4.0-alpha3",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "23.4.0-alpha3",
|
|
41
|
+
"@vaadin/vaadin-material-styles": "23.4.0-alpha3",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "23.4.0-alpha3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"web-types.json",
|
|
51
51
|
"web-types.lit.json"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "2336e451b1971dfb2dc4b601e11d05cafdb91516"
|
|
54
54
|
}
|
|
@@ -258,17 +258,38 @@ class SplitLayout extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
258
258
|
|
|
259
259
|
/** @private */
|
|
260
260
|
_processChildren() {
|
|
261
|
-
[...this.children]
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
261
|
+
const children = [...this.children];
|
|
262
|
+
|
|
263
|
+
children.filter((child) => child.hasAttribute('slot')).forEach((child) => this._processChildWithSlot(child));
|
|
264
|
+
|
|
265
|
+
children
|
|
266
|
+
.filter((child) => !child.hasAttribute('slot'))
|
|
267
|
+
.forEach((child, i) => this._processChildWithoutSlot(child, i));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/** @private */
|
|
271
|
+
_processChildWithSlot(child) {
|
|
272
|
+
const slot = child.getAttribute('slot');
|
|
273
|
+
if (child.__autoSlotted) {
|
|
274
|
+
this[`_${slot}Child`] = null;
|
|
275
|
+
child.removeAttribute('slot');
|
|
276
|
+
} else {
|
|
277
|
+
this[`_${slot}Child`] = child;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** @private */
|
|
282
|
+
_processChildWithoutSlot(child, idx) {
|
|
283
|
+
let slotName;
|
|
284
|
+
if (this._primaryChild || this._secondaryChild) {
|
|
285
|
+
slotName = this._primaryChild ? 'secondary' : 'primary';
|
|
286
|
+
} else {
|
|
287
|
+
slotName = idx === 0 ? 'primary' : 'secondary';
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
this[`_${slotName}Child`] = child;
|
|
291
|
+
child.setAttribute('slot', slotName);
|
|
292
|
+
child.__autoSlotted = true;
|
|
272
293
|
}
|
|
273
294
|
|
|
274
295
|
/** @private */
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED