UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

149 lines (106 loc) 6.75 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="92.118 148.118 28.118 148.118 28.118 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M224,184A96,96,0,0,0,60.11775,116.11775l-32,32" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><polyline points="92.118 148.118 28.118 148.118 28.118 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M224,184A96,96,0,0,0,60.11775,116.11775l-32,32" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><path d="M201.53906,110.46094a103.99978,103.99978,0,0,0-147.07812,0L36.11816,128.80371V84.11816a8,8,0,0,0-16,0v63.99512c-.00024.26563.01368.53174.04.79688.0105.10742.031.21093.04566.31689.02124.15283.03979.30566.06982.45752.0249.125.05957.24609.09009.36914.03247.13037.06128.26123.10034.39014.03662.1206.08228.23681.12427.355.04565.1289.08838.25781.14062.38476.04493.10743.09766.21094.147.31641.06152.13184.1206.26465.18969.39355.052.09717.11158.189.16724.28321.0769.13037.15088.26172.23584.38818.06616.09863.14038.19141.21094.28662.08423.11475.1643.231.25537.3418.116.14111.24194.27344.36719.40625.05444.0581.10229.11914.15869.17578.05346.05322.11157.09863.166.1499.13623.12891.27222.25782.417.377.10376.085.21289.15966.31958.23877.10327.07666.20361.15673.31079.22851.11718.07813.23925.14649.35962.21826.10424.062.20581.12744.313.18506.11817.063.23975.1167.36036.17334.11669.05518.23168.11328.35131.16309.11255.04638.22754.084.3418.125.13257.04834.26367.09863.39917.13965.10889.03271.21948.05664.32959.085.14307.03662.28491.07617.43091.105.11963.02343.24072.03711.36133.05517.13745.02051.27319.0459.41259.05957.20191.01953.40455.02637.60718.03077.05957.001.11719.00878.177.00878h64a8,8,0,0,0,0-16H47.43262l18.34277-18.34277A88,88,0,0,1,216,184a8,8,0,0,0,16,0A103.322,103.322,0,0,0,201.53906,110.46094Z"></path></svg>`, 4, true), _tmpl$6 = template(`<svg><polyline points="92.118 148.118 28.118 148.118 28.118 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M224,184A96,96,0,0,0,60.11775,116.11775l-32,32" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><polyline points="92.118 148.118 28.118 148.118 28.118 84.118" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$9 = template(`<svg><path d="M224,184A96,96,0,0,0,60.11775,116.11775l-32,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 ArrowArcLeft = function ArrowArcLeft(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 ArrowArcLeft; //# sourceMappingURL=ArrowArcLeft.esm.js.map