UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

460 lines (327 loc) 21.7 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><polygon points="128 74.039 76.68 111.325 96.282 171.655 159.718 171.655 179.32 111.325 128 74.039" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polygon></svg>`, 4, true), _tmpl$3 = template(`<svg><line x1="128" y1="32" x2="128" y2="74.0389" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$4 = template(`<svg><line x1="36.69857" y1="98.33437" x2="76.67992" y2="111.32512" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$5 = template(`<svg><line x1="71.57262" y1="205.66563" x2="96.28244" y2="171.6555" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$6 = template(`<svg><line x1="184.42738" y1="205.66563" x2="159.71756" y2="171.6555" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$7 = template(`<svg><line x1="219.30143" y1="98.33437" x2="179.32008" y2="111.32512" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$8 = template(`<svg><polygon points="128 86 88.056 115.021 103.313 161.979 152.687 161.979 167.944 115.021 128 86" opacity="0.2"></polygon></svg>`, 4, true), _tmpl$9 = template(`<svg><path d="M92.98335,38.58649a96.37511,96.37511,0,0,1,70.03342.00005l-.00031.00077L128,64,92.98372,38.58745Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$10 = template(`<svg><path d="M32.142,133.67252A96.375,96.375,0,0,1,53.78352,67.0668l.00064.00052,13.34822,41.15559L32.143,133.67246Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M103.77312,220.91932a96.37514,96.37514,0,0,1-56.65819-41.16465l.0007-.00045,43.26611.02287,13.39164,41.14123Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><path d="M208.885,179.75478a96.37518,96.37518,0,0,1-56.65826,41.16457l-.0002-.00081,13.39171-41.14145,43.26588-.02287Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M202.21656,67.06689A96.375,96.375,0,0,1,223.858,133.67264l-.00083,0-34.98958-25.44969,13.34815-41.15537Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$14 = 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$15 = template(`<svg><polygon points="128 86 88.056 115.021 103.313 161.979 152.687 161.979 167.944 115.021 128 86" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polygon></svg>`, 4, true), _tmpl$16 = template(`<svg><line x1="128" y1="64" x2="128" y2="86" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$17 = template(`<svg><polyline points="163.016 38.587 128 64 92.984 38.587" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$18 = template(`<svg><line x1="67.13238" y1="108.22291" x2="88.05563" y2="115.02129" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$19 = template(`<svg><polyline points="53.784 67.067 67.132 108.223 32.143 133.672" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$20 = template(`<svg><line x1="90.38174" y1="179.77709" x2="103.31302" y2="161.97871" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$21 = template(`<svg><polyline points="47.116 179.754 90.382 179.777 103.773 220.918" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$22 = template(`<svg><line x1="165.61826" y1="179.77709" x2="152.68698" y2="161.97871" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$23 = template(`<svg><polyline points="152.227 220.919 165.618 179.777 208.884 179.754" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$24 = template(`<svg><line x1="188.86762" y1="108.22291" x2="167.94437" y2="115.02129" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$25 = template(`<svg><polyline points="223.857 133.673 188.868 108.223 202.216 67.068" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$26 = template(`<svg><path d="M231.76978,134.8335a8.01081,8.01081,0,0,0,.07861-1.23633Q231.99652,130.81689,232,128a103.4965,103.4965,0,0,0-22.96765-65.10937,7.99721,7.99721,0,0,0-1.39539-1.69776,104.47716,104.47716,0,0,0-41.09863-29.78662,7.94558,7.94558,0,0,0-1.14416-.44824,103.96223,103.96223,0,0,0-74.78968.00049,7.97953,7.97953,0,0,0-1.14245.44775A104.47726,104.47726,0,0,0,48.36353,61.19238a7.99972,7.99972,0,0,0-1.39612,1.69825A103.49872,103.49872,0,0,0,24,128q0,2.81982.1521,5.60352A7.99281,7.99281,0,0,0,24.23,134.8291a103.303,103.303,0,0,0,15.69409,48.41211,7.99155,7.99155,0,0,0,1.05615,1.64307,104.37857,104.37857,0,0,0,60.27588,43.62353c.10743.03565.21851.05762.32752.08887a104.21832,104.21832,0,0,0,52.82971.00049c.11011-.03125.22241-.05371.33093-.08936a104.38026,104.38026,0,0,0,60.27552-43.62353,7.99155,7.99155,0,0,0,1.05615-1.64307A103.30408,103.30408,0,0,0,231.76978,134.8335ZM68.53931,117.0918l13.1676,4.27832,12.738,39.2041L86.30713,171.7749l-34.6377-.01806a87.36716,87.36716,0,0,1-11.15771-34.2793Zm118.92151,0,28.02746,20.38574a87.36716,87.36716,0,0,1-11.15771,34.2793l-34.6377.01806-8.13782-11.20068,12.738-39.2041Zm5.73291-48.13819L182.51624,101.875l-13.16749,4.27832L136,81.92383V68.07861l28.04492-20.353A88.44244,88.44244,0,0,1,193.19373,68.95361ZM91.95532,47.72559,120,68.07861V81.92383L86.65125,106.15332,73.48376,101.875,62.8064,68.95361A88.44288,88.44288,0,0,1,91.95532,47.72559Zm18.02539,166.4165-10.72937-32.9624,8.13782-11.20117h41.22168l8.13782,11.20117-10.72925,32.9624a88.31128,88.31128,0,0,1-36.0387,0Z"></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="12"></circle></svg>`, 4, true), _tmpl$28 = template(`<svg><polygon points="128 86 88.056 115.021 103.313 161.979 152.687 161.979 167.944 115.021 128 86" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polygon></svg>`, 4, true), _tmpl$29 = template(`<svg><line x1="128" y1="64" x2="128" y2="86" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$30 = template(`<svg><polyline points="163.016 38.587 128 64 92.984 38.587" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$31 = template(`<svg><line x1="67.13238" y1="108.22291" x2="88.05563" y2="115.02129" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$32 = template(`<svg><polyline points="53.784 67.067 67.132 108.223 32.143 133.672" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$33 = template(`<svg><line x1="90.38174" y1="179.77709" x2="103.31302" y2="161.97871" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$34 = template(`<svg><polyline points="47.116 179.754 90.382 179.777 103.773 220.918" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$35 = template(`<svg><line x1="165.61826" y1="179.77709" x2="152.68698" y2="161.97871" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$36 = template(`<svg><polyline points="152.227 220.919 165.618 179.777 208.884 179.754" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$37 = template(`<svg><line x1="188.86762" y1="108.22291" x2="167.94437" y2="115.02129" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$38 = template(`<svg><polyline points="223.857 133.673 188.868 108.223 202.216 67.068" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$39 = 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$40 = template(`<svg><polygon points="128 86 88.056 115.021 103.313 161.979 152.687 161.979 167.944 115.021 128 86" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polygon></svg>`, 4, true), _tmpl$41 = template(`<svg><line x1="128" y1="64" x2="128" y2="86" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$42 = template(`<svg><polyline points="163.016 38.587 128 64 92.984 38.587" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$43 = template(`<svg><line x1="67.13238" y1="108.22291" x2="88.05563" y2="115.02129" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$44 = template(`<svg><polyline points="53.784 67.067 67.132 108.223 32.143 133.672" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$45 = template(`<svg><line x1="90.38174" y1="179.77709" x2="103.31302" y2="161.97871" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$46 = template(`<svg><polyline points="47.116 179.754 90.382 179.777 103.773 220.918" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$47 = template(`<svg><line x1="165.61826" y1="179.77709" x2="152.68698" y2="161.97871" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$48 = template(`<svg><polyline points="152.227 220.919 165.618 179.777 208.884 179.754" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$49 = template(`<svg><line x1="188.86762" y1="108.22291" x2="167.94437" y2="115.02129" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$50 = template(`<svg><polyline points="223.857 133.673 188.868 108.223 202.216 67.068" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$51 = 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); setAttribute(_el$5, "stroke", color); return _el$5; }(), function () { var _el$6 = _tmpl$6.cloneNode(true); setAttribute(_el$6, "stroke", color); return _el$6; }(), function () { var _el$7 = _tmpl$7.cloneNode(true); setAttribute(_el$7, "stroke", color); return _el$7; }()]; case "duotone": return [_tmpl$8.cloneNode(true), _tmpl$9.cloneNode(true), _tmpl$10.cloneNode(true), _tmpl$11.cloneNode(true), _tmpl$12.cloneNode(true), _tmpl$13.cloneNode(true), function () { var _el$14 = _tmpl$14.cloneNode(true); setAttribute(_el$14, "stroke", color); return _el$14; }(), function () { var _el$15 = _tmpl$15.cloneNode(true); setAttribute(_el$15, "stroke", color); return _el$15; }(), 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; }(), function () { var _el$19 = _tmpl$19.cloneNode(true); setAttribute(_el$19, "stroke", color); return _el$19; }(), function () { var _el$20 = _tmpl$20.cloneNode(true); setAttribute(_el$20, "stroke", color); return _el$20; }(), function () { var _el$21 = _tmpl$21.cloneNode(true); setAttribute(_el$21, "stroke", color); return _el$21; }(), function () { var _el$22 = _tmpl$22.cloneNode(true); setAttribute(_el$22, "stroke", color); return _el$22; }(), function () { var _el$23 = _tmpl$23.cloneNode(true); setAttribute(_el$23, "stroke", color); return _el$23; }(), function () { var _el$24 = _tmpl$24.cloneNode(true); setAttribute(_el$24, "stroke", color); return _el$24; }(), function () { var _el$25 = _tmpl$25.cloneNode(true); setAttribute(_el$25, "stroke", color); return _el$25; }()]; case "fill": return _tmpl$26.cloneNode(true); case "light": return [function () { var _el$27 = _tmpl$27.cloneNode(true); setAttribute(_el$27, "stroke", color); return _el$27; }(), function () { var _el$28 = _tmpl$28.cloneNode(true); setAttribute(_el$28, "stroke", color); return _el$28; }(), function () { var _el$29 = _tmpl$29.cloneNode(true); setAttribute(_el$29, "stroke", color); return _el$29; }(), function () { var _el$30 = _tmpl$30.cloneNode(true); setAttribute(_el$30, "stroke", color); return _el$30; }(), function () { var _el$31 = _tmpl$31.cloneNode(true); setAttribute(_el$31, "stroke", color); return _el$31; }(), function () { var _el$32 = _tmpl$32.cloneNode(true); setAttribute(_el$32, "stroke", color); return _el$32; }(), function () { var _el$33 = _tmpl$33.cloneNode(true); setAttribute(_el$33, "stroke", color); return _el$33; }(), function () { var _el$34 = _tmpl$34.cloneNode(true); setAttribute(_el$34, "stroke", color); return _el$34; }(), function () { var _el$35 = _tmpl$35.cloneNode(true); setAttribute(_el$35, "stroke", color); return _el$35; }(), function () { var _el$36 = _tmpl$36.cloneNode(true); setAttribute(_el$36, "stroke", color); return _el$36; }(), function () { var _el$37 = _tmpl$37.cloneNode(true); setAttribute(_el$37, "stroke", color); return _el$37; }(), function () { var _el$38 = _tmpl$38.cloneNode(true); setAttribute(_el$38, "stroke", color); return _el$38; }()]; case "thin": return [function () { var _el$39 = _tmpl$39.cloneNode(true); setAttribute(_el$39, "stroke", color); return _el$39; }(), function () { var _el$40 = _tmpl$40.cloneNode(true); setAttribute(_el$40, "stroke", color); return _el$40; }(), function () { var _el$41 = _tmpl$41.cloneNode(true); setAttribute(_el$41, "stroke", color); return _el$41; }(), function () { var _el$42 = _tmpl$42.cloneNode(true); setAttribute(_el$42, "stroke", color); return _el$42; }(), function () { var _el$43 = _tmpl$43.cloneNode(true); setAttribute(_el$43, "stroke", color); return _el$43; }(), function () { var _el$44 = _tmpl$44.cloneNode(true); setAttribute(_el$44, "stroke", color); return _el$44; }(), function () { var _el$45 = _tmpl$45.cloneNode(true); setAttribute(_el$45, "stroke", color); return _el$45; }(), function () { var _el$46 = _tmpl$46.cloneNode(true); setAttribute(_el$46, "stroke", color); return _el$46; }(), function () { var _el$47 = _tmpl$47.cloneNode(true); setAttribute(_el$47, "stroke", color); return _el$47; }(), function () { var _el$48 = _tmpl$48.cloneNode(true); setAttribute(_el$48, "stroke", color); return _el$48; }(), function () { var _el$49 = _tmpl$49.cloneNode(true); setAttribute(_el$49, "stroke", color); return _el$49; }(), function () { var _el$50 = _tmpl$50.cloneNode(true); setAttribute(_el$50, "stroke", color); return _el$50; }()]; case "regular": return [function () { var _el$51 = _tmpl$14.cloneNode(true); setAttribute(_el$51, "stroke", color); return _el$51; }(), function () { var _el$52 = _tmpl$15.cloneNode(true); setAttribute(_el$52, "stroke", color); return _el$52; }(), function () { var _el$53 = _tmpl$16.cloneNode(true); setAttribute(_el$53, "stroke", color); return _el$53; }(), function () { var _el$54 = _tmpl$17.cloneNode(true); setAttribute(_el$54, "stroke", color); return _el$54; }(), function () { var _el$55 = _tmpl$18.cloneNode(true); setAttribute(_el$55, "stroke", color); return _el$55; }(), function () { var _el$56 = _tmpl$19.cloneNode(true); setAttribute(_el$56, "stroke", color); return _el$56; }(), function () { var _el$57 = _tmpl$20.cloneNode(true); setAttribute(_el$57, "stroke", color); return _el$57; }(), function () { var _el$58 = _tmpl$21.cloneNode(true); setAttribute(_el$58, "stroke", color); return _el$58; }(), function () { var _el$59 = _tmpl$22.cloneNode(true); setAttribute(_el$59, "stroke", color); return _el$59; }(), function () { var _el$60 = _tmpl$23.cloneNode(true); setAttribute(_el$60, "stroke", color); return _el$60; }(), function () { var _el$61 = _tmpl$24.cloneNode(true); setAttribute(_el$61, "stroke", color); return _el$61; }(), function () { var _el$62 = _tmpl$25.cloneNode(true); setAttribute(_el$62, "stroke", color); return _el$62; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var SoccerBall = function SoccerBall(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$63 = _tmpl$51.cloneNode(true), _el$64 = _el$63.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$63) : ref = _el$63; setAttribute(_el$63, "width", size != null ? size : contextSize); setAttribute(_el$63, "height", size != null ? size : contextSize); setAttribute(_el$63, "fill", color != null ? color : contextColor); setAttribute(_el$63, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$63, restContext, true, true); spread(_el$63, restProps, true, true); insert(_el$63, children, _el$64); insert(_el$63, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$63; }(); }; export default SoccerBall; //# sourceMappingURL=SoccerBall.esm.js.map