1 |
|
2 |
|
3 |
|
4 | 'use strict';
|
5 |
|
6 | Object.defineProperty(exports, '__esModule', { value: true });
|
7 |
|
8 | const index = require('./index-481858d9.js');
|
9 |
|
10 | const checkboxCss = ".radio,.checkbox{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.radio input,.checkbox input{cursor:pointer}.radio:hover,.checkbox:hover{color:#363636}[disabled].radio,[disabled].checkbox,fieldset[disabled] .radio,fieldset[disabled] .checkbox,.radio input[disabled],.checkbox input[disabled]{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:0.5em}bm-checkbox[disabled=true] .checkbox{color:#7a7a7a;cursor:not-allowed}";
|
11 |
|
12 | let Checkbox = class {
|
13 | constructor(hostRef) {
|
14 | index.registerInstance(this, hostRef);
|
15 | |
16 |
|
17 |
|
18 | this.inputClass = '';
|
19 | |
20 |
|
21 |
|
22 | this.labelClass = '';
|
23 | |
24 |
|
25 |
|
26 | this.checked = false;
|
27 | |
28 |
|
29 |
|
30 | this.disabled = false;
|
31 | }
|
32 | render() {
|
33 | return (index.h("label", { class: {
|
34 | checkbox: true,
|
35 | [this.labelClass]: Boolean(this.labelClass),
|
36 | } }, index.h("input", { type: "checkbox", class: {
|
37 | [this.inputClass]: Boolean(this.inputClass),
|
38 | }, disabled: this.disabled, checked: this.checked }), index.h("slot", null)));
|
39 | }
|
40 | };
|
41 | Checkbox.style = checkboxCss;
|
42 |
|
43 | exports.bm_checkbox = Checkbox;
|