UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

251 lines (178 loc) 11.5 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="144 87.994 184 47.994 223.999 87.987" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$2 = template(`<svg><line x1="184" y1="143.99359" x2="184" y2="47.99359" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$3 = template(`<svg><line x1="48" y1="127.99353" x2="119.99902" y2="127.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$4 = template(`<svg><line x1="48" y1="63.99353" x2="103.99902" y2="63.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$5 = template(`<svg><line x1="48" y1="191.99353" x2="183.99902" y2="191.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$6 = template(`<svg><polyline points="144 87.994 184 47.994 223.999 87.987" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$7 = template(`<svg><line x1="184" y1="143.99359" x2="184" y2="47.99359" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$8 = template(`<svg><line x1="48" y1="127.99353" x2="119.99902" y2="127.99353" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$9 = template(`<svg><line x1="48" y1="63.99353" x2="103.99902" y2="63.99353" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$10 = template(`<svg><line x1="48" y1="191.99353" x2="183.99902" y2="191.99353" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$11 = template(`<svg><g><path d="M229.65527,82.32947l-39.999-39.99317c-.00879-.00927-.019-.0166-.02832-.02587-.17822-.17627-.36426-.345-.55811-.50391-.08935-.07349-.18359-.13721-.27539-.20606-.11718-.08813-.23193-.17871-.354-.26025-.10889-.07275-.22168-.13574-.3335-.20264-.11279-.06762-.22314-.13818-.33935-.20019-.11133-.05982-.22608-.10986-.33985-.16406-.123-.05835-.24462-.11963-.37109-.17188-.10742-.04468-.21777-.08032-.32715-.11987-.13672-.04981-.27246-.10181-.4126-.14429-.106-.032-.21386-.05517-.3208-.08252-.1455-.03735-.28955-.07764-.43847-.10693-.11866-.02344-.23877-.03662-.35889-.05469-.13818-.021-.2749-.04639-.415-.06006-.20019-.01953-.40088-.02588-.60156-.03027-.061-.00147-.12061-.00928-.18213-.00928-.05811,0-.11426.00733-.17188.00879-.20458.00415-.40869.01074-.61279.03076-.13672.01343-.26953.03833-.40429.05835-.12354.01856-.24756.03247-.37012.05664-.14453.02857-.28516.06763-.42676.104-.11084.02832-.22314.05249-.333.08569-.13525.041-.2666.09155-.39892.1394-.11426.04126-.229.07862-.3418.12525-.12109.05-.23682.10864-.35449.16455-.11914.05615-.23926.10913-.35645.17163-.10986.05884-.21387.12573-.32031.18921-.11816.07031-.23731.137-.352.21387-.11377.07641-.22119.16137-.33106.2434-.09961.07422-.20117.14331-.29785.22266-.17578.14429-.34277.2981-.50537.45679-.02588.0249-.0542.04614-.07959.07177l-40,40a8.00036,8.00036,0,0,0,11.314,11.31446L176,67.3075v76.686a8,8,0,0,0,16,0V67.3053l26.34277,26.33862a7.99983,7.99983,0,1,0,11.3125-11.31445Z"></path><path d="M48,135.99353h71.999a8,8,0,1,0,0-16H48a8,8,0,0,0,0,16Z"></path><path d="M48,71.99353h55.999a8,8,0,0,0,0-16H48a8,8,0,1,0,0,16Z"></path><path d="M183.999,183.99353H48a8,8,0,0,0,0,16H183.999a8,8,0,0,0,0-16Z"></path></g></svg>`, 12, true), _tmpl$12 = template(`<svg><polyline points="144 87.994 184 47.994 223.999 87.987" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$13 = template(`<svg><line x1="184" y1="143.99359" x2="184" y2="47.99359" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$14 = template(`<svg><line x1="48" y1="127.99353" x2="119.99902" y2="127.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$15 = template(`<svg><line x1="48" y1="63.99353" x2="103.99902" y2="63.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$16 = template(`<svg><line x1="48" y1="191.99353" x2="183.99902" y2="191.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$17 = template(`<svg><polyline points="144 87.994 184 47.994 223.999 87.987" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$18 = template(`<svg><line x1="184" y1="143.99359" x2="184" y2="47.99359" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$19 = template(`<svg><line x1="48" y1="127.99353" x2="119.99902" y2="127.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$20 = template(`<svg><line x1="48" y1="63.99353" x2="103.99902" y2="63.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$21 = template(`<svg><line x1="48" y1="191.99353" x2="183.99902" y2="191.99353" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></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 SortDescending = function SortDescending(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 SortDescending; //# sourceMappingURL=SortDescending.esm.js.map