preact-material-components
Version:
preact wrapper for "Material Components for the web"
225 lines (178 loc) • 7.05 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.ImageList = exports.ImageListLabel = exports.ImageListSupporting = exports.ImageListImage = exports.ImageListItem = exports.ImageListAspectContainer = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _preact = require("preact");
var _MaterialComponent7 = _interopRequireDefault(require("../Base/MaterialComponent"));
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var ImageListAspectContainer =
/*#__PURE__*/
function (_MaterialComponent) {
(0, _inherits2.default)(ImageListAspectContainer, _MaterialComponent);
function ImageListAspectContainer() {
var _this;
(0, _classCallCheck2.default)(this, ImageListAspectContainer);
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ImageListAspectContainer).apply(this, arguments));
_this.componentName = 'image-list__image-aspect-container';
_this.mdcProps = [];
return _this;
}
(0, _createClass2.default)(ImageListAspectContainer, [{
key: "materialDom",
value: function materialDom(props) {
return (0, _preact.h)("div", Object.assign({}, props), this.props.children);
}
}]);
return ImageListAspectContainer;
}(_MaterialComponent7.default);
exports.ImageListAspectContainer = ImageListAspectContainer;
var ImageListItem =
/*#__PURE__*/
function (_MaterialComponent2) {
(0, _inherits2.default)(ImageListItem, _MaterialComponent2);
function ImageListItem() {
var _this2;
(0, _classCallCheck2.default)(this, ImageListItem);
_this2 = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ImageListItem).apply(this, arguments));
_this2.componentName = 'image-list__item';
_this2.mdcProps = [];
return _this2;
}
(0, _createClass2.default)(ImageListItem, [{
key: "materialDom",
value: function materialDom(props) {
return (0, _preact.h)("li", Object.assign({}, props, {
ref: this.setControlRef
}), props.children);
}
}]);
return ImageListItem;
}(_MaterialComponent7.default);
exports.ImageListItem = ImageListItem;
var ImageListImage =
/*#__PURE__*/
function (_MaterialComponent3) {
(0, _inherits2.default)(ImageListImage, _MaterialComponent3);
function ImageListImage() {
var _this3;
(0, _classCallCheck2.default)(this, ImageListImage);
_this3 = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ImageListImage).apply(this, arguments));
_this3.componentName = 'image-list__image';
_this3.mdcProps = [];
return _this3;
}
(0, _createClass2.default)(ImageListImage, [{
key: "materialDom",
value: function materialDom(allprops) {
var src = allprops.src,
props = __rest(allprops, ["src"]);
return (0, _preact.h)("img", Object.assign({
src: src
}, props, {
ref: this.setControlRef
}), props.children);
}
}]);
return ImageListImage;
}(_MaterialComponent7.default);
exports.ImageListImage = ImageListImage;
var ImageListSupporting =
/*#__PURE__*/
function (_MaterialComponent4) {
(0, _inherits2.default)(ImageListSupporting, _MaterialComponent4);
function ImageListSupporting() {
var _this4;
(0, _classCallCheck2.default)(this, ImageListSupporting);
_this4 = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ImageListSupporting).apply(this, arguments));
_this4.componentName = 'image-list__supporting';
_this4.mdcProps = [];
return _this4;
}
(0, _createClass2.default)(ImageListSupporting, [{
key: "materialDom",
value: function materialDom(props) {
return (0, _preact.h)("div", Object.assign({}, props), this.props.children);
}
}]);
return ImageListSupporting;
}(_MaterialComponent7.default);
exports.ImageListSupporting = ImageListSupporting;
var ImageListLabel =
/*#__PURE__*/
function (_MaterialComponent5) {
(0, _inherits2.default)(ImageListLabel, _MaterialComponent5);
function ImageListLabel() {
var _this5;
(0, _classCallCheck2.default)(this, ImageListLabel);
_this5 = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ImageListLabel).apply(this, arguments));
_this5.componentName = 'image-list__label';
_this5.mdcProps = [];
return _this5;
}
(0, _createClass2.default)(ImageListLabel, [{
key: "materialDom",
value: function materialDom(props) {
return (0, _preact.h)("span", Object.assign({}, props, {
ref: this.setControlRef
}), props.children);
}
}]);
return ImageListLabel;
}(_MaterialComponent7.default);
exports.ImageListLabel = ImageListLabel;
var ImageList =
/*#__PURE__*/
function (_MaterialComponent6) {
(0, _inherits2.default)(ImageList, _MaterialComponent6);
function ImageList() {
var _this6;
(0, _classCallCheck2.default)(this, ImageList);
_this6 = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ImageList).apply(this, arguments));
_this6.componentName = 'image-list';
_this6.mdcProps = ['masonry', 'with-text-protection'];
return _this6;
}
(0, _createClass2.default)(ImageList, [{
key: "materialDom",
value: function materialDom(props) {
return (0, _preact.h)("ul", Object.assign({}, props, {
ref: this.setControlRef
}), props.children);
}
}]);
return ImageList;
}(_MaterialComponent7.default);
exports.ImageList = ImageList;
var default_1 =
/*#__PURE__*/
function (_ImageList) {
(0, _inherits2.default)(default_1, _ImageList);
function default_1() {
(0, _classCallCheck2.default)(this, default_1);
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(default_1).apply(this, arguments));
}
return default_1;
}(ImageList);
exports.default = default_1;
default_1.Item = ImageListItem;
default_1.AspectContainer = ImageListAspectContainer;
default_1.Image = ImageListImage;
default_1.Supporting = ImageListSupporting;
default_1.Label = ImageListLabel;
//# sourceMappingURL=index.js.map