UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

149 lines (106 loc) 6.83 kB
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><polyline points="163.882 148.118 227.882 148.118 227.882 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M32,184a96,96,0,0,1,163.88225-67.88229l32,32" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><polyline points="163.882 148.118 227.882 148.118 227.882 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M32,184a96,96,0,0,1,163.88225-67.88229l32,32" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><path d="M229.07861,156.019c.12061-.01806.2417-.03174.36133-.05517.146-.02881.28784-.06836.43091-.105.11011-.02832.2207-.05225.32959-.085.1355-.041.2666-.09131.39917-.13965.11426-.041.22925-.07862.3418-.125.11963-.04981.23462-.10791.35131-.16309.12061-.05664.24219-.11035.36036-.17334.10717-.05762.20874-.12305.313-.18506.12037-.07177.24244-.14013.35962-.21826.10718-.07178.20752-.15185.31079-.22851.10669-.07911.21582-.15381.31958-.23877.14478-.11914.28077-.248.417-.377.05444-.05127.11255-.09668.166-.1499.0564-.05664.10425-.11768.15869-.17578.12525-.13281.25122-.26514.36719-.40625.09107-.11084.17114-.22705.25537-.3418.07056-.09521.14478-.188.21094-.28662.085-.12646.15894-.25781.23584-.38818.05566-.09424.11523-.186.16724-.28321.06909-.1289.12817-.26171.18969-.39355.04932-.10547.102-.209.147-.31641.05224-.127.095-.25586.14062-.38476.042-.11817.08765-.23438.12427-.355.03906-.12891.06787-.25977.10034-.39014.03052-.12305.06519-.24414.09009-.36914.03-.15186.04858-.30469.06982-.45752.01465-.106.03516-.20947.04566-.31689.02636-.26514.04028-.53125.04-.79688V84.11816a8,8,0,1,0-16,0v44.68555l-18.34278-18.34277A104,104,0,0,0,24,184a8,8,0,0,0,16,0,87.99889,87.99889,0,0,1,150.22461-62.22461l18.34277,18.34277H163.88184a8,8,0,0,0,0,16h64c.05981,0,.11743-.00781.177-.00879.20263-.00439.40527-.01123.60718-.03076C228.80542,156.06494,228.94116,156.03955,229.07861,156.019Z"></path></svg>`, 4, true), _tmpl$6 = template(`<svg><polyline points="163.882 148.118 227.882 148.118 227.882 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M32,184a96,96,0,0,1,163.88225-67.88229l32,32" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><polyline points="163.882 148.118 227.882 148.118 227.882 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$9 = template(`<svg><path d="M32,184a96,96,0,0,1,163.88225-67.88229l32,32" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$10 = 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 [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; }()]; case "fill": return _tmpl$5.cloneNode(true); case "light": return [function () { var _el$6 = _tmpl$6.cloneNode(true); setAttribute(_el$6, "stroke", color); return _el$6; }(), function () { var _el$7 = _tmpl$7.cloneNode(true); setAttribute(_el$7, "stroke", color); return _el$7; }()]; case "thin": return [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; }()]; case "regular": return [function () { var _el$10 = _tmpl$3.cloneNode(true); setAttribute(_el$10, "stroke", color); return _el$10; }(), function () { var _el$11 = _tmpl$4.cloneNode(true); setAttribute(_el$11, "stroke", color); return _el$11; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var ArrowArcRight = function ArrowArcRight(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$12 = _tmpl$10.cloneNode(true), _el$13 = _el$12.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$12) : ref = _el$12; setAttribute(_el$12, "width", size != null ? size : contextSize); setAttribute(_el$12, "height", size != null ? size : contextSize); setAttribute(_el$12, "fill", color != null ? color : contextColor); setAttribute(_el$12, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$12, restContext, true, true); spread(_el$12, restProps, true, true); insert(_el$12, children, _el$13); insert(_el$12, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$12; }(); }; export default ArrowArcRight; //# sourceMappingURL=ArrowArcRight.esm.js.map