UNPKG

@aurelia-mdc-web/list

Version:

Wrapper for Material Components Web List

42 lines 1.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MdcListGroupSubheader = exports.MdcListGroup = void 0; var tslib_1 = require("tslib"); var aurelia_framework_1 = require("aurelia-framework"); /** * Optional. Wrapper around two or more mdc-list elements to be grouped together. * @selector mdc-list-group */ var MdcListGroup = /** @class */ (function () { function MdcListGroup() { } MdcListGroup.prototype.headersChanged = function () { this.headers.forEach(function (x) { return x.classList.add('mdc-list-group__subheader'); }); }; tslib_1.__decorate([ (0, aurelia_framework_1.children)('h1,h2,h3,h4,h5,h6'), tslib_1.__metadata("design:type", Array) ], MdcListGroup.prototype, "headers", void 0); MdcListGroup = tslib_1.__decorate([ (0, aurelia_framework_1.inlineView)('<template class="mdc-list-group"><slot></slot></template>'), (0, aurelia_framework_1.customElement)('mdc-list-group') ], MdcListGroup); return MdcListGroup; }()); exports.MdcListGroup = MdcListGroup; var MdcListGroupSubheader = /** @class */ (function () { function MdcListGroupSubheader(root) { this.root = root; } MdcListGroupSubheader.prototype.attached = function () { this.root.classList.add('mdc-list-group__subheader'); }; MdcListGroupSubheader = tslib_1.__decorate([ (0, aurelia_framework_1.inject)(Element), (0, aurelia_framework_1.customAttribute)('mdc-list-group-subheader'), tslib_1.__metadata("design:paramtypes", [HTMLElement]) ], MdcListGroupSubheader); return MdcListGroupSubheader; }()); exports.MdcListGroupSubheader = MdcListGroupSubheader; //# sourceMappingURL=mdc-list-group.js.map