UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

184 lines (131 loc) 8.6 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><circle cx="128" cy="128" r="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></circle></svg>`, 4, true), _tmpl$2 = template(`<svg><line x1="128" y1="128" x2="184" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$3 = template(`<svg><line x1="167.59798" y1="167.59798" x2="128" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$4 = template(`<svg><circle cx="128" cy="128" r="96" opacity="0.2"></circle></svg>`, 4, true), _tmpl$5 = template(`<svg><circle cx="128" cy="128" r="96" fill="none" stroke-miterlimit="10" stroke-width="16"></circle></svg>`, 4, true), _tmpl$6 = template(`<svg><line x1="128" y1="128" x2="184" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$7 = template(`<svg><line x1="167.59798" y1="167.59798" x2="128" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$8 = template(`<svg><path d="M128,24A104,104,0,1,0,232,128,104.11791,104.11791,0,0,0,128,24Zm56,112H147.31348l25.9414,25.94141a7.99983,7.99983,0,0,1-11.31347,11.31347l-39.59766-39.59765c-.18652-.18653-.36328-.38282-.53076-.58692-.07373-.08984-.1377-.18457-.20654-.27636-.0879-.1167-.17823-.23145-.25977-.353-.07471-.11182-.13916-.22754-.208-.34229-.06494-.10937-.13379-.21582-.19385-.32861-.0625-.1167-.11572-.23731-.17187-.35693-.05566-.11719-.11426-.23243-.16406-.353-.04785-.11572-.08643-.23389-.12842-.35108-.04639-.12841-.0957-.25585-.13574-.38769-.03565-.11816-.06153-.23779-.0918-.35693-.03369-.13379-.0708-.26563-.09814-.40186-.02686-.1377-.04346-.27637-.063-.41553-.01758-.11963-.04-.23681-.05176-.3584q-.03808-.38232-.03906-.7666L120,128l.001-.022q.00145-.38452.03906-.7666c.01172-.12159.03418-.23877.05176-.3584.01953-.13916.03613-.27783.063-.41553.02734-.13623.06445-.26807.09814-.40186.03027-.11914.05615-.23876.0918-.35693.04-.13183.08935-.25928.13574-.38769.042-.11719.08057-.23536.12842-.35108.0498-.1206.1084-.23584.16406-.353.05615-.11962.10937-.24023.17187-.35693.06006-.11279.12891-.21924.19385-.32861.06885-.11475.1333-.23047.208-.34229.08154-.12158.17187-.23633.25977-.353.06884-.09179.13281-.18652.20654-.27636a8.04468,8.04468,0,0,1,1.1167-1.1167c.09179-.0752.188-.14014.28174-.21094.11474-.08594.22705-.1748.34668-.25439.11425-.07666.23242-.14258.3496-.21241.10694-.064.21143-.13134.32129-.18994.11963-.064.24268-.11816.36475-.17578.11475-.0542.22754-.11133.34473-.16015.11914-.04932.24072-.08887.36132-.13184.12549-.04541.249-.09326.37745-.13233.12207-.03662.24609-.064.36914-.09472.12988-.03272.25732-.06885.38965-.09522.14306-.02832.28808-.04541.43261-.06591.11377-.01612.22608-.03809.34131-.04932q.39477-.03956.7915-.04H184a8,8,0,0,1,0,16Z"></path></svg>`, 4, true), _tmpl$9 = template(`<svg><circle cx="128" cy="128" r="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></circle></svg>`, 4, true), _tmpl$10 = template(`<svg><line x1="128" y1="128" x2="184" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$11 = template(`<svg><line x1="167.59798" y1="167.59798" x2="128" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$12 = template(`<svg><circle cx="128" cy="128" r="96" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></circle></svg>`, 4, true), _tmpl$13 = template(`<svg><line x1="128" y1="128" x2="184" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$14 = template(`<svg><line x1="167.59798" y1="167.59798" x2="128" y2="128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$15 = 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; }()]; case "duotone": return [_tmpl$4.cloneNode(true), 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; }()]; case "fill": return _tmpl$8.cloneNode(true); case "light": 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; }()]; case "thin": 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; }()]; case "regular": return [function () { var _el$15 = _tmpl$5.cloneNode(true); setAttribute(_el$15, "stroke", color); return _el$15; }(), function () { var _el$16 = _tmpl$6.cloneNode(true); setAttribute(_el$16, "stroke", color); return _el$16; }(), function () { var _el$17 = _tmpl$7.cloneNode(true); setAttribute(_el$17, "stroke", color); return _el$17; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var ClockAfternoon = function ClockAfternoon(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$18 = _tmpl$15.cloneNode(true), _el$19 = _el$18.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$18) : ref = _el$18; setAttribute(_el$18, "width", size != null ? size : contextSize); setAttribute(_el$18, "height", size != null ? size : contextSize); setAttribute(_el$18, "fill", color != null ? color : contextColor); setAttribute(_el$18, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$18, restContext, true, true); spread(_el$18, restProps, true, true); insert(_el$18, children, _el$19); insert(_el$18, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$18; }(); }; export default ClockAfternoon; //# sourceMappingURL=ClockAfternoon.esm.js.map