Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "feel-ui", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/feel-ui.js", |
@@ -0,4 +1,6 @@ | ||
import { EventEmitter } from "angular2/core"; | ||
export declare class Checkbox { | ||
tabIndex: number; | ||
checked: boolean; | ||
checkedChange: EventEmitter<{}>; | ||
label: string; | ||
@@ -5,0 +7,0 @@ disabled: boolean; |
@@ -7,2 +7,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
(function (factory) { | ||
@@ -22,2 +25,3 @@ if (typeof module === 'object' && typeof module.exports === 'object') { | ||
this.tabIndex = 0; | ||
this.checkedChange = new core_1.EventEmitter(); | ||
} | ||
@@ -32,22 +36,37 @@ Checkbox.prototype._onKeyPress = function (event) { | ||
this.checked = !this.checked; | ||
this.checkedChange.emit(this.checked); | ||
} | ||
}; | ||
__decorate([ | ||
core_1.HostBinding("tabindex") | ||
core_1.HostBinding("tabindex"), | ||
__metadata('design:type', Object) | ||
], Checkbox.prototype, "tabIndex", void 0); | ||
__decorate([ | ||
core_1.Input() | ||
core_1.Input(), | ||
__metadata('design:type', Boolean) | ||
], Checkbox.prototype, "checked", void 0); | ||
__decorate([ | ||
core_1.Input() | ||
core_1.Output(), | ||
__metadata('design:type', Object) | ||
], Checkbox.prototype, "checkedChange", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', String) | ||
], Checkbox.prototype, "label", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
core_1.HostBinding("attr.disabled") | ||
core_1.HostBinding("attr.disabled"), | ||
__metadata('design:type', Boolean) | ||
], Checkbox.prototype, "disabled", void 0); | ||
__decorate([ | ||
core_1.HostListener("keypress", ["$event"]) | ||
core_1.HostListener("keypress", ["$event"]), | ||
__metadata('design:type', Function), | ||
__metadata('design:paramtypes', [KeyboardEvent]), | ||
__metadata('design:returntype', void 0) | ||
], Checkbox.prototype, "_onKeyPress", null); | ||
__decorate([ | ||
core_1.HostListener("click") | ||
core_1.HostListener("click"), | ||
__metadata('design:type', Function), | ||
__metadata('design:paramtypes', []), | ||
__metadata('design:returntype', void 0) | ||
], Checkbox.prototype, "_toggleClicked", null); | ||
@@ -59,3 +78,4 @@ Checkbox = __decorate([ | ||
template: "<svg [ngClass]=\"{ 'checked': checked }\" width=\"20px\" height=\"20px\">\n <rect x=\"1\" y=\"1\" width=\"16px\" height=\"16px\"></rect>\n <path d=\"M 4 6 l 6 6 l 12 -12\"></path>\n </svg>\n <label>{{label}}</label>" | ||
}) | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], Checkbox); | ||
@@ -66,1 +86,2 @@ return Checkbox; | ||
}); | ||
//# sourceMappingURL=checkbox.js.map |
@@ -1,2 +0,2 @@ | ||
import { Component, Input, HostListener, HostBinding } from "angular2/core"; | ||
import { Component, Input, HostListener, HostBinding, EventEmitter, Output } from "angular2/core"; | ||
import { NgClass } from "angular2/common"; | ||
@@ -21,2 +21,5 @@ | ||
@Output() | ||
checkedChange = new EventEmitter(); | ||
@Input() | ||
@@ -40,4 +43,5 @@ label: string; | ||
this.checked = !this.checked; | ||
this.checkedChange.emit(this.checked); | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137503
2308