@vaadin/tabs 24.4.6 → 24.5.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/README.md CHANGED
@@ -56,7 +56,7 @@ import '@vaadin/tabs/src/vaadin-tabs.js';
56
56
 
57
57
  ## Contributing
58
58
 
59
- Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
59
+ Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
60
60
 
61
61
  ## License
62
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/tabs",
3
- "version": "24.4.6",
3
+ "version": "24.5.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,6 +24,8 @@
24
24
  "theme",
25
25
  "vaadin-*.d.ts",
26
26
  "vaadin-*.js",
27
+ "!vaadin-lit-*.d.ts",
28
+ "!vaadin-lit-*.js",
27
29
  "web-types.json",
28
30
  "web-types.lit.json"
29
31
  ],
@@ -37,22 +39,22 @@
37
39
  "dependencies": {
38
40
  "@open-wc/dedupe-mixin": "^1.3.0",
39
41
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "~24.4.6",
41
- "@vaadin/component-base": "~24.4.6",
42
- "@vaadin/item": "~24.4.6",
43
- "@vaadin/vaadin-lumo-styles": "~24.4.6",
44
- "@vaadin/vaadin-material-styles": "~24.4.6",
45
- "@vaadin/vaadin-themable-mixin": "~24.4.6",
42
+ "@vaadin/a11y-base": "24.5.0-alpha10",
43
+ "@vaadin/component-base": "24.5.0-alpha10",
44
+ "@vaadin/item": "24.5.0-alpha10",
45
+ "@vaadin/vaadin-lumo-styles": "24.5.0-alpha10",
46
+ "@vaadin/vaadin-material-styles": "24.5.0-alpha10",
47
+ "@vaadin/vaadin-themable-mixin": "24.5.0-alpha10",
46
48
  "lit": "^3.0.0"
47
49
  },
48
50
  "devDependencies": {
49
- "@esm-bundle/chai": "^4.3.4",
50
- "@vaadin/testing-helpers": "^0.6.0",
51
- "sinon": "^13.0.2"
51
+ "@vaadin/chai-plugins": "24.5.0-alpha10",
52
+ "@vaadin/testing-helpers": "^1.0.0",
53
+ "sinon": "^18.0.0"
52
54
  },
53
55
  "web-types": [
54
56
  "web-types.json",
55
57
  "web-types.lit.json"
56
58
  ],
57
- "gitHead": "46d3cdb72eb99d544c7bb86c3de95043b9e5857f"
59
+ "gitHead": "6f9c37308031af872a98017bfab4de89aeacda51"
58
60
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ export * from './vaadin-tab.js';
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { html, LitElement } from 'lit';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
+ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
11
+ 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
+
15
+ /**
16
+ * LitElement based version of `<vaadin-tab>` web component.
17
+ *
18
+ * ## Disclaimer
19
+ *
20
+ * This component is an experiment and not yet a part of Vaadin platform.
21
+ * There is no ETA regarding specific Vaadin version where it'll land.
22
+ * Feel free to try this code in your apps as per Apache 2.0 license.
23
+ *
24
+ * @extends HTMLElement
25
+ * @mixes ElementMixin
26
+ * @mixes TabMixin
27
+ * @mixes ThemableMixin
28
+ */
29
+ class Tab extends TabMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
30
+ static get is() {
31
+ return 'vaadin-tab';
32
+ }
33
+
34
+ static get styles() {
35
+ return [tabStyles];
36
+ }
37
+
38
+ /** @protected */
39
+ render() {
40
+ return html`
41
+ <slot></slot>
42
+ <slot name="tooltip"></slot>
43
+ `;
44
+ }
45
+
46
+ /** @protected */
47
+ ready() {
48
+ super.ready();
49
+
50
+ this._tooltipController = new TooltipController(this);
51
+ this.addController(this._tooltipController);
52
+ }
53
+ }
54
+
55
+ defineCustomElement(Tab);
56
+
57
+ export { Tab };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ export * from './vaadin-tabs.js';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import './vaadin-lit-tab.js';
7
+ import { html, LitElement } from 'lit';
8
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
+ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
+ import { TabsMixin } from './vaadin-tabs-mixin.js';
13
+ import { tabsStyles } from './vaadin-tabs-styles.js';
14
+
15
+ /**
16
+ * LitElement based version of `<vaadin-tabs>` web component.
17
+ *
18
+ * ## Disclaimer
19
+ *
20
+ * This component is an experiment and not yet a part of Vaadin platform.
21
+ * There is no ETA regarding specific Vaadin version where it'll land.
22
+ * Feel free to try this code in your apps as per Apache 2.0 license.
23
+ *
24
+ * @extends HTMLElement
25
+ * @mixes ElementMixin
26
+ * @mixes TabsMixin
27
+ * @mixes ThemableMixin
28
+ */
29
+ class Tabs extends TabsMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
30
+ static get is() {
31
+ return 'vaadin-tabs';
32
+ }
33
+
34
+ static get styles() {
35
+ return [tabsStyles];
36
+ }
37
+
38
+ /** @protected */
39
+ render() {
40
+ return html`
41
+ <div @click="${this._scrollBack}" part="back-button" aria-hidden="true"></div>
42
+
43
+ <div id="scroll" part="tabs">
44
+ <slot></slot>
45
+ </div>
46
+
47
+ <div @click="${this._scrollForward}" part="forward-button" aria-hidden="true"></div>
48
+ `;
49
+ }
50
+ }
51
+
52
+ defineCustomElement(Tabs);
53
+
54
+ export { Tabs };
@@ -24,6 +24,8 @@ export const TabsMixin = (superClass) =>
24
24
  orientation: {
25
25
  value: 'horizontal',
26
26
  type: String,
27
+ reflectToAttribute: true,
28
+ sync: true,
27
29
  },
28
30
 
29
31
  /**
@@ -0,0 +1,2 @@
1
+ import './vaadin-tab-styles.js';
2
+ import '../../src/vaadin-lit-tab.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-tab-styles.js';
2
+ import '../../src/vaadin-lit-tab.js';
@@ -0,0 +1,3 @@
1
+ import './vaadin-lit-tab.js';
2
+ import './vaadin-tabs-styles.js';
3
+ import '../../src/vaadin-lit-tabs.js';
@@ -0,0 +1,3 @@
1
+ import './vaadin-lit-tab.js';
2
+ import './vaadin-tabs-styles.js';
3
+ import '../../src/vaadin-lit-tabs.js';
@@ -16,7 +16,9 @@ registerStyles(
16
16
  font-weight: 500;
17
17
  opacity: 1;
18
18
  color: var(--lumo-secondary-text-color);
19
- transition: 0.15s color, 0.2s transform;
19
+ transition:
20
+ 0.15s color,
21
+ 0.2s transform;
20
22
  flex-shrink: 0;
21
23
  display: flex;
22
24
  align-items: center;
@@ -92,11 +94,6 @@ registerStyles(
92
94
  will-change: transform;
93
95
  }
94
96
 
95
- :host([selected])::before,
96
- :host([selected])::after {
97
- background-color: var(--_selection-color);
98
- }
99
-
100
97
  :host([orientation='vertical'])::before,
101
98
  :host([orientation='vertical'])::after {
102
99
  left: 0;
@@ -111,11 +108,14 @@ registerStyles(
111
108
  :host::after {
112
109
  box-shadow: 0 0 0 4px var(--_selection-color);
113
110
  opacity: 0.15;
114
- transition: 0.15s 0.02s transform, 0.8s 0.17s opacity;
111
+ transition:
112
+ 0.15s 0.02s transform,
113
+ 0.8s 0.17s opacity;
115
114
  }
116
115
 
117
116
  :host([selected])::before,
118
117
  :host([selected])::after {
118
+ background-color: var(--_selection-color);
119
119
  transform: translateX(-50%) scale(1);
120
120
  transition-timing-function: cubic-bezier(0.12, 0.32, 0.54, 1.5);
121
121
  }
@@ -0,0 +1,2 @@
1
+ import './vaadin-tab-styles.js';
2
+ import '../../src/vaadin-lit-tab.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-tab-styles.js';
2
+ import '../../src/vaadin-lit-tab.js';
@@ -0,0 +1,3 @@
1
+ import './vaadin-lit-tab.js';
2
+ import './vaadin-tabs-styles.js';
3
+ import '../../src/vaadin-lit-tabs.js';
@@ -0,0 +1,3 @@
1
+ import './vaadin-lit-tab.js';
2
+ import './vaadin-tabs-styles.js';
3
+ import '../../src/vaadin-lit-tabs.js';
@@ -81,7 +81,9 @@ registerStyles(
81
81
  transform: translate(-50%, -50%) scale(0);
82
82
  background-color: var(--material-primary-color);
83
83
  opacity: 0;
84
- transition: transform 0s cubic-bezier(0.05, 0.8, 0.5, 1), opacity 0s linear;
84
+ transition:
85
+ transform 0s cubic-bezier(0.05, 0.8, 0.5, 1),
86
+ opacity 0s linear;
85
87
  }
86
88
 
87
89
  :host([focused]:not([focus-ring]))::after,
@@ -7,9 +7,6 @@ registerStyles(
7
7
  css`
8
8
  :host {
9
9
  -webkit-tap-highlight-color: transparent;
10
- }
11
-
12
- :host {
13
10
  display: flex;
14
11
  flex-shrink: 0;
15
12
  }
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": "24.4.6",
4
+ "version": "24.5.0-alpha10",
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": "24.4.6",
4
+ "version": "24.5.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {