@vaadin/button 23.2.2 → 23.3.0-alpha2
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 +6 -6
- package/src/vaadin-button.d.ts +2 -1
- package/src/vaadin-button.js +13 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/button",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.3.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
41
|
-
"@vaadin/vaadin-material-styles": "
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
39
|
+
"@vaadin/component-base": "23.3.0-alpha2",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "23.3.0-alpha2",
|
|
41
|
+
"@vaadin/vaadin-material-styles": "23.3.0-alpha2",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "23.3.0-alpha2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"web-types.json",
|
|
51
51
|
"web-types.lit.json"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "ae61027c62ffa7f7d70cfc50e43f333addfc74b6"
|
|
54
54
|
}
|
package/src/vaadin-button.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
+
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
6
7
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
7
8
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
9
|
import { ButtonMixin } from './vaadin-button-mixin.js';
|
|
@@ -35,7 +36,7 @@ import { ButtonMixin } from './vaadin-button-mixin.js';
|
|
|
35
36
|
*
|
|
36
37
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
37
38
|
*/
|
|
38
|
-
declare class Button extends ButtonMixin(ElementMixin(ThemableMixin(HTMLElement))) {}
|
|
39
|
+
declare class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(HTMLElement)))) {}
|
|
39
40
|
|
|
40
41
|
declare global {
|
|
41
42
|
interface HTMLElementTagNameMap {
|
package/src/vaadin-button.js
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
|
+
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
|
+
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
8
10
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
11
|
import { ButtonMixin } from './vaadin-button-mixin.js';
|
|
10
12
|
|
|
@@ -38,10 +40,11 @@ import { ButtonMixin } from './vaadin-button-mixin.js';
|
|
|
38
40
|
*
|
|
39
41
|
* @extends HTMLElement
|
|
40
42
|
* @mixes ButtonMixin
|
|
43
|
+
* @mixes ControllerMixin
|
|
41
44
|
* @mixes ElementMixin
|
|
42
45
|
* @mixes ThemableMixin
|
|
43
46
|
*/
|
|
44
|
-
class Button extends ButtonMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
47
|
+
class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {
|
|
45
48
|
static get is() {
|
|
46
49
|
return 'vaadin-button';
|
|
47
50
|
}
|
|
@@ -105,8 +108,17 @@ class Button extends ButtonMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
|
105
108
|
<slot name="suffix"></slot>
|
|
106
109
|
</span>
|
|
107
110
|
</div>
|
|
111
|
+
<slot name="tooltip"></slot>
|
|
108
112
|
`;
|
|
109
113
|
}
|
|
114
|
+
|
|
115
|
+
/** @protected */
|
|
116
|
+
ready() {
|
|
117
|
+
super.ready();
|
|
118
|
+
|
|
119
|
+
this._tooltipController = new TooltipController(this);
|
|
120
|
+
this.addController(this._tooltipController);
|
|
121
|
+
}
|
|
110
122
|
}
|
|
111
123
|
|
|
112
124
|
customElements.define(Button.is, Button);
|
package/web-types.json
CHANGED