phosphor-solid
Version:
A clean and friendly icon family for Solid-js
150 lines (107 loc) • 10.6 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><polyline points="172 104 113.333 160 84 132" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true),
_tmpl$3 = 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$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" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><polyline points="172 104 113.333 160 84 132" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true),
_tmpl$6 = 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.81543Zm-48.33886,6.97168-58.667,56a7.99978,7.99978,0,0,1-11.04688,0l-29.333-28a7.99994,7.99994,0,1,1,11.04688-11.57422L113.333,148.94043l53.14355-50.72754a7.99994,7.99994,0,1,1,11.04688,11.57422Z"></path></svg>`, 4, true),
_tmpl$7 = 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$8 = template(`<svg><polyline points="172 104 113.333 160 84 132" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></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="8"></path></svg>`, 4, true),
_tmpl$10 = template(`<svg><polyline points="172 104 113.333 160 84 132" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true),
_tmpl$11 = 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$4.cloneNode(true);
setAttribute(_el$11, "stroke", color);
return _el$11;
}(), function () {
var _el$12 = _tmpl$5.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 CircleWavyCheck = function CircleWavyCheck(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$11.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 CircleWavyCheck;
//# sourceMappingURL=CircleWavyCheck.esm.js.map