UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

219 lines (156 loc) 13.2 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><g><path d="M119.99332,106.41921l-26-45.03332a20,20,0,0,1,34.641-20l40,69.282" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path><path d="M89.35231,133.34742l-38-65.81793a20,20,0,1,1,34.641-20l34,58.88972" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path><path d="M153.99332,165.30894a40,40,0,0,1,14.641-54.641l-10-17.32051a20,20,0,1,1,34.641-20l20,34.641a80,80,0,1,1-138.56406,80l-38-65.81793a20,20,0,0,1,34.641-20l18,31.17692" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></g></svg>`, 10, true), _tmpl$2 = template(`<svg><path d="M176,22.99A59.97614,59.97614,0,0,1,227.96152,53" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><path d="M66.93521,240.00025A119.74962,119.74962,0,0,1,40.0943,207.99" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M158.63434,93.34742a20,20,0,1,1,34.641-20l20,34.641a80,80,0,1,1-138.56406,80l-38-65.81793a20,20,0,0,1,34.641-20l-20-34.641a20,20,0,1,1,34.641-20l8,13.8564a20,20,0,0,1,34.641-20Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><g><path d="M119.99332,106.41921l-26-45.03332a20,20,0,0,1,34.641-20l40,69.282" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><path d="M89.35231,133.34742l-38-65.81793a20,20,0,1,1,34.641-20l34,58.88972" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><path d="M153.99332,165.30894a40,40,0,0,1,14.641-54.641l-10-17.32051a20,20,0,1,1,34.641-20l20,34.641a80,80,0,1,1-138.56406,80l-38-65.81793a20,20,0,0,1,34.641-20l18,31.17692" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></g></svg>`, 10, true), _tmpl$6 = template(`<svg><path d="M81.09415,240.0027A111.54975,111.54975,0,0,1,48,203.99065" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M176,31A51.97065,51.97065,0,0,1,221.0258,57.00434" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><path d="M220.20312,103.98828l-19.999-34.64062a28.02682,28.02682,0,0,0-47.29834-1.92243l-17.34326-30.04a27.99212,27.99212,0,0,0-48.11328-.63549A28.003,28.003,0,0,0,44.4248,71.5293l7.35352,12.73663A27.99166,27.99166,0,0,0,29.7832,126.17041l38,65.81787a87.99976,87.99976,0,1,0,152.41992-88ZM213.54,166.62354A72.00058,72.00058,0,0,1,81.63867,183.98828l-37.999-65.81738a11.99994,11.99994,0,0,1,20.78418-12.00049l18,31.17725a8.01625,8.01625,0,0,0,.55566.82623c.05274.07.1084.13617.16309.204q.23657.2926.4956.5578c.0586.0603.11621.12207.17627.1803a8.00346,8.00346,0,0,0,.72412.62359l.01758.012a8.0088,8.0088,0,0,0,.76807.50262c.07519.04346.15088.08325.22705.12421q.31714.17148.64844.313c.07373.03149.1455.06524.22021.09454a8.05256,8.05256,0,0,0,.88867.29571c.01953.00519.03955.00782.05909.01288a8.05171,8.05171,0,0,0,.85449.16712c.08545.01226.1709.02105.25683.03058q.36036.03992.72412.04675c.05274.001.1045.01019.15723.01019.02539,0,.05127-.0047.07666-.00494a7.94421,7.94421,0,0,0,.93018-.05963c.0249-.00318.0498-.00965.0747-.01307a7.93311,7.93311,0,0,0,.84131-.16473c.08985-.0224.17823-.049.26758-.07465q.33692-.09659.66748-.22454c.08692-.03351.17383-.06482.26026-.10157a7.95946,7.95946,0,0,0,3.80175-11.35833l-18-31.17774-.0039-.00647L58.28027,63.52881A12.00012,12.00012,0,0,1,79.06543,51.5293l7.9834,13.82818.01562.02826,26,45.03369a8,8,0,1,0,13.85645-8l-25.999-45.03369a12.00023,12.00023,0,1,1,20.78515-12l29.99756,51.95752.00244.0044,6.3291,10.96338a48.025,48.025,0,0,0-10.9707,60.998,7.99959,7.99959,0,1,0,13.85547-8,32.00043,32.00043,0,0,1,11.71387-43.71289,7.96868,7.96868,0,0,0,.66992-.43329c.18017-.12921.34961-.26849.51562-.41009.03174-.02692.06641-.05048.09766-.07788.19092-.16761.37109-.344.543-.52668l.01611-.01586q.25928-.27687.48779-.575l.01758-.02087c.14453-.1886.27783-.384.4043-.5835.01318-.021.02832-.0404.0415-.06152.11377-.18286.21533-.37158.31348-.5622.022-.04248.04736-.08258.06885-.12548.0874-.17847.16308-.36206.2373-.54621.02344-.05877.05225-.115.07471-.17444.08056-.215.14892-.43408.21094-.655.0083-.03028.0205-.059.0288-.08942.00782-.02966.01172-.05988.01954-.0896.05664-.22278.10742-.44714.145-.67419.01171-.06977.01513-.14.0249-.2099.02636-.18915.05224-.3783.06494-.56922.00391-.05823.00146-.11633.00391-.17456.00927-.20325.01611-.40661.00976-.61078-.00146-.03888-.00732-.07739-.00879-.11621-.01025-.2218-.02588-.44366-.05469-.66522-.00341-.02515-.00976-.04981-.01318-.07489-.03271-.23193-.07275-.46344-.126-.69373-.00683-.02783-.0166-.05481-.02294-.08252-.05469-.22387-.11573-.4469-.19043-.66772-.022-.06525-.05127-.12811-.0752-.19281-.06641-.18012-.13184-.36029-.21191-.53735a7.98085,7.98085,0,0,0-.36475-.7121l-10-17.3208a12.00012,12.00012,0,0,1,20.78516-11.99951l20,34.64062A71.53255,71.53255,0,0,1,213.54,166.62354ZM87.668,244.56152a7.999,7.999,0,0,1-11.13281,2.01563,118.949,118.949,0,0,1-35.46289-38.58643,7.99959,7.99959,0,1,1,13.85546-8,103.08083,103.08083,0,0,0,30.72461,33.438A8.00009,8.00009,0,0,1,87.668,244.56152ZM168,30.99268A8.00009,8.00009,0,0,1,176,23h.00781A60.21143,60.21143,0,0,1,227.9541,53.00439a8.00044,8.00044,0,1,1-13.85742,8A44.16357,44.16357,0,0,0,175.99219,39,8,8,0,0,1,168,30.99268Z"></path></svg>`, 4, true), _tmpl$9 = template(`<svg><g><path d="M119.99332,106.41921l-26-45.03332a20,20,0,0,1,34.641-20l40,69.282" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path><path d="M89.35231,133.34742l-38-65.81793a20,20,0,1,1,34.641-20l34,58.88972" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path><path d="M153.99332,165.30894a40,40,0,0,1,14.641-54.641l-10-17.32051a20,20,0,1,1,34.641-20l20,34.641a80,80,0,1,1-138.56406,80l-38-65.81793a20,20,0,0,1,34.641-20l18,31.17692" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></g></svg>`, 10, true), _tmpl$10 = template(`<svg><path d="M81.09415,240.0027A111.54975,111.54975,0,0,1,48,203.99065" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M176,31A51.97065,51.97065,0,0,1,221.0258,57.00434" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><g><path d="M119.99332,106.41921l-26-45.03332a20,20,0,0,1,34.641-20l40,69.282" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path><path d="M89.35231,133.34742l-38-65.81793a20,20,0,1,1,34.641-20l34,58.88972" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path><path d="M153.99332,165.30894a40,40,0,0,1,14.641-54.641l-10-17.32051a20,20,0,1,1,34.641-20l20,34.641a80,80,0,1,1-138.56406,80l-38-65.81793a20,20,0,0,1,34.641-20l18,31.17692" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></g></svg>`, 10, true), _tmpl$13 = template(`<svg><path d="M81.09415,240.0027A111.54975,111.54975,0,0,1,48,203.99065" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><path d="M176,31A51.97065,51.97065,0,0,1,221.0258,57.00434" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$15 = 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), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling; setAttribute(_el$2, "stroke", color); setAttribute(_el$3, "stroke", color); setAttribute(_el$4, "stroke", color); return _el$; }(), function () { var _el$5 = _tmpl$2.cloneNode(true); setAttribute(_el$5, "stroke", color); return _el$5; }(), function () { var _el$6 = _tmpl$3.cloneNode(true); setAttribute(_el$6, "stroke", color); return _el$6; }()]; case "duotone": return [_tmpl$4.cloneNode(true), function () { var _el$8 = _tmpl$5.cloneNode(true), _el$9 = _el$8.firstChild, _el$10 = _el$9.nextSibling, _el$11 = _el$10.nextSibling; setAttribute(_el$9, "stroke", color); setAttribute(_el$10, "stroke", color); setAttribute(_el$11, "stroke", color); return _el$8; }(), function () { var _el$12 = _tmpl$6.cloneNode(true); setAttribute(_el$12, "stroke", color); return _el$12; }(), function () { var _el$13 = _tmpl$7.cloneNode(true); setAttribute(_el$13, "stroke", color); return _el$13; }()]; case "fill": return _tmpl$8.cloneNode(true); case "light": return [function () { var _el$15 = _tmpl$9.cloneNode(true), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling; setAttribute(_el$16, "stroke", color); setAttribute(_el$17, "stroke", color); setAttribute(_el$18, "stroke", color); return _el$15; }(), function () { var _el$19 = _tmpl$10.cloneNode(true); setAttribute(_el$19, "stroke", color); return _el$19; }(), function () { var _el$20 = _tmpl$11.cloneNode(true); setAttribute(_el$20, "stroke", color); return _el$20; }()]; case "thin": return [function () { var _el$21 = _tmpl$12.cloneNode(true), _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling; setAttribute(_el$22, "stroke", color); setAttribute(_el$23, "stroke", color); setAttribute(_el$24, "stroke", color); return _el$21; }(), function () { var _el$25 = _tmpl$13.cloneNode(true); setAttribute(_el$25, "stroke", color); return _el$25; }(), function () { var _el$26 = _tmpl$14.cloneNode(true); setAttribute(_el$26, "stroke", color); return _el$26; }()]; case "regular": return [function () { var _el$27 = _tmpl$5.cloneNode(true), _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.nextSibling; setAttribute(_el$28, "stroke", color); setAttribute(_el$29, "stroke", color); setAttribute(_el$30, "stroke", color); return _el$27; }(), function () { var _el$31 = _tmpl$6.cloneNode(true); setAttribute(_el$31, "stroke", color); return _el$31; }(), function () { var _el$32 = _tmpl$7.cloneNode(true); setAttribute(_el$32, "stroke", color); return _el$32; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var HandWaving = function HandWaving(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$33 = _tmpl$15.cloneNode(true), _el$34 = _el$33.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$33) : ref = _el$33; setAttribute(_el$33, "width", size != null ? size : contextSize); setAttribute(_el$33, "height", size != null ? size : contextSize); setAttribute(_el$33, "fill", color != null ? color : contextColor); setAttribute(_el$33, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$33, restContext, true, true); spread(_el$33, restProps, true, true); insert(_el$33, children, _el$34); insert(_el$33, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$33; }(); }; export default HandWaving; //# sourceMappingURL=HandWaving.esm.js.map