@vaadin/tabs 24.2.0-dev.f254716fe → 24.2.0
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 -9
- package/src/vaadin-tab.js +3 -1
- package/src/vaadin-tabs.js +3 -1
- package/web-types.json +154 -0
- package/web-types.lit.json +83 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/tabs",
|
|
3
|
-
"version": "24.2.0
|
|
3
|
+
"version": "24.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/a11y-base": "24.2.0
|
|
40
|
-
"@vaadin/component-base": "24.2.0
|
|
41
|
-
"@vaadin/item": "24.2.0
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "24.2.0
|
|
43
|
-
"@vaadin/vaadin-material-styles": "24.2.0
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "24.2.0
|
|
39
|
+
"@vaadin/a11y-base": "~24.2.0",
|
|
40
|
+
"@vaadin/component-base": "~24.2.0",
|
|
41
|
+
"@vaadin/item": "~24.2.0",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "~24.2.0",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "~24.2.0",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "~24.2.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
|
-
"@vaadin/testing-helpers": "^0.
|
|
48
|
+
"@vaadin/testing-helpers": "^0.5.0",
|
|
49
49
|
"sinon": "^13.0.2"
|
|
50
50
|
},
|
|
51
51
|
"web-types": [
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "8b9e860d53fc0132d05d3e8701eeded2dca74eba"
|
|
56
56
|
}
|
package/src/vaadin-tab.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
7
|
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
8
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
9
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
10
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
10
11
|
import { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';
|
|
@@ -32,6 +33,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
32
33
|
*
|
|
33
34
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
34
35
|
*
|
|
36
|
+
* @customElement
|
|
35
37
|
* @extends HTMLElement
|
|
36
38
|
* @mixes ControllerMixin
|
|
37
39
|
* @mixes ElementMixin
|
|
@@ -99,6 +101,6 @@ class Tab extends ElementMixin(ThemableMixin(ItemMixin(ControllerMixin(PolymerEl
|
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
defineCustomElement(Tab);
|
|
103
105
|
|
|
104
106
|
export { Tab };
|
package/src/vaadin-tabs.js
CHANGED
|
@@ -7,6 +7,7 @@ import './vaadin-tab.js';
|
|
|
7
7
|
import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';
|
|
8
8
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
9
9
|
import { ListMixin } from '@vaadin/a11y-base/src/list-mixin.js';
|
|
10
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
11
|
import { getNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js';
|
|
11
12
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
12
13
|
import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
|
|
@@ -46,6 +47,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
46
47
|
* @fires {CustomEvent} items-changed - Fired when the `items` property changes.
|
|
47
48
|
* @fires {CustomEvent} selected-changed - Fired when the `selected` property changes.
|
|
48
49
|
*
|
|
50
|
+
* @customElement
|
|
49
51
|
* @extends HTMLElement
|
|
50
52
|
* @mixes ElementMixin
|
|
51
53
|
* @mixes ListMixin
|
|
@@ -355,6 +357,6 @@ class Tabs extends ResizeMixin(ElementMixin(ListMixin(ThemableMixin(PolymerEleme
|
|
|
355
357
|
}
|
|
356
358
|
}
|
|
357
359
|
|
|
358
|
-
|
|
360
|
+
defineCustomElement(Tabs);
|
|
359
361
|
|
|
360
362
|
export { Tabs };
|
package/web-types.json
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/tabs",
|
|
4
|
+
"version": "24.2.0",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
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.",
|
|
12
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "selected",
|
|
15
|
+
"description": "If true, the item is in selected state.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"boolean"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "theme",
|
|
24
|
+
"description": "The theme variants to apply to the component.",
|
|
25
|
+
"value": {
|
|
26
|
+
"type": [
|
|
27
|
+
"string",
|
|
28
|
+
"null",
|
|
29
|
+
"undefined"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"js": {
|
|
35
|
+
"properties": [
|
|
36
|
+
{
|
|
37
|
+
"name": "value",
|
|
38
|
+
"description": "",
|
|
39
|
+
"value": {
|
|
40
|
+
"type": [
|
|
41
|
+
"string"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "selected",
|
|
47
|
+
"description": "If true, the item is in selected state.",
|
|
48
|
+
"value": {
|
|
49
|
+
"type": [
|
|
50
|
+
"boolean"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"events": []
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "vaadin-tabs",
|
|
60
|
+
"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.",
|
|
61
|
+
"attributes": [
|
|
62
|
+
{
|
|
63
|
+
"name": "disabled",
|
|
64
|
+
"description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
|
|
65
|
+
"value": {
|
|
66
|
+
"type": [
|
|
67
|
+
"boolean",
|
|
68
|
+
"null",
|
|
69
|
+
"undefined"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "selected",
|
|
75
|
+
"description": "The index of the selected tab.",
|
|
76
|
+
"value": {
|
|
77
|
+
"type": [
|
|
78
|
+
"number",
|
|
79
|
+
"null",
|
|
80
|
+
"undefined"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "orientation",
|
|
86
|
+
"description": "Set tabs disposition. Possible values are `horizontal|vertical`",
|
|
87
|
+
"value": {
|
|
88
|
+
"type": [
|
|
89
|
+
"TabsOrientation"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "theme",
|
|
95
|
+
"description": "The theme variants to apply to the component.",
|
|
96
|
+
"value": {
|
|
97
|
+
"type": [
|
|
98
|
+
"string",
|
|
99
|
+
"null",
|
|
100
|
+
"undefined"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"js": {
|
|
106
|
+
"properties": [
|
|
107
|
+
{
|
|
108
|
+
"name": "disabled",
|
|
109
|
+
"description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
|
|
110
|
+
"value": {
|
|
111
|
+
"type": [
|
|
112
|
+
"boolean",
|
|
113
|
+
"null",
|
|
114
|
+
"undefined"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "selected",
|
|
120
|
+
"description": "The index of the selected tab.",
|
|
121
|
+
"value": {
|
|
122
|
+
"type": [
|
|
123
|
+
"number",
|
|
124
|
+
"null",
|
|
125
|
+
"undefined"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "orientation",
|
|
131
|
+
"description": "Set tabs disposition. Possible values are `horizontal|vertical`",
|
|
132
|
+
"value": {
|
|
133
|
+
"type": [
|
|
134
|
+
"TabsOrientation"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"events": [
|
|
140
|
+
{
|
|
141
|
+
"name": "selected-changed",
|
|
142
|
+
"description": "Fired when the selection is changed.\nNot fired when used in `multiple` selection mode."
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "items-changed",
|
|
146
|
+
"description": "Fired when the `items` property changes."
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/tabs",
|
|
4
|
+
"version": "24.2.0",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"framework": "lit",
|
|
7
|
+
"framework-config": {
|
|
8
|
+
"enable-when": {
|
|
9
|
+
"node-packages": [
|
|
10
|
+
"lit"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"contributions": {
|
|
15
|
+
"html": {
|
|
16
|
+
"elements": [
|
|
17
|
+
{
|
|
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.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?selected",
|
|
24
|
+
"description": "If true, the item is in selected state.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": ".value",
|
|
31
|
+
"description": "",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "vaadin-tabs",
|
|
40
|
+
"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.",
|
|
41
|
+
"extension": true,
|
|
42
|
+
"attributes": [
|
|
43
|
+
{
|
|
44
|
+
"name": "?disabled",
|
|
45
|
+
"description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": ".selected",
|
|
52
|
+
"description": "The index of the selected tab.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": ".orientation",
|
|
59
|
+
"description": "Set tabs disposition. Possible values are `horizontal|vertical`",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "@selected-changed",
|
|
66
|
+
"description": "Fired when the selection is changed.\nNot fired when used in `multiple` selection mode.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "@items-changed",
|
|
73
|
+
"description": "Fired when the `items` property changes.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|