UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

353 lines (250 loc) 19.2 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="156.284 203.716 128 232 99.716 203.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$2 = template(`<svg><line x1="128" y1="160" x2="128" y2="232" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$3 = template(`<svg><polyline points="99.716 52.284 128 24 156.284 52.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$4 = template(`<svg><line x1="128" y1="96" x2="128" y2="24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$5 = template(`<svg><polyline points="52.284 156.284 24 128 52.284 99.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$6 = template(`<svg><line x1="96" y1="128" x2="24" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$7 = template(`<svg><polyline points="203.716 99.716 232 128 203.716 156.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$8 = template(`<svg><line x1="160" y1="128" x2="232" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$9 = template(`<svg><polyline points="156.284 203.716 128 232 99.716 203.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$10 = template(`<svg><line x1="128" y1="160" x2="128" y2="232" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$11 = template(`<svg><polyline points="99.716 52.284 128 24 156.284 52.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$12 = template(`<svg><line x1="128" y1="96" x2="128" y2="24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$13 = template(`<svg><polyline points="52.284 156.284 24 128 52.284 99.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$14 = template(`<svg><line x1="96" y1="128" x2="24" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$15 = template(`<svg><polyline points="203.716 99.716 232 128 203.716 156.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$16 = template(`<svg><line x1="160" y1="128" x2="232" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$17 = template(`<svg><g><path d="M150.627,198.05859,136,212.686V160a8,8,0,0,0-16,0v52.686l-14.62695-14.62745a8.00036,8.00036,0,0,0-11.31446,11.314l28.28418,28.28418c.0459.0459.09668.08545.14356.12988.1416.13526.28369.269.43457.39356.06152.05078.12793.09423.19092.14306.144.11133.28808.22364.43945.3252.05127.03418.106.063.1582.09619.16846.10742.33838.21289.51514.3081.03711.02.07715.03565.11523.05518.19385.1001.39063.19629.59375.28076.02344.00977.04737.0166.07032.02588.21777.08789.43847.16895.66455.23779.02783.00879.05713.01368.085.022.2207.06445.44385.12353.67187.16894.0669.01319.13575.019.20313.03076.18945.03321.3789.06641.57226.08545a7.90223,7.90223,0,0,0,1.59864,0c.19336-.019.38281-.05224.57226-.08545.06738-.01172.13623-.01757.20313-.03076.228-.04541.45117-.10449.67187-.16894.02783-.0083.05713-.01319.085-.022.22608-.06884.44678-.1499.66455-.23779.02295-.00928.04688-.01611.07032-.02588.20312-.08447.3999-.18066.59375-.28076.03808-.01953.07812-.03516.11523-.05518.17676-.09521.34668-.20068.51514-.3081.05224-.0332.10693-.062.1582-.09619.15137-.10156.29541-.21387.43945-.3252.063-.04883.1294-.09228.19092-.14306.15088-.12452.293-.2583.43457-.39356.04688-.04443.09766-.084.14356-.12988l28.28418-28.28418a8.00036,8.00036,0,0,0-11.31446-11.314Z"></path><path d="M105.37305,57.94141,120,43.314V96a8,8,0,0,0,16,0V43.314L150.627,57.94141a8.00036,8.00036,0,0,0,11.31446-11.314L133.65723,18.34326c-.04151-.0415-.08789-.07715-.12989-.11767-.1455-.13965-.29248-.27784-.44824-.40577-.06152-.05078-.12793-.09423-.19092-.14306-.144-.11133-.28808-.22364-.43945-.3252-.05127-.03418-.106-.063-.1582-.09619-.16846-.10742-.33838-.21289-.51514-.3081-.0376-.02-.07764-.03614-.11621-.05567-.19336-.1001-.38965-.1958-.59229-.28027-.02587-.01074-.05224-.01807-.07812-.02832-.21533-.08692-.43359-.16748-.65723-.23535-.02783-.00879-.05713-.01368-.085-.022-.2207-.06445-.44385-.12353-.67187-.16894-.0669-.01319-.13575-.019-.20313-.03076-.18945-.03321-.3789-.06641-.57226-.08545a7.90223,7.90223,0,0,0-1.59864,0c-.19336.019-.38281.05224-.57226.08545-.06738.01172-.13623.01757-.20313.03076-.228.04541-.45117.10449-.67187.16894-.02783.0083-.05713.01319-.085.022-.22364.06787-.4419.14843-.65723.23535-.02588.01025-.05225.01758-.07812.02832-.20264.08447-.39893.18017-.59229.28027-.03857.01953-.07861.03565-.11621.05567-.17676.09521-.34668.20068-.51514.3081-.05224.0332-.10693.062-.1582.09619-.15137.10156-.29541.21387-.43945.3252-.063.04883-.1294.09228-.19092.14306-.15576.12793-.30274.26612-.44824.40577-.042.04052-.08838.07617-.12989.11767L94.05859,46.62744a8.00036,8.00036,0,0,0,11.31446,11.314Z"></path><path d="M43.31348,136H96a8,8,0,0,0,0-16H43.31348l14.62793-14.62744A8.00036,8.00036,0,0,0,46.627,94.05859L18.34277,122.34326c-.03076.03028-.05615.064-.08593.09522-.15284.15771-.30225.31836-.44141.48828-.08594.10449-.16113.21386-.24072.32129-.0752.102-.1543.20117-.2251.30664-.083.12353-.15479.252-.23.3789-.05762.09717-.11914.1919-.17236.29151-.06836.12744-.12647.25879-.1875.38916-.0503.10644-.10352.21142-.14893.3208-.05225.126-.09424.25439-.14014.38232-.042.11866-.08789.23584-.125.35694-.03857.12841-.06738.25879-.09961.38916-.03076.123-.06543.24511-.09082.3706-.02978.15137-.04834.3042-.06933.457-.01514.106-.03516.20948-.0459.3169a8.02276,8.02276,0,0,0,0,1.584c.01074.10742.03076.21094.0459.3169.021.15283.03955.30566.06933.457.02539.12549.06006.24756.09082.3706.03223.13037.061.26075.09961.38916.03711.1211.083.23828.125.35694.0459.12793.08789.25634.14014.38232.04541.10938.09863.21436.14893.3208.061.13037.11914.26172.1875.38916.05322.09961.11474.19434.17236.29151.07519.127.147.25537.23.3789.0708.10547.1499.20459.2251.30664.07959.10743.15478.2168.24072.32129.13672.16651.28369.32471.43311.47949.03271.03418.061.07081.09423.104L46.627,161.94141a8.00036,8.00036,0,0,0,11.31446-11.314Z"></path><path d="M238.18457,133.07324c.08594-.10449.16113-.21386.24072-.32129.0752-.102.1543-.20117.2251-.30664.083-.12353.15479-.25195.23-.3789.05762-.09717.11914-.1919.17236-.29151.06836-.12744.12647-.25879.1875-.38916.0503-.10644.10352-.21142.14893-.3208.05225-.126.09424-.25439.14014-.38232.042-.11866.08789-.23584.125-.35694.03857-.12841.06738-.25879.09961-.38916.03076-.123.06543-.24511.09082-.3706.02978-.15137.04834-.3042.06933-.457.01514-.106.03516-.20948.0459-.3169a8.02276,8.02276,0,0,0,0-1.584c-.01074-.10742-.03076-.21094-.0459-.3169-.021-.15283-.03955-.30566-.06933-.457-.02539-.12549-.06006-.24756-.09082-.3706-.03223-.13037-.061-.26075-.09961-.38916-.03711-.1211-.083-.23828-.125-.35694-.0459-.12793-.08789-.25634-.14014-.38232-.04541-.10938-.09863-.21436-.14893-.3208-.061-.13037-.11914-.26172-.1875-.38916-.05322-.09961-.11474-.19434-.17236-.29151-.07519-.12695-.147-.25537-.23-.3789-.0708-.10547-.1499-.20459-.2251-.30664-.07959-.10743-.15478-.2168-.24072-.32129-.13916-.16992-.28857-.33057-.44141-.48828-.02978-.03125-.05517-.06494-.08593-.09522L209.37305,94.05859a8.00036,8.00036,0,0,0-11.31446,11.314L212.68652,120H160a8,8,0,0,0,0,16h52.68652l-14.62793,14.62744a8.00036,8.00036,0,0,0,11.31446,11.314l28.28418-28.28467c.0332-.0332.06152-.06983.09423-.104C237.90088,133.398,238.04785,133.23975,238.18457,133.07324Z"></path></g></svg>`, 12, true), _tmpl$18 = template(`<svg><polyline points="156.284 203.716 128 232 99.716 203.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$19 = template(`<svg><line x1="128" y1="160" x2="128" y2="232" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$20 = template(`<svg><polyline points="99.716 52.284 128 24 156.284 52.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$21 = template(`<svg><line x1="128" y1="96" x2="128" y2="24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$22 = template(`<svg><polyline points="52.284 156.284 24 128 52.284 99.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$23 = template(`<svg><line x1="96" y1="128" x2="24" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$24 = template(`<svg><polyline points="203.716 99.716 232 128 203.716 156.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$25 = template(`<svg><line x1="160" y1="128" x2="232" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$26 = template(`<svg><polyline points="156.284 203.716 128 232 99.716 203.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$27 = template(`<svg><line x1="128" y1="160" x2="128" y2="232" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$28 = template(`<svg><polyline points="99.716 52.284 128 24 156.284 52.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$29 = template(`<svg><line x1="128" y1="96" x2="128" y2="24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$30 = template(`<svg><polyline points="52.284 156.284 24 128 52.284 99.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$31 = template(`<svg><line x1="96" y1="128" x2="24" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$32 = template(`<svg><polyline points="203.716 99.716 232 128 203.716 156.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$33 = template(`<svg><line x1="160" y1="128" x2="232" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$34 = 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; }(), 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; }()]; case "duotone": 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; }(), function () { var _el$11 = _tmpl$11.cloneNode(true); setAttribute(_el$11, "stroke", color); return _el$11; }(), 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 "fill": return _tmpl$17.cloneNode(true); case "light": return [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; }(), function () { var _el$22 = _tmpl$22.cloneNode(true); setAttribute(_el$22, "stroke", color); return _el$22; }(), function () { var _el$23 = _tmpl$23.cloneNode(true); setAttribute(_el$23, "stroke", color); return _el$23; }(), function () { var _el$24 = _tmpl$24.cloneNode(true); setAttribute(_el$24, "stroke", color); return _el$24; }(), function () { var _el$25 = _tmpl$25.cloneNode(true); setAttribute(_el$25, "stroke", color); return _el$25; }()]; case "thin": return [function () { var _el$26 = _tmpl$26.cloneNode(true); setAttribute(_el$26, "stroke", color); return _el$26; }(), function () { var _el$27 = _tmpl$27.cloneNode(true); setAttribute(_el$27, "stroke", color); return _el$27; }(), function () { var _el$28 = _tmpl$28.cloneNode(true); setAttribute(_el$28, "stroke", color); return _el$28; }(), function () { var _el$29 = _tmpl$29.cloneNode(true); setAttribute(_el$29, "stroke", color); return _el$29; }(), function () { var _el$30 = _tmpl$30.cloneNode(true); setAttribute(_el$30, "stroke", color); return _el$30; }(), function () { var _el$31 = _tmpl$31.cloneNode(true); setAttribute(_el$31, "stroke", color); return _el$31; }(), function () { var _el$32 = _tmpl$32.cloneNode(true); setAttribute(_el$32, "stroke", color); return _el$32; }(), function () { var _el$33 = _tmpl$33.cloneNode(true); setAttribute(_el$33, "stroke", color); return _el$33; }()]; case "regular": return [function () { var _el$34 = _tmpl$9.cloneNode(true); setAttribute(_el$34, "stroke", color); return _el$34; }(), function () { var _el$35 = _tmpl$10.cloneNode(true); setAttribute(_el$35, "stroke", color); return _el$35; }(), function () { var _el$36 = _tmpl$11.cloneNode(true); setAttribute(_el$36, "stroke", color); return _el$36; }(), function () { var _el$37 = _tmpl$12.cloneNode(true); setAttribute(_el$37, "stroke", color); return _el$37; }(), function () { var _el$38 = _tmpl$13.cloneNode(true); setAttribute(_el$38, "stroke", color); return _el$38; }(), function () { var _el$39 = _tmpl$14.cloneNode(true); setAttribute(_el$39, "stroke", color); return _el$39; }(), function () { var _el$40 = _tmpl$15.cloneNode(true); setAttribute(_el$40, "stroke", color); return _el$40; }(), function () { var _el$41 = _tmpl$16.cloneNode(true); setAttribute(_el$41, "stroke", color); return _el$41; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var ArrowsOutCardinal = function ArrowsOutCardinal(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$42 = _tmpl$34.cloneNode(true), _el$43 = _el$42.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$42) : ref = _el$42; setAttribute(_el$42, "width", size != null ? size : contextSize); setAttribute(_el$42, "height", size != null ? size : contextSize); setAttribute(_el$42, "fill", color != null ? color : contextColor); setAttribute(_el$42, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$42, restContext, true, true); spread(_el$42, restProps, true, true); insert(_el$42, children, _el$43); insert(_el$42, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$42; }(); }; export default ArrowsOutCardinal; //# sourceMappingURL=ArrowsOutCardinal.esm.js.map