UNPKG

maille

Version:

Component library for MithrilJS

50 lines (49 loc) 3 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 AlarmClock { 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="M155.943 45.65c40.252-1.594 77.269 13.654 104.281 39.45C154.018 97.312 70.478 179.884 55.088 283.575 33.71 259.692 20.21 228.51 18.84 194.01 15.745 115.17 77.116 48.744 155.944 45.65zm357.949 354.784L278.661 433.66l1.524-17.22h-.39l2.28-21.249.838-9.437h.177L304.598 185.6l20.634 202.845 188.66 11.988zM310.527 0h32.67c6.142 0 11.15 5.02 11.15 11.162v93.095c126.38 14.564 224.541 121.927 224.541 252.192 0 60.273-21.047 115.655-56.15 159.203l52.69 91.289c3.082 5.315 1.24 12.177-4.063 15.236l-28.312 16.347c-5.315 3.06-12.153 1.228-15.236-4.087l-45.473-78.78c-43.253 34.217-97.927 54.686-157.348 54.686-57.627 0-110.777-19.24-153.38-51.603l-43.713 75.697c-3.071 5.315-9.91 7.146-15.237 4.087l-28.3-16.347c-5.302-3.059-7.157-9.921-4.074-15.248l50.34-87.202C93.508 475.601 71.114 418.635 71.114 356.45c0-131.553 100.088-239.743 228.263-252.617v-92.67C299.378 5.02 304.386 0 310.528 0zm173.53 45.65C443.805 44.056 406.8 59.304 379.776 85.1c106.206 12.212 189.746 94.784 205.148 198.475 21.366-23.883 34.867-55.064 36.237-89.564 3.106-78.84-58.265-145.266-137.104-148.36z"/>')); } 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 alarm-clock"; attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses; return attrs; } } exports.default = AlarmClock;