bulmil
Version: 

37 lines (33 loc) • 1.32 kB
JavaScript
import { r as registerInstance, h } from './index-75c52ae9.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:#363636}[disabled].radio,[disabled].checkbox,fieldset[disabled] .radio,fieldset[disabled] .checkbox{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:0.5em}bm-checkbox[disabled=true] .checkbox{color:#7a7a7a;cursor:not-allowed}";
const Checkbox = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /**
         * Input classes
         */
        this.inputClass = '';
        /**
         * Label classes
         */
        this.labelClass = '';
        /**
         * Checked
         */
        this.checked = false;
        /**
         * Disabled
         */
        this.disabled = false;
    }
    render() {
        return (h("label", { class: {
                checkbox: true,
                [this.labelClass]: Boolean(this.labelClass),
            } }, h("input", { type: "checkbox", class: {
                [this.inputClass]: Boolean(this.inputClass),
            }, disabled: this.disabled, checked: this.checked }), h("slot", null)));
    }
};
Checkbox.style = checkboxCss;
export { Checkbox as bm_checkbox };