UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

368 lines (261 loc) 17.4 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><circle cx="128" cy="128" r="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></circle></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M181.19142,79.40281a96.385,96.385,0,0,1,14.80852-19.167" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><path d="M196,195.76425a96.38487,96.38487,0,0,1-14.80811-19.16636" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M168.74273,140a97.31136,97.31136,0,0,1,0-24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><g><path d="M74.80858,79.40281a96.385,96.385,0,0,0-14.80852-19.167" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path><path d="M60.00005,195.76425a96.38487,96.38487,0,0,0,14.80811-19.16636" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path><path d="M87.25728,140A96.9478,96.9478,0,0,0,88,128a96.94587,96.94587,0,0,0-.74152-11.9903" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></g></svg>`, 10, true), _tmpl$6 = template(`<svg><path d="M60.05889,195.90664a96,96,0,0,1-.11775-135.64655l0,0a95.69768,95.69768,0,0,1,28,67.76427,95.69771,95.69771,0,0,1-27.99925,67.76355Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M196.05884,195.90664a96,96,0,0,1-.11776-135.64655l0,0a96,96,0,0,1,.00073,135.52782Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><circle cx="128" cy="128" r="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></circle></svg>`, 4, true), _tmpl$9 = template(`<svg><path d="M169.172,113.03177a96.58913,96.58913,0,0,1,3.80409-15.5448" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$10 = template(`<svg><path d="M172.975,158.5097a96.58848,96.58848,0,0,1-3.80352-15.54493" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M86.828,113.03177A96.58913,96.58913,0,0,0,83.02388,97.487" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><path d="M83.025,158.5097a96.58848,96.58848,0,0,0,3.80352-15.54493" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M186.79812,70.93634a96.59069,96.59069,0,0,1,9.20058-10.701" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><path d="M195.999,195.765a96.59178,96.59178,0,0,1-9.20291-10.70411" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$15 = template(`<svg><path d="M60.0012,195.76479A96.5897,96.5897,0,0,0,69.204,185.06084" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$16 = template(`<svg><path d="M69.20188,70.93634A96.59162,96.59162,0,0,0,60.001,60.235" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$17 = template(`<svg><path d="M207.24951,60.73486c-.02392.021-.04468.044-.06885.06446a88.76639,88.76639,0,0,0-10.37841,10.37841,8.0001,8.0001,0,1,1-12.21289-10.33691,104.79143,104.79143,0,0,1,11.3872-11.48828,103.80743,103.80743,0,0,0-135.95312,0,104.83246,104.83246,0,0,1,11.387,11.48779,8.00014,8.00014,0,0,1-6.102,13.169h-.00366a7.98253,7.98253,0,0,1-6.10987-2.83106A88.78841,88.78841,0,0,0,48.81592,60.7998c-.02368-.02-.0437-.04248-.0669-.0625a103.77819,103.77819,0,0,0,0,134.52588c.02417-.021.04493-.04443.06958-.06543A88.82286,88.82286,0,0,0,59.197,184.81934,8.00144,8.00144,0,0,1,71.4126,195.15723a104.89749,104.89749,0,0,1-11.38916,11.49023,103.80743,103.80743,0,0,0,135.95312,0,104.83154,104.83154,0,0,1-11.38916-11.49023,8,8,0,1,1,12.21192-10.33789,88.76639,88.76639,0,0,0,10.37841,10.37841c.02539.02149.04688.04541.07178.0669a103.77881,103.77881,0,0,0,0-134.52979ZM79.62866,87.97949A7.99764,7.99764,0,0,1,89.866,92.80518a104.86829,104.86829,0,0,1,4.4851,16.73877,8.00663,8.00663,0,0,1-7.88159,9.42431h-.00366a8.00242,8.00242,0,0,1-7.863-6.57861,88.81047,88.81047,0,0,0-3.79907-14.17676A8.00027,8.00027,0,0,1,79.62866,87.97949Zm14.72315,58.47315a104.886,104.886,0,0,1-4.48487,16.73925,8.003,8.003,0,0,1-7.52954,5.29834h-.00366a8.00492,8.00492,0,0,1-7.52905-10.70556,88.874,88.874,0,0,0,3.79883-14.17774,8.00167,8.00167,0,0,1,15.74829,2.84571Zm82.01391,21.56494a7.993,7.993,0,0,1-10.23291-4.82569,104.83662,104.83662,0,0,1-4.48486-16.73925,8.00011,8.00011,0,0,1,15.74512-2.84571,88.80709,88.80709,0,0,0,3.79834,14.17774A8.00013,8.00013,0,0,1,176.36572,168.01758Zm4.82666-69.8042a88.82819,88.82819,0,0,0-3.79883,14.17676,8.00019,8.00019,0,1,1-15.74511-2.84668,104.80436,104.80436,0,0,1,4.48633-16.73926,7.99986,7.99986,0,1,1,15.05761,5.40918Z"></path></svg>`, 4, true), _tmpl$18 = template(`<svg><circle cx="128" cy="128" r="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></circle></svg>`, 4, true), _tmpl$19 = template(`<svg><path d="M169.172,113.03177a96.58913,96.58913,0,0,1,3.80409-15.5448" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$20 = template(`<svg><path d="M172.975,158.5097a96.58848,96.58848,0,0,1-3.80352-15.54493" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$21 = template(`<svg><path d="M86.828,113.03177A96.58913,96.58913,0,0,0,83.02388,97.487" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$22 = template(`<svg><path d="M83.025,158.5097a96.58848,96.58848,0,0,0,3.80352-15.54493" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$23 = template(`<svg><path d="M186.79812,70.93634a96.59069,96.59069,0,0,1,9.20058-10.701" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$24 = template(`<svg><path d="M195.999,195.765a96.59178,96.59178,0,0,1-9.20291-10.70411" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$25 = template(`<svg><path d="M60.0012,195.76479A96.5897,96.5897,0,0,0,69.204,185.06084" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$26 = template(`<svg><path d="M69.20188,70.93634A96.59162,96.59162,0,0,0,60.001,60.235" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$27 = template(`<svg><circle cx="128" cy="128" r="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></circle></svg>`, 4, true), _tmpl$28 = template(`<svg><path d="M169.172,113.03177a96.58913,96.58913,0,0,1,3.80409-15.5448" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$29 = template(`<svg><path d="M172.975,158.5097a96.58848,96.58848,0,0,1-3.80352-15.54493" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$30 = template(`<svg><path d="M86.828,113.03177A96.58913,96.58913,0,0,0,83.02388,97.487" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$31 = template(`<svg><path d="M83.025,158.5097a96.58848,96.58848,0,0,0,3.80352-15.54493" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$32 = template(`<svg><path d="M186.79812,70.93634a96.59069,96.59069,0,0,1,9.20058-10.701" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$33 = template(`<svg><path d="M195.999,195.765a96.59178,96.59178,0,0,1-9.20291-10.70411" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$34 = template(`<svg><path d="M60.0012,195.76479A96.5897,96.5897,0,0,0,69.204,185.06084" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$35 = template(`<svg><path d="M69.20188,70.93634A96.59162,96.59162,0,0,0,60.001,60.235" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$36 = 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; }(), function () { var _el$4 = _tmpl$4.cloneNode(true); setAttribute(_el$4, "stroke", color); return _el$4; }(), function () { var _el$5 = _tmpl$5.cloneNode(true), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling; setAttribute(_el$6, "stroke", color); setAttribute(_el$7, "stroke", color); setAttribute(_el$8, "stroke", color); return _el$5; }()]; case "duotone": return [_tmpl$6.cloneNode(true), _tmpl$7.cloneNode(true), function () { var _el$11 = _tmpl$8.cloneNode(true); setAttribute(_el$11, "stroke", color); return _el$11; }(), function () { var _el$12 = _tmpl$9.cloneNode(true); setAttribute(_el$12, "stroke", color); return _el$12; }(), function () { var _el$13 = _tmpl$10.cloneNode(true); setAttribute(_el$13, "stroke", color); return _el$13; }(), function () { var _el$14 = _tmpl$11.cloneNode(true); setAttribute(_el$14, "stroke", color); return _el$14; }(), function () { var _el$15 = _tmpl$12.cloneNode(true); setAttribute(_el$15, "stroke", color); return _el$15; }(), function () { var _el$16 = _tmpl$13.cloneNode(true); setAttribute(_el$16, "stroke", color); return _el$16; }(), function () { var _el$17 = _tmpl$14.cloneNode(true); setAttribute(_el$17, "stroke", color); return _el$17; }(), function () { var _el$18 = _tmpl$15.cloneNode(true); setAttribute(_el$18, "stroke", color); return _el$18; }(), function () { var _el$19 = _tmpl$16.cloneNode(true); setAttribute(_el$19, "stroke", color); return _el$19; }()]; case "fill": return _tmpl$17.cloneNode(true); case "light": return [function () { var _el$21 = _tmpl$18.cloneNode(true); setAttribute(_el$21, "stroke", color); return _el$21; }(), function () { var _el$22 = _tmpl$19.cloneNode(true); setAttribute(_el$22, "stroke", color); return _el$22; }(), function () { var _el$23 = _tmpl$20.cloneNode(true); setAttribute(_el$23, "stroke", color); return _el$23; }(), function () { var _el$24 = _tmpl$21.cloneNode(true); setAttribute(_el$24, "stroke", color); return _el$24; }(), function () { var _el$25 = _tmpl$22.cloneNode(true); setAttribute(_el$25, "stroke", color); return _el$25; }(), function () { var _el$26 = _tmpl$23.cloneNode(true); setAttribute(_el$26, "stroke", color); return _el$26; }(), function () { var _el$27 = _tmpl$24.cloneNode(true); setAttribute(_el$27, "stroke", color); return _el$27; }(), function () { var _el$28 = _tmpl$25.cloneNode(true); setAttribute(_el$28, "stroke", color); return _el$28; }(), function () { var _el$29 = _tmpl$26.cloneNode(true); setAttribute(_el$29, "stroke", color); return _el$29; }()]; case "thin": return [function () { var _el$30 = _tmpl$27.cloneNode(true); setAttribute(_el$30, "stroke", color); return _el$30; }(), function () { var _el$31 = _tmpl$28.cloneNode(true); setAttribute(_el$31, "stroke", color); return _el$31; }(), function () { var _el$32 = _tmpl$29.cloneNode(true); setAttribute(_el$32, "stroke", color); return _el$32; }(), function () { var _el$33 = _tmpl$30.cloneNode(true); setAttribute(_el$33, "stroke", color); return _el$33; }(), function () { var _el$34 = _tmpl$31.cloneNode(true); setAttribute(_el$34, "stroke", color); return _el$34; }(), function () { var _el$35 = _tmpl$32.cloneNode(true); setAttribute(_el$35, "stroke", color); return _el$35; }(), function () { var _el$36 = _tmpl$33.cloneNode(true); setAttribute(_el$36, "stroke", color); return _el$36; }(), function () { var _el$37 = _tmpl$34.cloneNode(true); setAttribute(_el$37, "stroke", color); return _el$37; }(), function () { var _el$38 = _tmpl$35.cloneNode(true); setAttribute(_el$38, "stroke", color); return _el$38; }()]; case "regular": return [function () { var _el$39 = _tmpl$8.cloneNode(true); setAttribute(_el$39, "stroke", color); return _el$39; }(), function () { var _el$40 = _tmpl$9.cloneNode(true); setAttribute(_el$40, "stroke", color); return _el$40; }(), function () { var _el$41 = _tmpl$10.cloneNode(true); setAttribute(_el$41, "stroke", color); return _el$41; }(), function () { var _el$42 = _tmpl$11.cloneNode(true); setAttribute(_el$42, "stroke", color); return _el$42; }(), function () { var _el$43 = _tmpl$12.cloneNode(true); setAttribute(_el$43, "stroke", color); return _el$43; }(), function () { var _el$44 = _tmpl$13.cloneNode(true); setAttribute(_el$44, "stroke", color); return _el$44; }(), function () { var _el$45 = _tmpl$14.cloneNode(true); setAttribute(_el$45, "stroke", color); return _el$45; }(), function () { var _el$46 = _tmpl$15.cloneNode(true); setAttribute(_el$46, "stroke", color); return _el$46; }(), function () { var _el$47 = _tmpl$16.cloneNode(true); setAttribute(_el$47, "stroke", color); return _el$47; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var Baseball = function Baseball(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$48 = _tmpl$36.cloneNode(true), _el$49 = _el$48.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$48) : ref = _el$48; setAttribute(_el$48, "width", size != null ? size : contextSize); setAttribute(_el$48, "height", size != null ? size : contextSize); setAttribute(_el$48, "fill", color != null ? color : contextColor); setAttribute(_el$48, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$48, restContext, true, true); spread(_el$48, restProps, true, true); insert(_el$48, children, _el$49); insert(_el$48, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$48; }(); }; export default Baseball; //# sourceMappingURL=Baseball.esm.js.map