UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

312 lines (221 loc) 15.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><path d="M107.99406,128.00837a20,20,0,1,1,40,0,211.06573,211.06573,0,0,1-24.95471,99.87857" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M127.99406,68.00837a60,60,0,0,1,60,60q0,12.14234-1.128,24.00022" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><path d="M51.34928,192.22271a131.40267,131.40267,0,0,0,16.64478-64.21434,59.85046,59.85046,0,0,1,19.99759-44.72" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M103.31853,168.00854a170.97437,170.97437,0,0,1-20.308,49.32367" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><path d="M179.79526,192.00879a250.02989,250.02989,0,0,1-8.39355,26.119" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$6 = template(`<svg><path d="M22.276,160.00875a91.80964,91.80964,0,0,0,5.71806-32.00038l.0118.0001a100,100,0,0,1,200,0l-.0118-.0001a293.00937,293.00937,0,0,1-7.03556,64.00068" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M50.68905,184.92207a127.4728,127.4728,0,0,0,13.31718-56.913A63.88065,63.88065,0,0,1,88.0059,78.04632" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><path d="M128.00623,128.009a191.13407,191.13407,0,0,1-23.97573,92.98042" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$9 = template(`<svg><path d="M96.00623,128.009a32,32,0,0,1,64,0A223.13818,223.13818,0,0,1,138.731,223.41536" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$10 = template(`<svg><path d="M218.56486,184.00845a289.42035,289.42035,0,0,0,5.441-56,96,96,0,0,0-192,0,95.845,95.845,0,0,1-5.46267,32.00025" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M92.80577,160.00843a158.95129,158.95129,0,0,1-18.1147,47.84483" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><path d="M120.00621,64.50418a64.051,64.051,0,0,1,72,63.50485,258.52451,258.52451,0,0,1-1.98054,31.99945" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M183.94126,192.00844q-2.2851,8.87835-5.18116,17.5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><g><path d="M128.00586,24.00842a104.11791,104.11791,0,0,0-104,104A87.786,87.786,0,0,1,19,157.34241a8.00025,8.00025,0,1,0,15.08594,5.332,103.74958,103.74958,0,0,0,5.91992-34.666,88,88,0,0,1,176,0,282.27848,282.27848,0,0,1-5.29,54.45313,7.99962,7.99962,0,1,0,15.69727,3.09375,298.25279,298.25279,0,0,0,5.59277-57.54688A104.11791,104.11791,0,0,0,128.00586,24.00842Z"></path><path d="M93.00977,84.2887A8.00025,8.00025,0,0,0,83.00195,71.80432,71.69909,71.69909,0,0,0,56.00586,128.0094,118.80142,118.80142,0,0,1,43.52637,181.361,7.99964,7.99964,0,1,0,57.85254,188.484,134.64637,134.64637,0,0,0,72.00586,128.0094,55.77314,55.77314,0,0,1,93.00977,84.2887Z"></path><path d="M128.00586,120.0094a8.00039,8.00039,0,0,0-8,8A184.12954,184.12954,0,0,1,97.03418,217.11a7.99993,7.99993,0,1,0,13.99219,7.75977,200.16824,200.16824,0,0,0,24.97949-96.86035A8.00039,8.00039,0,0,0,128.00586,120.0094Z"></path><path d="M128.00586,88.0094a40.04583,40.04583,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09658,214.09658,0,0,1-20.51074,91.99512,8,8,0,1,0,14.47265,6.82226,229.98738,229.98738,0,0,0,22.03809-98.81738A40.04583,40.04583,0,0,0,128.00586,88.0094Z"></path><path d="M94.39648,152.16858a8.00778,8.00778,0,0,0-9.43066,6.249,150.78976,150.78976,0,0,1-17.2041,45.4375,8.00031,8.00031,0,1,0,13.85937,7.9961,166.73312,166.73312,0,0,0,19.02442-50.252A7.99971,7.99971,0,0,0,94.39648,152.16858Z"></path><path d="M128.00586,56.0094a72.92874,72.92874,0,0,0-8.99121.55664A8.00012,8.00012,0,1,0,120.99707,72.443a56.70946,56.70946,0,0,1,7.00879-.43359,56.0629,56.0629,0,0,1,56,56,251.41194,251.41194,0,0,1-1.919,31.00879,8,8,0,1,0,15.877,1.98047,267.59018,267.59018,0,0,0,2.042-32.98926A72.08124,72.08124,0,0,0,128.00586,56.0094Z"></path><path d="M185.93555,184.26135a7.99377,7.99377,0,0,0-9.74121,5.75293c-1.46485,5.68848-3.15332,11.39063-5.01856,16.94824a7.9999,7.9999,0,1,0,15.168,5.0918c1.9873-5.91992,3.78613-11.99316,5.34473-18.05176A7.999,7.999,0,0,0,185.93555,184.26135Z"></path></g></svg>`, 18, true), _tmpl$15 = template(`<svg><path d="M50.68905,184.92207a127.4728,127.4728,0,0,0,13.31718-56.913A63.88065,63.88065,0,0,1,88.0059,78.04632" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$16 = template(`<svg><path d="M128.00623,128.009a191.13407,191.13407,0,0,1-23.97573,92.98042" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$17 = template(`<svg><path d="M96.00623,128.009a32,32,0,0,1,64,0A223.13818,223.13818,0,0,1,138.731,223.41536" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$18 = template(`<svg><path d="M218.56486,184.00845a289.42035,289.42035,0,0,0,5.441-56,96,96,0,0,0-192,0,95.845,95.845,0,0,1-5.46267,32.00025" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$19 = template(`<svg><path d="M92.80577,160.00843a158.95129,158.95129,0,0,1-18.1147,47.84483" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$20 = template(`<svg><path d="M120.00621,64.50418a64.051,64.051,0,0,1,72,63.50485,258.52451,258.52451,0,0,1-1.98054,31.99945" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$21 = template(`<svg><path d="M183.94126,192.00844q-2.2851,8.87835-5.18116,17.5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$22 = template(`<svg><path d="M50.68905,184.92207a127.4728,127.4728,0,0,0,13.31718-56.913A63.88065,63.88065,0,0,1,88.0059,78.04632" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$23 = template(`<svg><path d="M128.00623,128.009a191.13407,191.13407,0,0,1-23.97573,92.98042" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$24 = template(`<svg><path d="M96.00623,128.009a32,32,0,0,1,64,0A223.13818,223.13818,0,0,1,138.731,223.41536" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$25 = template(`<svg><path d="M218.56486,184.00845a289.42035,289.42035,0,0,0,5.441-56,96,96,0,0,0-192,0,95.845,95.845,0,0,1-5.46267,32.00025" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$26 = template(`<svg><path d="M92.80577,160.00843a158.95129,158.95129,0,0,1-18.1147,47.84483" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$27 = template(`<svg><path d="M120.00621,64.50418a64.051,64.051,0,0,1,72,63.50485,258.52451,258.52451,0,0,1-1.98054,31.99945" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$28 = template(`<svg><path d="M183.94126,192.00844q-2.2851,8.87835-5.18116,17.5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$29 = 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; }()]; case "duotone": return [function () { var _el$7 = _tmpl$7.cloneNode(true); setAttribute(_el$7, "stroke", color); return _el$7; }(), 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; }(), function () { var _el$11 = _tmpl$11.cloneNode(true); setAttribute(_el$11, "stroke", color); return _el$11; }(), 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; }()]; case "fill": return _tmpl$14.cloneNode(true); case "light": return [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; }()]; case "thin": return [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; }(), function () { var _el$26 = _tmpl$26.cloneNode(true); setAttribute(_el$26, "stroke", color); return _el$26; }(), 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; }()]; case "regular": return [function () { var _el$29 = _tmpl$7.cloneNode(true); setAttribute(_el$29, "stroke", color); return _el$29; }(), function () { var _el$30 = _tmpl$8.cloneNode(true); setAttribute(_el$30, "stroke", color); return _el$30; }(), function () { var _el$31 = _tmpl$9.cloneNode(true); setAttribute(_el$31, "stroke", color); return _el$31; }(), function () { var _el$32 = _tmpl$10.cloneNode(true); setAttribute(_el$32, "stroke", color); return _el$32; }(), function () { var _el$33 = _tmpl$11.cloneNode(true); setAttribute(_el$33, "stroke", color); return _el$33; }(), function () { var _el$34 = _tmpl$12.cloneNode(true); setAttribute(_el$34, "stroke", color); return _el$34; }(), function () { var _el$35 = _tmpl$13.cloneNode(true); setAttribute(_el$35, "stroke", color); return _el$35; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var Fingerprint = function Fingerprint(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$36 = _tmpl$29.cloneNode(true), _el$37 = _el$36.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$36) : ref = _el$36; setAttribute(_el$36, "width", size != null ? size : contextSize); setAttribute(_el$36, "height", size != null ? size : contextSize); setAttribute(_el$36, "fill", color != null ? color : contextColor); setAttribute(_el$36, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$36, restContext, true, true); spread(_el$36, restProps, true, true); insert(_el$36, children, _el$37); insert(_el$36, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$36; }(); }; export default Fingerprint; //# sourceMappingURL=Fingerprint.esm.js.map