UNPKG

1.23 kBJavaScriptView Raw
1import { r as registerInstance, h } from './index-d9cbe763.js';
2
3const 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{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:0.5em}";
4
5const Radio = class {
6 constructor(hostRef) {
7 registerInstance(this, hostRef);
8 /**
9 * CSS Classes
10 */
11 this.class = '';
12 /**
13 * Label Classes
14 */
15 this.labelClass = '';
16 /**
17 * Checked
18 */
19 this.checked = false;
20 /**
21 * Disabled
22 */
23 this.disabled = false;
24 }
25 render() {
26 return (h("label", { class: {
27 radio: true,
28 [this.labelClass]: Boolean(this.labelClass),
29 } }, h("input", { class: {
30 [this.class]: Boolean(this.class),
31 }, type: "radio", name: this.name, disabled: this.disabled, checked: this.checked }), h("slot", null)));
32 }
33};
34Radio.style = radioCss;
35
36export { Radio as bm_radio };