phosphor-solid
Version:
A clean and friendly icon family for Solid-js
154 lines (111 loc) • 11.1 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="M54.46089,201.53911c-9.204-9.204-3.09935-28.52745-7.78412-39.85C41.82037,149.95168,24,140.50492,24,127.99963,24,115.4945,41.82047,106.048,46.67683,94.31079c4.68477-11.32253-1.41993-30.6459,7.78406-39.8499s28.52746-3.09935,39.85-7.78412C106.04832,41.82037,115.49508,24,128.00037,24c12.50513,0,21.95163,17.82047,33.68884,22.67683,11.32253,4.68477,30.6459-1.41993,39.8499,7.78406s3.09935,28.52746,7.78412,39.85C214.17963,106.04832,232,115.49508,232,128.00037c0,12.50513-17.82047,21.95163-22.67683,33.68884-4.68477,11.32253,1.41993,30.6459-7.78406,39.8499s-28.52745,3.09935-39.85,7.78412C149.95168,214.17963,140.50492,232,127.99963,232c-12.50513,0-21.95163-17.82047-33.68884-22.67683C82.98826,204.6384,63.66489,210.7431,54.46089,201.53911Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$2 = template(`<svg><circle cx="127.99854" cy="176" r="16"></circle></svg>`, 4, true),
_tmpl$3 = template(`<svg><path d="M127.9995,136.0045a28,28,0,1,0-28-28" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><path d="M54.46089,201.53911c-9.204-9.204-3.09935-28.52745-7.78412-39.85C41.82037,149.95168,24,140.50492,24,127.99963,24,115.4945,41.82047,106.048,46.67683,94.31079c4.68477-11.32253-1.41993-30.6459,7.78406-39.8499s28.52746-3.09935,39.85-7.78412C106.04832,41.82037,115.49508,24,128.00037,24c12.50513,0,21.95163,17.82047,33.68884,22.67683,11.32253,4.68477,30.6459-1.41993,39.8499,7.78406s3.09935,28.52746,7.78412,39.85C214.17963,106.04832,232,115.49508,232,128.00037c0,12.50513-17.82047,21.95163-22.67683,33.68884-4.68477,11.32253,1.41993,30.6459-7.78406,39.8499s-28.52745,3.09935-39.85,7.78412C149.95168,214.17963,140.50492,232,127.99963,232c-12.50513,0-21.95163-17.82047-33.68884-22.67683C82.98826,204.6384,63.66489,210.7431,54.46089,201.53911Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><path d="M54.46089,201.53911c-9.204-9.204-3.09935-28.52745-7.78412-39.85C41.82037,149.95168,24,140.50492,24,127.99963,24,115.4945,41.82047,106.048,46.67683,94.31079c4.68477-11.32253-1.41993-30.6459,7.78406-39.8499s28.52746-3.09935,39.85-7.78412C106.04832,41.82037,115.49508,24,128.00037,24c12.50513,0,21.95163,17.82047,33.68884,22.67683,11.32253,4.68477,30.6459-1.41993,39.8499,7.78406s3.09935,28.52746,7.78412,39.85C214.17963,106.04832,232,115.49508,232,128.00037c0,12.50513-17.82047,21.95163-22.67683,33.68884-4.68477,11.32253,1.41993,30.6459-7.78406,39.8499s-28.52745,3.09935-39.85,7.78412C149.95168,214.17963,140.50492,232,127.99963,232c-12.50513,0-21.95163-17.82047-33.68884-22.67683C82.98826,204.6384,63.66489,210.7431,54.46089,201.53911Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$6 = template(`<svg><circle cx="128" cy="180" r="12"></circle></svg>`, 4, true),
_tmpl$7 = template(`<svg><path d="M127.9995,144.0045v-8a28,28,0,1,0-28-28" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$8 = template(`<svg><path d="M225.8623,102.81543c-3.77246-3.93359-7.67285-8-9.14648-11.56348-1.35449-3.27343-1.43652-8.69531-1.51562-13.93945-.14747-9.75879-.31446-20.81934-8.00391-28.50879s-18.75-7.85644-28.50879-8.00391c-5.24414-.0791-10.666-.16113-13.93945-1.51562-3.5625-1.47363-7.62989-5.374-11.56348-9.14648C146.27539,23.51074,138.44238,16,128,16s-18.27441,7.51074-25.18457,14.1377c-3.93359,3.77246-8,7.67285-11.56348,9.14648-3.27343,1.35449-8.69531,1.43652-13.93945,1.51562-9.75879.14747-20.81934.31446-28.50879,8.00391s-7.85644,18.75-8.00391,28.50879c-.0791,5.24414-.16113,10.666-1.51562,13.93945-1.47363,3.5625-5.374,7.62989-9.14648,11.56348C23.51074,109.72461,16,117.55762,16,128s7.51074,18.27441,14.1377,25.18457c3.77246,3.93359,7.67285,8,9.14648,11.56348,1.35449,3.27343,1.43652,8.69531,1.51562,13.93945.14747,9.75879.31446,20.81934,8.00391,28.50879s18.75,7.85644,28.50879,8.00391c5.24414.0791,10.666.16113,13.93945,1.51562,3.5625,1.47363,7.62989,5.374,11.56348,9.14648C109.72461,232.48926,117.55762,240,128,240s18.27441-7.51074,25.18457-14.1377c3.93359-3.77246,8-7.67285,11.56348-9.14648,3.27343-1.35449,8.69531-1.43652,13.93945-1.51562,9.75879-.14747,20.81934-.31446,28.50879-8.00391s7.85644-18.75,8.00391-28.50879c.0791-5.24414.16113-10.666,1.51562-13.93945,1.47363-3.5625,5.374-7.62989,9.14648-11.56348C232.48926,146.27539,240,138.44238,240,128S232.48926,109.72559,225.8623,102.81543ZM128,192a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm7.999-48.89063v.89551a8,8,0,0,1-16,0v-8a8.00039,8.00039,0,0,1,8-8,20,20,0,1,0-20-20,8,8,0,0,1-16,0,36,36,0,1,1,44,35.10449Z"></path></svg>`, 4, true),
_tmpl$9 = template(`<svg><path d="M54.46089,201.53911c-9.204-9.204-3.09935-28.52745-7.78412-39.85C41.82037,149.95168,24,140.50492,24,127.99963,24,115.4945,41.82047,106.048,46.67683,94.31079c4.68477-11.32253-1.41993-30.6459,7.78406-39.8499s28.52746-3.09935,39.85-7.78412C106.04832,41.82037,115.49508,24,128.00037,24c12.50513,0,21.95163,17.82047,33.68884,22.67683,11.32253,4.68477,30.6459-1.41993,39.8499,7.78406s3.09935,28.52746,7.78412,39.85C214.17963,106.04832,232,115.49508,232,128.00037c0,12.50513-17.82047,21.95163-22.67683,33.68884-4.68477,11.32253,1.41993,30.6459-7.78406,39.8499s-28.52745,3.09935-39.85,7.78412C149.95168,214.17963,140.50492,232,127.99963,232c-12.50513,0-21.95163-17.82047-33.68884-22.67683C82.98826,204.6384,63.66489,210.7431,54.46089,201.53911Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$10 = template(`<svg><circle cx="127.99902" cy="180" r="10"></circle></svg>`, 4, true),
_tmpl$11 = template(`<svg><path d="M127.9995,144.0045v-8a28,28,0,1,0-28-28" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$12 = template(`<svg><path d="M54.46089,201.53911c-9.204-9.204-3.09935-28.52745-7.78412-39.85C41.82037,149.95168,24,140.50492,24,127.99963,24,115.4945,41.82047,106.048,46.67683,94.31079c4.68477-11.32253-1.41993-30.6459,7.78406-39.8499s28.52746-3.09935,39.85-7.78412C106.04832,41.82037,115.49508,24,128.00037,24c12.50513,0,21.95163,17.82047,33.68884,22.67683,11.32253,4.68477,30.6459-1.41993,39.8499,7.78406s3.09935,28.52746,7.78412,39.85C214.17963,106.04832,232,115.49508,232,128.00037c0,12.50513-17.82047,21.95163-22.67683,33.68884-4.68477,11.32253,1.41993,30.6459-7.78406,39.8499s-28.52745,3.09935-39.85,7.78412C149.95168,214.17963,140.50492,232,127.99963,232c-12.50513,0-21.95163-17.82047-33.68884-22.67683C82.98826,204.6384,63.66489,210.7431,54.46089,201.53911Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$13 = template(`<svg><circle cx="127.99951" cy="180" r="8"></circle></svg>`, 4, true),
_tmpl$14 = template(`<svg><path d="M127.9995,144.0045v-8a28,28,0,1,0-28-28" 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 [function () {
var _el$ = _tmpl$.cloneNode(true);
setAttribute(_el$, "stroke", color);
return _el$;
}(), _tmpl$2.cloneNode(true), function () {
var _el$3 = _tmpl$3.cloneNode(true);
setAttribute(_el$3, "stroke", color);
return _el$3;
}()];
case "duotone":
return [_tmpl$4.cloneNode(true), function () {
var _el$5 = _tmpl$5.cloneNode(true);
setAttribute(_el$5, "stroke", color);
return _el$5;
}(), _tmpl$6.cloneNode(true), 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 [function () {
var _el$9 = _tmpl$9.cloneNode(true);
setAttribute(_el$9, "stroke", color);
return _el$9;
}(), _tmpl$10.cloneNode(true), function () {
var _el$11 = _tmpl$11.cloneNode(true);
setAttribute(_el$11, "stroke", color);
return _el$11;
}()];
case "thin":
return [function () {
var _el$12 = _tmpl$12.cloneNode(true);
setAttribute(_el$12, "stroke", color);
return _el$12;
}(), _tmpl$13.cloneNode(true), function () {
var _el$14 = _tmpl$14.cloneNode(true);
setAttribute(_el$14, "stroke", color);
return _el$14;
}()];
case "regular":
return [function () {
var _el$15 = _tmpl$5.cloneNode(true);
setAttribute(_el$15, "stroke", color);
return _el$15;
}(), _tmpl$6.cloneNode(true), 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 CircleWavyQuestion = function CircleWavyQuestion(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 CircleWavyQuestion;
//# sourceMappingURL=CircleWavyQuestion.esm.js.map