@aurelia-mdc-web/layout-grid
Version:
Wrapper for Material Components Web Layout Grid
61 lines • 2.52 kB
JavaScript
import { __decorate, __metadata, __read } from "tslib";
import { customElement, useView, PLATFORM, inject } from 'aurelia-framework';
import { bindable } from 'aurelia-typed-observable-plugin';
/**
* @selector mdc-layout-grid
*/
var MdcLayoutGrid = /** @class */ (function () {
function MdcLayoutGrid(root) {
this.root = root;
}
MdcLayoutGrid.prototype.desktopColumnWidthChanged = function () {
this.root.style.setProperty('--mdc-layout-grid-column-width-desktop', "".concat(this.desktopColumnWidth, "px"));
};
MdcLayoutGrid.prototype.tabletColumnWidthChanged = function () {
this.root.style.setProperty('--mdc-layout-grid-column-width-tablet', "".concat(this.tabletColumnWidth, "px"));
};
MdcLayoutGrid.prototype.phoneColumnWidthChanged = function () {
this.root.style.setProperty('--mdc-layout-grid-column-width-phone', "".concat(this.phoneColumnWidth, "px"));
};
MdcLayoutGrid.prototype.columnWidthsChanged = function () {
var _a;
_a = __read(this.columnWidths.split(' '), 3), this.phoneColumnWidth = _a[0], this.tabletColumnWidth = _a[1], this.desktopColumnWidth = _a[2];
};
__decorate([
bindable.none,
__metadata("design:type", String)
], MdcLayoutGrid.prototype, "position", void 0);
__decorate([
bindable.booleanAttr,
__metadata("design:type", Boolean)
], MdcLayoutGrid.prototype, "fixedColumnWidth", void 0);
__decorate([
bindable.booleanAttr,
__metadata("design:type", Boolean)
], MdcLayoutGrid.prototype, "noPadding", void 0);
__decorate([
bindable.number,
__metadata("design:type", String)
], MdcLayoutGrid.prototype, "desktopColumnWidth", void 0);
__decorate([
bindable.number,
__metadata("design:type", String)
], MdcLayoutGrid.prototype, "tabletColumnWidth", void 0);
__decorate([
bindable.number,
__metadata("design:type", String)
], MdcLayoutGrid.prototype, "phoneColumnWidth", void 0);
__decorate([
bindable.number,
__metadata("design:type", String)
], MdcLayoutGrid.prototype, "columnWidths", void 0);
MdcLayoutGrid = __decorate([
inject(Element),
useView(PLATFORM.moduleName('./mdc-layout-grid.html')),
customElement('mdc-layout-grid'),
__metadata("design:paramtypes", [HTMLElement])
], MdcLayoutGrid);
return MdcLayoutGrid;
}());
export { MdcLayoutGrid };
//# sourceMappingURL=mdc-layout-grid.js.map