@vaadin/button 24.3.0-alpha9 → 24.3.0-beta2
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 +8 -10
- package/src/vaadin-lit-button.d.ts +6 -0
- package/src/vaadin-lit-button.js +49 -0
- package/theme/lumo/vaadin-button-styles.js +1 -2
- package/theme/lumo/vaadin-lit-button.js +2 -0
- package/theme/material/vaadin-lit-button.js +2 -0
- package/vaadin-lit-button.d.ts +1 -0
- package/vaadin-lit-button.js +3 -0
- 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": "24.3.0-
|
|
3
|
+
"version": "24.3.0-beta2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"!src/vaadin-lit-button.d.ts",
|
|
25
|
-
"!src/vaadin-lit-button.js",
|
|
26
24
|
"theme",
|
|
27
25
|
"vaadin-*.d.ts",
|
|
28
26
|
"vaadin-*.js",
|
|
@@ -38,16 +36,16 @@
|
|
|
38
36
|
"dependencies": {
|
|
39
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
38
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/a11y-base": "24.3.0-
|
|
42
|
-
"@vaadin/component-base": "24.3.0-
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "24.3.0-
|
|
44
|
-
"@vaadin/vaadin-material-styles": "24.3.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "24.3.0-
|
|
39
|
+
"@vaadin/a11y-base": "24.3.0-beta2",
|
|
40
|
+
"@vaadin/component-base": "24.3.0-beta2",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "24.3.0-beta2",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "24.3.0-beta2",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "24.3.0-beta2",
|
|
46
44
|
"lit": "^3.0.0"
|
|
47
45
|
},
|
|
48
46
|
"devDependencies": {
|
|
49
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
50
|
-
"@vaadin/icon": "24.3.0-
|
|
48
|
+
"@vaadin/icon": "24.3.0-beta2",
|
|
51
49
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
52
50
|
"sinon": "^13.0.2"
|
|
53
51
|
},
|
|
@@ -55,5 +53,5 @@
|
|
|
55
53
|
"web-types.json",
|
|
56
54
|
"web-types.lit.json"
|
|
57
55
|
],
|
|
58
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "0bbfb24cb8dcd6e1dca8ecf2269635efac53e4d0"
|
|
59
57
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2023 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 { buttonStyles, buttonTemplate } from './vaadin-button-base.js';
|
|
13
|
+
import { ButtonMixin } from './vaadin-button-mixin.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* LitElement based version of `<vaadin-button>` web component.
|
|
17
|
+
*
|
|
18
|
+
* ## Disclaimer
|
|
19
|
+
*
|
|
20
|
+
* This component is an experiment not intended for publishing to npm.
|
|
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
|
+
class Button extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
25
|
+
static get is() {
|
|
26
|
+
return 'vaadin-button';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static get styles() {
|
|
30
|
+
return buttonStyles;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** @protected */
|
|
34
|
+
render() {
|
|
35
|
+
return buttonTemplate(html);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** @protected */
|
|
39
|
+
ready() {
|
|
40
|
+
super.ready();
|
|
41
|
+
|
|
42
|
+
this._tooltipController = new TooltipController(this);
|
|
43
|
+
this.addController(this._tooltipController);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
defineCustomElement(Button);
|
|
48
|
+
|
|
49
|
+
export { Button };
|
|
@@ -11,8 +11,7 @@ const button = css`
|
|
|
11
11
|
--lumo-button-size: var(--lumo-size-m);
|
|
12
12
|
min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
|
|
13
13
|
height: var(--_button-size);
|
|
14
|
-
padding: var(--vaadin-button-padding
|
|
15
|
-
var(--vaadin-button-padding-h, calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
|
|
14
|
+
padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
|
|
16
15
|
margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
|
|
17
16
|
box-sizing: border-box;
|
|
18
17
|
/* Style */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/vaadin-button.js';
|
package/web-types.json
CHANGED