UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 6.88 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 ChainLinks { 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 fill-rule="nonzero" d="M291.405 295.374l-.118-.106c-7.099-11.575-12.142-24.178-15.13-37.135-.65-2.846-1.24-5.87-1.725-8.976-.496-3.2-.885-6.201-1.098-8.918v-.247l-.07-.934c-1.655-22.5 2.786-45.555 13.523-66.343a124.253 124.253 0 0 1 7.087-11.976c2.61-3.874 5.456-7.69 8.527-11.292l.024.024.012-.024.26-.319.425-.52 91.005-105.52c15.72-18.249 35.717-30.804 57.248-37.477l.697-.248a127.844 127.844 0 0 1 12.98-3.178c4.442-.85 8.895-1.464 13.277-1.807V.39l.07-.012.934-.07c22.5-1.654 45.555 2.787 66.343 13.523 4.028 2.079 8.055 4.477 11.976 7.087a124.19 124.19 0 0 1 11.292 8.54l-.024.011.024.012.697.59.106.071 1.075.922.118.094.07.06v.011l.52.425.178.213c17.528 15.768 29.587 35.54 35.941 56.729 1.193 4.028 2.197 8.28 3.024 12.614l.07.166h-.011l.012.035c.815 4.417 1.417 8.788 1.76 12.992h-.012l.012.071.07.933c1.654 22.489-2.787 45.544-13.535 66.32a123.813 123.813 0 0 1-7.087 11.976 126.011 126.011 0 0 1-8.54 11.304l-.011-.024-.012.024-.543.626-.154.212L491.7 311.366c-15.886 18.438-36.154 31.064-57.946 37.678a123.828 123.828 0 0 1-12.98 3.213 122.99 122.99 0 0 1-13.134 1.819h-.213l-.933.07a125.435 125.435 0 0 1-45.815-5.15 121.573 121.573 0 0 1-8.752-3.058l-3.331-1.311.118.106c7.098 11.575 12.142 24.177 15.13 37.134.65 2.847 1.24 5.87 1.724 8.977.497 3.2.886 6.2 1.099 8.917v.248l.07.933c1.654 22.5-2.787 45.556-13.523 66.344a124.253 124.253 0 0 1-7.087 11.976c-2.61 3.874-5.457 7.69-8.527 11.292l-.024-.024-.012.024-.26.318-.425.52-91.005 105.521c-15.72 18.248-35.717 30.804-57.249 37.477l-.697.248a127.844 127.844 0 0 1-12.98 3.177c-4.441.85-8.894 1.465-13.276 1.807v-.012l-.07.012-.934.071c-22.5 1.654-45.556-2.787-66.343-13.524-4.028-2.078-8.055-4.476-11.977-7.086a124.19 124.19 0 0 1-11.291-8.54l.024-.012-.024-.011-.697-.591-.106-.07-1.075-.922-.118-.095-.071-.059v-.012l-.52-.425-.177-.212c-17.528-15.768-29.587-35.54-35.941-56.73-1.193-4.027-2.197-8.279-3.024-12.614l-.07-.165h.011l-.012-.035c-.815-4.418-1.417-8.788-1.76-12.993h.012l-.012-.07-.07-.934c-1.654-22.488 2.787-45.544 13.535-66.32a123.813 123.813 0 0 1 7.087-11.976c2.61-3.886 5.468-7.689 8.54-11.303l.011.023.012-.023.543-.626.154-.213 90.993-105.52c15.886-18.438 36.154-31.064 57.945-37.678a123.828 123.828 0 0 1 12.981-3.213 122.99 122.99 0 0 1 13.134-1.819h.213l.933-.07a125.435 125.435 0 0 1 45.815 5.149c2.953.91 5.906 1.937 8.752 3.059l3.331 1.311zm-61.666 75.639l19.087-22.123-3.343-.047-.083.012-3.153.106-.071.012-.744.047-.083.012c-11.02.815-21.839 4.571-31.075 11.162a63.694 63.694 0 0 0-5.291 4.252l-.012-.024-.024.024a62.13 62.13 0 0 0-4.854 4.925l-.012-.012-.614.685-90.97 105.486c-7.653 8.882-12.307 19.56-13.972 30.556-.343 2.291-.58 4.512-.674 6.567a65.94 65.94 0 0 0 .06 6.65l.011.271.047.567c.815 11.02 4.583 21.839 11.162 31.087 1.276 1.784 2.67 3.473 4.075 5.079l.177.212a60.177 60.177 0 0 0 4.925 4.89l-.011.012.307.272.283.248.52.437c8.81 7.453 19.3 11.988 30.107 13.606l.165.024c2.256.33 4.453.567 6.46.65 2.138.082 4.37.059 6.603-.071l.343-.024.496-.035c11.008-.815 21.827-4.583 31.075-11.162a62.387 62.387 0 0 0 5.114-4.075l.165-.177a58.476 58.476 0 0 0 4.902-4.925l.012.012.614-.697 90.981-105.486c7.666-8.882 12.308-19.524 13.961-30.556h.012a66.58 66.58 0 0 0 .65-6.579c.082-2.161.059-4.405-.06-6.65l-.047-.767-.011-.06v-.094a63.214 63.214 0 0 0-.945-7.122l-18.65 21.638-.508.615-.673.744-.012-.012-.118.118a37.762 37.762 0 0 1-24.957 12.012c-9.284.673-18.874-2.055-26.599-8.362l.012-.024-.083-.047-.484-.414-.13-.106-.083-.083-.059-.035-.082-.07-.378-.32-.012-.012.023-.023c-10.736-9.544-14.716-24-11.527-37.146a38.26 38.26 0 0 1 2.81-7.701c1.17-2.386 2.658-4.69 4.335-6.803l.083-.13.142-.201.012.012.059-.083.52-.626.011.012.083-.13zM410.26 268.988l-19.087 22.122 3.343.047.082-.012 3.154-.106.07-.012.745-.047.083-.012c11.02-.815 21.838-4.57 31.075-11.161a63.694 63.694 0 0 0 5.291-4.252l.012.023.024-.023a62.13 62.13 0 0 0 4.854-4.926l.012.012.614-.685 90.97-105.486c7.653-8.882 12.307-19.56 13.972-30.555.343-2.292.579-4.512.673-6.567a65.94 65.94 0 0 0-.059-6.65l-.011-.272-.048-.567c-.815-11.02-4.582-21.839-11.161-31.087-1.276-1.783-2.67-3.472-4.075-5.078l-.177-.213a60.177 60.177 0 0 0-4.926-4.89l.012-.012-.307-.271-.283-.248-.52-.437c-8.811-7.453-19.3-11.989-30.107-13.607l-.165-.024c-2.256-.33-4.453-.566-6.46-.65a68.718 68.718 0 0 0-6.603.072l-.343.023-.496.036c-11.008.815-21.827 4.583-31.075 11.161a62.387 62.387 0 0 0-5.114 4.075l-.166.177a58.476 58.476 0 0 0-4.901 4.926l-.012-.012-.614.697-90.982 105.486c-7.665 8.882-12.307 19.524-13.96 30.555h-.012a66.58 66.58 0 0 0-.65 6.58 73.716 73.716 0 0 0 .06 6.649l.046.767.012.06v.094c.177 2.386.496 4.76.945 7.122l18.65-21.638.508-.614.673-.744.012.012.118-.119a37.762 37.762 0 0 1 24.957-12.012c9.284-.673 18.874 2.056 26.599 8.363l-.012.023.083.048.484.413.13.106.083.083.059.035.082.071.378.32.012.011-.024.024c10.737 9.543 14.717 24 11.528 37.146a38.26 38.26 0 0 1-2.811 7.7c-1.17 2.386-2.657 4.69-4.335 6.804l-.082.13-.142.2-.012-.011-.059.082-.52.626-.011-.011-.083.13z"/>')); } 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 chain-links"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = ChainLinks;