UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

149 lines (106 loc) 6.76 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="128 96 80 48 32 96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$2 = template(`<svg><polyline points="224 192 80 192 80 48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$3 = template(`<svg><polyline points="128 96 80 48 32 96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$4 = template(`<svg><polyline points="224 192 80 192 80 48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$5 = template(`<svg><path d="M224,184H88V67.3136l34.34277,34.34314a8.00018,8.00018,0,0,0,11.31446-11.31348l-48-48c-.01612-.01611-.03418-.02936-.0503-.04529-.17138-.16882-.34912-.33123-.53564-.48413-.09375-.07715-.19287-.14428-.28955-.21655-.11279-.08423-.22266-.17145-.33985-.24976-.11279-.07568-.23046-.14123-.34668-.21051-.10791-.06463-.21386-.1325-.32519-.1922-.1167-.06237-.23682-.11523-.356-.17144-.11767-.05579-.2334-.11444-.35449-.16455-.11377-.047-.22949-.08478-.34473-.12629-.13134-.04736-.26074-.09747-.395-.13806-.11377-.03436-.22949-.05938-.34423-.08862-.1377-.035-.27442-.07336-.41455-.10114-.13038-.02581-.26221-.04077-.39356-.06-.12695-.01862-.25195-.04236-.38086-.05494-.23193-.02282-.46484-.03271-.69824-.03527C80.05859,40.00415,80.02979,40,80,40s-.05859.00415-.08838.00446c-.2334.00256-.46631.01245-.69824.03527-.12891.01258-.25391.03632-.38086.05494-.13135.01928-.26318.03424-.39356.06-.14013.02778-.27685.06611-.41455.10114-.11474.02924-.23046.05426-.34423.08862-.13428.04059-.26368.0907-.395.13806-.11524.04151-.231.07929-.34473.12629-.12109.05011-.23682.10876-.35449.16455-.11914.05621-.23926.10907-.356.17144-.11133.0597-.21728.12757-.32519.1922-.11622.06928-.23389.13483-.34668.21051-.11719.07831-.22706.16553-.33985.24976-.09668.07227-.1958.1394-.28955.21655-.18652.1529-.36426.31531-.53564.48413-.01612.01593-.03418.02918-.0503.04529l-48,48a8.00018,8.00018,0,0,0,11.31446,11.31348L72,67.3136V192a8.00008,8.00008,0,0,0,8,8H224a8,8,0,0,0,0-16Z"></path></svg>`, 4, true), _tmpl$6 = template(`<svg><polyline points="128 96 80 48 32 96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$7 = template(`<svg><polyline points="224 192 80 192 80 48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$8 = template(`<svg><polyline points="128 96 80 48 32 96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$9 = template(`<svg><polyline points="224 192 80 192 80 48" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></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 ArrowElbowLeftUp = function ArrowElbowLeftUp(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 ArrowElbowLeftUp; //# sourceMappingURL=ArrowElbowLeftUp.esm.js.map