aire
Version:
Beautiful UiKit-based Aurelia plugin
106 lines (104 loc) • 3.75 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var aurelia_framework_1 = require("aurelia-framework");
var aurelia_pal_1 = require("aurelia-pal");
var multielement_1 = require("aire/form/multielement");
/**
* The aire-checkbox is a styled `input[type="checkbox"]`
*
* @component checkbox
*
*
* @param {bindable} checked (boolean)
* @param {bindable} name (string)
* @param {bindable} label (string)
* @param {bindable} value (any)
* @param {bindable} disabled (boolean)
*
* @param {pseudo} horizontal
* @param {pseudo} success
* @param {pseudo} danger
*
* @section.usage
* @usage.title
* Usage
* @usage.description
* Just like any form element, a checkbox can have a label and a value. It can also be disabled or checked.
*
* @usage.examples.Default
* aire-checkbox
*
* @usage.examples.With_Label_And_Value
* aire-checkbox(label="My Checkbox" value="1")
*
* @usage.examples.Disabled
* aire-checkbox(disabled label="Disabled Checkbox")
*
* @usage.examples.Checked
* aire-checkbox(checked label="Checked Checkbox")
*
*
* @section.group
* @group.title
* Group
* @group.description
* It is frequently desirable to have a checkbox be part of a group, in which case you should pass it a name.
*
* @group.examples.Group
* aire-checkbox(name="group" label="Checkbox 1" value="1")
* aire-checkbox(name="group" label="Checkbox 2" value="2")
*
*
* @section.styles
* @styles.title
* Styles
* @styles.description
* A checkbox's label can be moved horizontal with `horizontal`. The checkbox can also have an `danger` or `success` state.
*
* @styles.examples.Horizontal
* aire-checkbox(horizontal label="Horizontal Checkbox")
*
* @styles.examples.Danger
* aire-checkbox(danger label="Danger Checkbox")
*
* @styles.examples.Success
* aire-checkbox(success label="Success Checkbox")
*
*
*/
var AireCheckbox = /** @class */ (function (_super) {
__extends(AireCheckbox, _super);
function AireCheckbox(element) {
return _super.call(this, element) || this;
}
AireCheckbox = __decorate([
aurelia_framework_1.inject(aurelia_pal_1.DOM.Element),
aurelia_framework_1.customElement('aire-checkbox'),
__metadata("design:paramtypes", [Element])
], AireCheckbox);
return AireCheckbox;
}(multielement_1.AireFormMultiElement));
exports.AireCheckbox = AireCheckbox;
//# sourceMappingURL=checkbox.js.map
;