UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 3.33 kB
"use strict"; // 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 CalendarPlus { 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.733zm363.205 312.016c13.973-.106 25.276 11.138 25.241 25.11-.035 13.962-11.386 25.371-25.359 25.49l-61.252.436-.437 61.312c-.107 13.866-11.516 25.075-25.465 25.075-13.961-.035-25.182-11.28-25.075-25.134l.437-60.91-61.029.425c-13.972.106-25.264-11.126-25.24-25.087.035-13.984 11.386-25.394 25.37-25.5l61.241-.437.437-61.312c.107-13.854 11.516-25.087 25.477-25.063 13.949.023 25.17 11.268 25.063 25.11l-.425 60.91 61.017-.425zM35.93 219.735h568.154a2.422 2.422 0 0 1 2.409 2.422V637.59a2.427 2.427 0 0 1-2.41 2.41H35.93c-1.322 0-2.42-1.088-2.42-2.41V222.157a2.425 2.425 0 0 1 2.42-2.422zm46.064 41.28H568.33c2.693 0 4.902 2.327 4.902 4.902v327.37c0 2.575-2.339 4.913-4.902 4.913H77.186c-2.575 0-4.902-2.208-4.902-4.913V270.724c0-5.35 4.359-9.709 9.71-9.709zm361.941-107.883c15.06 0 27.39-9.72 27.39-21.52V78.675l-.153-2.114h-54.45l-.153 2.114v52.937c0 11.835 12.295 21.52 27.366 21.52zm-255.44 0c15.06 0 27.39-9.72 27.39-21.52V78.675l-.153-2.114h-54.462l-.141 2.114v52.937c0 11.835 12.295 21.52 27.366 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-plus"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = CalendarPlus;