@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 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": "24.8.0-alpha8",
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
- "@polymer/polymer": "^3.0.0",
40
- "@vaadin/component-base": "24.8.0-alpha8",
41
- "@vaadin/scroller": "24.8.0-alpha8",
42
- "@vaadin/tabs": "24.8.0-alpha8",
43
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha8",
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": "24.8.0-alpha8",
50
- "@vaadin/test-runner-commands": "24.8.0-alpha8",
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": "d914bb8f669d7e3d1981feb8eac05688ab9870b4"
55
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
59
56
  }
@@ -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>(ControllerMixin(ElementMixin(HTMLElement)))) {
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,
@@ -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, PolymerElement } from '@polymer/polymer/polymer-element.js';
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(ControllerMixin(PolymerElement)))) {
65
- static get template() {
66
- return html`
67
- <style>
68
- :host([hidden]) {
69
- display: none !important;
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
- :host {
73
- display: flex;
74
- flex-direction: column;
75
- }
75
+ :host([hidden]) {
76
+ display: none !important;
77
+ }
76
78
 
77
- [part='tabs-container'] {
78
- position: relative;
79
- display: flex;
80
- align-items: center;
81
- }
79
+ [part='tabs-container'] {
80
+ position: relative;
81
+ display: flex;
82
+ align-items: center;
83
+ }
82
84
 
83
- ::slotted([slot='tabs']) {
84
- flex: 1;
85
- align-self: stretch;
86
- min-width: 8em;
87
- }
85
+ ::slotted([slot='tabs']) {
86
+ flex: 1;
87
+ align-self: stretch;
88
+ min-width: 8em;
89
+ }
88
90
 
89
- [part='content'] {
90
- position: relative;
91
- flex: 1;
92
- box-sizing: border-box;
93
- }
94
- </style>
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tabsheet",
4
- "version": "24.8.0-alpha8",
4
+ "version": "25.0.0-alpha1",
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/tabsheet",
4
- "version": "24.8.0-alpha8",
4
+ "version": "25.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -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,4 +0,0 @@
1
- import '@vaadin/tabs/theme/lumo/vaadin-lit-tabs.js';
2
- import '@vaadin/scroller/theme/lumo/vaadin-lit-scroller.js';
3
- import './vaadin-tabsheet-styles.js';
4
- import '../../src/vaadin-lit-tabsheet.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/tabs/theme/lumo/vaadin-lit-tabs.js';
2
- import '@vaadin/scroller/theme/lumo/vaadin-lit-scroller.js';
3
- import './vaadin-tabsheet-styles.js';
4
- import '../../src/vaadin-lit-tabsheet.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/tabs/theme/material/vaadin-lit-tabs.js';
2
- import '@vaadin/scroller/theme/material/vaadin-lit-scroller.js';
3
- import './vaadin-tabsheet-styles.js';
4
- import '../../src/vaadin-lit-tabsheet.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/tabs/theme/material/vaadin-lit-tabs.js';
2
- import '@vaadin/scroller/theme/material/vaadin-lit-scroller.js';
3
- import './vaadin-tabsheet-styles.js';
4
- import '../../src/vaadin-lit-tabsheet.js';
@@ -1,2 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import '@vaadin/vaadin-material-styles/typography.js';
@@ -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' });
@@ -1,4 +0,0 @@
1
- import '@vaadin/tabs/theme/material/vaadin-tabs.js';
2
- import '@vaadin/scroller/theme/material/vaadin-scroller.js';
3
- import './vaadin-tabsheet-styles.js';
4
- import '../../src/vaadin-tabsheet.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/tabs/theme/material/vaadin-tabs.js';
2
- import '@vaadin/scroller/theme/material/vaadin-scroller.js';
3
- import './vaadin-tabsheet-styles.js';
4
- import '../../src/vaadin-tabsheet.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-tabsheet.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-tabsheet.js';
2
- export * from './src/vaadin-lit-tabsheet.js';