@aurelia-mdc-web/typography
Version:
Wrapper for Material Components Web Typography
207 lines • 6.72 kB
JavaScript
import { __decorate, __extends, __metadata } from "tslib";
import { customAttribute, inject } from 'aurelia-framework';
var MdcTypography = /** @class */ (function () {
function MdcTypography(root) {
this.root = root;
}
MdcTypography.prototype.attached = function () {
this.root.classList.add(this.type ? "mdc-typography--".concat(this.type) : 'mdc-typography');
};
return MdcTypography;
}());
var MdcHeadline1 = /** @class */ (function (_super) {
__extends(MdcHeadline1, _super);
function MdcHeadline1(root) {
var _this = _super.call(this, root) || this;
_this.type = 'headline1';
return _this;
}
MdcHeadline1 = __decorate([
inject(Element),
customAttribute('mdc-headline1'),
__metadata("design:paramtypes", [HTMLElement])
], MdcHeadline1);
return MdcHeadline1;
}(MdcTypography));
export { MdcHeadline1 };
var MdcHeadline2 = /** @class */ (function (_super) {
__extends(MdcHeadline2, _super);
function MdcHeadline2(root) {
var _this = _super.call(this, root) || this;
_this.type = 'headline2';
return _this;
}
MdcHeadline2 = __decorate([
inject(Element),
customAttribute('mdc-headline2'),
__metadata("design:paramtypes", [HTMLElement])
], MdcHeadline2);
return MdcHeadline2;
}(MdcTypography));
export { MdcHeadline2 };
var MdcHeadline3 = /** @class */ (function (_super) {
__extends(MdcHeadline3, _super);
function MdcHeadline3(root) {
var _this = _super.call(this, root) || this;
_this.type = 'headline3';
return _this;
}
MdcHeadline3 = __decorate([
inject(Element),
customAttribute('mdc-headline3'),
__metadata("design:paramtypes", [HTMLElement])
], MdcHeadline3);
return MdcHeadline3;
}(MdcTypography));
export { MdcHeadline3 };
var MdcHeadline4 = /** @class */ (function (_super) {
__extends(MdcHeadline4, _super);
function MdcHeadline4(root) {
var _this = _super.call(this, root) || this;
_this.type = 'headline4';
return _this;
}
MdcHeadline4 = __decorate([
inject(Element),
customAttribute('mdc-headline4'),
__metadata("design:paramtypes", [HTMLElement])
], MdcHeadline4);
return MdcHeadline4;
}(MdcTypography));
export { MdcHeadline4 };
var MdcHeadline5 = /** @class */ (function (_super) {
__extends(MdcHeadline5, _super);
function MdcHeadline5(root) {
var _this = _super.call(this, root) || this;
_this.type = 'headline5';
return _this;
}
MdcHeadline5 = __decorate([
inject(Element),
customAttribute('mdc-headline5'),
__metadata("design:paramtypes", [HTMLElement])
], MdcHeadline5);
return MdcHeadline5;
}(MdcTypography));
export { MdcHeadline5 };
var MdcHeadline6 = /** @class */ (function (_super) {
__extends(MdcHeadline6, _super);
function MdcHeadline6(root) {
var _this = _super.call(this, root) || this;
_this.type = 'headline6';
return _this;
}
MdcHeadline6 = __decorate([
inject(Element),
customAttribute('mdc-headline6'),
__metadata("design:paramtypes", [HTMLElement])
], MdcHeadline6);
return MdcHeadline6;
}(MdcTypography));
export { MdcHeadline6 };
var MdcSubtitle1 = /** @class */ (function (_super) {
__extends(MdcSubtitle1, _super);
function MdcSubtitle1(root) {
var _this = _super.call(this, root) || this;
_this.type = 'subtitle1';
return _this;
}
MdcSubtitle1 = __decorate([
inject(Element),
customAttribute('mdc-subtitle1'),
__metadata("design:paramtypes", [HTMLElement])
], MdcSubtitle1);
return MdcSubtitle1;
}(MdcTypography));
export { MdcSubtitle1 };
var MdcSubtitle2 = /** @class */ (function (_super) {
__extends(MdcSubtitle2, _super);
function MdcSubtitle2(root) {
var _this = _super.call(this, root) || this;
_this.type = 'subtitle2';
return _this;
}
MdcSubtitle2 = __decorate([
inject(Element),
customAttribute('mdc-subtitle2'),
__metadata("design:paramtypes", [HTMLElement])
], MdcSubtitle2);
return MdcSubtitle2;
}(MdcTypography));
export { MdcSubtitle2 };
var MdcBody1 = /** @class */ (function (_super) {
__extends(MdcBody1, _super);
function MdcBody1(root) {
var _this = _super.call(this, root) || this;
_this.type = 'body1';
return _this;
}
MdcBody1 = __decorate([
inject(Element),
customAttribute('mdc-body1'),
__metadata("design:paramtypes", [HTMLElement])
], MdcBody1);
return MdcBody1;
}(MdcTypography));
export { MdcBody1 };
var MdcBody2 = /** @class */ (function (_super) {
__extends(MdcBody2, _super);
function MdcBody2(root) {
var _this = _super.call(this, root) || this;
_this.type = 'body2';
return _this;
}
MdcBody2 = __decorate([
inject(Element),
customAttribute('mdc-body2'),
__metadata("design:paramtypes", [HTMLElement])
], MdcBody2);
return MdcBody2;
}(MdcTypography));
export { MdcBody2 };
var MdcCaption = /** @class */ (function (_super) {
__extends(MdcCaption, _super);
function MdcCaption(root) {
var _this = _super.call(this, root) || this;
_this.type = 'caption';
return _this;
}
MdcCaption = __decorate([
inject(Element),
customAttribute('mdc-caption'),
__metadata("design:paramtypes", [HTMLElement])
], MdcCaption);
return MdcCaption;
}(MdcTypography));
export { MdcCaption };
var MdcTypographyButton = /** @class */ (function (_super) {
__extends(MdcTypographyButton, _super);
function MdcTypographyButton(root) {
var _this = _super.call(this, root) || this;
_this.type = 'button';
return _this;
}
MdcTypographyButton = __decorate([
inject(Element),
customAttribute('mdc-typography-button'),
__metadata("design:paramtypes", [HTMLElement])
], MdcTypographyButton);
return MdcTypographyButton;
}(MdcTypography));
export { MdcTypographyButton };
var MdcOveline = /** @class */ (function (_super) {
__extends(MdcOveline, _super);
function MdcOveline(root) {
var _this = _super.call(this, root) || this;
_this.type = 'overline';
return _this;
}
MdcOveline = __decorate([
inject(Element),
customAttribute('mdc-overline'),
__metadata("design:paramtypes", [HTMLElement])
], MdcOveline);
return MdcOveline;
}(MdcTypography));
export { MdcOveline };
//# sourceMappingURL=mdc-typography.js.map