UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

251 lines (178 loc) 12.3 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><line x1="216" y1="128" x2="40" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$2 = template(`<svg><line x1="128" y1="12" x2="128" y2="88" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$3 = template(`<svg><polyline points="160 56 128 88 96 56" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$4 = template(`<svg><line x1="128" y1="244" x2="128" y2="168" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$5 = template(`<svg><polyline points="96 200 128 168 160 200" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$6 = template(`<svg><line x1="216" y1="128" x2="40" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$7 = template(`<svg><line x1="128" y1="16" x2="128" y2="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$8 = template(`<svg><polyline points="160 64 128 96 96 64" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$9 = template(`<svg><line x1="128" y1="240" x2="128" y2="160" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$10 = template(`<svg><polyline points="96 192 128 160 160 192" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M224,128a8.00039,8.00039,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8.00039,8.00039,0,0,1,224,128ZM122.34277,101.65723c.0542.0542.11377.10034.16895.15283.13525.12744.27.25561.41406.37353.10645.08765.21826.16431.32813.24561.10009.074.19726.15185.30078.22119.12207.08154.248.15259.37353.22681.09912.05884.19629.12134.29834.17627.124.0664.25147.1228.37842.18237.11035.05176.21875.10693.332.154.1211.05005.24463.09058.36768.13452.12353.04444.2456.0918.37207.13013.12158.03687.24512.064.36816.09473.13037.033.25879.06933.3916.0957.14063.02783.28321.04443.42481.0647.1167.0166.231.03882.34912.05029.26221.02588.52588.04.78955.04s.52734-.01416.78955-.04c.11816-.01147.23242-.03369.34912-.05029.1416-.02027.28418-.03687.42481-.0647.13281-.02637.26123-.06274.3916-.0957.123-.03076.24658-.05786.36816-.09473.12647-.03833.24854-.08569.37207-.13013.12305-.04394.24658-.08447.36768-.13452.11328-.04712.22168-.10229.332-.154.127-.05957.25439-.116.37842-.18237.10205-.05493.19922-.11743.29834-.17627.12549-.07422.25146-.14527.37353-.22681.10352-.06934.20069-.14722.30078-.22119.10987-.0813.22168-.158.32813-.24561.144-.11792.27881-.24609.41406-.37353.05518-.05249.11475-.09863.16895-.15283l32-32a8.00053,8.00053,0,0,0-11.31446-11.31446L136,76.68628V16a8,8,0,0,0-16,0V76.68628L101.65723,58.34277A8.00053,8.00053,0,0,0,90.34277,69.65723Zm11.31446,52.68554c-.05323-.05322-.11133-.09863-.166-.1499-.13623-.12891-.27246-.25781-.417-.37695-.10449-.0857-.21436-.16065-.32178-.24024-.10254-.07617-.20166-.15551-.3081-.22656-.11817-.0791-.24073-.148-.36231-.22-.10351-.06177-.2041-.12671-.31055-.18359-.11865-.06324-.24023-.117-.36084-.17383-.11669-.05518-.23144-.11328-.35107-.16284-.1123-.04663-.22754-.084-.3418-.12525-.13281-.04785-.26367-.09839-.39941-.1394-.10938-.0332-.2207-.05713-.33106-.08521-.14257-.03637-.2832-.07592-.42822-.10473-.12158-.02393-.24414-.0376-.3667-.05567-.13574-.02051-.27-.04565-.4082-.05908-.20215-.01977-.40479-.02612-.60742-.03076C128.11768,152.00757,128.05957,152,128,152s-.11768.00757-.17676.00879c-.20263.00464-.40527.011-.60742.03076-.13818.01343-.27246.03857-.4082.05908-.12256.01807-.24512.03174-.3667.05567-.145.02881-.28565.06836-.42822.10473-.11036.02808-.22168.052-.33106.08521-.13574.041-.2666.09155-.39941.1394-.11426.04126-.2295.07862-.3418.12525-.11963.04956-.23438.10766-.35107.16284-.12061.05688-.24219.11059-.36084.17383-.10645.05688-.207.12182-.31055.18359-.12158.072-.24414.14087-.36231.22-.10644.07105-.20556.15039-.3081.22656-.10742.07959-.21729.15454-.32178.24024-.14453.11914-.28076.248-.417.37695-.05469.05127-.11279.09668-.166.1499l-32,32a8.00053,8.00053,0,0,0,11.31446,11.31446L120,179.31372V240a8,8,0,0,0,16,0V179.31372l18.34277,18.34351a8.00053,8.00053,0,0,0,11.31446-11.31446Z"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><line x1="216" y1="128" x2="40" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$13 = template(`<svg><line x1="128" y1="16" x2="128" y2="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$14 = template(`<svg><polyline points="160 64 128 96 96 64" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$15 = template(`<svg><line x1="128" y1="240" x2="128" y2="160" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$16 = template(`<svg><polyline points="96 192 128 160 160 192" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$17 = template(`<svg><line x1="216" y1="128" x2="40" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$18 = template(`<svg><line x1="128" y1="16" x2="128" y2="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$19 = template(`<svg><polyline points="160 64 128 96 96 64" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$20 = template(`<svg><line x1="128" y1="240" x2="128" y2="160" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$21 = template(`<svg><polyline points="96 192 128 160 160 192" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$22 = 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; }(), 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; }(), function () { var _el$5 = _tmpl$5.cloneNode(true); setAttribute(_el$5, "stroke", color); return _el$5; }()]; case "duotone": 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; }(), 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; }(), function () { var _el$10 = _tmpl$10.cloneNode(true); setAttribute(_el$10, "stroke", color); return _el$10; }()]; case "fill": return _tmpl$11.cloneNode(true); case "light": return [function () { var _el$12 = _tmpl$12.cloneNode(true); setAttribute(_el$12, "stroke", color); return _el$12; }(), function () { var _el$13 = _tmpl$13.cloneNode(true); setAttribute(_el$13, "stroke", color); return _el$13; }(), function () { var _el$14 = _tmpl$14.cloneNode(true); setAttribute(_el$14, "stroke", color); return _el$14; }(), function () { var _el$15 = _tmpl$15.cloneNode(true); setAttribute(_el$15, "stroke", color); return _el$15; }(), function () { var _el$16 = _tmpl$16.cloneNode(true); setAttribute(_el$16, "stroke", color); return _el$16; }()]; case "thin": return [function () { var _el$17 = _tmpl$17.cloneNode(true); setAttribute(_el$17, "stroke", color); return _el$17; }(), function () { var _el$18 = _tmpl$18.cloneNode(true); setAttribute(_el$18, "stroke", color); return _el$18; }(), function () { var _el$19 = _tmpl$19.cloneNode(true); setAttribute(_el$19, "stroke", color); return _el$19; }(), function () { var _el$20 = _tmpl$20.cloneNode(true); setAttribute(_el$20, "stroke", color); return _el$20; }(), function () { var _el$21 = _tmpl$21.cloneNode(true); setAttribute(_el$21, "stroke", color); return _el$21; }()]; case "regular": return [function () { var _el$22 = _tmpl$6.cloneNode(true); setAttribute(_el$22, "stroke", color); return _el$22; }(), function () { var _el$23 = _tmpl$7.cloneNode(true); setAttribute(_el$23, "stroke", color); return _el$23; }(), function () { var _el$24 = _tmpl$8.cloneNode(true); setAttribute(_el$24, "stroke", color); return _el$24; }(), function () { var _el$25 = _tmpl$9.cloneNode(true); setAttribute(_el$25, "stroke", color); return _el$25; }(), function () { var _el$26 = _tmpl$10.cloneNode(true); setAttribute(_el$26, "stroke", color); return _el$26; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var ArrowsInLineVertical = function ArrowsInLineVertical(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$27 = _tmpl$22.cloneNode(true), _el$28 = _el$27.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$27) : ref = _el$27; setAttribute(_el$27, "width", size != null ? size : contextSize); setAttribute(_el$27, "height", size != null ? size : contextSize); setAttribute(_el$27, "fill", color != null ? color : contextColor); setAttribute(_el$27, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$27, restContext, true, true); spread(_el$27, restProps, true, true); insert(_el$27, children, _el$28); insert(_el$27, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$27; }(); }; export default ArrowsInLineVertical; //# sourceMappingURL=ArrowsInLineVertical.esm.js.map