@bulmil/core
Version:

33 lines (27 loc) • 1.51 kB
JavaScript
/*!
* Bulmil - MIT License
*/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-d5e0586a.js');
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:hsl(0, 0%, 21%)}[disabled].radio,[disabled].checkbox,fieldset[disabled] .radio,fieldset[disabled] .checkbox,.radio input[disabled],.checkbox input[disabled]{color:hsl(0, 0%, 48%);cursor:not-allowed}.radio+.radio{margin-left:0.5em}bm-checkbox[disabled=true] .checkbox{color:hsl(0, 0%, 48%);cursor:not-allowed}";
const BmCheckboxStyle0 = checkboxCss;
const Checkbox = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.inputClass = '';
this.labelClass = '';
this.checked = false;
this.disabled = false;
}
render() {
return (index.h("label", { key: '02d4f25905b20dded0ca6763b1045e611ef6287e', class: {
checkbox: true,
[this.labelClass]: Boolean(this.labelClass),
} }, index.h("input", { key: 'e03bde8115e5ba6b9f4758ba7b9d2920f89c36ba', type: "checkbox", class: {
[this.inputClass]: Boolean(this.inputClass),
}, disabled: this.disabled, checked: this.checked }), index.h("slot", { key: '3b01f2c99b4a6bf1363bd238f5880ca7a43a10d5' })));
}
};
Checkbox.style = BmCheckboxStyle0;
exports.bm_checkbox = Checkbox;