maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 4.49 kB
JavaScript
"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", "viewBox": "0 0 333334 274410", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", "fill-rule": "evenodd", "clip-rule": "evenodd" };
class Newspaper {
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="M95856 44756h197343v83367H95856V44756zM63541 248754c-1809 6080-4428 10989-7583 14822h239984l110 1c8658-489 15114-2795 19413-6882 4230-4022 6585-10021 7109-17957V10758H66083v217184c0 9239 103 11919-2543 20811zm-27857 25581c-1232 87-2467 94-3700 22-4930-287-9800-1812-14191-4402C8174 264281 737 253432 43 239261c-29-225-44-455-44-688V47608c0-2971 2409-5380 5380-5380h49946V5380c0-2971 2408-5380 5379-5380h267250c2971 0 5380 2409 5380 5380v233492c0 285-23 563-65 836-746 10586-4194 18856-10406 24763-6193 5887-14915 9178-26220 9819-229 30-463 45-700 45H35685zm-2992-10688c282-46 572-70 868-70h1958c2130-220 4219-826 6179-1851 11963-6259 13628-21570 13628-33698V52987H10758v185585c0 65-2 129-4 193 504 10212 5739 17954 12502 21944 2933 1730 6131 2746 9315 2931l120 7zm78165-198126h10569l13742 23102V65521h10696v41839h-10696l-13665-22974v22974h-10646V65521zm44330 0h30298v8941h-18936v6661h17555v8531h-17555v8239h19500v9466h-30862V65520zm35024 0h10747l3865 23344 5663-23344h10663l5707 23384 3889-23384h10696l-8078 41839h-11106l-6432-26344-6389 26344h-11089l-8137-41839zm54770 28000l10748-769c230 1987 708 3506 1424 4538 1169 1685 2831 2532 4998 2532 1612 0 2858-429 3728-1295 879-867 1314-1870 1314-3010 0-1081-409-2054-1237-2912-827-857-2755-1656-5783-2425-4964-1266-8496-2961-10611-5074-2133-2104-3198-4792-3198-8064 0-2142 545-4168 1637-6077 1092-1918 2730-3418 4922-4509 2193-1091 5195-1636 9007-1636 4683 0 8249 993 10706 2990 2456 1987 3915 5152 4384 9496l-10645 720c-281-1899-879-3282-1783-4139-913-867-2167-1295-3762-1295-1313 0-2312 321-2976 954-666 633-998 1412-998 2328 0 662 273 1257 810 1792 520 555 1783 1062 3779 1539 4947 1217 8487 2454 10620 3701 2141 1246 3702 2785 4675 4635 972 1841 1458 3905 1458 6194 0 2678-648 5152-1944 7421-1306 2260-3114 3983-5451 5152-2328 1169-5263 1753-8811 1753-6227 0-10543-1373-12940-4110-2396-2736-3753-6213-4069-10430zM97123 165055c-2971 0-5379-2408-5379-5379s2408-5379 5379-5379h82072c2970 0 5379 2408 5379 5379s-2409 5379-5379 5379H97123zm105587 17c-2980 0-5396-2416-5396-5396s2416-5396 5396-5396h88528c2980 0 5396 2416 5396 5396s-2417 5396-5396 5396h-88528zm0 31224c-2980 0-5396-2416-5396-5396s2416-5396 5396-5396h88528c2980 0 5396 2417 5396 5396 0 2980-2417 5396-5396 5396h-88528zm0 31223c-2980 0-5396-2416-5396-5396s2416-5396 5396-5396h88528c2980 0 5396 2416 5396 5396s-2417 5396-5396 5396h-88528zm-105587-17c-2971 0-5379-2408-5379-5379s2408-5379 5379-5379h82072c2970 0 5379 2408 5379 5379s-2409 5379-5379 5379H97123zm2586-31223c-2971 0-5380-2408-5380-5379s2409-5379 5380-5379h82072c2971 0 5379 2408 5379 5379s-2408 5379-5379 5379H99709z"/>'));
}
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 newspaper";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = Newspaper;