@akveo/nga-theme
Version:
@akveo/nga-theme
293 lines • 10.6 kB
JavaScript
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
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);
};
import { Component, Input, HostBinding } from '@angular/core';
/**
* Component intended to be used within the `<nga-card>` component.
* It adds styles for a preset header section.
*/
var NgaCardHeaderComponent = (function () {
function NgaCardHeaderComponent() {
}
return NgaCardHeaderComponent;
}());
NgaCardHeaderComponent = __decorate([
Component({
selector: 'nga-card-header',
template: "<ng-content></ng-content>",
})
], NgaCardHeaderComponent);
export { NgaCardHeaderComponent };
/**
* Component intended to be used within the `<nga-card>` component.
* It adds styles for a preset body section.
*/
var NgaCardBodyComponent = (function () {
function NgaCardBodyComponent() {
}
return NgaCardBodyComponent;
}());
NgaCardBodyComponent = __decorate([
Component({
selector: 'nga-card-body',
template: "<ng-content></ng-content>",
})
], NgaCardBodyComponent);
export { NgaCardBodyComponent };
/**
* Component intended to be used within the `<nga-card>` component.
* It adds styles for a preset footer section.
*/
var NgaCardFooterComponent = (function () {
function NgaCardFooterComponent() {
}
return NgaCardFooterComponent;
}());
NgaCardFooterComponent = __decorate([
Component({
selector: 'nga-card-footer',
template: "<ng-content></ng-content>",
})
], NgaCardFooterComponent);
export { NgaCardFooterComponent };
/**
* A basic content container component
*
* While this component can be used alone, it also provides a number
* of child components for common card sections, including:
* - nga-card-header
* - nga-card-body
* - nga-card-footer
*/
var NgaCardComponent = NgaCardComponent_1 = (function () {
function NgaCardComponent() {
}
Object.defineProperty(NgaCardComponent.prototype, "xxsmall", {
get: function () {
return this.size === NgaCardComponent_1.SIZE_XXSMALL;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "xsmall", {
get: function () {
return this.size === NgaCardComponent_1.SIZE_XSMALL;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "small", {
get: function () {
return this.size === NgaCardComponent_1.SIZE_SMALL;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "medium", {
get: function () {
return this.size === NgaCardComponent_1.SIZE_MEDIUM;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "large", {
get: function () {
return this.size === NgaCardComponent_1.SIZE_LARGE;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "xlarge", {
get: function () {
return this.size === NgaCardComponent_1.SIZE_XLARGE;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "xxlarge", {
get: function () {
return this.size === NgaCardComponent_1.SIZE_XXLARGE;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "active", {
get: function () {
return this.status === NgaCardComponent_1.STATUS_ACTIVE;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "disabled", {
get: function () {
return this.status === NgaCardComponent_1.STATUS_DISABLED;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "primary", {
get: function () {
return this.status === NgaCardComponent_1.STATUS_PRIMARY;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "info", {
get: function () {
return this.status === NgaCardComponent_1.STATUS_INFO;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "success", {
get: function () {
return this.status === NgaCardComponent_1.STATUS_SUCCESS;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "warning", {
get: function () {
return this.status === NgaCardComponent_1.STATUS_WARNING;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "danger", {
get: function () {
return this.status === NgaCardComponent_1.STATUS_DANGER;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "setSize", {
set: function (val) {
this.size = val;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NgaCardComponent.prototype, "setStatus", {
set: function (val) {
this.status = val;
},
enumerable: true,
configurable: true
});
return NgaCardComponent;
}());
NgaCardComponent.SIZE_XXSMALL = 'xxsmall';
NgaCardComponent.SIZE_XSMALL = 'xsmall';
NgaCardComponent.SIZE_SMALL = 'small';
NgaCardComponent.SIZE_MEDIUM = 'medium';
NgaCardComponent.SIZE_LARGE = 'large';
NgaCardComponent.SIZE_XLARGE = 'xlarge';
NgaCardComponent.SIZE_XXLARGE = 'xxlarge';
NgaCardComponent.STATUS_ACTIVE = 'active';
NgaCardComponent.STATUS_DISABLED = 'disabled';
NgaCardComponent.STATUS_PRIMARY = 'primary';
NgaCardComponent.STATUS_INFO = 'info';
NgaCardComponent.STATUS_SUCCESS = 'success';
NgaCardComponent.STATUS_WARNING = 'warning';
NgaCardComponent.STATUS_DANGER = 'danger';
__decorate([
HostBinding('class.xxsmall-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "xxsmall", null);
__decorate([
HostBinding('class.xsmall-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "xsmall", null);
__decorate([
HostBinding('class.small-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "small", null);
__decorate([
HostBinding('class.medium-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "medium", null);
__decorate([
HostBinding('class.large-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "large", null);
__decorate([
HostBinding('class.xlarge-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "xlarge", null);
__decorate([
HostBinding('class.xxlarge-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "xxlarge", null);
__decorate([
HostBinding('class.active-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "active", null);
__decorate([
HostBinding('class.disabled-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "disabled", null);
__decorate([
HostBinding('class.primary-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "primary", null);
__decorate([
HostBinding('class.info-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "info", null);
__decorate([
HostBinding('class.success-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "success", null);
__decorate([
HostBinding('class.warning-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "warning", null);
__decorate([
HostBinding('class.danger-card'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], NgaCardComponent.prototype, "danger", null);
__decorate([
Input('size'),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], NgaCardComponent.prototype, "setSize", null);
__decorate([
Input('status'),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], NgaCardComponent.prototype, "setStatus", null);
NgaCardComponent = NgaCardComponent_1 = __decorate([
Component({
selector: 'nga-card',
styles: [":host{display:flex;flex-direction:column} "],
template: "\n <ng-content></ng-content>\n <ng-content select=\"nga-card-header\"></ng-content>\n <ng-content select=\"nga-card-body\"></ng-content>\n <ng-content select=\"nga-card-footer\"></ng-content>\n ",
})
], NgaCardComponent);
export { NgaCardComponent };
var NgaCardComponent_1;
//# sourceMappingURL=card.component.js.map