UNPKG

1.21 kBJavaScriptView Raw
1/*!
2 * Bulmil - MIT License
3 */
4import { r as registerInstance, h } from './index-8f15c9d4.js';
5
6const radioCss = ".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}";
7
8let Radio = class {
9 constructor(hostRef) {
10 registerInstance(this, hostRef);
11 /**
12 * Input class
13 */
14 this.inputClass = '';
15 /**
16 * Label Classes
17 */
18 this.labelClass = '';
19 /**
20 * Checked
21 */
22 this.checked = false;
23 /**
24 * Disabled
25 */
26 this.disabled = false;
27 }
28 render() {
29 return (h("label", { class: {
30 radio: true,
31 [this.labelClass]: Boolean(this.labelClass),
32 } }, h("input", { class: {
33 [this.inputClass]: Boolean(this.inputClass),
34 }, type: "radio", name: this.name, disabled: this.disabled, checked: this.checked }), h("slot", null)));
35 }
36};
37Radio.style = radioCss;
38
39export { Radio as bm_radio };