UNPKG

1.47 kBJavaScriptView Raw
1import { r as registerInstance, h } from './core-98b1cff0.js';
2var Radio = /** @class */ (function () {
3 function Radio(hostRef) {
4 registerInstance(this, hostRef);
5 /**
6 * CSS Classes
7 */
8 this.class = '';
9 /**
10 * Label Classes
11 */
12 this.labelClass = '';
13 /**
14 * Checked
15 */
16 this.checked = false;
17 /**
18 * Disabled
19 */
20 this.disabled = false;
21 }
22 Radio.prototype.render = function () {
23 var _a, _b;
24 return (h("label", { class: (_a = {
25 radio: true
26 },
27 _a[this.labelClass] = Boolean(this.labelClass),
28 _a) }, h("input", { class: (_b = {},
29 _b[this.class] = Boolean(this.class),
30 _b), type: "radio", name: this.name, disabled: this.disabled, checked: this.checked }), h("slot", null)));
31 };
32 Object.defineProperty(Radio, "style", {
33 get: function () { return ".checkbox,.radio{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox input,.radio input{cursor:pointer}.checkbox:hover,.radio:hover{color:#363636}[disabled].checkbox,[disabled].radio,fieldset[disabled] .checkbox,fieldset[disabled] .radio{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:.5em}"; },
34 enumerable: true,
35 configurable: true
36 });
37 return Radio;
38}());
39export { Radio as bm_radio };