UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

154 lines (111 loc) 8.03 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="156" cy="76" r="16"></circle></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M186.30284,167.94573Q185.15821,167.99979,184,168a48,48,0,0,1-48-48A48,48,0,0,1,88,72q0-1.16456.05488-2.31579" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><path d="M62.177,153.17849,12,175.96316,64,192l16,52,22.8003-50.20045v.00009c138.35934-3.2851,120.00626-122.89746,114.38209-148.8602a7.98721,7.98721,0,0,0-6.1218-6.12182C185.099,33.19376,65.49508,14.84213,62.17691,153.17849Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M88.05489,69.68421c-14.74239,17.88968-24.94149,44.45157-25.878,83.49428h.0001L8,175.96316,64,192l16,56,22.8003-54.20045v.00009c39.04488-.92705,65.60976-11.118,83.50255-25.85391Q185.1582,167.99979,184,168a48,48,0,0,1-48-48A48,48,0,0,1,88,72Q88,70.83544,88.05489,69.68421Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><circle cx="156" cy="76" r="12"></circle></svg>`, 4, true), _tmpl$6 = template(`<svg><path d="M186.30284,167.94573Q185.15821,167.99979,184,168a48,48,0,0,1-48-48A48,48,0,0,1,88,72q0-1.16456.05488-2.31579" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M62.177,153.17849,8,175.96316,64,192l16,56,22.8003-54.20045v.00009c138.35934-3.2851,120.00626-122.89746,114.38209-148.8602a7.98721,7.98721,0,0,0-6.1218-6.12182C185.099,33.19376,65.49508,14.84213,62.17691,153.17849Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><path d="M168,76a12,12,0,1,1-12-12A12,12,0,0,1,168,76Zm37.708,83.49292c-20.42774,25.95142-53.21875,40.1106-97.51758,42.12524L87.374,251.10205A7.99987,7.99987,0,0,1,80.00293,256c-.16016,0-.32129-.00488-.48242-.01416a8.0008,8.0008,0,0,1-7.21289-5.78809l-14.7793-51.72949L5.79785,183.6543a8.00035,8.00035,0,0,1-.89941-15.06543l49.46094-20.80152c2.02539-44.28955,16.19042-77.074,42.14355-97.49829,41.11816-32.35791,99.376-22.94629,116.251-19.29A16.03051,16.03051,0,0,1,225.001,43.24487C228.65723,60.12231,238.07031,118.3811,205.708,159.49292Zm3.65625-112.85986C194.2168,43.35449,142.02148,34.82642,106.39844,62.8623a78.69585,78.69585,0,0,0-10.38086,9.83619A40.03964,40.03964,0,0,0,136,112a8.00024,8.00024,0,0,1,8,8,40.039,40.039,0,0,0,39.29077,39.98193,78.64492,78.64492,0,0,0,9.845-10.38549C221.17383,113.978,212.64551,61.78223,209.36426,46.63306Z"></path></svg>`, 4, true), _tmpl$9 = template(`<svg><circle cx="156" cy="76" r="10"></circle></svg>`, 4, true), _tmpl$10 = template(`<svg><path d="M186.30284,167.94573Q185.15821,167.99979,184,168a48,48,0,0,1-48-48A48,48,0,0,1,88,72q0-1.16456.05488-2.31579" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M62.177,153.17849,8,175.96316,64,192l16,56,22.8003-54.20045v.00009c138.35934-3.2851,120.00626-122.89746,114.38209-148.8602a7.98721,7.98721,0,0,0-6.1218-6.12182C185.099,33.19376,65.49508,14.84213,62.17691,153.17849Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><circle cx="156" cy="76" r="8"></circle></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M186.30284,167.94573Q185.15821,167.99979,184,168a48,48,0,0,1-48-48A48,48,0,0,1,88,72q0-1.16456.05488-2.31579" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><path d="M62.177,153.17849,8,175.96316,64,192l16,56,22.8003-54.20045v.00009c138.35934-3.2851,120.00626-122.89746,114.38209-148.8602a7.98721,7.98721,0,0,0-6.1218-6.12182C185.099,33.19376,65.49508,14.84213,62.17691,153.17849Z" 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 [_tmpl$.cloneNode(true), 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; }()]; case "duotone": return [_tmpl$4.cloneNode(true), _tmpl$5.cloneNode(true), 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 "fill": return _tmpl$8.cloneNode(true); case "light": return [_tmpl$9.cloneNode(true), 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; }()]; case "thin": return [_tmpl$12.cloneNode(true), 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; }()]; case "regular": return [_tmpl$5.cloneNode(true), function () { var _el$16 = _tmpl$6.cloneNode(true); setAttribute(_el$16, "stroke", color); return _el$16; }(), function () { var _el$17 = _tmpl$7.cloneNode(true); setAttribute(_el$17, "stroke", color); return _el$17; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var Fish = function Fish(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$18 = _tmpl$15.cloneNode(true), _el$19 = _el$18.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$18) : ref = _el$18; setAttribute(_el$18, "width", size != null ? size : contextSize); setAttribute(_el$18, "height", size != null ? size : contextSize); setAttribute(_el$18, "fill", color != null ? color : contextColor); setAttribute(_el$18, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$18, restContext, true, true); spread(_el$18, restProps, true, true); insert(_el$18, children, _el$19); insert(_el$18, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$18; }(); }; export default Fish; //# sourceMappingURL=Fish.esm.js.map