@vaadin/split-layout 24.8.0-alpha8 → 25.0.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.
- package/README.md +0 -23
- package/package.json +8 -11
- package/src/vaadin-split-layout.js +14 -10
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/vaadin-lit-split-layout.d.ts +0 -6
- package/src/vaadin-lit-split-layout.js +0 -46
- package/theme/lumo/vaadin-lit-split-layout.d.ts +0 -2
- package/theme/lumo/vaadin-lit-split-layout.js +0 -2
- package/theme/material/vaadin-lit-split-layout.d.ts +0 -2
- package/theme/material/vaadin-lit-split-layout.js +0 -2
- package/theme/material/vaadin-split-layout-styles.d.ts +0 -1
- package/theme/material/vaadin-split-layout-styles.js +0 -32
- package/theme/material/vaadin-split-layout.d.ts +0 -2
- package/theme/material/vaadin-split-layout.js +0 -2
- package/vaadin-lit-split-layout.d.ts +0 -1
- package/vaadin-lit-split-layout.js +0 -2
package/README.md
CHANGED
|
@@ -35,29 +35,6 @@ Once installed, import the component in your application:
|
|
|
35
35
|
import '@vaadin/split-layout';
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
## Themes
|
|
39
|
-
|
|
40
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
41
|
-
The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/split-layout/vaadin-split-layout.js) of the package uses the Lumo theme.
|
|
42
|
-
|
|
43
|
-
To use the Material theme, import the component from the `theme/material` folder:
|
|
44
|
-
|
|
45
|
-
```js
|
|
46
|
-
import '@vaadin/split-layout/theme/material/vaadin-split-layout.js';
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
You can also import the Lumo version of the component explicitly:
|
|
50
|
-
|
|
51
|
-
```js
|
|
52
|
-
import '@vaadin/split-layout/theme/lumo/vaadin-split-layout.js';
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
|
|
56
|
-
|
|
57
|
-
```js
|
|
58
|
-
import '@vaadin/split-layout/src/vaadin-split-layout.js';
|
|
59
|
-
```
|
|
60
|
-
|
|
61
38
|
## Contributing
|
|
62
39
|
|
|
63
40
|
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/split-layout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,21 +31,18 @@
|
|
|
31
31
|
"Vaadin",
|
|
32
32
|
"split 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
|
-
"@
|
|
40
|
-
"@vaadin/
|
|
41
|
-
"@vaadin/vaadin-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "24.8.0-alpha8",
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha8",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha1",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
|
|
44
41
|
"lit": "^3.0.0"
|
|
45
42
|
},
|
|
46
43
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "
|
|
48
|
-
"@vaadin/test-runner-commands": "
|
|
44
|
+
"@vaadin/chai-plugins": "25.0.0-alpha1",
|
|
45
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha1",
|
|
49
46
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
50
47
|
"sinon": "^18.0.0"
|
|
51
48
|
},
|
|
@@ -53,5 +50,5 @@
|
|
|
53
50
|
"web-types.json",
|
|
54
51
|
"web-types.lit.json"
|
|
55
52
|
],
|
|
56
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
|
|
57
54
|
}
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 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,
|
|
6
|
+
import { html, LitElement } from 'lit';
|
|
7
7
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
|
-
import {
|
|
9
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
11
|
import { SplitLayoutMixin } from './vaadin-split-layout-mixin.js';
|
|
11
12
|
import { splitLayoutStyles } from './vaadin-split-layout-styles.js';
|
|
12
13
|
|
|
13
|
-
registerStyles('vaadin-split-layout', splitLayoutStyles, { moduleId: 'vaadin-split-layout-styles' });
|
|
14
|
-
|
|
15
14
|
/**
|
|
16
15
|
* `<vaadin-split-layout>` is a Web Component implementing a split layout for two
|
|
17
16
|
* content elements with a draggable splitter between them.
|
|
@@ -156,8 +155,17 @@ registerStyles('vaadin-split-layout', splitLayoutStyles, { moduleId: 'vaadin-spl
|
|
|
156
155
|
* @mixes SplitLayoutMixin
|
|
157
156
|
* @mixes ThemableMixin
|
|
158
157
|
*/
|
|
159
|
-
class SplitLayout extends SplitLayoutMixin(ElementMixin(ThemableMixin(
|
|
160
|
-
static get
|
|
158
|
+
class SplitLayout extends SplitLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
159
|
+
static get is() {
|
|
160
|
+
return 'vaadin-split-layout';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
static get styles() {
|
|
164
|
+
return splitLayoutStyles;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** @protected */
|
|
168
|
+
render() {
|
|
161
169
|
return html`
|
|
162
170
|
<slot id="primary" name="primary"></slot>
|
|
163
171
|
<div part="splitter" id="splitter">
|
|
@@ -167,10 +175,6 @@ class SplitLayout extends SplitLayoutMixin(ElementMixin(ThemableMixin(PolymerEle
|
|
|
167
175
|
`;
|
|
168
176
|
}
|
|
169
177
|
|
|
170
|
-
static get is() {
|
|
171
|
-
return 'vaadin-split-layout';
|
|
172
|
-
}
|
|
173
|
-
|
|
174
178
|
/**
|
|
175
179
|
* Fired after dragging the splitter have ended.
|
|
176
180
|
*
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 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 { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
|
-
import { SplitLayoutMixin } from './vaadin-split-layout-mixin.js';
|
|
12
|
-
import { splitLayoutStyles } from './vaadin-split-layout-styles.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* LitElement based version of `<vaadin-split-layout>` web component.
|
|
16
|
-
*
|
|
17
|
-
* ## Disclaimer
|
|
18
|
-
*
|
|
19
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
20
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
21
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
22
|
-
*/
|
|
23
|
-
class SplitLayout extends SplitLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
24
|
-
static get is() {
|
|
25
|
-
return 'vaadin-split-layout';
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static get styles() {
|
|
29
|
-
return splitLayoutStyles;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** @protected */
|
|
33
|
-
render() {
|
|
34
|
-
return html`
|
|
35
|
-
<slot id="primary" name="primary"></slot>
|
|
36
|
-
<div part="splitter" id="splitter">
|
|
37
|
-
<div part="handle"></div>
|
|
38
|
-
</div>
|
|
39
|
-
<slot id="secondary" name="secondary"></slot>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
defineCustomElement(SplitLayout);
|
|
45
|
-
|
|
46
|
-
export { SplitLayout };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
3
|
-
|
|
4
|
-
registerStyles(
|
|
5
|
-
'vaadin-split-layout',
|
|
6
|
-
css`
|
|
7
|
-
[part='splitter'] {
|
|
8
|
-
min-width: 8px;
|
|
9
|
-
min-height: 8px;
|
|
10
|
-
background-color: var(--_material-split-layout-splitter-background-color, #000);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[part='handle'] {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
[part='handle']::after {
|
|
20
|
-
content: '';
|
|
21
|
-
display: block;
|
|
22
|
-
width: 2px;
|
|
23
|
-
height: 24px;
|
|
24
|
-
background-color: var(--material-background-color);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host([orientation='vertical']) [part='handle']::after {
|
|
28
|
-
transform: rotate(90deg);
|
|
29
|
-
}
|
|
30
|
-
`,
|
|
31
|
-
{ moduleId: 'material-split-layout' },
|
|
32
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-split-layout.js';
|