UNPKG

1.37 kBJavaScriptView Raw
1/*!
2 * Bulmil - MIT License
3 */
4'use strict';
5
6Object.defineProperty(exports, '__esModule', { value: true });
7
8const index = require('./index-481858d9.js');
9
10const 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
12let Checkbox = class {
13 constructor(hostRef) {
14 index.registerInstance(this, hostRef);
15 /**
16 * Input classes
17 */
18 this.inputClass = '';
19 /**
20 * Label classes
21 */
22 this.labelClass = '';
23 /**
24 * Checked
25 */
26 this.checked = false;
27 /**
28 * Disabled
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};
41Checkbox.style = checkboxCss;
42
43exports.bm_checkbox = Checkbox;