@vaadin/tabsheet 25.0.0-alpha1 → 25.0.0-alpha10

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/tabsheet",
3
- "version": "25.0.0-alpha1",
3
+ "version": "25.0.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,6 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
+ "!src/styles/*-base-styles.d.ts",
25
+ "!src/styles/*-base-styles.js",
24
26
  "theme",
25
27
  "vaadin-*.d.ts",
26
28
  "vaadin-*.js",
@@ -35,22 +37,22 @@
35
37
  ],
36
38
  "dependencies": {
37
39
  "@open-wc/dedupe-mixin": "^1.3.0",
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",
40
+ "@vaadin/component-base": "25.0.0-alpha10",
41
+ "@vaadin/scroller": "25.0.0-alpha10",
42
+ "@vaadin/tabs": "25.0.0-alpha10",
43
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
44
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
43
45
  "lit": "^3.0.0"
44
46
  },
45
47
  "devDependencies": {
46
- "@vaadin/chai-plugins": "25.0.0-alpha1",
47
- "@vaadin/test-runner-commands": "25.0.0-alpha1",
48
- "@vaadin/testing-helpers": "^1.1.0",
48
+ "@vaadin/chai-plugins": "25.0.0-alpha10",
49
+ "@vaadin/test-runner-commands": "25.0.0-alpha10",
50
+ "@vaadin/testing-helpers": "^2.0.0",
49
51
  "sinon": "^18.0.0"
50
52
  },
51
53
  "web-types": [
52
54
  "web-types.json",
53
55
  "web-types.lit.json"
54
56
  ],
55
- "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
57
+ "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
56
58
  }
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const tabSheetStyles: CSSResult;
@@ -0,0 +1,75 @@
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/component-base/src/style-props.js';
7
+ import { css } from 'lit';
8
+ import { loaderStyles } from '@vaadin/component-base/src/loader-styles.js';
9
+
10
+ export const tabSheetStyles = [
11
+ loaderStyles,
12
+ css`
13
+ :host {
14
+ display: flex;
15
+ flex-direction: column;
16
+ border: var(--vaadin-tabsheet-border-width, 1px) solid
17
+ var(--vaadin-tabsheet-border-color, var(--vaadin-border-color));
18
+ border-radius: var(--vaadin-tabsheet-border-radius, var(--vaadin-radius-l));
19
+ overflow: hidden;
20
+ }
21
+
22
+ :host([hidden]) {
23
+ display: none !important;
24
+ }
25
+
26
+ [part='tabs-container'] {
27
+ position: relative;
28
+ display: flex;
29
+ align-items: center;
30
+ gap: var(--vaadin-tabsheet-gap, var(--vaadin-gap-container-inline));
31
+ padding: var(--vaadin-tabsheet-padding, var(--vaadin-padding));
32
+ box-sizing: border-box;
33
+ }
34
+
35
+ ::slotted([slot='tabs']) {
36
+ flex: 1;
37
+ align-self: stretch;
38
+ min-width: 128px;
39
+ }
40
+
41
+ [part='content'] {
42
+ position: relative;
43
+ flex: 1;
44
+ box-sizing: border-box;
45
+ padding: var(--vaadin-tabsheet-padding, var(--vaadin-padding));
46
+ border-top: var(--vaadin-tabsheet-border-width, 1px) solid transparent;
47
+ margin-top: calc(var(--vaadin-tabsheet-border-width, 1px) * -1);
48
+ }
49
+
50
+ [part='content'][focus-ring] {
51
+ border-bottom-left-radius: inherit;
52
+ border-bottom-right-radius: inherit;
53
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
54
+ }
55
+
56
+ [part='content'][overflow~='top'] {
57
+ border-top-color: var(--vaadin-tabsheet-border-color, var(--vaadin-border-color));
58
+ }
59
+
60
+ :host([loading]) [part='content'] {
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ }
65
+
66
+ :host([theme~='no-border']) {
67
+ border: 0;
68
+ border-radius: 0;
69
+ }
70
+
71
+ :host([theme~='no-padding']) [part='content'] {
72
+ padding: 0 !important;
73
+ }
74
+ `,
75
+ ];
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const tabSheetStyles: CSSResult;
@@ -0,0 +1,35 @@
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 { css } from 'lit';
7
+
8
+ export const tabSheetStyles = css`
9
+ :host {
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
13
+
14
+ :host([hidden]) {
15
+ display: none !important;
16
+ }
17
+
18
+ [part='tabs-container'] {
19
+ position: relative;
20
+ display: flex;
21
+ align-items: center;
22
+ }
23
+
24
+ ::slotted([slot='tabs']) {
25
+ flex: 1;
26
+ align-self: stretch;
27
+ min-width: 8em;
28
+ }
29
+
30
+ [part='content'] {
31
+ position: relative;
32
+ flex: 1;
33
+ box-sizing: border-box;
34
+ }
35
+ `;
@@ -30,21 +30,21 @@ export interface TabSheetEventMap extends HTMLElementEventMap, TabSheetCustomEve
30
30
  * `<vaadin-tabsheet>` is a Web Component for organizing and grouping content
31
31
  * into scrollable panels. The panels can be switched between by using tabs.
32
32
  *
33
- * ```
34
- * <vaadin-tabsheet>
35
- * <div slot="prefix">Prefix</div>
36
- * <div slot="suffix">Suffix</div>
33
+ * ```html
34
+ * <vaadin-tabsheet>
35
+ * <div slot="prefix">Prefix</div>
36
+ * <div slot="suffix">Suffix</div>
37
37
  *
38
- * <vaadin-tabs slot="tabs">
39
- * <vaadin-tab id="tab-1">Tab 1</vaadin-tab>
40
- * <vaadin-tab id="tab-2">Tab 2</vaadin-tab>
41
- * <vaadin-tab id="tab-3">Tab 3</vaadin-tab>
42
- * </vaadin-tabs>
38
+ * <vaadin-tabs slot="tabs">
39
+ * <vaadin-tab id="tab-1">Tab 1</vaadin-tab>
40
+ * <vaadin-tab id="tab-2">Tab 2</vaadin-tab>
41
+ * <vaadin-tab id="tab-3">Tab 3</vaadin-tab>
42
+ * </vaadin-tabs>
43
43
  *
44
- * <div tab="tab-1">Panel 1</div>
45
- * <div tab="tab-2">Panel 2</div>
46
- * <div tab="tab-3">Panel 3</div>
47
- * </vaadin-tabsheet>
44
+ * <div tab="tab-1">Panel 1</div>
45
+ * <div tab="tab-2">Panel 2</div>
46
+ * <div tab="tab-3">Panel 3</div>
47
+ * </vaadin-tabsheet>
48
48
  * ```
49
49
  *
50
50
  * ### Styling
@@ -5,32 +5,34 @@
5
5
  */
6
6
  import '@vaadin/tabs/src/vaadin-tabs.js';
7
7
  import './vaadin-tabsheet-scroller.js';
8
- import { css, html, LitElement } from 'lit';
8
+ import { html, LitElement } from 'lit';
9
9
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
11
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
12
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
+ import { tabSheetStyles } from './styles/vaadin-tabsheet-core-styles.js';
13
15
  import { TabSheetMixin } from './vaadin-tabsheet-mixin.js';
14
16
 
15
17
  /**
16
18
  * `<vaadin-tabsheet>` is a Web Component for organizing and grouping content
17
19
  * into scrollable panels. The panels can be switched between by using tabs.
18
20
  *
19
- * ```
20
- * <vaadin-tabsheet>
21
- * <div slot="prefix">Prefix</div>
22
- * <div slot="suffix">Suffix</div>
21
+ * ```html
22
+ * <vaadin-tabsheet>
23
+ * <div slot="prefix">Prefix</div>
24
+ * <div slot="suffix">Suffix</div>
23
25
  *
24
- * <vaadin-tabs slot="tabs">
25
- * <vaadin-tab id="tab-1">Tab 1</vaadin-tab>
26
- * <vaadin-tab id="tab-2">Tab 2</vaadin-tab>
27
- * <vaadin-tab id="tab-3">Tab 3</vaadin-tab>
28
- * </vaadin-tabs>
26
+ * <vaadin-tabs slot="tabs">
27
+ * <vaadin-tab id="tab-1">Tab 1</vaadin-tab>
28
+ * <vaadin-tab id="tab-2">Tab 2</vaadin-tab>
29
+ * <vaadin-tab id="tab-3">Tab 3</vaadin-tab>
30
+ * </vaadin-tabs>
29
31
  *
30
- * <div tab="tab-1">Panel 1</div>
31
- * <div tab="tab-2">Panel 2</div>
32
- * <div tab="tab-3">Panel 3</div>
33
- * </vaadin-tabsheet>
32
+ * <div tab="tab-1">Panel 1</div>
33
+ * <div tab="tab-2">Panel 2</div>
34
+ * <div tab="tab-3">Panel 3</div>
35
+ * </vaadin-tabsheet>
34
36
  * ```
35
37
  *
36
38
  * ### Styling
@@ -60,40 +62,13 @@ import { TabSheetMixin } from './vaadin-tabsheet-mixin.js';
60
62
  * @mixes ElementMixin
61
63
  * @mixes ThemableMixin
62
64
  */
63
- class TabSheet extends TabSheetMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
65
+ class TabSheet extends TabSheetMixin(ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
64
66
  static get is() {
65
67
  return 'vaadin-tabsheet';
66
68
  }
67
69
 
68
70
  static get styles() {
69
- return css`
70
- :host {
71
- display: flex;
72
- flex-direction: column;
73
- }
74
-
75
- :host([hidden]) {
76
- display: none !important;
77
- }
78
-
79
- [part='tabs-container'] {
80
- position: relative;
81
- display: flex;
82
- align-items: center;
83
- }
84
-
85
- ::slotted([slot='tabs']) {
86
- flex: 1;
87
- align-self: stretch;
88
- min-width: 8em;
89
- }
90
-
91
- [part='content'] {
92
- position: relative;
93
- flex: 1;
94
- box-sizing: border-box;
95
- }
96
- `;
71
+ return tabSheetStyles;
97
72
  }
98
73
 
99
74
  /** @protected */
@@ -40,7 +40,7 @@ const tabsheet = css`
40
40
  }
41
41
 
42
42
  :host([theme~='no-padding']) [part='content'] {
43
- padding: 0;
43
+ padding: 0 !important;
44
44
  }
45
45
  `;
46
46
 
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tabsheet",
4
- "version": "25.0.0-alpha1",
4
+ "version": "25.0.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-tabsheet",
11
- "description": "`<vaadin-tabsheet>` is a Web Component for organizing and grouping content\ninto scrollable panels. The panels can be switched between by using tabs.\n\n```\n <vaadin-tabsheet>\n <div slot=\"prefix\">Prefix</div>\n <div slot=\"suffix\">Suffix</div>\n\n <vaadin-tabs slot=\"tabs\">\n <vaadin-tab id=\"tab-1\">Tab 1</vaadin-tab>\n <vaadin-tab id=\"tab-2\">Tab 2</vaadin-tab>\n <vaadin-tab id=\"tab-3\">Tab 3</vaadin-tab>\n </vaadin-tabs>\n\n <div tab=\"tab-1\">Panel 1</div>\n <div tab=\"tab-2\">Panel 2</div>\n <div tab=\"tab-3\">Panel 3</div>\n </vaadin-tabsheet>\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n--------- | ---------------\n`tabs-container` | The container for the slotted prefix, tabs and suffix\n`content` | The container for the slotted panels\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n------------------|-------------\n`loading` | Set when a tab without associated content is selected\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-tabsheet>` is a Web Component for organizing and grouping content\ninto scrollable panels. The panels can be switched between by using tabs.\n\n```html\n<vaadin-tabsheet>\n <div slot=\"prefix\">Prefix</div>\n <div slot=\"suffix\">Suffix</div>\n\n <vaadin-tabs slot=\"tabs\">\n <vaadin-tab id=\"tab-1\">Tab 1</vaadin-tab>\n <vaadin-tab id=\"tab-2\">Tab 2</vaadin-tab>\n <vaadin-tab id=\"tab-3\">Tab 3</vaadin-tab>\n </vaadin-tabs>\n\n <div tab=\"tab-1\">Panel 1</div>\n <div tab=\"tab-2\">Panel 2</div>\n <div tab=\"tab-3\">Panel 3</div>\n</vaadin-tabsheet>\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n--------- | ---------------\n`tabs-container` | The container for the slotted prefix, tabs and suffix\n`content` | The container for the slotted panels\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n------------------|-------------\n`loading` | Set when a tab without associated content is selected\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "selected",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tabsheet",
4
- "version": "25.0.0-alpha1",
4
+ "version": "25.0.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-tabsheet",
19
- "description": "`<vaadin-tabsheet>` is a Web Component for organizing and grouping content\ninto scrollable panels. The panels can be switched between by using tabs.\n\n```\n <vaadin-tabsheet>\n <div slot=\"prefix\">Prefix</div>\n <div slot=\"suffix\">Suffix</div>\n\n <vaadin-tabs slot=\"tabs\">\n <vaadin-tab id=\"tab-1\">Tab 1</vaadin-tab>\n <vaadin-tab id=\"tab-2\">Tab 2</vaadin-tab>\n <vaadin-tab id=\"tab-3\">Tab 3</vaadin-tab>\n </vaadin-tabs>\n\n <div tab=\"tab-1\">Panel 1</div>\n <div tab=\"tab-2\">Panel 2</div>\n <div tab=\"tab-3\">Panel 3</div>\n </vaadin-tabsheet>\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n--------- | ---------------\n`tabs-container` | The container for the slotted prefix, tabs and suffix\n`content` | The container for the slotted panels\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n------------------|-------------\n`loading` | Set when a tab without associated content is selected\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-tabsheet>` is a Web Component for organizing and grouping content\ninto scrollable panels. The panels can be switched between by using tabs.\n\n```html\n<vaadin-tabsheet>\n <div slot=\"prefix\">Prefix</div>\n <div slot=\"suffix\">Suffix</div>\n\n <vaadin-tabs slot=\"tabs\">\n <vaadin-tab id=\"tab-1\">Tab 1</vaadin-tab>\n <vaadin-tab id=\"tab-2\">Tab 2</vaadin-tab>\n <vaadin-tab id=\"tab-3\">Tab 3</vaadin-tab>\n </vaadin-tabs>\n\n <div tab=\"tab-1\">Panel 1</div>\n <div tab=\"tab-2\">Panel 2</div>\n <div tab=\"tab-3\">Panel 3</div>\n</vaadin-tabsheet>\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n--------- | ---------------\n`tabs-container` | The container for the slotted prefix, tabs and suffix\n`content` | The container for the slotted panels\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n------------------|-------------\n`loading` | Set when a tab without associated content is selected\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {