maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 4.85 kB
JavaScript
;
// THIS FILE WAS AUTO-GENERATED FOR PACKAGING, DO NOT MODIFY
Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = require("../../../types");
// tslint:disable-next-line
const SVG_PROPS = { "xmlns": "http://www.w3.org/2000/svg", "width": "64", "height": "64", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd", "viewBox": "0 0 640 640" };
class Calendar {
constructor() {
this.defaults = {
height: "1em",
width: "1em",
fill: "black",
};
}
view(vnode) {
return m("svg", Object.assign({}, this.genAttrs(vnode)),
// tslint:disable-next-line
m.trust('<path d="M43.252 76.477h118.005l-.13-2.031V21.508c0-11.835 12.296-21.52 27.367-21.52 15.06 0 27.39 9.72 27.39 21.52v52.938l-.142 2.031h200.98l-.142-2.031V21.508c0-11.835 12.295-21.52 27.366-21.52 15.06 0 27.39 9.72 27.39 21.52v52.938l-.141 2.031H596.76c5.362 0 9.732 4.37 9.732 9.733v101.352c0 5.362-4.37 9.732-9.732 9.732H43.253c-5.363 0-9.745-4.37-9.745-9.732V86.21c0-5.363 4.382-9.733 9.745-9.733zM35.93 219.735h568.153a2.422 2.422 0 0 1 2.41 2.422V637.59a2.427 2.427 0 0 1-2.41 2.41H35.93c-1.323 0-2.422-1.088-2.422-2.41V222.157a2.425 2.425 0 0 1 2.422-2.422zm506.64 52.62h-71.387c-4.311 0-7.82 3.283-7.82 7.298v66.367c0 4.016 3.509 7.3 7.82 7.3h71.387c4.322 0 7.854-3.284 7.854-7.3v-66.367c0-4.015-3.532-7.299-7.854-7.299zm-442.883 115.5h71.374c4.323 0 7.855 3.272 7.855 7.276v66.367c0 4.027-3.532 7.3-7.855 7.3H99.687c-4.312 0-7.831-3.273-7.831-7.3V395.13c0-4.004 3.52-7.276 7.83-7.276zm0 115.478h71.374c4.323 0 7.855 3.284 7.855 7.3v66.355c0 4.015-3.532 7.299-7.855 7.299H99.687c-4.312 0-7.831-3.284-7.831-7.3v-66.355c0-4.015 3.52-7.299 7.83-7.299zm0-230.979h71.374c4.323 0 7.855 3.284 7.855 7.3v66.366c0 4.016-3.532 7.3-7.855 7.3H99.687c-4.312 0-7.831-3.284-7.831-7.3v-66.367c0-4.015 3.52-7.299 7.83-7.299zm123.84 0h71.386c4.3 0 7.831 3.284 7.831 7.3v66.366c0 4.016-3.531 7.3-7.83 7.3h-71.387c-4.312 0-7.843-3.284-7.843-7.3v-66.367c0-4.015 3.531-7.299 7.843-7.299zm0 115.501h71.386c4.3 0 7.831 3.272 7.831 7.276v66.367c0 4.027-3.531 7.3-7.83 7.3h-71.387c-4.312 0-7.843-3.273-7.843-7.3V395.13c0-4.004 3.531-7.276 7.843-7.276zm0 115.478h71.386c4.3 0 7.831 3.284 7.831 7.3v66.355c0 4.015-3.531 7.299-7.83 7.299h-71.387c-4.312 0-7.843-3.284-7.843-7.3v-66.355c0-4.015 3.531-7.299 7.843-7.299zm123.84-230.979h71.386c4.311 0 7.843 3.284 7.843 7.3v66.366c0 4.016-3.532 7.3-7.843 7.3h-71.386c-4.323 0-7.855-3.284-7.855-7.3v-66.367c0-4.015 3.532-7.299 7.855-7.299zm0 115.501h71.386c4.311 0 7.843 3.272 7.843 7.276v66.367c0 4.027-3.532 7.3-7.843 7.3h-71.386c-4.323 0-7.855-3.273-7.855-7.3V395.13c0-4.004 3.532-7.276 7.855-7.276zm195.203-.012h-71.387c-4.311 0-7.82 3.284-7.82 7.288v66.367c0 4.027 3.509 7.3 7.82 7.3h71.387c4.322 0 7.854-3.273 7.854-7.3V395.13c0-4.004-3.532-7.288-7.854-7.288zm0 115.49h-71.387c-4.311 0-7.82 3.272-7.82 7.288v66.367c0 4.016 3.509 7.3 7.82 7.3h71.387c4.322 0 7.854-3.284 7.854-7.3V510.62c0-4.016-3.532-7.288-7.854-7.288zm-195.203 0h71.386c4.311 0 7.843 3.284 7.843 7.3v66.355c0 4.015-3.532 7.299-7.843 7.299h-71.386c-4.323 0-7.855-3.284-7.855-7.3v-66.354c0-4.016 3.532-7.3 7.855-7.3zM73.206 251.684h498.408c2.693 0 4.901 2.292 4.901 4.902v346.587c0 2.61-2.291 4.902-4.901 4.902H68.399c-2.61 0-4.902-2.21-4.902-4.902V261.405c0-5.35 4.358-9.72 9.709-9.72zm370.74-98.552c15.06 0 27.39-9.72 27.39-21.52V78.674l-.153-2.114h-54.45l-.153 2.114v52.938c0 11.835 12.295 21.52 27.367 21.52zm-255.451 0c15.059 0 27.39-9.72 27.39-21.52V78.674l-.154-2.114H161.27l-.142 2.114v52.938c0 11.835 12.296 21.52 27.367 21.52z"/>'));
}
genAttrs(vnode) {
const overrides = Object.values(types_1.GeneralIconAttrName)
.reduce((acc, name) => {
if (!name) {
return acc;
}
if (vnode && vnode && vnode.attrs[name]) {
acc[name] = vnode.attrs[name];
return acc;
}
if (name in this.defaults) {
acc[name] = this.defaults[name];
}
return acc;
}, {});
const attrs = Object.assign({}, SVG_PROPS, overrides);
if (!("style" in attrs) || !attrs.style) {
attrs.style = {};
}
if (attrs.style && typeof attrs.style !== "object") {
throw new Error("attr.style must be an object for icons");
}
attrs.style["vertical-align"] = "middle";
attrs.style["min-width"] = "1.25em";
const additionalClasses = "maille maille-uxwing-icon calendar";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = Calendar;