@vaadin/split-layout 25.0.0-alpha1 → 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/split-layout",
3
- "version": "25.0.0-alpha1",
3
+ "version": "25.0.0-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,7 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "theme",
25
24
  "vaadin-*.d.ts",
26
25
  "vaadin-*.js",
27
26
  "web-types.json",
@@ -35,20 +34,20 @@
35
34
  ],
36
35
  "dependencies": {
37
36
  "@open-wc/dedupe-mixin": "^1.3.0",
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",
37
+ "@vaadin/component-base": "25.0.0-alpha11",
38
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha11",
41
39
  "lit": "^3.0.0"
42
40
  },
43
41
  "devDependencies": {
44
- "@vaadin/chai-plugins": "25.0.0-alpha1",
45
- "@vaadin/test-runner-commands": "25.0.0-alpha1",
46
- "@vaadin/testing-helpers": "^1.1.0",
42
+ "@vaadin/chai-plugins": "25.0.0-alpha11",
43
+ "@vaadin/test-runner-commands": "25.0.0-alpha11",
44
+ "@vaadin/testing-helpers": "^2.0.0",
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha11",
47
46
  "sinon": "^18.0.0"
48
47
  },
49
48
  "web-types": [
50
49
  "web-types.json",
51
50
  "web-types.lit.json"
52
51
  ],
53
- "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
52
+ "gitHead": "abfd315ba5a7484a613e0768635a4e8fe945a44b"
54
53
  }
@@ -0,0 +1,117 @@
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 '@vaadin/component-base/src/styles/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const splitLayoutStyles = css`
10
+ :host {
11
+ display: flex;
12
+ contain: layout;
13
+ }
14
+
15
+ :host([hidden]) {
16
+ display: none !important;
17
+ }
18
+
19
+ :host([orientation='vertical']) {
20
+ flex-direction: column;
21
+ }
22
+
23
+ ::slotted(*) {
24
+ flex: 1 1 auto;
25
+ min-width: 0;
26
+ min-height: 0;
27
+ }
28
+
29
+ [part='splitter'] {
30
+ --_splitter-size: var(--vaadin-split-layout-splitter-size, 8px);
31
+ --_splitter-target-size: var(--vaadin-split-layout-splitter-target-size, 8px);
32
+ --_handle-size: var(--vaadin-split-layout-handle-size, 4px);
33
+ --_handle-target-size: var(--vaadin-split-layout-handle-target-size, 32px);
34
+ background: var(--vaadin-split-layout-splitter-background, var(--vaadin-background-container-strong));
35
+ flex: none;
36
+ position: relative;
37
+ z-index: 1;
38
+ box-sizing: border-box;
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ }
43
+
44
+ [part='splitter']::after {
45
+ content: '';
46
+ inset: 0 calc((var(--_splitter-target-size) - var(--_splitter-size)) / -2);
47
+ position: absolute;
48
+ }
49
+
50
+ :host([orientation='vertical']) [part='splitter']::after {
51
+ inset: calc((var(--_splitter-target-size) - var(--_splitter-size)) / -2) 0;
52
+ }
53
+
54
+ :host(:not([orientation='vertical'])) > [part='splitter'] {
55
+ cursor: ew-resize;
56
+ width: var(--_splitter-size);
57
+ }
58
+
59
+ :host([orientation='vertical']) > [part='splitter'] {
60
+ cursor: ns-resize;
61
+ height: var(--_splitter-size);
62
+ }
63
+
64
+ [part='handle'] {
65
+ background: var(--vaadin-split-layout-handle-background, var(--vaadin-color-subtle));
66
+ border-radius: var(--vaadin-radius-m);
67
+ flex: none;
68
+ width: var(--_handle-size);
69
+ height: var(--_handle-target-size);
70
+ max-height: 50%;
71
+ position: relative;
72
+ }
73
+
74
+ :host([orientation='vertical']) [part='handle'] {
75
+ width: var(--_handle-target-size);
76
+ max-width: 50%;
77
+ height: var(--_handle-size);
78
+ max-height: none;
79
+ }
80
+
81
+ [part='handle']::after {
82
+ content: '';
83
+ position: absolute;
84
+ top: 50%;
85
+ left: 50%;
86
+ height: var(--_handle-target-size);
87
+ width: var(--_handle-target-size);
88
+ transform: translate3d(-50%, -50%, 0);
89
+ border-radius: 50%;
90
+ }
91
+
92
+ :host([theme~='small']) > [part='splitter'] {
93
+ --vaadin-split-layout-splitter-size: 1px;
94
+ --vaadin-split-layout-splitter-target-size: 5px;
95
+ --vaadin-split-layout-handle-size: 3px;
96
+ }
97
+
98
+ :host([theme~='small']) [part='splitter'] [part='handle'] {
99
+ opacity: 0;
100
+ }
101
+
102
+ :host([theme~='small']) [part='splitter']:active [part='handle'] {
103
+ opacity: 1;
104
+ }
105
+
106
+ @media (any-hover: hover) {
107
+ :host([theme~='small']) [part='splitter']:hover [part='handle'] {
108
+ opacity: 1;
109
+ }
110
+ }
111
+
112
+ @media (forced-colors: active) {
113
+ [part~='splitter'] {
114
+ border: 1px solid;
115
+ }
116
+ }
117
+ `;
@@ -7,9 +7,10 @@ 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
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
+ import { splitLayoutStyles } from './styles/vaadin-split-layout-base-styles.js';
11
13
  import { SplitLayoutMixin } from './vaadin-split-layout-mixin.js';
12
- import { splitLayoutStyles } from './vaadin-split-layout-styles.js';
13
14
 
14
15
  /**
15
16
  * `<vaadin-split-layout>` is a Web Component implementing a split layout for two
@@ -155,7 +156,7 @@ import { splitLayoutStyles } from './vaadin-split-layout-styles.js';
155
156
  * @mixes SplitLayoutMixin
156
157
  * @mixes ThemableMixin
157
158
  */
158
- class SplitLayout extends SplitLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
159
+ class SplitLayout extends SplitLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
159
160
  static get is() {
160
161
  return 'vaadin-split-layout';
161
162
  }
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-split-layout.js';
1
+ import './src/vaadin-split-layout.js';
2
2
  export * from './src/vaadin-split-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/split-layout",
4
- "version": "25.0.0-alpha1",
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/split-layout",
4
- "version": "25.0.0-alpha1",
4
+ "version": "25.0.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1,65 +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 { css } from 'lit';
7
-
8
- export const splitLayoutStyles = css`
9
- :host {
10
- display: flex;
11
- overflow: hidden !important;
12
- transform: translateZ(0);
13
- }
14
-
15
- :host([hidden]) {
16
- display: none !important;
17
- }
18
-
19
- :host([orientation='vertical']) {
20
- flex-direction: column;
21
- }
22
-
23
- :host ::slotted(*) {
24
- flex: 1 1 auto;
25
- overflow: auto;
26
- -webkit-overflow-scrolling: touch;
27
- }
28
-
29
- [part='splitter'] {
30
- flex: none;
31
- position: relative;
32
- z-index: 1;
33
- overflow: visible;
34
- min-width: 8px;
35
- min-height: 8px;
36
- }
37
-
38
- :host(:not([orientation='vertical'])) > [part='splitter'] {
39
- cursor: ew-resize;
40
- }
41
-
42
- :host([orientation='vertical']) > [part='splitter'] {
43
- cursor: ns-resize;
44
- }
45
-
46
- [part='handle'] {
47
- width: 40px;
48
- height: 40px;
49
- position: absolute;
50
- top: 50%;
51
- left: 50%;
52
- transform: translate3d(-50%, -50%, 0);
53
- }
54
-
55
- @media (forced-colors: active) {
56
- [part~='splitter'] {
57
- outline: 1px solid;
58
- }
59
-
60
- [part~='handle']::after {
61
- background-color: AccentColor !important;
62
- forced-color-adjust: none;
63
- }
64
- }
65
- `;
@@ -1,4 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
@@ -1,91 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
6
-
7
- registerStyles(
8
- 'vaadin-split-layout',
9
- css`
10
- [part='splitter'] {
11
- min-width: var(--lumo-space-s);
12
- min-height: var(--lumo-space-s);
13
- background-color: var(--lumo-contrast-5pct);
14
- transition: 0.1s background-color;
15
- }
16
-
17
- [part='handle'] {
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- width: var(--lumo-size-m);
22
- height: var(--lumo-size-m);
23
- }
24
-
25
- [part='handle']::after {
26
- content: '';
27
- display: block;
28
- --_handle-size: 4px;
29
- width: var(--_handle-size);
30
- height: 100%;
31
- max-width: 100%;
32
- max-height: 100%;
33
- border-radius: var(--lumo-border-radius-s);
34
- background-color: var(--lumo-contrast-30pct);
35
- transition:
36
- 0.1s opacity,
37
- 0.1s background-color;
38
- }
39
-
40
- :host([orientation='vertical']) [part='handle']::after {
41
- width: 100%;
42
- height: var(--_handle-size);
43
- }
44
-
45
- /* Hover style */
46
- @media (any-hover: hover) {
47
- [part='splitter']:hover [part='handle']::after {
48
- background-color: var(--lumo-contrast-40pct);
49
- }
50
- }
51
-
52
- /* Active style */
53
- [part='splitter']:active [part='handle']::after {
54
- background-color: var(--lumo-contrast-50pct);
55
- }
56
-
57
- /* Small/minimal */
58
- :host([theme~='small']) > [part='splitter'] {
59
- border-left: 1px solid var(--lumo-contrast-10pct);
60
- border-top: 1px solid var(--lumo-contrast-10pct);
61
- }
62
-
63
- :host(:is([theme~='small'], [theme~='minimal'])) > [part='splitter'] {
64
- min-width: 0;
65
- min-height: 0;
66
- background-color: transparent;
67
- }
68
-
69
- :host(:is([theme~='small'], [theme~='minimal'])) > [part='splitter']::after {
70
- content: '';
71
- position: absolute;
72
- inset: -4px;
73
- }
74
-
75
- :host(:is([theme~='small'], [theme~='minimal'])) > [part='splitter'] > [part='handle'] {
76
- left: calc(50% - 0.5px);
77
- top: calc(50% - 0.5px);
78
- }
79
-
80
- :host(:is([theme~='small'], [theme~='minimal'])) > [part='splitter'] > [part='handle']::after {
81
- opacity: 0;
82
- --_handle-size: 5px;
83
- }
84
-
85
- :host(:is([theme~='small'], [theme~='minimal'])) > [part='splitter']:hover > [part='handle']::after,
86
- :host(:is([theme~='small'], [theme~='minimal'])) > [part='splitter']:active > [part='handle']::after {
87
- opacity: 1;
88
- }
89
- `,
90
- { moduleId: 'lumo-split-layout' },
91
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-split-layout-styles.js';
2
- import '../../src/vaadin-split-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-split-layout-styles.js';
2
- import '../../src/vaadin-split-layout.js';