@vaadin/tabs 25.0.0-alpha5 → 25.0.0-alpha7

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-alpha5",
3
+ "version": "25.0.0-alpha7",
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,16 +37,16 @@
35
37
  ],
36
38
  "dependencies": {
37
39
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.0.0-alpha5",
39
- "@vaadin/component-base": "25.0.0-alpha5",
40
- "@vaadin/item": "25.0.0-alpha5",
41
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha5",
42
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha5",
40
+ "@vaadin/a11y-base": "25.0.0-alpha7",
41
+ "@vaadin/component-base": "25.0.0-alpha7",
42
+ "@vaadin/item": "25.0.0-alpha7",
43
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
44
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
43
45
  "lit": "^3.0.0"
44
46
  },
45
47
  "devDependencies": {
46
- "@vaadin/chai-plugins": "25.0.0-alpha5",
47
- "@vaadin/test-runner-commands": "25.0.0-alpha5",
48
+ "@vaadin/chai-plugins": "25.0.0-alpha7",
49
+ "@vaadin/test-runner-commands": "25.0.0-alpha7",
48
50
  "@vaadin/testing-helpers": "^2.0.0",
49
51
  "sinon": "^18.0.0"
50
52
  },
@@ -52,5 +54,5 @@
52
54
  "web-types.json",
53
55
  "web-types.lit.json"
54
56
  ],
55
- "gitHead": "7dc87bb2a3cae81ed53259fa10b58f990d50c6fd"
57
+ "gitHead": "87f72707ce6866892f8be5782fa0da008e87dcbc"
56
58
  }
@@ -0,0 +1,8 @@
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 { CSSResult } from 'lit';
7
+
8
+ export const tabStyles: CSSResult;
@@ -0,0 +1,93 @@
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/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const tabStyles = css`
10
+ @layer base {
11
+ :host {
12
+ flex-shrink: 0;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ gap: var(--vaadin-tab-gap, var(--vaadin-gap-container-inline));
17
+ padding: var(--vaadin-tab-padding, var(--vaadin-padding-container));
18
+ cursor: var(--vaadin-clickable-cursor);
19
+ font-size: var(--vaadin-tab-font-size, 1em);
20
+ font-weight: var(--vaadin-tab-font-weight, 500);
21
+ line-height: var(--vaadin-tab-line-height, inherit);
22
+ color: var(--vaadin-tab-color, var(--vaadin-color-subtle));
23
+ background: var(--vaadin-tab-background, transparent);
24
+ border-radius: var(--vaadin-tab-border-radius, var(--vaadin-radius-m));
25
+ -webkit-tap-highlight-color: transparent;
26
+ -webkit-user-select: none;
27
+ user-select: none;
28
+ touch-action: manipulation;
29
+ position: relative;
30
+ }
31
+
32
+ :host([hidden]) {
33
+ display: none !important;
34
+ }
35
+
36
+ :host([orientation='vertical']) {
37
+ justify-content: start;
38
+ }
39
+
40
+ :host([selected]) {
41
+ --vaadin-tab-background: var(--vaadin-background-container);
42
+ --vaadin-tab-color: var(--vaadin-color);
43
+ }
44
+
45
+ :host([disabled]) {
46
+ cursor: var(--vaadin-disabled-cursor);
47
+ opacity: 0.5;
48
+ }
49
+
50
+ :host(:is([focus-ring], :focus-visible)) {
51
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
52
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
53
+ }
54
+
55
+ slot {
56
+ gap: inherit;
57
+ align-items: inherit;
58
+ justify-content: inherit;
59
+ }
60
+
61
+ ::slotted(a) {
62
+ color: inherit;
63
+ cursor: inherit;
64
+ text-decoration: inherit;
65
+ display: flex;
66
+ align-items: inherit;
67
+ justify-content: inherit;
68
+ gap: inherit;
69
+ }
70
+
71
+ ::slotted(a)::before {
72
+ content: '';
73
+ position: absolute;
74
+ inset: 0;
75
+ }
76
+
77
+ @media (forced-colors: active) {
78
+ :host {
79
+ border: 1px solid Canvas;
80
+ }
81
+
82
+ :host([selected]) {
83
+ color: Highlight;
84
+ border-color: Highlight;
85
+ }
86
+
87
+ :host([disabled]) {
88
+ color: GrayText;
89
+ opacity: 1;
90
+ }
91
+ }
92
+ }
93
+ `;
@@ -0,0 +1,8 @@
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 { CSSResult } from 'lit';
7
+
8
+ export const tabsStyles: CSSResult;
@@ -0,0 +1,106 @@
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/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const tabsStyles = css`
10
+ @layer base {
11
+ :host {
12
+ display: flex;
13
+ max-width: 100%;
14
+ max-height: 100%;
15
+ position: relative;
16
+ }
17
+
18
+ :host([hidden]) {
19
+ display: none !important;
20
+ }
21
+
22
+ :host([orientation='vertical']) {
23
+ flex-direction: column;
24
+ }
25
+
26
+ [part='tabs'] {
27
+ flex: 1;
28
+ overflow: auto;
29
+ overscroll-behavior: contain;
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: var(--vaadin-tabs-gap, var(--vaadin-gap-container-inline));
33
+ }
34
+
35
+ :host([orientation='horizontal']) [part='tabs'] {
36
+ flex-direction: row;
37
+ scrollbar-width: none;
38
+ }
39
+
40
+ /* scrollbar-width is supported in Safari 18.2, use the following for earlier */
41
+ :host([orientation='horizontal']) [part='tabs']::-webkit-scrollbar {
42
+ display: none;
43
+ }
44
+
45
+ [part$='button'] {
46
+ position: absolute;
47
+ z-index: 1;
48
+ pointer-events: none;
49
+ opacity: 0;
50
+ cursor: var(--vaadin-clickable-cursor);
51
+ box-sizing: border-box;
52
+ height: 100%;
53
+ padding: var(--vaadin-tab-padding, var(--vaadin-padding-container));
54
+ background: var(--vaadin-background-color);
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ -webkit-tap-highlight-color: transparent;
59
+ touch-action: manipulation;
60
+ }
61
+
62
+ [part='forward-button'] {
63
+ inset-inline-end: 0;
64
+ }
65
+
66
+ :host([overflow~='start']) [part='back-button'],
67
+ :host([overflow~='end']) [part='forward-button'] {
68
+ pointer-events: auto;
69
+ opacity: 1;
70
+ }
71
+
72
+ [part$='button']::before {
73
+ content: '';
74
+ display: block;
75
+ width: var(--vaadin-icon-size, 1lh);
76
+ height: var(--vaadin-icon-size, 1lh);
77
+ background: currentColor;
78
+ mask-image: var(--_vaadin-icon-chevron-down);
79
+ rotate: 90deg;
80
+ }
81
+
82
+ [part='forward-button']::before {
83
+ rotate: -90deg;
84
+ }
85
+
86
+ :host(:is([orientation='vertical'], [theme~='hide-scroll-buttons'])) [part$='button'] {
87
+ display: none;
88
+ }
89
+
90
+ @media (pointer: coarse) {
91
+ :host(:not([theme~='show-scroll-buttons'])) [part$='button'] {
92
+ display: none;
93
+ }
94
+ }
95
+
96
+ :host([dir='rtl']) [part$='button']::before {
97
+ scale: 1 -1;
98
+ }
99
+
100
+ @media (forced-colors: active) {
101
+ [part$='button']::before {
102
+ background: CanvasText;
103
+ }
104
+ }
105
+ }
106
+ `;
@@ -24,7 +24,6 @@ export const tabsStyles = css`
24
24
  display: flex;
25
25
  align-self: stretch;
26
26
  overflow-x: auto;
27
- -webkit-overflow-scrolling: touch;
28
27
  }
29
28
 
30
29
  /* This seems more future-proof than \`overflow: -moz-scrollbars-none\` which is marked obsolete
@@ -43,7 +42,6 @@ export const tabsStyles = css`
43
42
  :host([orientation='vertical']) [part='tabs'] {
44
43
  height: 100%;
45
44
  overflow-y: auto;
46
- -webkit-overflow-scrolling: touch;
47
45
  }
48
46
 
49
47
  [part='back-button'],
package/src/vaadin-tab.js CHANGED
@@ -9,7 +9,7 @@ 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
11
  import { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';
12
- import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
12
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
13
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
14
  import { tabStyles } from './styles/vaadin-tab-core-styles.js';
15
15
 
@@ -41,7 +41,7 @@ import { tabStyles } from './styles/vaadin-tab-core-styles.js';
41
41
  * @mixes ItemMixin
42
42
  * @mixes ThemableMixin
43
43
  */
44
- class Tab extends ItemMixin(ThemableMixin(ElementMixin(CSSInjectionMixin(PolylitMixin(LitElement))))) {
44
+ class Tab extends ItemMixin(ThemableMixin(ElementMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
45
45
  static get is() {
46
46
  return 'vaadin-tab';
47
47
  }
@@ -8,7 +8,7 @@ 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 { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
11
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
12
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
13
  import { tabsStyles } from './styles/vaadin-tabs-core-styles.js';
14
14
  import { TabsMixin } from './vaadin-tabs-mixin.js';
@@ -53,7 +53,7 @@ import { TabsMixin } from './vaadin-tabs-mixin.js';
53
53
  * @mixes TabsMixin
54
54
  * @mixes ThemableMixin
55
55
  */
56
- class Tabs extends TabsMixin(ElementMixin(ThemableMixin(CSSInjectionMixin(PolylitMixin(LitElement))))) {
56
+ class Tabs extends TabsMixin(ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
57
57
  static get is() {
58
58
  return 'vaadin-tabs';
59
59
  }
@@ -73,7 +73,6 @@ registerStyles(
73
73
 
74
74
  [part='tabs'] {
75
75
  --_lumo-tabs-overflow-mask-image: none;
76
- -webkit-mask-image: var(--_lumo-tabs-overflow-mask-image);
77
76
  mask-image: var(--_lumo-tabs-overflow-mask-image);
78
77
  }
79
78
 
package/web-types.json CHANGED
@@ -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-alpha5",
4
+ "version": "25.0.0-alpha7",
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/tabs",
4
- "version": "25.0.0-alpha5",
4
+ "version": "25.0.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {