@vaadin/tabs 25.0.0-alpha10 → 25.0.0-alpha11
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 +9 -12
- package/src/styles/vaadin-tab-base-styles.js +1 -1
- package/src/styles/vaadin-tabs-base-styles.js +1 -1
- package/src/vaadin-tab.js +1 -1
- package/src/vaadin-tabs.js +1 -1
- package/vaadin-tab.js +1 -1
- package/vaadin-tabs.js +1 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/styles/vaadin-tab-core-styles.d.ts +0 -8
- package/src/styles/vaadin-tab-core-styles.js +0 -27
- package/src/styles/vaadin-tabs-core-styles.d.ts +0 -8
- package/src/styles/vaadin-tabs-core-styles.js +0 -82
- package/theme/lumo/vaadin-tab-styles.d.ts +0 -4
- package/theme/lumo/vaadin-tab-styles.js +0 -243
- package/theme/lumo/vaadin-tab.d.ts +0 -2
- package/theme/lumo/vaadin-tab.js +0 -2
- package/theme/lumo/vaadin-tabs-styles.d.ts +0 -6
- package/theme/lumo/vaadin-tabs-styles.js +0 -250
- package/theme/lumo/vaadin-tabs.d.ts +0 -3
- package/theme/lumo/vaadin-tabs.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/tabs",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,9 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"!src/styles/*-base-styles.d.ts",
|
|
25
|
-
"!src/styles/*-base-styles.js",
|
|
26
|
-
"theme",
|
|
27
24
|
"vaadin-*.d.ts",
|
|
28
25
|
"vaadin-*.js",
|
|
29
26
|
"web-types.json",
|
|
@@ -37,22 +34,22 @@
|
|
|
37
34
|
],
|
|
38
35
|
"dependencies": {
|
|
39
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
41
|
-
"@vaadin/component-base": "25.0.0-
|
|
42
|
-
"@vaadin/item": "25.0.0-
|
|
43
|
-
"@vaadin/vaadin-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha11",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha11",
|
|
39
|
+
"@vaadin/item": "25.0.0-alpha11",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha11",
|
|
45
41
|
"lit": "^3.0.0"
|
|
46
42
|
},
|
|
47
43
|
"devDependencies": {
|
|
48
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
49
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
44
|
+
"@vaadin/chai-plugins": "25.0.0-alpha11",
|
|
45
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha11",
|
|
50
46
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
47
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha11",
|
|
51
48
|
"sinon": "^18.0.0"
|
|
52
49
|
},
|
|
53
50
|
"web-types": [
|
|
54
51
|
"web-types.json",
|
|
55
52
|
"web-types.lit.json"
|
|
56
53
|
],
|
|
57
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "abfd315ba5a7484a613e0768635a4e8fe945a44b"
|
|
58
55
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2017 - 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 '@vaadin/component-base/src/style-props.js';
|
|
6
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
|
|
9
9
|
export const tabStyles = css`
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2017 - 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 '@vaadin/component-base/src/style-props.js';
|
|
6
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
|
|
9
9
|
export const tabsStyles = css`
|
package/src/vaadin-tab.js
CHANGED
|
@@ -11,7 +11,7 @@ import { TooltipController } from '@vaadin/component-base/src/tooltip-controller
|
|
|
11
11
|
import { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';
|
|
12
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
|
-
import { tabStyles } from './styles/vaadin-tab-
|
|
14
|
+
import { tabStyles } from './styles/vaadin-tab-base-styles.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* `<vaadin-tab>` is a Web Component providing an accessible and customizable tab.
|
package/src/vaadin-tabs.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
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
|
-
import { tabsStyles } from './styles/vaadin-tabs-
|
|
13
|
+
import { tabsStyles } from './styles/vaadin-tabs-base-styles.js';
|
|
14
14
|
import { TabsMixin } from './vaadin-tabs-mixin.js';
|
|
15
15
|
|
|
16
16
|
/**
|
package/vaadin-tab.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
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 './
|
|
1
|
+
import './src/vaadin-tabs.js';
|
|
2
2
|
export * from './src/vaadin-tabs.js';
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -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,82 +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
|
-
}
|
|
28
|
-
|
|
29
|
-
/* This seems more future-proof than \`overflow: -moz-scrollbars-none\` which is marked obsolete
|
|
30
|
-
and is no longer guaranteed to work:
|
|
31
|
-
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#Mozilla_Extensions */
|
|
32
|
-
@-moz-document url-prefix() {
|
|
33
|
-
:host([orientation='horizontal']) [part='tabs'] {
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host([orientation='horizontal']) [part='tabs']::-webkit-scrollbar {
|
|
39
|
-
display: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:host([orientation='vertical']) [part='tabs'] {
|
|
43
|
-
height: 100%;
|
|
44
|
-
overflow-y: auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
[part='back-button'],
|
|
48
|
-
[part='forward-button'] {
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
opacity: 0;
|
|
51
|
-
cursor: default;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
:host([overflow~='start']) [part='back-button'],
|
|
55
|
-
:host([overflow~='end']) [part='forward-button'] {
|
|
56
|
-
pointer-events: auto;
|
|
57
|
-
opacity: 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
[part='back-button']::after {
|
|
61
|
-
content: '\\25C0';
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
[part='forward-button']::after {
|
|
65
|
-
content: '\\25B6';
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:host([orientation='vertical']) [part='back-button'],
|
|
69
|
-
:host([orientation='vertical']) [part='forward-button'] {
|
|
70
|
-
display: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* RTL specific styles */
|
|
74
|
-
|
|
75
|
-
:host([dir='rtl']) [part='back-button']::after {
|
|
76
|
-
content: '\\25B6';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
:host([dir='rtl']) [part='forward-button']::after {
|
|
80
|
-
content: '\\25C0';
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
@@ -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
|
-
);
|
package/theme/lumo/vaadin-tab.js
DELETED
|
@@ -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,250 +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
|
-
mask-image: var(--_lumo-tabs-overflow-mask-image);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Horizontal tabs overflow */
|
|
80
|
-
|
|
81
|
-
/* Both ends overflowing */
|
|
82
|
-
:host([overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
|
|
83
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(
|
|
84
|
-
90deg,
|
|
85
|
-
transparent 2em,
|
|
86
|
-
#000 4em,
|
|
87
|
-
#000 calc(100% - 4em),
|
|
88
|
-
transparent calc(100% - 2em)
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* End overflowing */
|
|
93
|
-
:host([overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
|
|
94
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 4em), transparent calc(100% - 2em));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Start overflowing */
|
|
98
|
-
:host([overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
|
|
99
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent 2em, #000 4em);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/* Vertical tabs overflow */
|
|
103
|
-
|
|
104
|
-
/* Both ends overflowing */
|
|
105
|
-
:host([overflow~='start'][overflow~='end'][orientation='vertical']) [part='tabs'] {
|
|
106
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em, #000 calc(100% - 2em), transparent);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* End overflowing */
|
|
110
|
-
:host([overflow~='end'][orientation='vertical']) [part='tabs'] {
|
|
111
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(#000 calc(100% - 2em), transparent);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/* Start overflowing */
|
|
115
|
-
:host([overflow~='start'][orientation='vertical']) [part='tabs'] {
|
|
116
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
:host [part='tabs'] ::slotted(:not(vaadin-tab)) {
|
|
120
|
-
margin-left: var(--lumo-space-m);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Centered */
|
|
124
|
-
|
|
125
|
-
:host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:first-of-type) {
|
|
126
|
-
margin-inline-start: auto;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:last-of-type) {
|
|
130
|
-
margin-inline-end: auto;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/* Small */
|
|
134
|
-
|
|
135
|
-
:host([theme~='small']),
|
|
136
|
-
:host([theme~='small']) [part='tabs'] {
|
|
137
|
-
min-height: var(--lumo-size-m);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
:host([theme~='small']) [part='tabs'] ::slotted(vaadin-tab) {
|
|
141
|
-
font-size: var(--lumo-font-size-s);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* Minimal */
|
|
145
|
-
|
|
146
|
-
:host([theme~='minimal']) {
|
|
147
|
-
box-shadow: none;
|
|
148
|
-
--_lumo-tab-marker-display: none;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/* Hide-scroll-buttons */
|
|
152
|
-
|
|
153
|
-
:host([theme~='hide-scroll-buttons']) [part='back-button'],
|
|
154
|
-
:host([theme~='hide-scroll-buttons']) [part='forward-button'] {
|
|
155
|
-
display: none;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* prettier-ignore */
|
|
159
|
-
:host([theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
|
|
160
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(
|
|
161
|
-
90deg,
|
|
162
|
-
transparent,
|
|
163
|
-
#000 2em,
|
|
164
|
-
#000 calc(100% - 2em),
|
|
165
|
-
transparent 100%
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
:host([theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
|
|
170
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 2em), transparent 100%);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
:host([theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
|
|
174
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent, #000 2em);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* Equal-width tabs */
|
|
178
|
-
:host([theme~='equal-width-tabs']) {
|
|
179
|
-
flex: auto;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
:host([theme~='equal-width-tabs']) [part='tabs'] ::slotted(vaadin-tab) {
|
|
183
|
-
flex: 1 0 0%;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* RTL specific styles */
|
|
187
|
-
|
|
188
|
-
:host([dir='rtl']) [part='forward-button']::after {
|
|
189
|
-
content: var(--lumo-icons-angle-left);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
:host([dir='rtl']) [part='back-button']::after {
|
|
193
|
-
content: var(--lumo-icons-angle-right);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
:host([orientation='vertical'][dir='rtl']) {
|
|
197
|
-
box-shadow: 1px 0 0 0 var(--lumo-contrast-10pct);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
:host([dir='rtl']) [part='forward-button'] {
|
|
201
|
-
left: 0;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
:host([dir='rtl']) [part='tabs'] ::slotted(:not(vaadin-tab)) {
|
|
205
|
-
margin-left: 0;
|
|
206
|
-
margin-right: var(--lumo-space-m);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/* Both ends overflowing */
|
|
210
|
-
:host([dir='rtl'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
|
|
211
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(
|
|
212
|
-
-90deg,
|
|
213
|
-
transparent 2em,
|
|
214
|
-
#000 4em,
|
|
215
|
-
#000 calc(100% - 4em),
|
|
216
|
-
transparent calc(100% - 2em)
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/* End overflowing */
|
|
221
|
-
:host([dir='rtl'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
|
|
222
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 4em), transparent calc(100% - 2em));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/* Start overflowing */
|
|
226
|
-
:host([dir='rtl'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
|
|
227
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent 2em, #000 4em);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
:host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical']))
|
|
231
|
-
[part='tabs'] {
|
|
232
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(
|
|
233
|
-
-90deg,
|
|
234
|
-
transparent,
|
|
235
|
-
#000 2em,
|
|
236
|
-
#000 calc(100% - 2em),
|
|
237
|
-
transparent 100%
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
:host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] {
|
|
242
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 2em), transparent 100%);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
:host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] {
|
|
246
|
-
--_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent, #000 2em);
|
|
247
|
-
}
|
|
248
|
-
`,
|
|
249
|
-
{ moduleId: 'lumo-tabs' },
|
|
250
|
-
);
|