1 | import { r as registerInstance, h } from './core-98b1cff0.js';
|
2 | var Checkbox = (function () {
|
3 | function Checkbox(hostRef) {
|
4 | registerInstance(this, hostRef);
|
5 | |
6 |
|
7 |
|
8 | this.class = '';
|
9 | |
10 |
|
11 |
|
12 | this.labelClass = '';
|
13 | |
14 |
|
15 |
|
16 | this.checked = false;
|
17 | |
18 |
|
19 |
|
20 | this.disabled = false;
|
21 | }
|
22 | Checkbox.prototype.render = function () {
|
23 | var _a, _b;
|
24 | return (h("label", { class: (_a = {
|
25 | checkbox: true
|
26 | },
|
27 | _a[this.labelClass] = Boolean(this.labelClass),
|
28 | _a) }, h("input", { type: "checkbox", class: (_b = {},
|
29 | _b[this.class] = Boolean(this.class),
|
30 | _b), disabled: this.disabled, checked: this.checked }), h("slot", null)));
|
31 | };
|
32 | Object.defineProperty(Checkbox, "style", {
|
33 | get: function () { return ".checkbox,.radio{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox input,.radio input{cursor:pointer}.checkbox:hover,.radio:hover{color:#363636}[disabled].checkbox,[disabled].radio,fieldset[disabled] .checkbox,fieldset[disabled] .radio{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:.5em}bm-checkbox[disabled=true] .checkbox{color:#7a7a7a;cursor:not-allowed}"; },
|
34 | enumerable: true,
|
35 | configurable: true
|
36 | });
|
37 | return Checkbox;
|
38 | }());
|
39 | export { Checkbox as bm_checkbox };
|