UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

250 lines (179 loc) 14.8 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="96" cy="132.00002" r="16"></circle></svg>`, 4, true), _tmpl$2 = template(`<svg><circle cx="160" cy="132.00002" r="16"></circle></svg>`, 4, true), _tmpl$3 = template(`<svg><path d="M151.28891,174.57783l15.78018,31.56053a7.96793,7.96793,0,0,0,8.99115,4.20919c24.53876-5.99927,45.69294-16.45908,61.10024-29.85086a8.05225,8.05225,0,0,0,2.47192-8.38971L205.65855,58.86074a8.02121,8.02121,0,0,0-4.62655-5.10908,175.85294,175.85294,0,0,0-29.66452-9.18289,8.01781,8.01781,0,0,0-9.31925,5.28642L151.51644,81.45071" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M104.7111,174.57783,88.93092,206.13837a7.96794,7.96794,0,0,1-8.99115,4.20918c-24.53866-5.99924-45.69277-16.459-61.10006-29.85069a8.05224,8.05224,0,0,1-2.47193-8.38972L50.34158,58.8607a8.0212,8.0212,0,0,1,4.62655-5.1091,175.85321,175.85321,0,0,1,29.66439-9.18283,8.01781,8.01781,0,0,1,9.31924,5.28642l10.53179,31.59552" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><path d="M181.08378,168.00031C165.87906,173.0549,147.6274,176,128,176s-37.87933-2.94514-53.08411-7.9998" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$6 = template(`<svg><path d="M176,86.42155A174.46263,174.46263,0,0,0,128,80a174.46238,174.46238,0,0,0-48,6.42156" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><g opacity="0.2"><path d="M100.95624,182.08757l-12.02532,24.0508a7.96794,7.96794,0,0,1-8.99115,4.20918c-24.53866-5.99924-45.69277-16.459-61.10006-29.85069a8.05224,8.05224,0,0,1-2.47193-8.38972L50.34158,58.8607a8.0212,8.0212,0,0,1,4.62655-5.1091,175.85349,175.85349,0,0,1,29.66439-9.18283,8.0178,8.0178,0,0,1,9.31924,5.28642l7.97318,23.91964,0-.00016a192.44676,192.44676,0,0,1,52.15015,0l0,.00016,7.97318-23.91964a8.01781,8.01781,0,0,1,9.31925-5.28642A175.85294,175.85294,0,0,1,201.032,53.75166a8.02121,8.02121,0,0,1,4.62655,5.10908L239.6324,172.107a8.05225,8.05225,0,0,1-2.47192,8.38971c-15.4073,13.39178-36.56148,23.85159-61.10024,29.85086a7.96793,7.96793,0,0,1-8.99115-4.20919l-12.02517-24.05042A189.308,189.308,0,0,1,128,184a189.3097,189.3097,0,0,1-27.04382-1.912Z"></path></g></svg>`, 6, true), _tmpl$8 = template(`<svg><circle cx="96" cy="144.00002" r="12"></circle></svg>`, 4, true), _tmpl$9 = template(`<svg><circle cx="160" cy="144.00002" r="12"></circle></svg>`, 4, true), _tmpl$10 = template(`<svg><path d="M74.4017,80A175.32467,175.32467,0,0,1,128,72a175.32507,175.32507,0,0,1,53.59754,7.99971" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$11 = template(`<svg><path d="M181.59717,176.00041A175.32523,175.32523,0,0,1,128,184a175.32505,175.32505,0,0,1-53.59753-7.99971" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$12 = template(`<svg><path d="M155.04392,182.08789l12.02517,24.05047a7.96793,7.96793,0,0,0,8.99115,4.20919c24.53876-5.99927,45.69294-16.45908,61.10024-29.85086a8.05225,8.05225,0,0,0,2.47192-8.38971L205.65855,58.86074a8.02121,8.02121,0,0,0-4.62655-5.10908,175.85294,175.85294,0,0,0-29.66452-9.18289,8.01781,8.01781,0,0,0-9.31925,5.28642l-7.97318,23.91964" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M100.95624,182.08757l-12.02532,24.0508a7.96794,7.96794,0,0,1-8.99115,4.20918c-24.53866-5.99924-45.69277-16.459-61.10006-29.85069a8.05224,8.05224,0,0,1-2.47193-8.38972L50.34158,58.8607a8.0212,8.0212,0,0,1,4.62655-5.1091,175.85349,175.85349,0,0,1,29.66439-9.18283,8.0178,8.0178,0,0,1,9.31924,5.28642l7.97318,23.91964" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><path d="M247.29492,169.80862,213.32129,56.56252A15.953,15.953,0,0,0,204.084,46.35744l-.53759.16309.54931-.1919a185.84371,185.84371,0,0,0-34.53515-10.30712,8.00026,8.00026,0,1,0-3.12012,15.69336q6.72656,1.3374,13.18457,3.14746a7.97792,7.97792,0,0,1-4.46045,15.07714,188.85309,188.85309,0,0,0-93.26074-.18359,7.99484,7.99484,0,0,1-5.56592-14.87305l.03418.01172q6.4541-1.80762,13.20068-3.15185a8.00026,8.00026,0,0,0-3.12011-15.69336A185.88539,185.88539,0,0,0,51.917,46.35647a15.95771,15.95771,0,0,0-9.23828,10.20507L8.70508,169.80862a16.09028,16.09028,0,0,0,4.88672,16.72656c.95459.83008,1.9331,1.645,2.92529,2.45166.02344.019.04346.041.06689.06006,16.23047,13.166,37.50342,23.22461,61.51856,29.08691a7.99977,7.99977,0,0,0,3.79492-15.543,160.72734,160.72734,0,0,1-31.33789-11.0664l.06592.00488a7.99746,7.99746,0,0,1,8.59912-13.24219C78.21,186.74367,102.063,192,128,192s49.80664-5.26269,68.792-13.71924a7.997,7.997,0,0,1,8.58252,13.24854l.06592-.00488a160.72734,160.72734,0,0,1-31.33789,11.0664,7.99978,7.99978,0,1,0,3.79492,15.543c24.01514-5.8623,45.28809-15.9209,61.51856-29.08691.02441-.01953.04492-.042.06884-.062h.00049c.99121-.80615,1.96973-1.62109,2.92383-2.45068A16.09062,16.09062,0,0,0,247.29492,169.80862ZM96,156a12,12,0,1,1,12-12A12,12,0,0,1,96,156Zm64,0a12,12,0,1,1,12-12A12,12,0,0,1,160,156Z"></path></svg>`, 4, true), _tmpl$15 = template(`<svg><circle cx="96" cy="144.00002" r="10"></circle></svg>`, 4, true), _tmpl$16 = template(`<svg><circle cx="160" cy="144.00002" r="10"></circle></svg>`, 4, true), _tmpl$17 = template(`<svg><path d="M74.4017,80A175.32467,175.32467,0,0,1,128,72a175.32507,175.32507,0,0,1,53.59754,7.99971" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$18 = template(`<svg><path d="M181.59717,176.00041A175.32523,175.32523,0,0,1,128,184a175.32505,175.32505,0,0,1-53.59753-7.99971" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$19 = template(`<svg><path d="M155.04392,182.08789l12.02517,24.05047a7.96793,7.96793,0,0,0,8.99115,4.20919c24.53876-5.99927,45.69294-16.45908,61.10024-29.85086a8.05225,8.05225,0,0,0,2.47192-8.38971L205.65855,58.86074a8.02121,8.02121,0,0,0-4.62655-5.10908,175.85294,175.85294,0,0,0-29.66452-9.18289,8.01781,8.01781,0,0,0-9.31925,5.28642l-7.97318,23.91964" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$20 = template(`<svg><path d="M100.95624,182.08757l-12.02532,24.0508a7.96794,7.96794,0,0,1-8.99115,4.20918c-24.53866-5.99924-45.69277-16.459-61.10006-29.85069a8.05224,8.05224,0,0,1-2.47193-8.38972L50.34158,58.8607a8.0212,8.0212,0,0,1,4.62655-5.1091,175.85349,175.85349,0,0,1,29.66439-9.18283,8.0178,8.0178,0,0,1,9.31924,5.28642l7.97318,23.91964" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$21 = template(`<svg><circle cx="96" cy="144.00002" r="8"></circle></svg>`, 4, true), _tmpl$22 = template(`<svg><circle cx="160" cy="144.00002" r="8"></circle></svg>`, 4, true), _tmpl$23 = template(`<svg><path d="M74.4017,80A175.32467,175.32467,0,0,1,128,72a175.32507,175.32507,0,0,1,53.59754,7.99971" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$24 = template(`<svg><path d="M181.59717,176.00041A175.32523,175.32523,0,0,1,128,184a175.32505,175.32505,0,0,1-53.59753-7.99971" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$25 = template(`<svg><path d="M155.04392,182.08789l12.02517,24.05047a7.96793,7.96793,0,0,0,8.99115,4.20919c24.53876-5.99927,45.69294-16.45908,61.10024-29.85086a8.05225,8.05225,0,0,0,2.47192-8.38971L205.65855,58.86074a8.02121,8.02121,0,0,0-4.62655-5.10908,175.85294,175.85294,0,0,0-29.66452-9.18289,8.01781,8.01781,0,0,0-9.31925,5.28642l-7.97318,23.91964" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$26 = template(`<svg><path d="M100.95624,182.08757l-12.02532,24.0508a7.96794,7.96794,0,0,1-8.99115,4.20918c-24.53866-5.99924-45.69277-16.459-61.10006-29.85069a8.05224,8.05224,0,0,1-2.47193-8.38972L50.34158,58.8607a8.0212,8.0212,0,0,1,4.62655-5.1091,175.85349,175.85349,0,0,1,29.66439-9.18283,8.0178,8.0178,0,0,1,9.31924,5.28642l7.97318,23.91964" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$27 = 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 [_tmpl$.cloneNode(true), _tmpl$2.cloneNode(true), 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; }()]; case "duotone": return [_tmpl$7.cloneNode(true), _tmpl$8.cloneNode(true), _tmpl$9.cloneNode(true), 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 "fill": return _tmpl$14.cloneNode(true); case "light": return [_tmpl$15.cloneNode(true), _tmpl$16.cloneNode(true), 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; }()]; case "thin": return [_tmpl$21.cloneNode(true), _tmpl$22.cloneNode(true), 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; }(), function () { var _el$26 = _tmpl$26.cloneNode(true); setAttribute(_el$26, "stroke", color); return _el$26; }()]; case "regular": return [_tmpl$8.cloneNode(true), _tmpl$9.cloneNode(true), function () { var _el$29 = _tmpl$10.cloneNode(true); setAttribute(_el$29, "stroke", color); return _el$29; }(), function () { var _el$30 = _tmpl$11.cloneNode(true); setAttribute(_el$30, "stroke", color); return _el$30; }(), function () { var _el$31 = _tmpl$12.cloneNode(true); setAttribute(_el$31, "stroke", color); return _el$31; }(), function () { var _el$32 = _tmpl$13.cloneNode(true); setAttribute(_el$32, "stroke", color); return _el$32; }(), _tmpl$8.cloneNode(true), _tmpl$9.cloneNode(true), 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; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var DiscordLogo = function DiscordLogo(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$39 = _tmpl$27.cloneNode(true), _el$40 = _el$39.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$39) : ref = _el$39; setAttribute(_el$39, "width", size != null ? size : contextSize); setAttribute(_el$39, "height", size != null ? size : contextSize); setAttribute(_el$39, "fill", color != null ? color : contextColor); setAttribute(_el$39, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$39, restContext, true, true); spread(_el$39, restProps, true, true); insert(_el$39, children, _el$40); insert(_el$39, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$39; }(); }; export default DiscordLogo; //# sourceMappingURL=DiscordLogo.esm.js.map