UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

177 lines (128 loc) 8.29 kB
import { useContext } from 'solid-js'; import { IconContext } from '../lib/index.esm.js'; import { template, setAttribute, spread, insert } from 'solid-js/web'; import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../_virtual/_rollupPluginBabelHelpers.js'; const _tmpl$ = template(`<svg><path d="M92.91969,166.06177a50.7769,50.7769,0,0,1,70.145,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M58.97857,132.12064a98.75415,98.75415,0,0,1,138.02724,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><path d="M25.06379,98.17952a146.68225,146.68225,0,0,1,205.8568,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$4 = template(`<svg><circle cx="128" cy="200" r="16"></circle></svg>`, 4, true), _tmpl$5 = template(`<svg><path d="M20.20855,75.93124c63.48474-47.90809,152.098-47.90812,215.58263.00015a8.015,8.015,0,0,1,1.201,11.61025c-19.04723,22.44929-82.94714,97.76169-102.95188,121.33925a7.93583,7.93583,0,0,1-12.14044-.0705L19.03968,87.57941A8.055,8.055,0,0,1,20.20855,75.93124Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$6 = template(`<svg><path d="M20.20855,75.93124c63.48474-47.90809,152.098-47.90812,215.58263.00015a8.015,8.015,0,0,1,1.201,11.61025c-19.04723,22.44929-82.94714,97.76169-102.95188,121.33925a7.93583,7.93583,0,0,1-12.14044-.0705L19.03968,87.57941A8.055,8.055,0,0,1,20.20855,75.93124Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M246.86034,80.49665a15.72068,15.72068,0,0,0-6.209-10.91944C174.34325,19.50788,81.71141,19.49665,15.39061,69.54548a15.73529,15.73529,0,0,0-6.21142,10.936,16.27674,16.27674,0,0,0,3.76074,12.27393L115.85985,214.05768a15.95117,15.95117,0,0,0,12.17383,5.65528A15.77638,15.77638,0,0,0,140.081,214.127L243.12206,92.6822A16.16767,16.16767,0,0,0,246.86034,80.49665Z"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><path d="M92.91969,166.06177a50.7769,50.7769,0,0,1,70.145,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$9 = template(`<svg><path d="M58.97857,132.12064a98.75415,98.75415,0,0,1,138.02724,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$10 = template(`<svg><path d="M25.06379,98.17952a146.68225,146.68225,0,0,1,205.8568,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$11 = template(`<svg><circle cx="128" cy="200" r="10"></circle></svg>`, 4, true), _tmpl$12 = template(`<svg><path d="M92.91969,166.06177a50.7769,50.7769,0,0,1,70.145,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M58.97857,132.12064a98.75415,98.75415,0,0,1,138.02724,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><path d="M25.06379,98.17952a146.68225,146.68225,0,0,1,205.8568,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$15 = template(`<svg><circle cx="128" cy="200" r="8"></circle></svg>`, 4, true), _tmpl$16 = template(`<svg><path d="M92.91969,166.06177a50.7769,50.7769,0,0,1,70.145,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$17 = template(`<svg><path d="M58.97857,132.12064a98.75415,98.75415,0,0,1,138.02724,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$18 = template(`<svg><path d="M25.06379,98.17952a146.68225,146.68225,0,0,1,205.8568,0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$19 = template(`<svg><circle cx="128" cy="200" r="12"></circle></svg>`, 4, true), _tmpl$20 = template(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect></svg>`, 4); var renderPathFor = function renderPathFor(weight, color) { switch (weight) { case "bold": return [function () { var _el$ = _tmpl$.cloneNode(true); setAttribute(_el$, "stroke", color); return _el$; }(), function () { var _el$2 = _tmpl$2.cloneNode(true); setAttribute(_el$2, "stroke", color); return _el$2; }(), function () { var _el$3 = _tmpl$3.cloneNode(true); setAttribute(_el$3, "stroke", color); return _el$3; }(), _tmpl$4.cloneNode(true)]; case "duotone": return [_tmpl$5.cloneNode(true), function () { var _el$6 = _tmpl$6.cloneNode(true); setAttribute(_el$6, "stroke", color); return _el$6; }()]; case "fill": return _tmpl$7.cloneNode(true); case "light": return [function () { var _el$8 = _tmpl$8.cloneNode(true); setAttribute(_el$8, "stroke", color); return _el$8; }(), function () { var _el$9 = _tmpl$9.cloneNode(true); setAttribute(_el$9, "stroke", color); return _el$9; }(), function () { var _el$10 = _tmpl$10.cloneNode(true); setAttribute(_el$10, "stroke", color); return _el$10; }(), _tmpl$11.cloneNode(true)]; case "thin": return [function () { var _el$12 = _tmpl$12.cloneNode(true); setAttribute(_el$12, "stroke", color); return _el$12; }(), function () { var _el$13 = _tmpl$13.cloneNode(true); setAttribute(_el$13, "stroke", color); return _el$13; }(), function () { var _el$14 = _tmpl$14.cloneNode(true); setAttribute(_el$14, "stroke", color); return _el$14; }(), _tmpl$15.cloneNode(true)]; case "regular": return [function () { var _el$16 = _tmpl$16.cloneNode(true); setAttribute(_el$16, "stroke", color); return _el$16; }(), function () { var _el$17 = _tmpl$17.cloneNode(true); setAttribute(_el$17, "stroke", color); return _el$17; }(), function () { var _el$18 = _tmpl$18.cloneNode(true); setAttribute(_el$18, "stroke", color); return _el$18; }(), _tmpl$19.cloneNode(true)]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var WifiHigh = function WifiHigh(props, ref) { var color = props.color, size = props.size, weight = props.weight, mirrored = props.mirrored, children = props.children, restProps = _objectWithoutPropertiesLoose(props, ["color", "size", "weight", "mirrored", "children"]); var _useContext = useContext(IconContext), contextColor = _useContext.color, contextSize = _useContext.size, contextWeight = _useContext.weight, contextMirrored = _useContext.mirrored, restContext = _objectWithoutPropertiesLoose(_useContext, ["color", "size", "weight", "mirrored"]); return function () { var _el$20 = _tmpl$20.cloneNode(true), _el$21 = _el$20.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$20) : ref = _el$20; setAttribute(_el$20, "width", size != null ? size : contextSize); setAttribute(_el$20, "height", size != null ? size : contextSize); setAttribute(_el$20, "fill", color != null ? color : contextColor); setAttribute(_el$20, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$20, restContext, true, true); spread(_el$20, restProps, true, true); insert(_el$20, children, _el$21); insert(_el$20, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$20; }(); }; export default WifiHigh; //# sourceMappingURL=WifiHigh.esm.js.map