phosphor-solid
Version:
A clean and friendly icon family for Solid-js
288 lines (205 loc) • 12.5 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><circle cx="128" cy="140" r="40" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></circle></svg>`, 4, true),
_tmpl$2 = template(`<svg><path d="M70.4343,215.9991a64.02584,64.02584,0,0,1,115.13125-.00031" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$3 = template(`<svg><path d="M204.50925,116.59876a59.962,59.962,0,0,1,39.49189,23.39691" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><path d="M167.10717,70.22754a32.00487,32.00487,0,1,1,36.89009,44.765" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><path d="M52.00271,114.99256a32.00461,32.00461,0,1,1,36.88964-44.766" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$6 = template(`<svg><path d="M11.99717,139.99792A59.96206,59.96206,0,0,1,51.4908,116.59875" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$7 = template(`<svg><circle cx="128" cy="140" r="40" opacity="0.2"></circle></svg>`, 4, true),
_tmpl$8 = template(`<svg><circle cx="60" cy="84" r="32" opacity="0.2"></circle></svg>`, 4, true),
_tmpl$9 = template(`<svg><circle cx="196" cy="84" r="32" opacity="0.2"></circle></svg>`, 4, true),
_tmpl$10 = template(`<svg><circle cx="128" cy="140" r="40" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></circle></svg>`, 4, true),
_tmpl$11 = template(`<svg><path d="M196,116a59.909,59.909,0,0,1,48.00114,23.99567" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$12 = template(`<svg><path d="M11.99717,139.99792A59.909,59.909,0,0,1,60,116" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$13 = template(`<svg><path d="M70.4343,215.9991a64.02584,64.02584,0,0,1,115.13125-.00031" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$14 = template(`<svg><path d="M60,116A32,32,0,1,1,91.437,77.99243" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$15 = template(`<svg><path d="M164.56291,77.993A32.0027,32.0027,0,1,1,196,116" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$16 = template(`<svg><path d="M63.99805,140.002a7.99955,7.99955,0,0,1-8,8h-.00049l-44.00147-.0039a8,8,0,0,1-6.3955-12.80469A67.81463,67.81463,0,0,1,33.02783,113.5127,39.99241,39.99241,0,1,1,99.29492,76.50293a7.99971,7.99971,0,0,1-3.78515,8.37695,64.36027,64.36027,0,0,0-27.85889,33.7959A63.645,63.645,0,0,0,63.99805,140.002Zm186.39941-4.81054a67.81009,67.81009,0,0,0-27.42676-21.68067A39.99246,39.99246,0,1,0,156.70361,76.5a8.00092,8.00092,0,0,0,3.78467,8.37695,64.367,64.367,0,0,1,27.85938,33.79688A63.64448,63.64448,0,0,1,192,140a8.00039,8.00039,0,0,0,8.001,8l44.001-.00391a8,8,0,0,0,6.39551-12.80468ZM157.16162,178.0896a48,48,0,1,0-58.32324,0,71.66776,71.66776,0,0,0-35.59522,34.40454A7.9997,7.9997,0,0,0,70.43457,223.999H185.56543a8.00017,8.00017,0,0,0,7.19141-11.50488A71.66776,71.66776,0,0,0,157.16162,178.0896Z"></path></svg>`, 4, true),
_tmpl$17 = template(`<svg><circle cx="128" cy="140" r="40" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></circle></svg>`, 4, true),
_tmpl$18 = template(`<svg><path d="M196,116a59.909,59.909,0,0,1,48.00114,23.99567" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$19 = template(`<svg><path d="M11.99717,139.99792A59.909,59.909,0,0,1,60,116" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$20 = template(`<svg><path d="M70.4343,215.9991a64.02584,64.02584,0,0,1,115.13125-.00031" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$21 = template(`<svg><path d="M60,116A32,32,0,1,1,91.437,77.99243" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$22 = template(`<svg><path d="M164.56291,77.993A32.0027,32.0027,0,1,1,196,116" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$23 = template(`<svg><circle cx="128" cy="140" r="40" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></circle></svg>`, 4, true),
_tmpl$24 = template(`<svg><path d="M196,116a59.909,59.909,0,0,1,48.00114,23.99567" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$25 = template(`<svg><path d="M11.99717,139.99792A59.909,59.909,0,0,1,60,116" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$26 = template(`<svg><path d="M70.4343,215.9991a64.02584,64.02584,0,0,1,115.13125-.00031" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$27 = template(`<svg><path d="M60,116A32,32,0,1,1,91.437,77.99243" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$28 = template(`<svg><path d="M164.56291,77.993A32.0027,32.0027,0,1,1,196,116" 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 [_tmpl$7.cloneNode(true), _tmpl$8.cloneNode(true), _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;
}(), 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;
}(), 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;
}()];
case "fill":
return _tmpl$16.cloneNode(true);
case "light":
return [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;
}()];
case "thin":
return [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$10.cloneNode(true);
setAttribute(_el$29, "stroke", color);
return _el$29;
}(), function () {
var _el$30 = _tmpl$11.cloneNode(true);
setAttribute(_el$30, "stroke", color);
return _el$30;
}(), function () {
var _el$31 = _tmpl$12.cloneNode(true);
setAttribute(_el$31, "stroke", color);
return _el$31;
}(), function () {
var _el$32 = _tmpl$13.cloneNode(true);
setAttribute(_el$32, "stroke", color);
return _el$32;
}(), function () {
var _el$33 = _tmpl$14.cloneNode(true);
setAttribute(_el$33, "stroke", color);
return _el$33;
}(), function () {
var _el$34 = _tmpl$15.cloneNode(true);
setAttribute(_el$34, "stroke", color);
return _el$34;
}()];
default:
console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".');
return null;
}
};
var UsersThree = function UsersThree(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$35 = _tmpl$29.cloneNode(true),
_el$36 = _el$35.firstChild;
var _ref$ = ref;
typeof _ref$ === "function" ? _ref$(_el$35) : ref = _el$35;
setAttribute(_el$35, "width", size != null ? size : contextSize);
setAttribute(_el$35, "height", size != null ? size : contextSize);
setAttribute(_el$35, "fill", color != null ? color : contextColor);
setAttribute(_el$35, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined);
spread(_el$35, restContext, true, true);
spread(_el$35, restProps, true, true);
insert(_el$35, children, _el$36);
insert(_el$35, function () {
return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor);
}, null);
return _el$35;
}();
};
export default UsersThree;
//# sourceMappingURL=UsersThree.esm.js.map