phosphor-solid
Version:
A clean and friendly icon family for Solid-js
220 lines (157 loc) • 11.5 kB
JavaScript
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><path d="M195.88225,105.37258,128,173.25483,82.74517,128l67.88225-67.88225c25.70415-25.70415,51.40829-25.45342,62.37042-23.81787a7.96343,7.96343,0,0,1,6.70228,6.70228C221.33567,53.96429,221.5864,79.66843,195.88225,105.37258Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$2 = template(`<svg><path d="M184.56854,116.68629v64.56854a8,8,0,0,1-2.34314,5.65686l-32.34176,32.34176a8,8,0,0,1-13.5015-4.08793L128,173.25483" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$3 = template(`<svg><path d="M139.31371,71.43146H74.74517a8,8,0,0,0-5.65686,2.34314L36.74655,106.11636a8,8,0,0,0,4.08793,13.5015L82.74517,128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><path d="M90.56048,192.38144c-15.05815,26.12823-53.07015,26.12823-53.07015,26.12823s0-38.012,26.12827-53.07018" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><path d="M94.05887,184.56854c-11.3137,33.94113-56.56854,33.94113-56.56854,33.94113s0-45.25484,33.94113-56.56854Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$6 = template(`<svg><path d="M184.56854,116.68629v64.56854a8,8,0,0,1-2.34314,5.65686l-32.34176,32.34176a8,8,0,0,1-13.5015-4.08793L128,173.25483Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$7 = template(`<svg><path d="M139.31371,71.43146H74.74517a8,8,0,0,0-5.65686,2.34314L36.74655,106.11636a8,8,0,0,0,4.08793,13.5015L82.74517,128Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$8 = template(`<svg><path d="M94.05887,184.56854c-11.3137,33.94113-56.56854,33.94113-56.56854,33.94113s0-45.25484,33.94113-56.56854" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$9 = template(`<svg><path d="M195.88225,105.37258,128,173.25483,82.74517,128l67.88225-67.88225c25.70415-25.70415,51.40829-25.45342,62.37042-23.81787a7.96343,7.96343,0,0,1,6.70228,6.70228C221.33567,53.96429,221.5864,79.66843,195.88225,105.37258Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$10 = template(`<svg><path d="M184.56854,116.68629v64.56854a8,8,0,0,1-2.34314,5.65686l-32.34176,32.34176a8,8,0,0,1-13.5015-4.08793L128,173.25483" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$11 = template(`<svg><path d="M139.31371,71.43146H74.74517a8,8,0,0,0-5.65686,2.34314L36.74655,106.11636a8,8,0,0,0,4.08793,13.5015L82.74517,128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$12 = template(`<svg><g><path d="M96.58887,176.979a8.00118,8.00118,0,0,0-10.12012,5.06006C79.916,201.69775,58.57422,207.78613,46.332,209.669c1.88281-12.24854,7.97168-33.58594,27.62988-40.13819a8.00027,8.00027,0,1,0-5.06054-15.1792c-16.36035,5.45362-28.37891,18.45069-34.75782,37.58692a92.73335,92.73335,0,0,0-4.65332,26.57129,8.00041,8.00041,0,0,0,8,8,92.73569,92.73569,0,0,0,26.57129-4.65332c19.13575-6.37842,32.13282-18.39747,37.58692-34.75782A8.001,8.001,0,0,0,96.58887,176.979Z"></path><path d="M227.6123,41.82031A15.879,15.879,0,0,0,214.17871,28.3877c-11.28613-1.68409-40.62109-2.51319-69.209,26.07324l-8.97046,8.9707H74.74512a15.90118,15.90118,0,0,0-11.31446,4.686L31.08887,100.46a16.00008,16.00008,0,0,0,8.17675,27.00244l39.53492,7.90723,41.82983,41.82959,7.90674,39.53516a15.99768,15.99768,0,0,0,27.00391,8.17578l32.34179-32.34229a15.8955,15.8955,0,0,0,4.68555-11.313V120l8.9707-8.9707C230.127,82.44141,229.29688,53.10645,227.6123,41.82031ZM74.74512,79.43164h45.25439l-39.884,39.88379-37.71216-7.542ZM176.56836,181.25488l-32.3418,32.3418-7.54223-37.71191,39.884-39.88428Z"></path></g></svg>`, 8, true),
_tmpl$13 = template(`<svg><path d="M94.05887,184.56854c-11.3137,33.94113-56.56854,33.94113-56.56854,33.94113s0-45.25484,33.94113-56.56854" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$14 = template(`<svg><path d="M195.88225,105.37258,128,173.25483,82.74517,128l67.88225-67.88225c25.70415-25.70415,51.40829-25.45342,62.37042-23.81787a7.96343,7.96343,0,0,1,6.70228,6.70228C221.33567,53.96429,221.5864,79.66843,195.88225,105.37258Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$15 = template(`<svg><path d="M184.56854,116.68629v64.56854a8,8,0,0,1-2.34314,5.65686l-32.34176,32.34176a8,8,0,0,1-13.5015-4.08793L128,173.25483" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$16 = template(`<svg><path d="M139.31371,71.43146H74.74517a8,8,0,0,0-5.65686,2.34314L36.74655,106.11636a8,8,0,0,0,4.08793,13.5015L82.74517,128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$17 = template(`<svg><path d="M94.05887,184.56854c-11.3137,33.94113-56.56854,33.94113-56.56854,33.94113s0-45.25484,33.94113-56.56854" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$18 = template(`<svg><path d="M195.88225,105.37258,128,173.25483,82.74517,128l67.88225-67.88225c25.70415-25.70415,51.40829-25.45342,62.37042-23.81787a7.96343,7.96343,0,0,1,6.70228,6.70228C221.33567,53.96429,221.5864,79.66843,195.88225,105.37258Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$19 = template(`<svg><path d="M184.56854,116.68629v64.56854a8,8,0,0,1-2.34314,5.65686l-32.34176,32.34176a8,8,0,0,1-13.5015-4.08793L128,173.25483" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$20 = template(`<svg><path d="M139.31371,71.43146H74.74517a8,8,0,0,0-5.65686,2.34314L36.74655,106.11636a8,8,0,0,0,4.08793,13.5015L82.74517,128" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$21 = 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 [_tmpl$5.cloneNode(true), _tmpl$6.cloneNode(true), _tmpl$7.cloneNode(true), 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;
}(), function () {
var _el$11 = _tmpl$11.cloneNode(true);
setAttribute(_el$11, "stroke", color);
return _el$11;
}()];
case "fill":
return _tmpl$12.cloneNode(true);
case "light":
return [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;
}()];
case "regular":
return [function () {
var _el$21 = _tmpl$8.cloneNode(true);
setAttribute(_el$21, "stroke", color);
return _el$21;
}(), function () {
var _el$22 = _tmpl$9.cloneNode(true);
setAttribute(_el$22, "stroke", color);
return _el$22;
}(), function () {
var _el$23 = _tmpl$10.cloneNode(true);
setAttribute(_el$23, "stroke", color);
return _el$23;
}(), function () {
var _el$24 = _tmpl$11.cloneNode(true);
setAttribute(_el$24, "stroke", color);
return _el$24;
}()];
default:
console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".');
return null;
}
};
var RocketLaunch = function RocketLaunch(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$25 = _tmpl$21.cloneNode(true),
_el$26 = _el$25.firstChild;
var _ref$ = ref;
typeof _ref$ === "function" ? _ref$(_el$25) : ref = _el$25;
setAttribute(_el$25, "width", size != null ? size : contextSize);
setAttribute(_el$25, "height", size != null ? size : contextSize);
setAttribute(_el$25, "fill", color != null ? color : contextColor);
setAttribute(_el$25, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined);
spread(_el$25, restContext, true, true);
spread(_el$25, restProps, true, true);
insert(_el$25, children, _el$26);
insert(_el$25, function () {
return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor);
}, null);
return _el$25;
}();
};
export default RocketLaunch;
//# sourceMappingURL=RocketLaunch.esm.js.map