UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

217 lines (154 loc) 11.4 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="176.167 99.716 224.167 99.716 224.167 51.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M65.7746,65.7746a88,88,0,0,1,124.4508,0l33.94112,33.94113" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><polyline points="79.833 156.284 31.833 156.284 31.833 204.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></polyline></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M190.2254,190.2254a88,88,0,0,1-124.4508,0L31.83348,156.28427" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><polyline points="176.167 99.716 224.167 99.716 224.167 51.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$6 = template(`<svg><path d="M65.7746,65.7746a88,88,0,0,1,124.4508,0l33.94112,33.94113" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><polyline points="79.833 156.284 31.833 156.284 31.833 204.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline></svg>`, 4, true), _tmpl$8 = template(`<svg><path d="M190.2254,190.2254a88,88,0,0,1-124.4508,0L31.83348,156.28427" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$9 = template(`<svg><g><path d="M225.73047,107.56073c.13257-.02631.26123-.06274.3916-.09558.123-.03088.24658-.05792.36816-.09473.12647-.03833.2483-.08575.37183-.13006.123-.04395.24683-.08454.36792-.13465.11328-.047.22168-.10217.332-.15411.127-.05945.2544-.11591.37842-.18237.10229-.05475.19922-.11725.29858-.17627.12525-.07416.25147-.14521.37329-.22681.10352-.0694.20069-.14709.30079-.22113.10986-.08124.22192-.158.32837-.24554.14379-.118.27856-.246.41357-.37366.05542-.05243.11475-.09845.16919-.15277.0564-.0564.10425-.11786.15869-.17554.12524-.13287.25122-.26532.36719-.40649.09106-.11072.17114-.22718.25537-.34156.07056-.09564.14477-.18805.21094-.28686.085-.12659.15893-.25781.23584-.38806.05566-.09443.11523-.18622.16723-.28308.06909-.12916.12818-.26185.1897-.3938.04932-.10547.10205-.20874.147-.31665.05225-.12653.095-.25568.14063-.38428.042-.11817.08764-.2345.12426-.35517.03907-.1289.06788-.25982.10035-.39019.03051-.123.06518-.24414.09008-.36933.03-.15149.04859-.30444.06983-.45715.01465-.1059.03516-.2099.04565-.31714a7.97366,7.97366,0,0,0,.04-.79706V51.71582a8,8,0,0,0-16,0V80.40137L195.88281,60.11719a96.11137,96.11137,0,0,0-135.76562,0A8.00052,8.00052,0,0,0,71.43164,71.43164a80.08769,80.08769,0,0,1,113.13672,0l20.28418,20.28418H176.167a8,8,0,0,0,0,16h48c.26367,0,.5271-.014.78955-.03992.11817-.01159.23267-.03369.34912-.05035C225.44751,107.60529,225.5896,107.58868,225.73047,107.56073Z"></path><path d="M184.56836,184.56836a80.08769,80.08769,0,0,1-113.13672,0L51.14746,164.28418H79.833a8,8,0,0,0,0-16h-48c-.05982,0-.11743.00763-.177.00891-.20264.00446-.40528.01093-.60718.0307-.13819.01343-.27246.03851-.40845.0589-.12207.01831-.24487.03186-.36621.05591-.14526.02869-.28613.06811-.42847.10455-.11035.02826-.22168.05219-.3313.08521-.13549.041-.2666.09155-.39917.13952-.11425.0412-.22924.07862-.34179.12519-.11963.04962-.23462.10772-.35132.1629-.12061.05688-.24219.11047-.36035.17371-.10645.057-.20752.12194-.311.18359-.12134.07214-.24389.141-.36206.22009-.1062.071-.20581.15045-.3081.22638-.10767.07965-.21729.15473-.32178.24048-.14478.119-.28076.248-.417.37671-.05445.05151-.11255.09668-.166.15-.0564.0564-.10425.11786-.15869.17554-.12524.13287-.25122.26532-.36719.40649-.09106.11072-.17114.22718-.25537.34156-.07056.09564-.14477.188-.21094.28686-.085.12659-.15893.25781-.23584.38806-.05566.09443-.11523.18622-.16723.28308-.06909.12916-.12818.26185-.1897.3938-.04932.10547-.10205.20874-.147.31665-.05225.12653-.095.25568-.14063.38428-.042.11817-.08764.2345-.12426.35517-.03907.1289-.06788.25982-.10035.39019-.03051.123-.06518.24414-.09008.36933-.03.15149-.04859.30444-.06983.45715-.01465.1059-.03516.2099-.04565.31714a7.97366,7.97366,0,0,0-.04.79706v47.99487a8,8,0,0,0,16,0V175.59863l20.28418,20.28418a96.11136,96.11136,0,0,0,135.76562,0,8.00052,8.00052,0,0,0-11.31445-11.31445Z"></path></g></svg>`, 8, true), _tmpl$10 = template(`<svg><polyline points="176.167 99.716 224.167 99.716 224.167 51.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M65.7746,65.7746a88,88,0,0,1,124.4508,0l33.94112,33.94113" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><polyline points="79.833 156.284 31.833 156.284 31.833 204.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></polyline></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M190.2254,190.2254a88,88,0,0,1-124.4508,0L31.83348,156.28427" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><polyline points="176.167 99.716 224.167 99.716 224.167 51.716" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$15 = template(`<svg><path d="M65.7746,65.7746a88,88,0,0,1,124.4508,0l33.94112,33.94113" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$16 = template(`<svg><polyline points="79.833 156.284 31.833 156.284 31.833 204.284" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></polyline></svg>`, 4, true), _tmpl$17 = template(`<svg><path d="M190.2254,190.2254a88,88,0,0,1-124.4508,0L31.83348,156.28427" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$18 = 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; }()]; case "duotone": return [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 "fill": return _tmpl$9.cloneNode(true); case "light": return [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; }()]; case "thin": return [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; }(), function () { var _el$17 = _tmpl$17.cloneNode(true); setAttribute(_el$17, "stroke", color); return _el$17; }()]; case "regular": return [function () { var _el$18 = _tmpl$5.cloneNode(true); setAttribute(_el$18, "stroke", color); return _el$18; }(), function () { var _el$19 = _tmpl$6.cloneNode(true); setAttribute(_el$19, "stroke", color); return _el$19; }(), function () { var _el$20 = _tmpl$7.cloneNode(true); setAttribute(_el$20, "stroke", color); return _el$20; }(), function () { var _el$21 = _tmpl$8.cloneNode(true); setAttribute(_el$21, "stroke", color); return _el$21; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var ArrowsClockwise = function ArrowsClockwise(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$22 = _tmpl$18.cloneNode(true), _el$23 = _el$22.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$22) : ref = _el$22; setAttribute(_el$22, "width", size != null ? size : contextSize); setAttribute(_el$22, "height", size != null ? size : contextSize); setAttribute(_el$22, "fill", color != null ? color : contextColor); setAttribute(_el$22, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$22, restContext, true, true); spread(_el$22, restProps, true, true); insert(_el$22, children, _el$23); insert(_el$22, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$22; }(); }; export default ArrowsClockwise; //# sourceMappingURL=ArrowsClockwise.esm.js.map