phosphor-solid
Version:
A clean and friendly icon family for Solid-js
253 lines (180 loc) • 14.9 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><path d="M128,200s40-21.81818,40-80c0-45.58443-24.55378-68.84723-35.18644-76.78386a8.03282,8.03282,0,0,0-9.62712,0C112.55378,51.15277,88,74.41557,88,120,88,178.18182,128,200,128,200Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$2 = template(`<svg><path d="M128,200c11.99027-2.55021,44.33-20.78184,63.71281-54.35383S206.32158,85.26679,202.535,73.60781a7.99178,7.99178,0,0,0-9.27184-5.3531,77.437,77.437,0,0,0-31.35645,15.135" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$3 = template(`<svg><path d="M94.09282,83.38935a77.43686,77.43686,0,0,0-31.356-15.13464,7.99178,7.99178,0,0,0-9.27184,5.3531c-3.78659,11.659-8.56062,38.46637,10.82218,72.03836S116.00973,197.44979,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><path d="M128,200c16,0,41.83868-.1803,72.27252-17.75129s40.28226-39.5825,43.43363-50.85144a7.95859,7.95859,0,0,0-5.67817-9.83489c-7.2816-1.86638-19.78443-3.55592-35.86354.13268" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><path d="M53.83554,121.69505c-16.0791-3.68859-28.58193-1.999-35.86352-.13267a7.95859,7.95859,0,0,0-5.67817,9.83489c3.15137,11.26894,12.99979,33.28046,43.43363,50.85144S112,200,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$6 = template(`<svg><path d="M128,200s-40-21.81818-40-80a107.00551,107.00551,0,0,1,6.09189-36.611l.00093.00032A77.45432,77.45432,0,0,0,62.77111,68.262,8.012,8.012,0,0,0,53.467,73.6017c-2.83963,8.74013-6.23716,26.00178.41465,48.2482l.0002-.00005c-16.39783-3.88948-29.14419-2.17963-36.52582-.28778a7.95673,7.95673,0,0,0-5.68022,9.8322c3.15047,11.268,12.99793,33.2819,43.43447,50.85444C85.54411,199.8197,112,200,128,200" opacity="0.2"></path></svg>`, 4, true),
_tmpl$7 = template(`<svg><path d="M128,200s40-21.81818,40-80a107.00551,107.00551,0,0,0-6.09189-36.611l-.00093.00032A77.45432,77.45432,0,0,1,193.22889,68.262a8.012,8.012,0,0,1,9.30412,5.3397c2.83963,8.74013,6.23716,26.00178-.41465,48.2482l-.0002-.00005c16.39783-3.88948,29.14419-2.17963,36.52582-.28778a7.95673,7.95673,0,0,1,5.68022,9.8322c-3.15047,11.268-12.99793,33.2819-43.43447,50.85444C170.45589,199.8197,144,200,128,200" opacity="0.2"></path></svg>`, 4, true),
_tmpl$8 = template(`<svg><path d="M128,200c16,0,42.45589-.1803,72.88973-17.75129s40.28225-39.5825,43.43363-50.85144a7.95859,7.95859,0,0,0-5.67818-9.83489c-7.38178-1.89206-20.12947-3.60238-36.52927.288" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$9 = template(`<svg><path d="M53.88184,121.84985c-16.39872-3.88969-29.14558-2.17944-36.527-.28747a7.95859,7.95859,0,0,0-5.67818,9.83489c3.15138,11.26894,12.99979,33.28046,43.43363,50.85144S112,200,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$10 = template(`<svg><path d="M128,200s40-21.81818,40-80c0-45.58443-24.55378-68.84723-35.18644-76.78386a8.03282,8.03282,0,0,0-9.62712,0C112.55378,51.15277,88,74.41557,88,120,88,178.18182,128,200,128,200Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$11 = template(`<svg><path d="M128,200c11.99027-2.55021,44.33-20.78184,63.71281-54.35383S206.32158,85.26679,202.535,73.60781a7.99178,7.99178,0,0,0-9.27184-5.3531,77.437,77.437,0,0,0-31.35645,15.135" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$12 = template(`<svg><path d="M94.09282,83.38935a77.43686,77.43686,0,0,0-31.356-15.13464,7.99178,7.99178,0,0,0-9.27184,5.3531c-3.78659,11.659-8.56062,38.46637,10.82218,72.03836S116.00973,197.44979,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$13 = template(`<svg><path d="M250.47559,121.28906a15.82032,15.82032,0,0,0-9.84375-7.47558,80.056,80.056,0,0,0-27.957-1.85254,85.73919,85.73919,0,0,0-2.53125-40.8252,15.96177,15.96177,0,0,0-18.54394-10.706,82.56127,82.56127,0,0,0-26.1582,10.74511,94.07116,94.07116,0,0,0-27.84034-34.36816,15.94439,15.94439,0,0,0-19.20361.001A94.06121,94.06121,0,0,0,90.55859,71.1748,82.56738,82.56738,0,0,0,64.40234,60.42969a15.96626,15.96626,0,0,0-18.54589,10.707A85.73054,85.73054,0,0,0,43.3252,111.96a80.01629,80.01629,0,0,0-27.957,1.85352,15.957,15.957,0,0,0-11.3955,19.73828c3.53808,12.65332,14.36767,36.70508,47.13769,55.626C83.67676,207.979,112.45654,208,127.94629,208c.01562,0,.03027.00195.0459.00195L128,208.00146l.00781.00049c.01563,0,.03028-.00195.0459-.00195,15.48975,0,44.26953-.021,76.83594-18.82324,32.77-18.91992,43.59961-42.97168,47.13769-55.625A15.81809,15.81809,0,0,0,250.47559,121.28906ZM128.03027,49.62793C137.64258,56.80469,160,78.02832,160,120s-22.35742,63.19531-31.96826,70.37109a.0448.0448,0,0,1-.06348,0C118.355,183.19238,96,161.96875,96,120,96,78.02832,118.35742,56.80469,128.03027,49.62793ZM19.3418,129.31152a66.43813,66.43813,0,0,1,28.34814-.57763,123.02667,123.02667,0,0,0,9.669,20.91259,138.33271,138.33271,0,0,0,33.27295,38.52344,121.79948,121.79948,0,0,1-31.52149-12.84863C31.25732,159.23926,22.26367,139.54883,19.3418,129.31152Zm177.54785,46.00879a121.79928,121.79928,0,0,1-31.521,12.84912,138.33687,138.33687,0,0,0,33.27246-38.523,123.02667,123.02667,0,0,0,9.66895-20.91259,67.45364,67.45364,0,0,1,28.30908.50927C233.73633,139.54883,224.74268,159.23926,196.88965,175.32031Z"></path></svg>`, 4, true),
_tmpl$14 = template(`<svg><path d="M128,200c16,0,42.45589-.1803,72.88973-17.75129s40.28225-39.5825,43.43363-50.85144a7.95859,7.95859,0,0,0-5.67818-9.83489c-7.38178-1.89206-20.12947-3.60238-36.52927.288" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$15 = template(`<svg><path d="M53.88184,121.84985c-16.39872-3.88969-29.14558-2.17944-36.527-.28747a7.95859,7.95859,0,0,0-5.67818,9.83489c3.15138,11.26894,12.99979,33.28046,43.43363,50.85144S112,200,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$16 = template(`<svg><path d="M128,200s40-21.81818,40-80c0-45.58443-24.55378-68.84723-35.18644-76.78386a8.03282,8.03282,0,0,0-9.62712,0C112.55378,51.15277,88,74.41557,88,120,88,178.18182,128,200,128,200Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$17 = template(`<svg><path d="M128,200c11.99027-2.55021,44.33-20.78184,63.71281-54.35383S206.32158,85.26679,202.535,73.60781a7.99178,7.99178,0,0,0-9.27184-5.3531,77.437,77.437,0,0,0-31.35645,15.135" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$18 = template(`<svg><path d="M94.09282,83.38935a77.43686,77.43686,0,0,0-31.356-15.13464,7.99178,7.99178,0,0,0-9.27184,5.3531c-3.78659,11.659-8.56062,38.46637,10.82218,72.03836S116.00973,197.44979,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$19 = template(`<svg><path d="M128,200c16,0,42.45589-.1803,72.88973-17.75129s40.28225-39.5825,43.43363-50.85144a7.95859,7.95859,0,0,0-5.67818-9.83489c-7.38178-1.89206-20.12947-3.60238-36.52927.288" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$20 = template(`<svg><path d="M53.88184,121.84985c-16.39872-3.88969-29.14558-2.17944-36.527-.28747a7.95859,7.95859,0,0,0-5.67818,9.83489c3.15138,11.26894,12.99979,33.28046,43.43363,50.85144S112,200,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$21 = template(`<svg><path d="M128,200s40-21.81818,40-80c0-45.58443-24.55378-68.84723-35.18644-76.78386a8.03282,8.03282,0,0,0-9.62712,0C112.55378,51.15277,88,74.41557,88,120,88,178.18182,128,200,128,200Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$22 = template(`<svg><path d="M128,200c11.99027-2.55021,44.33-20.78184,63.71281-54.35383S206.32158,85.26679,202.535,73.60781a7.99178,7.99178,0,0,0-9.27184-5.3531,77.437,77.437,0,0,0-31.35645,15.135" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$23 = template(`<svg><path d="M94.09282,83.38935a77.43686,77.43686,0,0,0-31.356-15.13464,7.99178,7.99178,0,0,0-9.27184,5.3531c-3.78659,11.659-8.56062,38.46637,10.82218,72.03836S116.00973,197.44979,128,200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$24 = 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;
}()];
case "duotone":
return [_tmpl$6.cloneNode(true), _tmpl$7.cloneNode(true), function () {
var _el$8 = _tmpl$8.cloneNode(true);
setAttribute(_el$8, "stroke", color);
return _el$8;
}(), 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;
}(), 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;
}()];
case "fill":
return _tmpl$13.cloneNode(true);
case "light":
return [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;
}(), function () {
var _el$16 = _tmpl$16.cloneNode(true);
setAttribute(_el$16, "stroke", color);
return _el$16;
}(), 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;
}()];
case "thin":
return [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;
}(), function () {
var _el$23 = _tmpl$23.cloneNode(true);
setAttribute(_el$23, "stroke", color);
return _el$23;
}()];
case "regular":
return [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;
}()];
default:
console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".');
return null;
}
};
var FlowerLotus = function FlowerLotus(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$29 = _tmpl$24.cloneNode(true),
_el$30 = _el$29.firstChild;
var _ref$ = ref;
typeof _ref$ === "function" ? _ref$(_el$29) : ref = _el$29;
setAttribute(_el$29, "width", size != null ? size : contextSize);
setAttribute(_el$29, "height", size != null ? size : contextSize);
setAttribute(_el$29, "fill", color != null ? color : contextColor);
setAttribute(_el$29, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined);
spread(_el$29, restContext, true, true);
spread(_el$29, restProps, true, true);
insert(_el$29, children, _el$30);
insert(_el$29, function () {
return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor);
}, null);
return _el$29;
}();
};
export default FlowerLotus;
//# sourceMappingURL=FlowerLotus.esm.js.map