phosphor-solid
Version:
A clean and friendly icon family for Solid-js
152 lines (109 loc) • 14.3 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="128" r="44" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></circle></svg>`, 4, true),
_tmpl$2 = template(`<svg><path d="M52.2928,91.56894a83.9101,83.9101,0,0,1,6.30466-10.9001l0,0-.43686-25.95193a8.0267,8.0267,0,0,1,2.852-6.27063A103.88918,103.88918,0,0,1,92.5929,30.18373a8.00115,8.00115,0,0,1,6.83547.67167l22.2927,13.376-.023-.01381a83.91075,83.91075,0,0,1,12.5921.00995v.00005l22.25659-13.3543a8.02665,8.02665,0,0,1,6.85653-.66537,103.88929,103.88929,0,0,1,31.606,18.218,8.00114,8.00114,0,0,1,2.836,6.25552l-.43756,25.994.00046-.02682a83.91167,83.91167,0,0,1,6.28743,10.91l0,0L226.389,104.15631a8.02664,8.02664,0,0,1,4.0045,5.60524,103.89,103.89,0,0,1,.03192,36.44593,8.03466,8.03466,0,0,1-4.00724,5.61943l-22.72861,12.61716.02345-.013a83.9101,83.9101,0,0,1-6.30466,10.9001l0,0,.43686,25.95193a8.0267,8.0267,0,0,1-2.852,6.27063A103.88918,103.88918,0,0,1,163.413,225.81627a8.00115,8.00115,0,0,1-6.83547-.67167l-22.2927-13.376.023.01381a83.91075,83.91075,0,0,1-12.5921-.01v-.00005L99.45911,225.12674a8.02664,8.02664,0,0,1-6.85654.66538,103.88937,103.88937,0,0,1-31.606-18.218,8.00115,8.00115,0,0,1-2.836-6.25553l.43756-25.994-.00046.02682a83.91167,83.91167,0,0,1-6.28743-10.91005l.00005,0L29.61682,151.84369a8.02666,8.02666,0,0,1-4.0045-5.60525,103.88989,103.88989,0,0,1-.03192-36.44591,8.03463,8.03463,0,0,1,4.00724-5.61944L52.31625,91.55593Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$3 = template(`<svg><path d="M230.39551,109.76147a8.02782,8.02782,0,0,0-4.0044-5.60522L203.69775,91.55859h0a83.925,83.925,0,0,0-6.28759-10.90991l.437-25.96728a8.00126,8.00126,0,0,0-2.83594-6.25562,103.89316,103.89316,0,0,0-31.606-18.21777,8.02614,8.02614,0,0,0-6.85644.66528L134.292,44.22754h0a83.8907,83.8907,0,0,0-12.59179-.01l.02294.01392-22.293-13.376a8.00112,8.00112,0,0,0-6.83545-.67188,103.89444,103.89444,0,0,0-31.58008,18.2627A8.0265,8.0265,0,0,0,58.1626,54.7168l.437,25.95215h0a83.90687,83.90687,0,0,0-6.30469,10.8999L29.58984,104.1731a8.03308,8.03308,0,0,0-4.00732,5.61938,103.89,103.89,0,0,0,.03174,36.44605,8.02781,8.02781,0,0,0,4.00439,5.60522L52.3125,164.44141H52.312a83.92506,83.92506,0,0,0,6.2876,10.90991l.00049-.02661-.4375,25.99389a8.00126,8.00126,0,0,0,2.83594,6.25562,103.89311,103.89311,0,0,0,31.606,18.21777,8.026,8.026,0,0,0,6.85645-.66528l22.25683-13.35425h0a83.89083,83.89083,0,0,0,12.5918.01l-.023-.01392,22.293,13.376a8.00112,8.00112,0,0,0,6.83545.67188,103.89468,103.89468,0,0,0,31.58008-18.2627,8.02653,8.02653,0,0,0,2.85205-6.27051l-.437-25.95215h0a83.85174,83.85174,0,0,0,6.30468-10.8999l22.70508-12.60425a8.03312,8.03312,0,0,0,4.00733-5.61938A103.89047,103.89047,0,0,0,230.39551,109.76147ZM128.00488,176a48,48,0,1,1,48-48A47.99988,47.99988,0,0,1,128.00488,176Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><path d="M52.29475,91.56894a83.91125,83.91125,0,0,1,6.30466-10.9001l0,0L58.1626,54.71694a8.02666,8.02666,0,0,1,2.852-6.27063A103.88918,103.88918,0,0,1,92.59485,30.18373a8.00115,8.00115,0,0,1,6.83547.67167l22.2927,13.376-.023-.01381a83.91075,83.91075,0,0,1,12.5921.00995v.00005l22.2566-13.3543a8.02664,8.02664,0,0,1,6.85653-.66537,103.88924,103.88924,0,0,1,31.606,18.218,8.00114,8.00114,0,0,1,2.836,6.25552l-.43756,25.994.00046-.02682a83.91052,83.91052,0,0,1,6.28743,10.91l0,0L226.391,104.15631a8.02663,8.02663,0,0,1,4.00449,5.60524,103.88977,103.88977,0,0,1,.03192,36.44593,8.03463,8.03463,0,0,1-4.00724,5.61943l-22.72861,12.61716.02346-.013a83.9124,83.9124,0,0,1-6.30466,10.9001l0,0,.43686,25.95193a8.02667,8.02667,0,0,1-2.852,6.27063,103.88913,103.88913,0,0,1-31.58021,18.26258,8.00115,8.00115,0,0,1-6.83547-.67167l-22.29271-13.376.023.01381a83.91061,83.91061,0,0,1-12.59209-.01v-.00005L99.46106,225.12674a8.02664,8.02664,0,0,1-6.85654.66538,103.88937,103.88937,0,0,1-31.606-18.218,8.00118,8.00118,0,0,1-2.836-6.25553l.43757-25.994-.00046.02682a83.91174,83.91174,0,0,1-6.28744-10.91005l.00005,0L29.61877,151.84369a8.02666,8.02666,0,0,1-4.0045-5.60525,103.89013,103.89013,0,0,1-.03192-36.44591,8.03467,8.03467,0,0,1,4.00725-5.61944L52.31821,91.55593Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><circle cx="128.00488" cy="128" r="48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></circle></svg>`, 4, true),
_tmpl$6 = template(`<svg><path d="M238.26562,108.35476A15.96155,15.96155,0,0,0,230.269,97.16189L209.74561,85.76883c-1.315-2.5503-2.75342-5.0459-4.29981-7.46094l.395-23.4917a15.93081,15.93081,0,0,0-5.68213-12.50977,111.53059,111.53059,0,0,0-34.03808-19.62158,15.96193,15.96193,0,0,0-13.69288,1.32862L132.2998,36.09109c-2.86816-.13623-5.749-.13916-8.61132-.00683L103.542,23.99637a15.92639,15.92639,0,0,0-13.67578-1.33448A111.52894,111.52894,0,0,0,55.854,42.32986a15.96061,15.96061,0,0,0-5.69482,12.522l.39453,23.47022c-1.55127,2.415-2.99365,4.90869-4.31152,7.45459L25.70117,97.179a15.96884,15.96884,0,0,0-8.00049,11.21436,111.54254,111.54254,0,0,0,.0337,39.25244A15.96155,15.96155,0,0,0,25.731,158.83865l20.52343,11.39307c1.31495,2.55029,2.75342,5.0459,4.29981,7.46094l-.395,23.49169a15.93079,15.93079,0,0,0,5.68213,12.50977A111.53059,111.53059,0,0,0,89.87939,233.3157a15.95994,15.95994,0,0,0,13.69288-1.32861l20.12793-12.07764c2.86816.13672,5.749.13867,8.61132.00684L152.458,232.00418a15.92909,15.92909,0,0,0,13.67578,1.33447,111.52853,111.52853,0,0,0,34.01221-19.668,15.9606,15.9606,0,0,0,5.69482-12.522l-.39453-23.47021c1.55127-2.415,2.99365-4.9087,4.31152-7.45459l20.541-11.40235a15.971,15.971,0,0,0,8.00049-11.21435A111.5426,111.5426,0,0,0,238.26562,108.35476Zm-66.26953,19.64551a44,44,0,1,1-44-44A44.04972,44.04972,0,0,1,171.99609,128.00027Z"></path></svg>`, 4, true),
_tmpl$7 = template(`<svg><circle cx="128.00195" cy="128" r="48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></circle></svg>`, 4, true),
_tmpl$8 = template(`<svg><path d="M52.29182,91.56894a83.91125,83.91125,0,0,1,6.30466-10.9001l0,0-.43685-25.95193a8.02666,8.02666,0,0,1,2.852-6.27063A103.88918,103.88918,0,0,1,92.59192,30.18373a8.00115,8.00115,0,0,1,6.83547.67167l22.2927,13.376-.023-.01381a83.91061,83.91061,0,0,1,12.59209.00995v.00005l22.2566-13.3543a8.02664,8.02664,0,0,1,6.85653-.66537,103.88924,103.88924,0,0,1,31.606,18.218,8.00114,8.00114,0,0,1,2.836,6.25552l-.43756,25.994.00046-.02682a83.91052,83.91052,0,0,1,6.28743,10.91l0,0,22.69346,12.59763a8.02663,8.02663,0,0,1,4.00449,5.60524,103.88977,103.88977,0,0,1,.03192,36.44593,8.03463,8.03463,0,0,1-4.00724,5.61943l-22.72861,12.61716.02346-.013a83.9124,83.9124,0,0,1-6.30466,10.9001l-.00005,0,.43686,25.95193a8.02667,8.02667,0,0,1-2.852,6.27063A103.88913,103.88913,0,0,1,163.412,225.81627a8.00115,8.00115,0,0,1-6.83547-.67167l-22.29271-13.376.023.01381a83.91061,83.91061,0,0,1-12.59209-.01v-.00005L99.45813,225.12674a8.02664,8.02664,0,0,1-6.85654.66538,103.88937,103.88937,0,0,1-31.606-18.218,8.00121,8.00121,0,0,1-2.836-6.25553l.43757-25.994-.00046.02682a83.91174,83.91174,0,0,1-6.28744-10.91005l0,0L29.61584,151.84369a8.02666,8.02666,0,0,1-4.0045-5.60525,103.89013,103.89013,0,0,1-.03192-36.44591,8.03467,8.03467,0,0,1,4.00725-5.61944L52.31528,91.55593Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$9 = template(`<svg><circle cx="128.00098" cy="128" r="48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></circle></svg>`, 4, true),
_tmpl$10 = template(`<svg><path d="M52.29084,91.56894a83.9124,83.9124,0,0,1,6.30466-10.9001l.00005,0-.43686-25.95193a8.02667,8.02667,0,0,1,2.852-6.27063A103.88913,103.88913,0,0,1,92.59094,30.18373a8.00115,8.00115,0,0,1,6.83547.67167l22.29271,13.376-.023-.01381a83.91061,83.91061,0,0,1,12.59209.00995v.00005l22.25659-13.3543a8.02665,8.02665,0,0,1,6.85653-.66537,103.88912,103.88912,0,0,1,31.606,18.218,8.00112,8.00112,0,0,1,2.83605,6.25552l-.43757,25.994.00046-.02682a83.91174,83.91174,0,0,1,6.28744,10.91l-.00005,0,22.69345,12.59763a8.02664,8.02664,0,0,1,4.0045,5.60524,103.89024,103.89024,0,0,1,.03192,36.44593,8.03467,8.03467,0,0,1-4.00725,5.61943l-22.72861,12.61716.02346-.013a83.91125,83.91125,0,0,1-6.30466,10.9001l0,0,.43685,25.95193a8.02666,8.02666,0,0,1-2.852,6.27063A103.88918,103.88918,0,0,1,163.411,225.81627a8.00115,8.00115,0,0,1-6.83547-.67167l-22.2927-13.376.023.01381a83.91061,83.91061,0,0,1-12.59209-.01v-.00005l-22.2566,13.35429a8.02664,8.02664,0,0,1-6.85654.66538,103.88937,103.88937,0,0,1-31.606-18.218,8.00117,8.00117,0,0,1-2.836-6.25553l.43756-25.994-.00046.02682a83.91052,83.91052,0,0,1-6.28743-10.91005l.00005,0L29.61487,151.84369a8.02665,8.02665,0,0,1-4.00451-5.60525,103.89013,103.89013,0,0,1-.03192-36.44591,8.03467,8.03467,0,0,1,4.00725-5.61944L52.3143,91.55593Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$11 = template(`<svg><circle cx="128" cy="128" r="48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></circle></svg>`, 4, true),
_tmpl$12 = template(`<svg><path d="M52.28987,91.56894a83.9101,83.9101,0,0,1,6.30466-10.9001l0,0-.43686-25.95193a8.0267,8.0267,0,0,1,2.852-6.27063A103.88918,103.88918,0,0,1,92.59,30.18373a8.00115,8.00115,0,0,1,6.83547.67167l22.2927,13.376-.023-.01381a83.91075,83.91075,0,0,1,12.5921.00995v.00005l22.25659-13.3543a8.02665,8.02665,0,0,1,6.85653-.66537,103.88929,103.88929,0,0,1,31.606,18.218,8.00114,8.00114,0,0,1,2.836,6.25552l-.43756,25.994.00046-.02682a83.91167,83.91167,0,0,1,6.28743,10.91l-.00005,0,22.69345,12.59763a8.02664,8.02664,0,0,1,4.0045,5.60524,103.89,103.89,0,0,1,.03192,36.44593,8.03466,8.03466,0,0,1-4.00724,5.61943l-22.72861,12.61716.02345-.013a83.9101,83.9101,0,0,1-6.30466,10.9001l0,0,.43686,25.95193a8.0267,8.0267,0,0,1-2.852,6.27063A103.88918,103.88918,0,0,1,163.41,225.81627a8.00115,8.00115,0,0,1-6.83547-.67167l-22.2927-13.376.023.01381a83.91075,83.91075,0,0,1-12.5921-.01v-.00005L99.45618,225.12674a8.02664,8.02664,0,0,1-6.85654.66538,103.88937,103.88937,0,0,1-31.606-18.218,8.00115,8.00115,0,0,1-2.836-6.25553l.43756-25.994-.00046.02682a83.91167,83.91167,0,0,1-6.28743-10.91005l.00005,0L29.61389,151.84369a8.02666,8.02666,0,0,1-4.0045-5.60525,103.88989,103.88989,0,0,1-.03192-36.44591,8.03465,8.03465,0,0,1,4.00724-5.61944L52.31332,91.55593Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$13 = 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;
}()];
case "duotone":
return [_tmpl$3.cloneNode(true), 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;
}()];
case "fill":
return _tmpl$6.cloneNode(true);
case "light":
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;
}()];
case "thin":
return [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;
}()];
case "regular":
return [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;
}()];
default:
console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".');
return null;
}
};
var GearSix = function GearSix(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$13 = _tmpl$13.cloneNode(true),
_el$14 = _el$13.firstChild;
var _ref$ = ref;
typeof _ref$ === "function" ? _ref$(_el$13) : ref = _el$13;
setAttribute(_el$13, "width", size != null ? size : contextSize);
setAttribute(_el$13, "height", size != null ? size : contextSize);
setAttribute(_el$13, "fill", color != null ? color : contextColor);
setAttribute(_el$13, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined);
spread(_el$13, restContext, true, true);
spread(_el$13, restProps, true, true);
insert(_el$13, children, _el$14);
insert(_el$13, function () {
return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor);
}, null);
return _el$13;
}();
};
export default GearSix;
//# sourceMappingURL=GearSix.esm.js.map