UNPKG

phosphor-solid

Version:

A clean and friendly icon family for Solid-js

243 lines (174 loc) 12 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><line x1="48" y1="40" x2="208" y2="216" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></line></svg>`, 4, true), _tmpl$2 = template(`<svg><path d="M73.99446,68.59357C33.22519,89.23912,16,128,16,128s32,71.99219,112,71.99219a118.0238,118.0238,0,0,0,53.99756-12.59461" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$3 = template(`<svg><path d="M214.40925,163.58516C232.12131,145.72513,240,128,240,128S208,55.99219,128,55.99219q-5.64912,0-10.9808.46371" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true), _tmpl$4 = template(`<svg><path d="M128,56C48,56,16,128.00781,16,128.00781S48,200,128,200s112-71.99219,112-71.99219S208,56,128,56Zm0,112.0083a40,40,0,1,1,40-40A40.0001,40.0001,0,0,1,128,168.0083Z" opacity="0.2"></path></svg>`, 4, true), _tmpl$5 = template(`<svg><line x1="48" y1="40" x2="208" y2="216" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$6 = template(`<svg><path d="M154.9071,157.59781a40.00028,40.00028,0,0,1-53.8142-59.19562" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$7 = template(`<svg><path d="M73.99446,68.59357C33.22519,89.23912,16,128,16,128s32,71.99219,112,71.99219a118.0238,118.0238,0,0,0,53.99756-12.59461" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$8 = template(`<svg><path d="M208.60953,169.09937C230.41132,149.5722,240,128,240,128S208,55.99219,128,55.99219a125.31923,125.31923,0,0,0-20.68221,1.68414" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$9 = template(`<svg><path d="M135.52737,88.70779a40.02413,40.02413,0,0,1,32.29785,35.52875" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$10 = template(`<svg><g><path d="M247.31055,124.75842c-.35157-.79-8.81934-19.57519-27.65332-38.41113C194.57324,61.26038,162.87793,47.99963,128,47.99963a133.97063,133.97063,0,0,0-21.99512,1.793,8.00028,8.00028,0,0,0-4.60254,13.27246L202.69336,174.485a8.00126,8.00126,0,0,0,11.25781.57715c22.8125-20.43359,32.93946-42.86035,33.35938-43.80566A8.00282,8.00282,0,0,0,247.31055,124.75842Z"></path><path d="M53.91992,34.6178A8.0006,8.0006,0,1,0,42.08008,45.38147l19.24121,21.165c-36.321,22.291-51.93628,56.648-52.63184,58.21191a8.00282,8.00282,0,0,0,0,6.49805c.35157.791,8.82032,19.57226,27.6543,38.4043,25.084,25.081,56.77832,38.33886,91.65625,38.33886a126.97091,126.97091,0,0,0,52.06567-10.834l22.01441,24.21582a8.0006,8.0006,0,0,0,11.83984-10.76367ZM128,164.00012a35.98594,35.98594,0,0,1-29.52319-56.582l47.20459,51.9248A35.78086,35.78086,0,0,1,128,164.00012Z"></path></g></svg>`, 8, true), _tmpl$11 = template(`<svg><line x1="48" y1="40" x2="208" y2="216" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></line></svg>`, 4, true), _tmpl$12 = template(`<svg><path d="M154.9071,157.59781a40.00028,40.00028,0,0,1-53.8142-59.19562" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$13 = template(`<svg><path d="M73.99446,68.59357C33.22519,89.23912,16,128,16,128s32,71.99219,112,71.99219a118.0238,118.0238,0,0,0,53.99756-12.59461" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$14 = template(`<svg><path d="M208.60953,169.09937C230.41132,149.5722,240,128,240,128S208,55.99219,128,55.99219a125.31923,125.31923,0,0,0-20.68221,1.68414" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$15 = template(`<svg><path d="M135.52737,88.70779a40.02413,40.02413,0,0,1,32.29785,35.52875" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true), _tmpl$16 = template(`<svg><line x1="48" y1="40" x2="208" y2="216" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></line></svg>`, 4, true), _tmpl$17 = template(`<svg><path d="M154.9071,157.59781a40.00028,40.00028,0,0,1-53.8142-59.19562" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$18 = template(`<svg><path d="M73.99446,68.59357C33.22519,89.23912,16,128,16,128s32,71.99219,112,71.99219a118.0238,118.0238,0,0,0,53.99756-12.59461" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$19 = template(`<svg><path d="M208.60953,169.09937C230.41132,149.5722,240,128,240,128S208,55.99219,128,55.99219a125.31923,125.31923,0,0,0-20.68221,1.68414" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$20 = template(`<svg><path d="M135.52737,88.70779a40.02413,40.02413,0,0,1,32.29785,35.52875" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true), _tmpl$21 = template(`<svg><line x1="48" y1="40.00122" x2="208" y2="216.00122" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line></svg>`, 4, true), _tmpl$22 = template(`<svg><path d="M154.9071,157.599a40.00028,40.00028,0,0,1-53.8142-59.19562" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$23 = template(`<svg><path d="M73.99446,68.59479C33.22519,89.24034,16,128.00122,16,128.00122s32,71.99219,112,71.99219a118.0238,118.0238,0,0,0,53.99756-12.59461" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$24 = template(`<svg><path d="M208.60953,169.10059C230.41132,149.57342,240,128.00122,240,128.00122S208,55.99341,128,55.99341a125.31923,125.31923,0,0,0-20.68221,1.68414" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$25 = template(`<svg><path d="M135.52737,88.709a40.02411,40.02411,0,0,1,32.29785,35.52874" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true), _tmpl$26 = 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; }(), 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; }()]; case "fill": return _tmpl$10.cloneNode(true); case "light": return [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; }()]; case "thin": return [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; }(), 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 "regular": return [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; }()]; default: console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'); return null; } }; var EyeSlash = function EyeSlash(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$26 = _tmpl$26.cloneNode(true), _el$27 = _el$26.firstChild; var _ref$ = ref; typeof _ref$ === "function" ? _ref$(_el$26) : ref = _el$26; setAttribute(_el$26, "width", size != null ? size : contextSize); setAttribute(_el$26, "height", size != null ? size : contextSize); setAttribute(_el$26, "fill", color != null ? color : contextColor); setAttribute(_el$26, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined); spread(_el$26, restContext, true, true); spread(_el$26, restProps, true, true); insert(_el$26, children, _el$27); insert(_el$26, function () { return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor); }, null); return _el$26; }(); }; export default EyeSlash; //# sourceMappingURL=EyeSlash.esm.js.map