UNPKG

@bulmil/core

Version:

![bulmil](https://user-images.githubusercontent.com/2362138/65766959-c721a080-e16f-11e9-9fb9-45a5a2ad0391.jpg)

51 lines (46 loc) 2.16 kB
/*! * Bulmil - MIT License */ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client'; 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 = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLElement { constructor() { super(); this.__registerHost(); this.inputClass = ''; this.labelClass = ''; this.checked = false; this.disabled = false; } render() { return (h("label", { key: 'b8b9f4e200aae88df8aa625da9e744e03c14d28a', class: { checkbox: true, [this.labelClass]: Boolean(this.labelClass), } }, h("input", { key: '19a7b66eff0080e9f75e79c79409558acb53dcf0', type: "checkbox", class: { [this.inputClass]: Boolean(this.inputClass), }, disabled: this.disabled, checked: this.checked }), h("slot", { key: 'bfa7b45e1e7a42dede0575d82c2d37972784ffa2' }))); } static get style() { return BmCheckboxStyle0; } }, [4, "bm-checkbox", { "inputClass": [1, "input-class"], "labelClass": [1, "label-class"], "checked": [4], "disabled": [4] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["bm-checkbox"]; components.forEach(tagName => { switch (tagName) { case "bm-checkbox": if (!customElements.get(tagName)) { customElements.define(tagName, Checkbox); } break; } }); } const BmCheckbox = Checkbox; const defineCustomElement = defineCustomElement$1; export { BmCheckbox, defineCustomElement };