UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 4.18 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", "viewBox": "0 0 640 640", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" }; class EarthAfricaView { 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="M320 0c176.707 0 320 143.293 320 320S496.707 640 320 640 0 496.707 0 320 143.293 0 320 0zm87.887 33.827C515.274 69.521 595.85 164.022 611.37 279.145l-10.17-1.086c-1.807 7.783-3.472 7.984-3.472 17.362 0 8.268 10.418 13.807 10.418 31.264 0 4.677-10.985 14.032-11.47 15.662l-16.31-19.134v24.319l-2.48-.095-4.394-44.87-9.107 2.87-10.842-33.379-35.706 37.265-.425 27.283-11.657 7.82-12.379-69.994-7.405 5.41-16.772-22.63-25.063.744-9.603-10.973-9.827 2.705-19.335-22.158-3.732 2.54 11.977 30.614h13.901v-6.945h6.945c5.008 13.843 10.418 5.646 10.418 13.902 0 28.89-35.682 50.126-59.056 55.571 1.252 5.22.768 10.43 6.945 10.43 13.087 0 6.579-2.292 20.847-3.473-.662 29.516-33.851 64.76-48.025 86.741l6.343 45.26c1.677 9.828-20.41 20.233-27.922 31.3l3.603 17.34-10.17 4.11c-1.783 17.81-19.075 37.57-38.469 37.57h-20.835c0-24.39-17.374-59.197-17.374-76.43 0-14.633 6.945-16.606 6.945-34.736 0-16.748-17.362-40.772-17.362-45.154v-27.792h-13.902c-2.067-7.748-.803-10.417-10.417-10.417h-3.473c-15.177 0-12.614 6.945-27.792 6.945h-13.901c-12.532 0-34.737-40.217-34.737-45.166v-41.682c0-17.988 16.465-37.571 27.792-45.166V215.53l15.638-15.898 8.681-1.476c18.638 0 16.43-10.418 27.792-10.418h31.264v24.32l34.37 14.669 3.237-14.835c15.579 3.65 19.63 10.583 38.823 10.583h6.945c13.181 0 13.89-17.492 13.89-31.264l-27.827 2.752-12.107-26.375-12.035 3.201c2.161 9.437 3.342 5.516 3.342 13.477 0 4.689-3.862 5.209-6.956 6.945l-12.036-30.544-25.878-18.484-3.437 3.378 22.04 23.185c-2.93 8.315-3.272 32.339-15.426 15.52l11.362-5.469-28.323-29.681-16.973 6.638-16.748 16.04c-1.748 12.92-5.268 19.417-18.791 19.417-9 0-3.567-2.327-17.375-3.473v-34.736h31.265l-10.134-23.138-3.756 2.291v-6.945l50.764-23.41c-.957-7.287-2.126-3.378-2.126-11.327 0-.472 3.413-6.886 3.472-6.956l13.134 8.15-3.141-14.954-20.257 4.17-3.755-18.178c16.063-8.456 51.402-38.232 62.646-38.232h10.43c10.972 0 40.37 10.83 45.153 17.362l-27.874-2.823 20.681 17.032 1.985-7.264 15.437-4.228.189-9.662h6.957v10.417l39.425-11.48zm201.298 340.315a314.507 314.507 0 0 1-2.67 13.04l-1.594-11.21 4.264-1.83zm-10.004 39.39a283.57 283.57 0 0 1-2.374 6.957h-2.551v-6.957h4.925zM61.24 485.31a299.59 299.59 0 0 1-41.233-94.927l56.363 27.178.283 16.82c0 6.176-10.547 19.322-13.89 24.318l-1.523 26.61z"/>')); } 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 earth-africa-view"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = EarthAfricaView;