UNPKG

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