maille
Version:
Component library for MithrilJS
50 lines (49 loc) • 4.43 kB
JavaScript
;
// 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 LinuxLogo {
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="M354.796 460.541c-51.201 23.847-98.848 23.552-130.856 21.284-38.15-2.764-68.835-13.193-82.312-22.312-8.315-5.634-19.595-3.448-25.252 4.89-5.658 8.327-3.45 19.583 4.89 25.24 21.673 14.682 60.024 25.596 100.123 28.49 6.803.483 14.244.802 22.287.802 34.879 0 79.159-3.33 126.521-25.358 9.118-4.229 13.052-15.048 8.8-24.154-4.24-9.118-15.036-13.051-24.154-8.8l-.048-.082zm202.042-26.906c1.76-157.927 17.965-456.372-284.366-432.253C-26.055 25.418 53.103 340.742 48.674 446.344 44.717 502.223 26.197 570.515 0 639.988l80.67.012c8.28-29.433 14.41-58.572 16.985-86.351a190.202 190.202 0 0 0 15.65 9.791c9.047 5.327 16.795 12.402 25.04 19.878 19.204 17.528 40.996 37.359 83.563 39.84 2.835.165 5.705.247 8.552.247 43.087 0 72.52-18.838 96.166-34.004 11.327-7.24 21.119-13.524 30.367-16.524 26.197-8.197 49.075-21.437 66.201-38.28a124.86 124.86 0 0 0 7.477-8.079c9.531 34.926 22.56 74.245 37.04 113.446l172.29-.012c-41.363-63.874-84.037-126.474-83.163-206.365v.048zM77.553 347.71v-.036c-2.965-51.532 21.685-94.89 55.075-96.851 33.402-1.973 62.848 38.28 65.8 89.8v.047c.166 2.764.237 5.516.237 8.233-10.571 2.645-20.115 6.52-28.678 11.008-.047-.39-.047-.756-.07-1.158-2.847-29.244-18.485-51.355-34.926-49.359-16.453 1.985-27.438 27.355-24.567 56.6 1.24 12.756 4.913 24.153 10.04 32.764-1.288.992-4.89 3.638-9.001 6.638-3.118 2.28-6.874 5.031-11.445 8.397-12.437-16.323-20.953-39.709-22.477-66.201l.012.118zm338.248 127.407c-1.193 27.248-36.804 52.89-69.733 63.166l-.19.07c-13.688 4.454-25.89 12.25-38.799 20.517-21.72 13.878-44.162 28.24-76.56 28.24-2.114 0-4.323-.07-6.437-.189-29.681-1.724-43.607-14.41-61.158-30.437-9.284-8.433-18.874-17.197-31.229-24.45l-.295-.164c-26.681-15.072-43.229-33.804-44.327-50.115-.508-8.115 3.094-15.119 10.724-20.882 16.642-12.485 27.804-20.634 35.162-26.032 8.197-6 10.677-7.796 12.52-9.555a183.84 183.84 0 0 0 4.24-4.123c15.284-14.846 40.831-39.72 80.08-39.72 24 0 50.551 9.236 78.84 27.437 13.322 8.681 24.92 12.685 39.59 17.764 10.087 3.484 21.567 7.44 36.875 14.008l.248.118c14.28 5.882 31.205 16.595 30.402 34.323l.047.024zm-7.878-64.017a102.134 102.134 0 0 0-8.599-3.91c-13.807-5.928-24.886-9.92-34.087-13.121 5.091-9.922 8.245-22.312 8.528-35.753.732-32.717-15.791-59.327-36.874-59.363-21.072-.023-38.717 26.446-39.438 59.162a36.16 36.16 0 0 0 0 3.201c-12.957-5.953-25.713-10.323-38.233-12.957-.047-1.24-.13-2.433-.165-3.673v-.035c-1.205-59.647 35.363-109.005 81.71-110.245 46.358-1.24 84.875 46.075 86.115 105.675v.047c.555 26.953-6.685 51.792-19.004 71.044l.047-.07z"/>'));
}
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 linux-logo";
attrs.className = attrs.className ? (attrs.className + " " + additionalClasses) : additionalClasses;
return attrs;
}
}
exports.default = LinuxLogo;