@vaadin/tabs 25.0.0-alpha2 → 25.0.0-alpha21

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/tabs",
3
- "version": "25.0.0-alpha2",
3
+ "version": "25.0.0-alpha21",
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,22 +34,22 @@
35
34
  ],
36
35
  "dependencies": {
37
36
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.0.0-alpha2",
39
- "@vaadin/component-base": "25.0.0-alpha2",
40
- "@vaadin/item": "25.0.0-alpha2",
41
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
42
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
37
+ "@vaadin/a11y-base": "25.0.0-alpha21",
38
+ "@vaadin/component-base": "25.0.0-alpha21",
39
+ "@vaadin/item": "25.0.0-alpha21",
40
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha21",
43
41
  "lit": "^3.0.0"
44
42
  },
45
43
  "devDependencies": {
46
- "@vaadin/chai-plugins": "25.0.0-alpha2",
47
- "@vaadin/test-runner-commands": "25.0.0-alpha2",
44
+ "@vaadin/chai-plugins": "25.0.0-alpha21",
45
+ "@vaadin/test-runner-commands": "25.0.0-alpha21",
48
46
  "@vaadin/testing-helpers": "^2.0.0",
49
- "sinon": "^18.0.0"
47
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha21",
48
+ "sinon": "^21.0.0"
50
49
  },
51
50
  "web-types": [
52
51
  "web-types.json",
53
52
  "web-types.lit.json"
54
53
  ],
55
- "gitHead": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
54
+ "gitHead": "8fb9e9710c01449edf623a1aaac4655cdc11a933"
56
55
  }
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 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 tabStyles = css`
10
+ :host {
11
+ flex-shrink: 0;
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ gap: var(--vaadin-tab-gap, var(--vaadin-gap-s));
16
+ padding: var(--vaadin-tab-padding, var(--vaadin-padding-container));
17
+ cursor: var(--vaadin-clickable-cursor);
18
+ font-size: var(--vaadin-tab-font-size, 1em);
19
+ font-weight: var(--vaadin-tab-font-weight, 500);
20
+ line-height: var(--vaadin-tab-line-height, inherit);
21
+ color: var(--vaadin-tab-color, var(--vaadin-text-color-secondary));
22
+ background: var(--vaadin-tab-background, transparent);
23
+ border-radius: var(--vaadin-tab-border-radius, var(--vaadin-radius-m));
24
+ -webkit-tap-highlight-color: transparent;
25
+ -webkit-user-select: none;
26
+ user-select: none;
27
+ touch-action: manipulation;
28
+ position: relative;
29
+ }
30
+
31
+ :host([hidden]) {
32
+ display: none !important;
33
+ }
34
+
35
+ :host([orientation='vertical']) {
36
+ justify-content: start;
37
+ }
38
+
39
+ :host([selected]) {
40
+ --vaadin-tab-background: var(--vaadin-background-container);
41
+ --vaadin-tab-color: var(--vaadin-text-color);
42
+ }
43
+
44
+ :host([disabled]) {
45
+ cursor: var(--vaadin-disabled-cursor);
46
+ opacity: 0.5;
47
+ }
48
+
49
+ :host(:is([focus-ring], :focus-visible)) {
50
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
51
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
52
+ }
53
+
54
+ slot {
55
+ gap: inherit;
56
+ align-items: inherit;
57
+ justify-content: inherit;
58
+ }
59
+
60
+ ::slotted(a) {
61
+ color: inherit;
62
+ cursor: inherit;
63
+ text-decoration: inherit;
64
+ display: flex;
65
+ align-items: inherit;
66
+ justify-content: inherit;
67
+ gap: inherit;
68
+ }
69
+
70
+ ::slotted(a)::before {
71
+ content: '';
72
+ position: absolute;
73
+ inset: 0;
74
+ }
75
+
76
+ @media (forced-colors: active) {
77
+ :host {
78
+ border: 1px solid Canvas;
79
+ }
80
+
81
+ :host([selected]) {
82
+ color: Highlight;
83
+ border-color: Highlight;
84
+ }
85
+
86
+ :host([disabled]) {
87
+ color: GrayText;
88
+ opacity: 1;
89
+ }
90
+ }
91
+ `;
@@ -0,0 +1,104 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 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 tabsStyles = css`
10
+ :host {
11
+ display: flex;
12
+ max-width: 100%;
13
+ max-height: 100%;
14
+ position: relative;
15
+ }
16
+
17
+ :host([hidden]) {
18
+ display: none !important;
19
+ }
20
+
21
+ :host([orientation='vertical']) {
22
+ flex-direction: column;
23
+ }
24
+
25
+ [part='tabs'] {
26
+ flex: 1;
27
+ overflow: auto;
28
+ overscroll-behavior: contain;
29
+ display: flex;
30
+ flex-direction: column;
31
+ gap: var(--vaadin-tabs-gap, var(--vaadin-gap-s));
32
+ }
33
+
34
+ :host([orientation='horizontal']) [part='tabs'] {
35
+ flex-direction: row;
36
+ scrollbar-width: none;
37
+ }
38
+
39
+ /* scrollbar-width is supported in Safari 18.2, use the following for earlier */
40
+ :host([orientation='horizontal']) [part='tabs']::-webkit-scrollbar {
41
+ display: none;
42
+ }
43
+
44
+ [part$='button'] {
45
+ position: absolute;
46
+ z-index: 1;
47
+ pointer-events: none;
48
+ opacity: 0;
49
+ cursor: var(--vaadin-clickable-cursor);
50
+ box-sizing: border-box;
51
+ height: 100%;
52
+ padding: var(--vaadin-tab-padding, var(--vaadin-padding-container));
53
+ background: var(--vaadin-background-color);
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ -webkit-tap-highlight-color: transparent;
58
+ touch-action: manipulation;
59
+ }
60
+
61
+ [part='forward-button'] {
62
+ inset-inline-end: 0;
63
+ }
64
+
65
+ :host([overflow~='start']) [part='back-button'],
66
+ :host([overflow~='end']) [part='forward-button'] {
67
+ pointer-events: auto;
68
+ opacity: 1;
69
+ }
70
+
71
+ [part$='button']::before {
72
+ content: '';
73
+ display: block;
74
+ width: var(--vaadin-icon-size, 1lh);
75
+ height: var(--vaadin-icon-size, 1lh);
76
+ background: currentColor;
77
+ mask: var(--_vaadin-icon-chevron-down) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;
78
+ rotate: 90deg;
79
+ }
80
+
81
+ [part='forward-button']::before {
82
+ rotate: -90deg;
83
+ }
84
+
85
+ :host(:is([orientation='vertical'], [theme~='hide-scroll-buttons'])) [part$='button'] {
86
+ display: none;
87
+ }
88
+
89
+ @media (pointer: coarse) {
90
+ :host(:not([theme~='show-scroll-buttons'])) [part$='button'] {
91
+ display: none;
92
+ }
93
+ }
94
+
95
+ :host([dir='rtl']) [part$='button']::before {
96
+ scale: 1 -1;
97
+ }
98
+
99
+ @media (forced-colors: active) {
100
+ [part$='button']::before {
101
+ background: CanvasText;
102
+ }
103
+ }
104
+ `;
@@ -10,22 +10,21 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
10
10
  /**
11
11
  * `<vaadin-tab>` is a Web Component providing an accessible and customizable tab.
12
12
  *
13
- * ```
14
- * <vaadin-tab>
15
- * Tab 1
16
- * </vaadin-tab>
13
+ * ```html
14
+ * <vaadin-tab>Tab 1</vaadin-tab>
17
15
  * ```
18
16
  *
19
17
  * The following state attributes are available for styling:
20
18
  *
21
- * Attribute | Description | Part name
22
- * -----------|-------------|------------
23
- * `disabled` | Set to a disabled tab | :host
24
- * `focused` | Set when the element is focused | :host
25
- * `focus-ring` | Set when the element is keyboard focused | :host
26
- * `selected` | Set when the tab is selected | :host
27
- * `active` | Set when mousedown or enter/spacebar pressed | :host
28
- * `orientation` | Set to `horizontal` or `vertical` depending on the direction of items | :host
19
+ * Attribute | Description
20
+ * ---------------|---------------------------------
21
+ * `disabled` | Set when the element is disabled
22
+ * `focused` | Set when the element is focused
23
+ * `focus-ring` | Set when the element is keyboard focused
24
+ * `selected` | Set when the tab is selected
25
+ * `active` | Set when mousedown or enter/spacebar pressed
26
+ * `orientation` | Set to `horizontal` or `vertical` depending on the direction of items
27
+ * `has-tooltip` | Set when the tab has a slotted tooltip
29
28
  *
30
29
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
31
30
  */
package/src/vaadin-tab.js CHANGED
@@ -8,45 +8,45 @@ 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
10
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
11
+ import { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';
12
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
- import { TabMixin } from './vaadin-tab-mixin.js';
13
- import { tabStyles } from './vaadin-tab-styles.js';
14
+ import { tabStyles } from './styles/vaadin-tab-base-styles.js';
14
15
 
15
16
  /**
16
17
  * `<vaadin-tab>` is a Web Component providing an accessible and customizable tab.
17
18
  *
18
- * ```
19
- * <vaadin-tab>
20
- * Tab 1
21
- * </vaadin-tab>
19
+ * ```html
20
+ * <vaadin-tab>Tab 1</vaadin-tab>
22
21
  * ```
23
22
  *
24
23
  * The following state attributes are available for styling:
25
24
  *
26
- * Attribute | Description | Part name
27
- * -----------|-------------|------------
28
- * `disabled` | Set to a disabled tab | :host
29
- * `focused` | Set when the element is focused | :host
30
- * `focus-ring` | Set when the element is keyboard focused | :host
31
- * `selected` | Set when the tab is selected | :host
32
- * `active` | Set when mousedown or enter/spacebar pressed | :host
33
- * `orientation` | Set to `horizontal` or `vertical` depending on the direction of items | :host
25
+ * Attribute | Description
26
+ * ---------------|---------------------------------
27
+ * `disabled` | Set when the element is disabled
28
+ * `focused` | Set when the element is focused
29
+ * `focus-ring` | Set when the element is keyboard focused
30
+ * `selected` | Set when the tab is selected
31
+ * `active` | Set when mousedown or enter/spacebar pressed
32
+ * `orientation` | Set to `horizontal` or `vertical` depending on the direction of items
33
+ * `has-tooltip` | Set when the tab has a slotted tooltip
34
34
  *
35
35
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
36
36
  *
37
37
  * @customElement
38
38
  * @extends HTMLElement
39
39
  * @mixes ElementMixin
40
+ * @mixes ItemMixin
40
41
  * @mixes ThemableMixin
41
- * @mixes TabMixin
42
42
  */
43
- class Tab extends TabMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
43
+ class Tab extends ItemMixin(ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
44
44
  static get is() {
45
45
  return 'vaadin-tab';
46
46
  }
47
47
 
48
48
  static get styles() {
49
- return [tabStyles];
49
+ return tabStyles;
50
50
  }
51
51
 
52
52
  /** @protected */
@@ -61,9 +61,31 @@ class Tab extends TabMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))
61
61
  ready() {
62
62
  super.ready();
63
63
 
64
+ this.setAttribute('role', 'tab');
65
+
64
66
  this._tooltipController = new TooltipController(this);
65
67
  this.addController(this._tooltipController);
66
68
  }
69
+
70
+ /**
71
+ * Override an event listener from `KeyboardMixin`
72
+ * to handle clicking anchors inside the tabs.
73
+ * @param {!KeyboardEvent} event
74
+ * @protected
75
+ * @override
76
+ */
77
+ _onKeyUp(event) {
78
+ const willClick = this.hasAttribute('active');
79
+
80
+ super._onKeyUp(event);
81
+
82
+ if (willClick) {
83
+ const anchor = this.querySelector('a');
84
+ if (anchor) {
85
+ anchor.click();
86
+ }
87
+ }
88
+ }
67
89
  }
68
90
 
69
91
  defineCustomElement(Tab);
@@ -30,13 +30,13 @@ export interface TabsEventMap extends HTMLElementEventMap, TabsCustomEventMap {}
30
30
  /**
31
31
  * `<vaadin-tabs>` is a Web Component for organizing and grouping content into sections.
32
32
  *
33
- * ```
34
- * <vaadin-tabs selected="4">
35
- * <vaadin-tab>Page 1</vaadin-tab>
36
- * <vaadin-tab>Page 2</vaadin-tab>
37
- * <vaadin-tab>Page 3</vaadin-tab>
38
- * <vaadin-tab>Page 4</vaadin-tab>
39
- * </vaadin-tabs>
33
+ * ```html
34
+ * <vaadin-tabs selected="4">
35
+ * <vaadin-tab>Page 1</vaadin-tab>
36
+ * <vaadin-tab>Page 2</vaadin-tab>
37
+ * <vaadin-tab>Page 3</vaadin-tab>
38
+ * <vaadin-tab>Page 4</vaadin-tab>
39
+ * </vaadin-tabs>
40
40
  * ```
41
41
  *
42
42
  * ### Styling
@@ -51,10 +51,10 @@ export interface TabsEventMap extends HTMLElementEventMap, TabsCustomEventMap {}
51
51
  *
52
52
  * The following state attributes are available for styling:
53
53
  *
54
- * Attribute | Description | Part name
55
- * -----------|-------------|------------
56
- * `orientation` | Tabs disposition, valid values are `horizontal` and `vertical`. | :host
57
- * `overflow` | It's set to `start`, `end`, none or both. | :host
54
+ * Attribute | Description
55
+ * ---------------|--------------------------------------
56
+ * `orientation` | Tabs disposition, valid values are `horizontal` and `vertical`
57
+ * `overflow` | It's set to `start`, `end`, none or both.
58
58
  *
59
59
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
60
60
  *
@@ -8,20 +8,21 @@ import { html, LitElement } from 'lit';
8
8
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
10
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
+ import { tabsStyles } from './styles/vaadin-tabs-base-styles.js';
12
14
  import { TabsMixin } from './vaadin-tabs-mixin.js';
13
- import { tabsStyles } from './vaadin-tabs-styles.js';
14
15
 
15
16
  /**
16
17
  * `<vaadin-tabs>` is a Web Component for organizing and grouping content into sections.
17
18
  *
18
- * ```
19
- * <vaadin-tabs selected="4">
20
- * <vaadin-tab>Page 1</vaadin-tab>
21
- * <vaadin-tab>Page 2</vaadin-tab>
22
- * <vaadin-tab>Page 3</vaadin-tab>
23
- * <vaadin-tab>Page 4</vaadin-tab>
24
- * </vaadin-tabs>
19
+ * ```html
20
+ * <vaadin-tabs selected="4">
21
+ * <vaadin-tab>Page 1</vaadin-tab>
22
+ * <vaadin-tab>Page 2</vaadin-tab>
23
+ * <vaadin-tab>Page 3</vaadin-tab>
24
+ * <vaadin-tab>Page 4</vaadin-tab>
25
+ * </vaadin-tabs>
25
26
  * ```
26
27
  *
27
28
  * ### Styling
@@ -36,10 +37,10 @@ import { tabsStyles } from './vaadin-tabs-styles.js';
36
37
  *
37
38
  * The following state attributes are available for styling:
38
39
  *
39
- * Attribute | Description | Part name
40
- * -----------|-------------|------------
41
- * `orientation` | Tabs disposition, valid values are `horizontal` and `vertical`. | :host
42
- * `overflow` | It's set to `start`, `end`, none or both. | :host
40
+ * Attribute | Description
41
+ * ---------------|--------------------------------------
42
+ * `orientation` | Tabs disposition, valid values are `horizontal` and `vertical`
43
+ * `overflow` | It's set to `start`, `end`, none or both.
43
44
  *
44
45
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
45
46
  *
@@ -52,13 +53,13 @@ import { tabsStyles } from './vaadin-tabs-styles.js';
52
53
  * @mixes TabsMixin
53
54
  * @mixes ThemableMixin
54
55
  */
55
- class Tabs extends TabsMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
56
+ class Tabs extends TabsMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
56
57
  static get is() {
57
58
  return 'vaadin-tabs';
58
59
  }
59
60
 
60
61
  static get styles() {
61
- return [tabsStyles];
62
+ return tabsStyles;
62
63
  }
63
64
 
64
65
  /** @protected */
package/vaadin-tab.js CHANGED
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-tab.js';
1
+ import './src/vaadin-tab.js';
2
2
  export * from './src/vaadin-tab.js';
package/vaadin-tabs.js CHANGED
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-tabs.js';
1
+ import './src/vaadin-tabs.js';
2
2
  export * from './src/vaadin-tabs.js';
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tabs",
4
- "version": "25.0.0-alpha2",
4
+ "version": "25.0.0-alpha21",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-tab",
11
- "description": "`<vaadin-tab>` is a Web Component providing an accessible and customizable tab.\n\n```\n <vaadin-tab>\n Tab 1\n </vaadin-tab>\n```\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set to a disabled tab | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`selected` | Set when the tab is selected | :host\n`active` | Set when mousedown or enter/spacebar pressed | :host\n`orientation` | Set to `horizontal` or `vertical` depending on the direction of items | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-tab>` is a Web Component providing an accessible and customizable tab.\n\n```html\n<vaadin-tab>Tab 1</vaadin-tab>\n```\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`selected` | Set when the tab is selected\n`active` | Set when mousedown or enter/spacebar pressed\n`orientation` | Set to `horizontal` or `vertical` depending on the direction of items\n`has-tooltip` | Set when the tab has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -79,7 +79,7 @@
79
79
  },
80
80
  {
81
81
  "name": "vaadin-tabs",
82
- "description": "`<vaadin-tabs>` is a Web Component for organizing and grouping content into sections.\n\n```\n <vaadin-tabs selected=\"4\">\n <vaadin-tab>Page 1</vaadin-tab>\n <vaadin-tab>Page 2</vaadin-tab>\n <vaadin-tab>Page 3</vaadin-tab>\n <vaadin-tab>Page 4</vaadin-tab>\n </vaadin-tabs>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|--------------------------------------\n`back-button` | Button for moving the scroll back\n`tabs` | The tabs container\n`forward-button` | Button for moving the scroll forward\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`orientation` | Tabs disposition, valid values are `horizontal` and `vertical`. | :host\n`overflow` | It's set to `start`, `end`, none or both. | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
82
+ "description": "`<vaadin-tabs>` is a Web Component for organizing and grouping content into sections.\n\n```html\n<vaadin-tabs selected=\"4\">\n <vaadin-tab>Page 1</vaadin-tab>\n <vaadin-tab>Page 2</vaadin-tab>\n <vaadin-tab>Page 3</vaadin-tab>\n <vaadin-tab>Page 4</vaadin-tab>\n</vaadin-tabs>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|--------------------------------------\n`back-button` | Button for moving the scroll back\n`tabs` | The tabs container\n`forward-button` | Button for moving the scroll forward\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|--------------------------------------\n`orientation` | Tabs disposition, valid values are `horizontal` and `vertical`\n`overflow` | It's set to `start`, `end`, none or both.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
83
83
  "attributes": [
84
84
  {
85
85
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tabs",
4
- "version": "25.0.0-alpha2",
4
+ "version": "25.0.0-alpha21",
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-tab",
19
- "description": "`<vaadin-tab>` is a Web Component providing an accessible and customizable tab.\n\n```\n <vaadin-tab>\n Tab 1\n </vaadin-tab>\n```\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set to a disabled tab | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`selected` | Set when the tab is selected | :host\n`active` | Set when mousedown or enter/spacebar pressed | :host\n`orientation` | Set to `horizontal` or `vertical` depending on the direction of items | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-tab>` is a Web Component providing an accessible and customizable tab.\n\n```html\n<vaadin-tab>Tab 1</vaadin-tab>\n```\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`selected` | Set when the tab is selected\n`active` | Set when mousedown or enter/spacebar pressed\n`orientation` | Set to `horizontal` or `vertical` depending on the direction of items\n`has-tooltip` | Set when the tab has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -44,7 +44,7 @@
44
44
  },
45
45
  {
46
46
  "name": "vaadin-tabs",
47
- "description": "`<vaadin-tabs>` is a Web Component for organizing and grouping content into sections.\n\n```\n <vaadin-tabs selected=\"4\">\n <vaadin-tab>Page 1</vaadin-tab>\n <vaadin-tab>Page 2</vaadin-tab>\n <vaadin-tab>Page 3</vaadin-tab>\n <vaadin-tab>Page 4</vaadin-tab>\n </vaadin-tabs>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|--------------------------------------\n`back-button` | Button for moving the scroll back\n`tabs` | The tabs container\n`forward-button` | Button for moving the scroll forward\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`orientation` | Tabs disposition, valid values are `horizontal` and `vertical`. | :host\n`overflow` | It's set to `start`, `end`, none or both. | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
47
+ "description": "`<vaadin-tabs>` is a Web Component for organizing and grouping content into sections.\n\n```html\n<vaadin-tabs selected=\"4\">\n <vaadin-tab>Page 1</vaadin-tab>\n <vaadin-tab>Page 2</vaadin-tab>\n <vaadin-tab>Page 3</vaadin-tab>\n <vaadin-tab>Page 4</vaadin-tab>\n</vaadin-tabs>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------|--------------------------------------\n`back-button` | Button for moving the scroll back\n`tabs` | The tabs container\n`forward-button` | Button for moving the scroll forward\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|--------------------------------------\n`orientation` | Tabs disposition, valid values are `horizontal` and `vertical`\n`overflow` | It's set to `start`, `end`, none or both.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
48
48
  "extension": true,
49
49
  "attributes": [
50
50
  {
@@ -1,18 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import type { Constructor } from '@open-wc/dedupe-mixin';
7
- import type { ActiveMixinClass } from '@vaadin/a11y-base/src/active-mixin.js';
8
- import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
9
- import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
10
- import type { ItemMixinClass } from '@vaadin/item/src/vaadin-item-mixin.js';
11
-
12
- export declare function TabMixin<T extends Constructor<HTMLElement>>(
13
- base: T,
14
- ): Constructor<ActiveMixinClass> &
15
- Constructor<DisabledMixinClass> &
16
- Constructor<FocusMixinClass> &
17
- Constructor<ItemMixinClass> &
18
- T;
@@ -1,40 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';
7
-
8
- /**
9
- * @polymerMixin
10
- * @mixes ItemMixin
11
- */
12
- export const TabMixin = (superClass) =>
13
- class TabMixinClass extends ItemMixin(superClass) {
14
- /** @protected */
15
- ready() {
16
- super.ready();
17
-
18
- this.setAttribute('role', 'tab');
19
- }
20
-
21
- /**
22
- * Override an event listener from `KeyboardMixin`
23
- * to handle clicking anchors inside the tabs.
24
- * @param {!KeyboardEvent} event
25
- * @protected
26
- * @override
27
- */
28
- _onKeyUp(event) {
29
- const willClick = this.hasAttribute('active');
30
-
31
- super._onKeyUp(event);
32
-
33
- if (willClick) {
34
- const anchor = this.querySelector('a');
35
- if (anchor) {
36
- anchor.click();
37
- }
38
- }
39
- }
40
- };
@@ -1,27 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 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 tabStyles = css`
9
- :host {
10
- display: block;
11
- }
12
-
13
- :host([hidden]) {
14
- display: none !important;
15
- }
16
-
17
- @media (forced-colors: active) {
18
- :host([focused]) {
19
- outline: 1px solid;
20
- outline-offset: -1px;
21
- }
22
-
23
- :host([selected]) {
24
- border-bottom: 2px solid;
25
- }
26
- }
27
- `;
@@ -1,84 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 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 tabsStyles = css`
9
- :host {
10
- display: flex;
11
- align-items: center;
12
- }
13
-
14
- :host([hidden]) {
15
- display: none !important;
16
- }
17
-
18
- :host([orientation='vertical']) {
19
- display: block;
20
- }
21
-
22
- :host([orientation='horizontal']) [part='tabs'] {
23
- flex-grow: 1;
24
- display: flex;
25
- align-self: stretch;
26
- overflow-x: auto;
27
- -webkit-overflow-scrolling: touch;
28
- }
29
-
30
- /* This seems more future-proof than \`overflow: -moz-scrollbars-none\` which is marked obsolete
31
- and is no longer guaranteed to work:
32
- https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#Mozilla_Extensions */
33
- @-moz-document url-prefix() {
34
- :host([orientation='horizontal']) [part='tabs'] {
35
- overflow: hidden;
36
- }
37
- }
38
-
39
- :host([orientation='horizontal']) [part='tabs']::-webkit-scrollbar {
40
- display: none;
41
- }
42
-
43
- :host([orientation='vertical']) [part='tabs'] {
44
- height: 100%;
45
- overflow-y: auto;
46
- -webkit-overflow-scrolling: touch;
47
- }
48
-
49
- [part='back-button'],
50
- [part='forward-button'] {
51
- pointer-events: none;
52
- opacity: 0;
53
- cursor: default;
54
- }
55
-
56
- :host([overflow~='start']) [part='back-button'],
57
- :host([overflow~='end']) [part='forward-button'] {
58
- pointer-events: auto;
59
- opacity: 1;
60
- }
61
-
62
- [part='back-button']::after {
63
- content: '\\25C0';
64
- }
65
-
66
- [part='forward-button']::after {
67
- content: '\\25B6';
68
- }
69
-
70
- :host([orientation='vertical']) [part='back-button'],
71
- :host([orientation='vertical']) [part='forward-button'] {
72
- display: none;
73
- }
74
-
75
- /* RTL specific styles */
76
-
77
- :host([dir='rtl']) [part='back-button']::after {
78
- content: '\\25B6';
79
- }
80
-
81
- :host([dir='rtl']) [part='forward-button']::after {
82
- content: '\\25C0';
83
- }
84
- `;
@@ -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/style.js';
4
- import '@vaadin/vaadin-lumo-styles/typography.js';
@@ -1,243 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/style.js';
4
- import '@vaadin/vaadin-lumo-styles/typography.js';
5
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
6
-
7
- registerStyles(
8
- 'vaadin-tab',
9
- css`
10
- :host {
11
- box-sizing: border-box;
12
- padding: 0.5rem 0.75rem;
13
- font-family: var(--lumo-font-family);
14
- font-size: var(--lumo-font-size-m);
15
- line-height: var(--lumo-line-height-xs);
16
- font-weight: 500;
17
- opacity: 1;
18
- color: var(--lumo-secondary-text-color);
19
- transition:
20
- 0.15s color,
21
- 0.2s transform;
22
- flex-shrink: 0;
23
- display: flex;
24
- align-items: center;
25
- position: relative;
26
- cursor: var(--lumo-clickable-cursor);
27
- transform-origin: 50% 100%;
28
- outline: none;
29
- -webkit-font-smoothing: antialiased;
30
- -moz-osx-font-smoothing: grayscale;
31
- overflow: hidden;
32
- min-width: var(--lumo-size-m);
33
- -webkit-user-select: none;
34
- user-select: none;
35
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
36
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
37
- --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
38
- --_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
39
- }
40
-
41
- :host(:not([orientation='vertical'])) {
42
- text-align: center;
43
- }
44
-
45
- :host([orientation='vertical']) {
46
- transform-origin: 0% 50%;
47
- padding: 0.25rem 1rem;
48
- min-height: var(--lumo-size-m);
49
- min-width: 0;
50
- }
51
-
52
- @media (forced-colors: active) {
53
- :host([focused]) {
54
- outline: 1px solid;
55
- outline-offset: -1px;
56
- }
57
-
58
- :host([orientation='vertical'][selected]) {
59
- border-bottom: none;
60
- border-left: 2px solid;
61
- }
62
- }
63
-
64
- :host(:hover),
65
- :host([focus-ring]) {
66
- color: var(--lumo-body-text-color);
67
- }
68
-
69
- :host([selected]) {
70
- color: var(--_selection-color-text);
71
- transition: 0.6s color;
72
- }
73
-
74
- :host([active]:not([selected])) {
75
- color: var(--_selection-color-text);
76
- transition-duration: 0.1s;
77
- }
78
-
79
- :host::before,
80
- :host::after {
81
- content: '';
82
- position: absolute;
83
- display: var(--_lumo-tab-marker-display, block);
84
- bottom: 0;
85
- left: 50%;
86
- width: var(--lumo-size-s);
87
- height: 2px;
88
- background-color: var(--lumo-contrast-60pct);
89
- border-radius: var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0 0;
90
- transform: translateX(-50%) scale(0);
91
- transform-origin: 50% 100%;
92
- transition: 0.14s transform cubic-bezier(0.12, 0.32, 0.54, 1);
93
- will-change: transform;
94
- }
95
-
96
- :host([orientation='vertical'])::before,
97
- :host([orientation='vertical'])::after {
98
- left: 0;
99
- bottom: 50%;
100
- transform: translateY(50%) scale(0);
101
- width: 2px;
102
- height: var(--lumo-size-xs);
103
- border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
104
- transform-origin: 100% 50%;
105
- }
106
-
107
- :host::after {
108
- box-shadow: 0 0 0 4px var(--_selection-color);
109
- opacity: 0.15;
110
- transition:
111
- 0.15s 0.02s transform,
112
- 0.8s 0.17s opacity;
113
- }
114
-
115
- :host([selected])::before,
116
- :host([selected])::after {
117
- background-color: var(--_selection-color);
118
- transform: translateX(-50%) scale(1);
119
- transition-timing-function: cubic-bezier(0.12, 0.32, 0.54, 1.5);
120
- }
121
-
122
- :host([orientation='vertical'][selected])::before,
123
- :host([orientation='vertical'][selected])::after {
124
- transform: translateY(50%) scale(1);
125
- }
126
-
127
- :host([selected]:not([active]))::after {
128
- opacity: 0;
129
- }
130
-
131
- :host(:not([orientation='vertical'])) ::slotted(a[href]) {
132
- justify-content: center;
133
- }
134
-
135
- :host ::slotted(a) {
136
- display: flex;
137
- width: 100%;
138
- align-items: center;
139
- height: 100%;
140
- margin: -0.5rem -0.75rem;
141
- padding: 0.5rem 0.75rem;
142
- outline: none;
143
-
144
- /*
145
- Override the CSS inherited from \`lumo-color\` and \`lumo-typography\`.
146
- Note: \`!important\` is needed because of the \`:slotted\` specificity.
147
- */
148
- text-decoration: none !important;
149
- color: inherit !important;
150
- }
151
-
152
- :host ::slotted(vaadin-icon) {
153
- margin: 0 4px;
154
- width: var(--lumo-icon-size-m);
155
- height: var(--lumo-icon-size-m);
156
- }
157
-
158
- /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
159
- :host ::slotted(vaadin-icon[icon^='vaadin:']) {
160
- padding: 0.25rem;
161
- box-sizing: border-box !important;
162
- }
163
-
164
- :host(:not([dir='rtl'])) ::slotted(vaadin-icon:first-child) {
165
- margin-left: 0;
166
- }
167
-
168
- :host(:not([dir='rtl'])) ::slotted(vaadin-icon:last-child) {
169
- margin-right: 0;
170
- }
171
-
172
- :host([theme~='icon-on-top']) {
173
- display: flex;
174
- flex-direction: column;
175
- align-items: center;
176
- justify-content: space-around;
177
- text-align: center;
178
- padding-bottom: 0.5rem;
179
- padding-top: 0.25rem;
180
- }
181
-
182
- :host([theme~='icon-on-top']) ::slotted(a) {
183
- flex-direction: column;
184
- align-items: center;
185
- margin-top: -0.25rem;
186
- padding-top: 0.25rem;
187
- }
188
-
189
- :host([theme~='icon-on-top']) ::slotted(vaadin-icon) {
190
- margin: 0;
191
- }
192
-
193
- /* Disabled */
194
-
195
- :host([disabled]) {
196
- pointer-events: none;
197
- opacity: 1;
198
- color: var(--lumo-disabled-text-color);
199
- }
200
-
201
- /* Focus-ring */
202
-
203
- :host([focus-ring]) {
204
- box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
205
- border-radius: var(--lumo-border-radius-m);
206
- }
207
-
208
- /* RTL specific styles */
209
-
210
- :host([dir='rtl'])::before,
211
- :host([dir='rtl'])::after {
212
- left: auto;
213
- right: 50%;
214
- transform: translateX(50%) scale(0);
215
- }
216
-
217
- :host([dir='rtl'][selected]:not([orientation='vertical']))::before,
218
- :host([dir='rtl'][selected]:not([orientation='vertical']))::after {
219
- transform: translateX(50%) scale(1);
220
- }
221
-
222
- :host([dir='rtl']) ::slotted(vaadin-icon:first-child) {
223
- margin-right: 0;
224
- }
225
-
226
- :host([dir='rtl']) ::slotted(vaadin-icon:last-child) {
227
- margin-left: 0;
228
- }
229
-
230
- :host([orientation='vertical'][dir='rtl']) {
231
- transform-origin: 100% 50%;
232
- }
233
-
234
- :host([dir='rtl'][orientation='vertical'])::before,
235
- :host([dir='rtl'][orientation='vertical'])::after {
236
- left: auto;
237
- right: 0;
238
- border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
239
- transform-origin: 0% 50%;
240
- }
241
- `,
242
- { moduleId: 'lumo-tab' },
243
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-tab-styles.js';
2
- import '../../src/vaadin-tab.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-tab-styles.js';
2
- import '../../src/vaadin-tab.js';
@@ -1,6 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
2
- import '@vaadin/vaadin-lumo-styles/color.js';
3
- import '@vaadin/vaadin-lumo-styles/sizing.js';
4
- import '@vaadin/vaadin-lumo-styles/spacing.js';
5
- import '@vaadin/vaadin-lumo-styles/style.js';
6
- import '@vaadin/vaadin-lumo-styles/typography.js';
@@ -1,251 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
2
- import '@vaadin/vaadin-lumo-styles/color.js';
3
- import '@vaadin/vaadin-lumo-styles/sizing.js';
4
- import '@vaadin/vaadin-lumo-styles/spacing.js';
5
- import '@vaadin/vaadin-lumo-styles/style.js';
6
- import '@vaadin/vaadin-lumo-styles/typography.js';
7
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
-
9
- registerStyles(
10
- 'vaadin-tabs',
11
- css`
12
- :host {
13
- -webkit-tap-highlight-color: transparent;
14
- }
15
-
16
- :host(:not([orientation='vertical'])) {
17
- box-shadow: inset 0 -1px 0 0 var(--lumo-contrast-10pct);
18
- position: relative;
19
- min-height: var(--lumo-size-l);
20
- }
21
-
22
- :host([orientation='horizontal']) [part='tabs'] ::slotted(vaadin-tab:not([theme~='icon-on-top'])) {
23
- justify-content: center;
24
- }
25
-
26
- :host([orientation='vertical']) {
27
- box-shadow: -1px 0 0 0 var(--lumo-contrast-10pct);
28
- }
29
-
30
- :host([orientation='horizontal']) [part='tabs'] {
31
- margin: 0 0.75rem;
32
- }
33
-
34
- :host([orientation='vertical']) [part='tabs'] {
35
- width: 100%;
36
- margin: 0.5rem 0;
37
- }
38
-
39
- [part='forward-button'],
40
- [part='back-button'] {
41
- position: absolute;
42
- z-index: 1;
43
- font-family: lumo-icons;
44
- color: var(--lumo-tertiary-text-color);
45
- font-size: var(--lumo-icon-size-m);
46
- display: flex;
47
- align-items: center;
48
- justify-content: center;
49
- width: 1.5em;
50
- height: 100%;
51
- transition: 0.2s opacity;
52
- top: 0;
53
- }
54
-
55
- [part='forward-button']:hover,
56
- [part='back-button']:hover {
57
- color: inherit;
58
- }
59
-
60
- :host(:not([dir='rtl'])) [part='forward-button'] {
61
- right: 0;
62
- }
63
-
64
- [part='forward-button']::after {
65
- content: var(--lumo-icons-angle-right);
66
- }
67
-
68
- [part='back-button']::after {
69
- content: var(--lumo-icons-angle-left);
70
- }
71
-
72
- /* Tabs overflow */
73
-
74
- [part='tabs'] {
75
- --_lumo-tabs-overflow-mask-image: none;
76
- -webkit-mask-image: var(--_lumo-tabs-overflow-mask-image);
77
- mask-image: var(--_lumo-tabs-overflow-mask-image);
78
- }
79
-
80
- /* Horizontal tabs overflow */
81
-
82
- /* Both ends overflowing */
83
- :host([overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
84
- --_lumo-tabs-overflow-mask-image: linear-gradient(
85
- 90deg,
86
- transparent 2em,
87
- #000 4em,
88
- #000 calc(100% - 4em),
89
- transparent calc(100% - 2em)
90
- );
91
- }
92
-
93
- /* End overflowing */
94
- :host([overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
95
- --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 4em), transparent calc(100% - 2em));
96
- }
97
-
98
- /* Start overflowing */
99
- :host([overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
100
- --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent 2em, #000 4em);
101
- }
102
-
103
- /* Vertical tabs overflow */
104
-
105
- /* Both ends overflowing */
106
- :host([overflow~='start'][overflow~='end'][orientation='vertical']) [part='tabs'] {
107
- --_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em, #000 calc(100% - 2em), transparent);
108
- }
109
-
110
- /* End overflowing */
111
- :host([overflow~='end'][orientation='vertical']) [part='tabs'] {
112
- --_lumo-tabs-overflow-mask-image: linear-gradient(#000 calc(100% - 2em), transparent);
113
- }
114
-
115
- /* Start overflowing */
116
- :host([overflow~='start'][orientation='vertical']) [part='tabs'] {
117
- --_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em);
118
- }
119
-
120
- :host [part='tabs'] ::slotted(:not(vaadin-tab)) {
121
- margin-left: var(--lumo-space-m);
122
- }
123
-
124
- /* Centered */
125
-
126
- :host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:first-of-type) {
127
- margin-inline-start: auto;
128
- }
129
-
130
- :host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:last-of-type) {
131
- margin-inline-end: auto;
132
- }
133
-
134
- /* Small */
135
-
136
- :host([theme~='small']),
137
- :host([theme~='small']) [part='tabs'] {
138
- min-height: var(--lumo-size-m);
139
- }
140
-
141
- :host([theme~='small']) [part='tabs'] ::slotted(vaadin-tab) {
142
- font-size: var(--lumo-font-size-s);
143
- }
144
-
145
- /* Minimal */
146
-
147
- :host([theme~='minimal']) {
148
- box-shadow: none;
149
- --_lumo-tab-marker-display: none;
150
- }
151
-
152
- /* Hide-scroll-buttons */
153
-
154
- :host([theme~='hide-scroll-buttons']) [part='back-button'],
155
- :host([theme~='hide-scroll-buttons']) [part='forward-button'] {
156
- display: none;
157
- }
158
-
159
- /* prettier-ignore */
160
- :host([theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
161
- --_lumo-tabs-overflow-mask-image: linear-gradient(
162
- 90deg,
163
- transparent,
164
- #000 2em,
165
- #000 calc(100% - 2em),
166
- transparent 100%
167
- );
168
- }
169
-
170
- :host([theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
171
- --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 2em), transparent 100%);
172
- }
173
-
174
- :host([theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
175
- --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent, #000 2em);
176
- }
177
-
178
- /* Equal-width tabs */
179
- :host([theme~='equal-width-tabs']) {
180
- flex: auto;
181
- }
182
-
183
- :host([theme~='equal-width-tabs']) [part='tabs'] ::slotted(vaadin-tab) {
184
- flex: 1 0 0%;
185
- }
186
-
187
- /* RTL specific styles */
188
-
189
- :host([dir='rtl']) [part='forward-button']::after {
190
- content: var(--lumo-icons-angle-left);
191
- }
192
-
193
- :host([dir='rtl']) [part='back-button']::after {
194
- content: var(--lumo-icons-angle-right);
195
- }
196
-
197
- :host([orientation='vertical'][dir='rtl']) {
198
- box-shadow: 1px 0 0 0 var(--lumo-contrast-10pct);
199
- }
200
-
201
- :host([dir='rtl']) [part='forward-button'] {
202
- left: 0;
203
- }
204
-
205
- :host([dir='rtl']) [part='tabs'] ::slotted(:not(vaadin-tab)) {
206
- margin-left: 0;
207
- margin-right: var(--lumo-space-m);
208
- }
209
-
210
- /* Both ends overflowing */
211
- :host([dir='rtl'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
212
- --_lumo-tabs-overflow-mask-image: linear-gradient(
213
- -90deg,
214
- transparent 2em,
215
- #000 4em,
216
- #000 calc(100% - 4em),
217
- transparent calc(100% - 2em)
218
- );
219
- }
220
-
221
- /* End overflowing */
222
- :host([dir='rtl'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
223
- --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 4em), transparent calc(100% - 2em));
224
- }
225
-
226
- /* Start overflowing */
227
- :host([dir='rtl'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
228
- --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent 2em, #000 4em);
229
- }
230
-
231
- :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical']))
232
- [part='tabs'] {
233
- --_lumo-tabs-overflow-mask-image: linear-gradient(
234
- -90deg,
235
- transparent,
236
- #000 2em,
237
- #000 calc(100% - 2em),
238
- transparent 100%
239
- );
240
- }
241
-
242
- :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
243
- --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 2em), transparent 100%);
244
- }
245
-
246
- :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
247
- --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent, #000 2em);
248
- }
249
- `,
250
- { moduleId: 'lumo-tabs' },
251
- );
@@ -1,3 +0,0 @@
1
- import './vaadin-tab.js';
2
- import './vaadin-tabs-styles.js';
3
- import '../../src/vaadin-tabs.js';
@@ -1,3 +0,0 @@
1
- import './vaadin-tab.js';
2
- import './vaadin-tabs-styles.js';
3
- import '../../src/vaadin-tabs.js';