@vaadin/tabsheet 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 +10 -13
- package/src/vaadin-tabsheet.d.ts +1 -2
- package/src/vaadin-tabsheet.js +36 -34
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/vaadin-lit-tabsheet-scroller.js +0 -21
- package/src/vaadin-lit-tabsheet.d.ts +0 -1
- package/src/vaadin-lit-tabsheet.js +0 -79
- package/theme/lumo/vaadin-lit-tabsheet.d.ts +0 -4
- package/theme/lumo/vaadin-lit-tabsheet.js +0 -4
- package/theme/material/vaadin-lit-tabsheet.d.ts +0 -4
- package/theme/material/vaadin-lit-tabsheet.js +0 -4
- package/theme/material/vaadin-tabsheet-styles.d.ts +0 -2
- package/theme/material/vaadin-tabsheet-styles.js +0 -46
- package/theme/material/vaadin-tabsheet.d.ts +0 -4
- package/theme/material/vaadin-tabsheet.js +0 -4
- package/vaadin-lit-tabsheet.d.ts +0 -1
- package/vaadin-lit-tabsheet.js +0 -2
package/README.md
CHANGED
|
@@ -36,29 +36,6 @@ Once installed, import the component in your application:
|
|
|
36
36
|
import '@vaadin/tabsheet';
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
## Themes
|
|
40
|
-
|
|
41
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
42
|
-
The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/tabsheet/vaadin-tabsheet.js) of the package uses the Lumo theme.
|
|
43
|
-
|
|
44
|
-
To use the Material theme, import the component from the `theme/material` folder:
|
|
45
|
-
|
|
46
|
-
```js
|
|
47
|
-
import '@vaadin/tabsheet/theme/material/vaadin-tabsheet.js';
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
You can also import the Lumo version of the component explicitly:
|
|
51
|
-
|
|
52
|
-
```js
|
|
53
|
-
import '@vaadin/tabsheet/theme/lumo/vaadin-tabsheet.js';
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
|
|
57
|
-
|
|
58
|
-
```js
|
|
59
|
-
import '@vaadin/tabsheet/src/vaadin-tabsheet.js';
|
|
60
|
-
```
|
|
61
|
-
|
|
62
39
|
## Contributing
|
|
63
40
|
|
|
64
41
|
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/tabsheet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,23 +31,20 @@
|
|
|
31
31
|
"Vaadin",
|
|
32
32
|
"vaadin-tabsheet",
|
|
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/
|
|
42
|
-
"@vaadin/
|
|
43
|
-
"@vaadin/vaadin-
|
|
44
|
-
"@vaadin/vaadin-material-styles": "24.8.0-alpha8",
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha8",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha1",
|
|
39
|
+
"@vaadin/scroller": "25.0.0-alpha1",
|
|
40
|
+
"@vaadin/tabs": "25.0.0-alpha1",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
|
|
46
43
|
"lit": "^3.0.0"
|
|
47
44
|
},
|
|
48
45
|
"devDependencies": {
|
|
49
|
-
"@vaadin/chai-plugins": "
|
|
50
|
-
"@vaadin/test-runner-commands": "
|
|
46
|
+
"@vaadin/chai-plugins": "25.0.0-alpha1",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha1",
|
|
51
48
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
52
49
|
"sinon": "^18.0.0"
|
|
53
50
|
},
|
|
@@ -55,5 +52,5 @@
|
|
|
55
52
|
"web-types.json",
|
|
56
53
|
"web-types.lit.json"
|
|
57
54
|
],
|
|
58
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
|
|
59
56
|
}
|
package/src/vaadin-tabsheet.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Copyright (c) 2022 - 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 { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
6
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
8
7
|
import type { Tab } from '@vaadin/tabs/src/vaadin-tab.js';
|
|
9
8
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
@@ -69,7 +68,7 @@ export interface TabSheetEventMap extends HTMLElementEventMap, TabSheetCustomEve
|
|
|
69
68
|
* @fires {CustomEvent} items-changed - Fired when the `items` property changes.
|
|
70
69
|
* @fires {CustomEvent} selected-changed - Fired when the `selected` property changes.
|
|
71
70
|
*/
|
|
72
|
-
declare class TabSheet extends ThemableMixin(TabSheetMixin<Tab>(
|
|
71
|
+
declare class TabSheet extends ThemableMixin(TabSheetMixin<Tab>(ElementMixin(HTMLElement))) {
|
|
73
72
|
addEventListener<K extends keyof TabSheetEventMap>(
|
|
74
73
|
type: K,
|
|
75
74
|
listener: (this: TabSheet, ev: TabSheetEventMap[K]) => void,
|
package/src/vaadin-tabsheet.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/tabs/src/vaadin-tabs.js';
|
|
7
7
|
import './vaadin-tabsheet-scroller.js';
|
|
8
|
-
import { html,
|
|
9
|
-
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
8
|
+
import { css, html, LitElement } from 'lit';
|
|
10
9
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
11
10
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
12
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
13
|
import { TabSheetMixin } from './vaadin-tabsheet-mixin.js';
|
|
14
14
|
|
|
@@ -59,40 +59,46 @@ import { TabSheetMixin } from './vaadin-tabsheet-mixin.js';
|
|
|
59
59
|
* @mixes TabSheetMixin
|
|
60
60
|
* @mixes ElementMixin
|
|
61
61
|
* @mixes ThemableMixin
|
|
62
|
-
* @mixes ControllerMixin
|
|
63
62
|
*/
|
|
64
|
-
class TabSheet extends TabSheetMixin(ThemableMixin(ElementMixin(
|
|
65
|
-
static get
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
class TabSheet extends TabSheetMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
|
|
64
|
+
static get is() {
|
|
65
|
+
return 'vaadin-tabsheet';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static get styles() {
|
|
69
|
+
return css`
|
|
70
|
+
:host {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
}
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
75
|
+
:host([hidden]) {
|
|
76
|
+
display: none !important;
|
|
77
|
+
}
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
[part='tabs-container'] {
|
|
80
|
+
position: relative;
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
}
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
::slotted([slot='tabs']) {
|
|
86
|
+
flex: 1;
|
|
87
|
+
align-self: stretch;
|
|
88
|
+
min-width: 8em;
|
|
89
|
+
}
|
|
88
90
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
[part='content'] {
|
|
92
|
+
position: relative;
|
|
93
|
+
flex: 1;
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
}
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
95
98
|
|
|
99
|
+
/** @protected */
|
|
100
|
+
render() {
|
|
101
|
+
return html`
|
|
96
102
|
<div part="tabs-container">
|
|
97
103
|
<slot name="prefix"></slot>
|
|
98
104
|
<slot name="tabs"></slot>
|
|
@@ -105,10 +111,6 @@ class TabSheet extends TabSheetMixin(ThemableMixin(ElementMixin(ControllerMixin(
|
|
|
105
111
|
</vaadin-tabsheet-scroller>
|
|
106
112
|
`;
|
|
107
113
|
}
|
|
108
|
-
|
|
109
|
-
static get is() {
|
|
110
|
-
return 'vaadin-tabsheet';
|
|
111
|
-
}
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
defineCustomElement(TabSheet);
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
7
|
-
import { Scroller } from '@vaadin/scroller/src/vaadin-lit-scroller.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* An element used internally by `<vaadin-tabsheet>`. Not intended to be used separately.
|
|
11
|
-
*
|
|
12
|
-
* @extends Scroller
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
class TabsheetScroller extends Scroller {
|
|
16
|
-
static get is() {
|
|
17
|
-
return 'vaadin-tabsheet-scroller';
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
defineCustomElement(TabsheetScroller);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './vaadin-tabsheet.js';
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/tabs/src/vaadin-lit-tabs.js';
|
|
7
|
-
import './vaadin-lit-tabsheet-scroller.js';
|
|
8
|
-
import { css, html, LitElement } from 'lit';
|
|
9
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
12
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
-
import { TabSheetMixin } from './vaadin-tabsheet-mixin.js';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* LitElement based version of `<vaadin-tabsheet>` web component.
|
|
17
|
-
*
|
|
18
|
-
* ## Disclaimer
|
|
19
|
-
*
|
|
20
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
21
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
22
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
23
|
-
*/
|
|
24
|
-
class TabSheet extends TabSheetMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
|
|
25
|
-
static get is() {
|
|
26
|
-
return 'vaadin-tabsheet';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static get styles() {
|
|
30
|
-
return css`
|
|
31
|
-
:host {
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host([hidden]) {
|
|
37
|
-
display: none !important;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[part='tabs-container'] {
|
|
41
|
-
position: relative;
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
::slotted([slot='tabs']) {
|
|
47
|
-
flex: 1;
|
|
48
|
-
align-self: stretch;
|
|
49
|
-
min-width: 8em;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
[part='content'] {
|
|
53
|
-
position: relative;
|
|
54
|
-
flex: 1;
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** @protected */
|
|
61
|
-
render() {
|
|
62
|
-
return html`
|
|
63
|
-
<div part="tabs-container">
|
|
64
|
-
<slot name="prefix"></slot>
|
|
65
|
-
<slot name="tabs"></slot>
|
|
66
|
-
<slot name="suffix"></slot>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<vaadin-tabsheet-scroller part="content">
|
|
70
|
-
<div part="loader"></div>
|
|
71
|
-
<slot id="panel-slot"></slot>
|
|
72
|
-
</vaadin-tabsheet-scroller>
|
|
73
|
-
`;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
defineCustomElement(TabSheet);
|
|
78
|
-
|
|
79
|
-
export { TabSheet };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-material-styles/typography.js';
|
|
3
|
-
import { loader } from '@vaadin/vaadin-material-styles/mixins/loader.js';
|
|
4
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
5
|
-
|
|
6
|
-
const tabsheet = css`
|
|
7
|
-
:host {
|
|
8
|
-
font-family: var(--material-font-family);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host([theme~='bordered']) {
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
border: 1px solid var(--material-divider-color);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[part='tabs-container'] {
|
|
17
|
-
box-shadow: inset 0 -1px 0 0 var(--material-divider-color);
|
|
18
|
-
gap: 8px;
|
|
19
|
-
padding: 4px 8px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
::slotted([slot='tabs']) {
|
|
23
|
-
margin: -4px -8px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[part='content'] {
|
|
27
|
-
padding: 24px;
|
|
28
|
-
border-bottom-left-radius: inherit;
|
|
29
|
-
border-bottom-right-radius: inherit;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host([loading]) [part='content'] {
|
|
33
|
-
overflow: visible;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[part='loader'] {
|
|
37
|
-
position: absolute;
|
|
38
|
-
z-index: 1;
|
|
39
|
-
top: 0;
|
|
40
|
-
left: 0;
|
|
41
|
-
right: 0;
|
|
42
|
-
transform: translate(0, -100%);
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
registerStyles('vaadin-tabsheet', [tabsheet, loader], { moduleId: 'material-tabsheet' });
|
package/vaadin-lit-tabsheet.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-tabsheet.js';
|
package/vaadin-lit-tabsheet.js
DELETED