@vaadin/checkbox 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-checkbox-mixin.js +12 -0
- package/src/vaadin-lit-checkbox.d.ts +6 -0
- package/src/vaadin-lit-checkbox.js +55 -0
- package/theme/lumo/vaadin-lit-checkbox.js +2 -0
- package/theme/material/vaadin-lit-checkbox.js +2 -0
- package/vaadin-lit-checkbox.d.ts +1 -0
- package/vaadin-lit-checkbox.js +2 -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/checkbox",
|
|
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-checkbox.d.ts",
|
|
25
|
-
"!src/vaadin-lit-checkbox.js",
|
|
26
24
|
"theme",
|
|
27
25
|
"vaadin-*.d.ts",
|
|
28
26
|
"vaadin-*.js",
|
|
@@ -39,12 +37,12 @@
|
|
|
39
37
|
"dependencies": {
|
|
40
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
39
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/a11y-base": "24.3.0-
|
|
43
|
-
"@vaadin/component-base": "24.3.0-
|
|
44
|
-
"@vaadin/field-base": "24.3.0-
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.3.0-
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.3.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.3.0-
|
|
40
|
+
"@vaadin/a11y-base": "24.3.0-beta2",
|
|
41
|
+
"@vaadin/component-base": "24.3.0-beta2",
|
|
42
|
+
"@vaadin/field-base": "24.3.0-beta2",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "24.3.0-beta2",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "24.3.0-beta2",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "24.3.0-beta2",
|
|
48
46
|
"lit": "^3.0.0"
|
|
49
47
|
},
|
|
50
48
|
"devDependencies": {
|
|
@@ -56,5 +54,5 @@
|
|
|
56
54
|
"web-types.json",
|
|
57
55
|
"web-types.lit.json"
|
|
58
56
|
],
|
|
59
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "0bbfb24cb8dcd6e1dca8ecf2269635efac53e4d0"
|
|
60
58
|
}
|
|
@@ -48,6 +48,18 @@ export const CheckboxMixin = (superclass) =>
|
|
|
48
48
|
type: String,
|
|
49
49
|
value: '',
|
|
50
50
|
},
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Indicates whether the element can be focused and where it participates in sequential keyboard navigation.
|
|
54
|
+
*
|
|
55
|
+
* @override
|
|
56
|
+
* @protected
|
|
57
|
+
*/
|
|
58
|
+
tabindex: {
|
|
59
|
+
type: Number,
|
|
60
|
+
value: 0,
|
|
61
|
+
reflectToAttribute: true,
|
|
62
|
+
},
|
|
51
63
|
};
|
|
52
64
|
}
|
|
53
65
|
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { CheckboxMixin } from './vaadin-checkbox-mixin.js';
|
|
13
|
+
import { checkboxStyles } from './vaadin-checkbox-styles.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* LitElement based version of `<vaadin-checkbox>` 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
|
+
export class Checkbox extends CheckboxMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
25
|
+
static get is() {
|
|
26
|
+
return 'vaadin-checkbox';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static get styles() {
|
|
30
|
+
return checkboxStyles;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** @protected */
|
|
34
|
+
render() {
|
|
35
|
+
return html`
|
|
36
|
+
<div class="vaadin-checkbox-container">
|
|
37
|
+
<div part="checkbox" aria-hidden="true"></div>
|
|
38
|
+
<slot name="input"></slot>
|
|
39
|
+
<slot name="label"></slot>
|
|
40
|
+
</div>
|
|
41
|
+
<slot name="tooltip"></slot>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @protected */
|
|
46
|
+
ready() {
|
|
47
|
+
super.ready();
|
|
48
|
+
|
|
49
|
+
this._tooltipController = new TooltipController(this);
|
|
50
|
+
this._tooltipController.setAriaTarget(this.inputElement);
|
|
51
|
+
this.addController(this._tooltipController);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
defineCustomElement(Checkbox);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/vaadin-checkbox.js';
|
package/web-types.json
CHANGED