UNPKG

2.03 kBJavaScriptView Raw
1System.register(['./index-1a441b18.system.js'], function (exports) {
2 'use strict';
3 var registerInstance, h;
4 return {
5 setters: [function (module) {
6 registerInstance = module.r;
7 h = module.h;
8 }],
9 execute: function () {
10 var 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}";
11 var Radio = /** @class */ (function () {
12 function Radio(hostRef) {
13 registerInstance(this, hostRef);
14 /**
15 * CSS Classes
16 */
17 this.class = '';
18 /**
19 * Label Classes
20 */
21 this.labelClass = '';
22 /**
23 * Checked
24 */
25 this.checked = false;
26 /**
27 * Disabled
28 */
29 this.disabled = false;
30 }
31 Radio.prototype.render = function () {
32 var _a, _b;
33 return (h("label", { class: (_a = {
34 radio: true
35 },
36 _a[this.labelClass] = Boolean(this.labelClass),
37 _a) }, h("input", { class: (_b = {},
38 _b[this.class] = Boolean(this.class),
39 _b), type: "radio", name: this.name, disabled: this.disabled, checked: this.checked }), h("slot", null)));
40 };
41 return Radio;
42 }());
43 exports('bm_radio', Radio);
44 Radio.style = radioCss;
45 }
46 };
47});