phosphor-solid
Version:
A clean and friendly icon family for Solid-js
355 lines (252 loc) • 17.4 kB
JavaScript
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="M111.99332,114.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="M85.35231,148.27562l-42-72.74613a20,20,0,1,1,34.641-20l42,72.74613" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path><path d="M168.63434,132.52433l-18-31.17691a20,20,0,1,1,34.641-20l20,34.641a80,80,0,1,1-138.56406,80l-42-72.74613a20,20,0,0,1,34.641-20l22,38.10512" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></g></svg>`, 10, true),
_tmpl$2 = template(`<svg><g><line x1="156" y1="12" x2="156" y2="28" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line><line x1="204" y1="24.86156" x2="196" y2="38.71797" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line><line x1="239.13844" y1="60" x2="225.28203" y2="68" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></g></svg>`, 10, true),
_tmpl$3 = template(`<svg><path d="M76.988,93.50979l-8-13.8564a17.92489,17.92489,0,0,0-9.12085-7.79857l-.00017.00051L57.52388,67.797a18,18,0,1,1,31.17691-18L99.04433,67.71252l.0004-.001A18.00053,18.00053,0,0,0,76.988,93.50979" opacity="0.2"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><path d="M156.22214,94.745a18.00053,18.00053,0,0,0-22.05725,25.79811l-26-45.03332a17.92489,17.92489,0,0,0-9.12016-7.7983l-.0004.001-2.34352-4.0591a18,18,0,1,1,31.1769-18l28.3439,49.09309Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><path d="M153.87771,90.68671a18,18,0,1,1,31.17691-18l17,29.44486a72.02623,72.02623,0,0,1-14.0179,89.38343l.00006,0a71.83347,71.83347,0,0,0-5.695-59.527l-17-29.44487a17.925,17.925,0,0,0-9.11967-7.79811l-.00053.00148Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$6 = template(`<svg><path d="M51.81106,121.9021a18,18,0,1,0-31.17691,18l37,64.08588a72,72,0,0,0,124.70766-72l-17-29.44487a18,18,0,0,0-31.17692,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$7 = template(`<svg><path d="M106.988,145.47132l-38-65.81793a18,18,0,0,0-31.17692,18l38,65.81793" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$8 = template(`<svg><path d="M150.16489,148.25593l-42-72.74614a18,18,0,0,0-31.17691,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$9 = template(`<svg><path d="M99.04433,67.71252,88.70079,49.797a18,18,0,1,0-31.17691,18L59.867,71.85533" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$10 = template(`<svg><path d="M188.03672,191.515a72.02623,72.02623,0,0,0,14.0179-89.38343l-17-29.44486a18,18,0,1,0-31.17691,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$11 = template(`<svg><path d="M156.22161,94.74648l-28.3439-49.09309a18,18,0,0,0-31.17692,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$12 = template(`<svg><line x1="176.84663" y1="11.27112" x2="172.70552" y2="26.72593" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true),
_tmpl$13 = template(`<svg><line x1="207.06334" y1="25.3614" x2="197.88611" y2="38.46784" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true),
_tmpl$14 = template(`<svg><line x1="230.6386" y1="48.93666" x2="217.53216" y2="58.11389" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true),
_tmpl$15 = template(`<svg><path d="M190.251,69.68652a23.9764,23.9764,0,0,0-41.56055.01514L133.07422,42.65332a23.97141,23.97141,0,0,0-41.8042.45459A24.00171,24.00171,0,0,0,49.90137,64.916a23.98424,23.98424,0,0,0-17.28614,35.7373L36.23,106.91455A23.98051,23.98051,0,0,0,15.4375,142.90234l37,64.08594a77.99184,77.99184,0,0,0,140.75391-12.09082A78.372,78.372,0,0,0,207.251,99.13184Zm-37.2627,155.459a66.077,66.077,0,0,1-90.1582-24.15723l-37-64.08594a12.00023,12.00023,0,0,1,20.78515-12l.001.00122,23.999,41.56812a6.00012,6.00012,0,1,0,10.39258-6l-38-65.81836a11.99981,11.99981,0,1,1,20.78418-12l38,65.81836a6.00012,6.00012,0,0,0,10.39258-6l-30-51.96143v-.00048a11.99981,11.99981,0,1,1,20.78418-12l42,72.74609a6.00012,6.00012,0,0,0,10.39258-6L139.36182,117.5437l-.00049-.00073a11.99981,11.99981,0,0,1,20.78418-12l17,29.44531a65.999,65.999,0,0,1-24.15723,90.15723Zm13.9209-199.97266,4.1416-15.4541a6.00029,6.00029,0,0,1,11.5918,3.10547l-4.1416,15.4541a6.00029,6.00029,0,0,1-11.5918-3.10547Zm26.06152,9.85352,9.17774-13.10645a6.00007,6.00007,0,0,1,9.83008,6.88281l-9.17774,13.10645a6.00007,6.00007,0,0,1-9.83008-6.88281Zm41.10938,18.82519L220.97363,63.0293a6.00007,6.00007,0,0,1-6.88281-9.83008l13.10645-9.17774a6.00007,6.00007,0,0,1,6.88281,9.83008Z"></path></svg>`, 4, true),
_tmpl$16 = template(`<svg><path d="M51.81106,121.9021a18,18,0,1,0-31.17691,18l37,64.08588a72,72,0,0,0,124.70766-72l-17-29.44487a18,18,0,0,0-31.17692,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$17 = template(`<svg><path d="M106.988,145.47132l-38-65.81793a18,18,0,0,0-31.17692,18l38,65.81793" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$18 = template(`<svg><path d="M150.16489,148.25593l-42-72.74614a18,18,0,0,0-31.17691,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$19 = template(`<svg><path d="M99.04433,67.71252,88.70079,49.797a18,18,0,1,0-31.17691,18L59.867,71.85533" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$20 = template(`<svg><path d="M188.03672,191.515a72.02623,72.02623,0,0,0,14.0179-89.38343l-17-29.44486a18,18,0,1,0-31.17691,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$21 = template(`<svg><path d="M156.22161,94.74648l-28.3439-49.09309a18,18,0,0,0-31.17692,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$22 = template(`<svg><line x1="176.84663" y1="11.27112" x2="172.70552" y2="26.72593" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true),
_tmpl$23 = template(`<svg><line x1="207.06334" y1="25.3614" x2="197.88611" y2="38.46784" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true),
_tmpl$24 = template(`<svg><line x1="230.6386" y1="48.93666" x2="217.53216" y2="58.11389" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true),
_tmpl$25 = template(`<svg><path d="M51.81106,121.9021a18,18,0,1,0-31.17691,18l37,64.08588a72,72,0,0,0,124.70766-72l-17-29.44487a18,18,0,0,0-31.17692,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$26 = template(`<svg><path d="M106.988,145.47132l-38-65.81793a18,18,0,0,0-31.17692,18l38,65.81793" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$27 = template(`<svg><path d="M150.16489,148.25593l-42-72.74614a18,18,0,0,0-31.17691,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$28 = template(`<svg><path d="M99.04433,67.71252,88.70079,49.797a18,18,0,1,0-31.17691,18L59.867,71.85533" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$29 = template(`<svg><path d="M188.03672,191.515a72.02623,72.02623,0,0,0,14.0179-89.38343l-17-29.44486a18,18,0,1,0-31.17691,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$30 = template(`<svg><path d="M156.22161,94.74648l-28.3439-49.09309a18,18,0,0,0-31.17692,18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$31 = template(`<svg><line x1="176.84663" y1="11.27112" x2="172.70552" y2="26.72593" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true),
_tmpl$32 = template(`<svg><line x1="207.06334" y1="25.3614" x2="197.88611" y2="38.46784" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true),
_tmpl$33 = template(`<svg><line x1="230.6386" y1="48.93666" x2="217.53216" y2="58.11389" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true),
_tmpl$34 = 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),
_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$3.cloneNode(true), _tmpl$4.cloneNode(true), _tmpl$5.cloneNode(true), 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;
}(), function () {
var _el$14 = _tmpl$8.cloneNode(true);
setAttribute(_el$14, "stroke", color);
return _el$14;
}(), function () {
var _el$15 = _tmpl$9.cloneNode(true);
setAttribute(_el$15, "stroke", color);
return _el$15;
}(), function () {
var _el$16 = _tmpl$10.cloneNode(true);
setAttribute(_el$16, "stroke", color);
return _el$16;
}(), function () {
var _el$17 = _tmpl$11.cloneNode(true);
setAttribute(_el$17, "stroke", color);
return _el$17;
}(), function () {
var _el$18 = _tmpl$12.cloneNode(true);
setAttribute(_el$18, "stroke", color);
return _el$18;
}(), function () {
var _el$19 = _tmpl$13.cloneNode(true);
setAttribute(_el$19, "stroke", color);
return _el$19;
}(), function () {
var _el$20 = _tmpl$14.cloneNode(true);
setAttribute(_el$20, "stroke", color);
return _el$20;
}()];
case "fill":
return _tmpl$15.cloneNode(true);
case "light":
return [function () {
var _el$22 = _tmpl$6.cloneNode(true);
setAttribute(_el$22, "stroke", color);
return _el$22;
}(), function () {
var _el$23 = _tmpl$7.cloneNode(true);
setAttribute(_el$23, "stroke", color);
return _el$23;
}(), function () {
var _el$24 = _tmpl$8.cloneNode(true);
setAttribute(_el$24, "stroke", color);
return _el$24;
}(), function () {
var _el$25 = _tmpl$9.cloneNode(true);
setAttribute(_el$25, "stroke", color);
return _el$25;
}(), function () {
var _el$26 = _tmpl$10.cloneNode(true);
setAttribute(_el$26, "stroke", color);
return _el$26;
}(), function () {
var _el$27 = _tmpl$11.cloneNode(true);
setAttribute(_el$27, "stroke", color);
return _el$27;
}(), function () {
var _el$28 = _tmpl$12.cloneNode(true);
setAttribute(_el$28, "stroke", color);
return _el$28;
}(), function () {
var _el$29 = _tmpl$13.cloneNode(true);
setAttribute(_el$29, "stroke", color);
return _el$29;
}(), function () {
var _el$30 = _tmpl$14.cloneNode(true);
setAttribute(_el$30, "stroke", color);
return _el$30;
}()];
case "thin":
return [function () {
var _el$31 = _tmpl$16.cloneNode(true);
setAttribute(_el$31, "stroke", color);
return _el$31;
}(), function () {
var _el$32 = _tmpl$17.cloneNode(true);
setAttribute(_el$32, "stroke", color);
return _el$32;
}(), function () {
var _el$33 = _tmpl$18.cloneNode(true);
setAttribute(_el$33, "stroke", color);
return _el$33;
}(), function () {
var _el$34 = _tmpl$19.cloneNode(true);
setAttribute(_el$34, "stroke", color);
return _el$34;
}(), function () {
var _el$35 = _tmpl$20.cloneNode(true);
setAttribute(_el$35, "stroke", color);
return _el$35;
}(), function () {
var _el$36 = _tmpl$21.cloneNode(true);
setAttribute(_el$36, "stroke", color);
return _el$36;
}(), function () {
var _el$37 = _tmpl$22.cloneNode(true);
setAttribute(_el$37, "stroke", color);
return _el$37;
}(), function () {
var _el$38 = _tmpl$23.cloneNode(true);
setAttribute(_el$38, "stroke", color);
return _el$38;
}(), function () {
var _el$39 = _tmpl$24.cloneNode(true);
setAttribute(_el$39, "stroke", color);
return _el$39;
}()];
case "regular":
return [function () {
var _el$40 = _tmpl$25.cloneNode(true);
setAttribute(_el$40, "stroke", color);
return _el$40;
}(), function () {
var _el$41 = _tmpl$26.cloneNode(true);
setAttribute(_el$41, "stroke", color);
return _el$41;
}(), function () {
var _el$42 = _tmpl$27.cloneNode(true);
setAttribute(_el$42, "stroke", color);
return _el$42;
}(), function () {
var _el$43 = _tmpl$28.cloneNode(true);
setAttribute(_el$43, "stroke", color);
return _el$43;
}(), function () {
var _el$44 = _tmpl$29.cloneNode(true);
setAttribute(_el$44, "stroke", color);
return _el$44;
}(), function () {
var _el$45 = _tmpl$30.cloneNode(true);
setAttribute(_el$45, "stroke", color);
return _el$45;
}(), function () {
var _el$46 = _tmpl$31.cloneNode(true);
setAttribute(_el$46, "stroke", color);
return _el$46;
}(), function () {
var _el$47 = _tmpl$32.cloneNode(true);
setAttribute(_el$47, "stroke", color);
return _el$47;
}(), function () {
var _el$48 = _tmpl$33.cloneNode(true);
setAttribute(_el$48, "stroke", color);
return _el$48;
}()];
default:
console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".');
return null;
}
};
var HandsClapping = function HandsClapping(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$49 = _tmpl$34.cloneNode(true),
_el$50 = _el$49.firstChild;
var _ref$ = ref;
typeof _ref$ === "function" ? _ref$(_el$49) : ref = _el$49;
setAttribute(_el$49, "width", size != null ? size : contextSize);
setAttribute(_el$49, "height", size != null ? size : contextSize);
setAttribute(_el$49, "fill", color != null ? color : contextColor);
setAttribute(_el$49, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined);
spread(_el$49, restContext, true, true);
spread(_el$49, restProps, true, true);
insert(_el$49, children, _el$50);
insert(_el$49, function () {
return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor);
}, null);
return _el$49;
}();
};
export default HandsClapping;
//# sourceMappingURL=HandsClapping.esm.js.map