phosphor-solid
Version:
A clean and friendly icon family for Solid-js
150 lines (107 loc) • 7.83 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="M32,208V64a8,8,0,0,1,8-8H93.33333a8,8,0,0,1,4.8,1.6l27.73334,20.8a8,8,0,0,0,4.8,1.6H200a8,8,0,0,1,8,8v24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$2 = template(`<svg><path d="M32,208l29.93872-71.10446A8,8,0,0,1,69.3118,132h48.266a8,8,0,0,0,4.43761-1.3436l19.9692-13.3128A8,8,0,0,1,146.42221,116h82.32506a8,8,0,0,1,7.556,10.62816L208,208Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"></path></svg>`, 4, true),
_tmpl$3 = template(`<svg><path d="M69.416,128h48.16162a8.00257,8.00257,0,0,0,4.438-1.34375l19.96876-13.3125A8.00257,8.00257,0,0,1,146.42236,112H208V88a7.99977,7.99977,0,0,0-8-8H130.6665a7.9995,7.9995,0,0,1-4.7998-1.6001L98.1333,57.6001A7.9995,7.9995,0,0,0,93.3335,56H40a7.99977,7.99977,0,0,0-8,8V208l29.98828-74.97119A8.00025,8.00025,0,0,1,69.416,128Z" opacity="0.2"></path></svg>`, 4, true),
_tmpl$4 = template(`<svg><path d="M32,208V64a8,8,0,0,1,8-8H93.33333a8,8,0,0,1,4.8,1.6l27.73334,20.8a8,8,0,0,0,4.8,1.6H200a8,8,0,0,1,8,8v24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$5 = template(`<svg><path d="M32,208l29.98845-74.97113A8,8,0,0,1,69.41626,128h48.16153a8,8,0,0,0,4.43761-1.3436l19.9692-13.3128A8,8,0,0,1,146.42221,112h82.47838a8,8,0,0,1,7.58947,10.52982L208,208Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>`, 4, true),
_tmpl$6 = template(`<svg><path d="M241.88037,110.64453A16.03934,16.03934,0,0,0,228.90039,104H216V88a16.01833,16.01833,0,0,0-16-16H130.667l-27.7334-20.7998A16.10323,16.10323,0,0,0,93.333,48H40A16.01833,16.01833,0,0,0,24,64V208a8.06184,8.06184,0,0,0,.04541.8457c.00293.02735.00928.0542.0127.08155a7.86829,7.86829,0,0,0,.13818.81543c.01562.07226.03711.14306.05517.21484.05665.22559.12159.44775.19727.665.02734.07812.05566.15527.08545.23242q.126.33033.28076.64551c.03076.064.05908.12842.09229.1914a7.98135,7.98135,0,0,0,1.01318,1.49952c.06055.07129.12451.13769.1875.20654.14063.15381.28662.30176.43945.44434.07276.06787.145.13525.22022.20068.17187.14844.3501.28808.53418.42187.05469.04.10693.084.16308.12207a7.91673,7.91673,0,0,0,.77246.47168c.0254.01368.05225.02442.07764.0376a7.86248,7.86248,0,0,0,.73779.33594c.07129.02832.14405.05322.2168.07959q.31715.11572.64649.20459c.085.023.16894.04541.25439.06543.21875.05127.44092.09131.666.124.08154.01221.16259.02783.24462.0376A8.04614,8.04614,0,0,0,32,216H208a8.00117,8.00117,0,0,0,7.58984-5.47021l28.48926-85.47022A16.03873,16.03873,0,0,0,241.88037,110.64453ZM93.333,64l27.7334,20.7998A16.10323,16.10323,0,0,0,130.667,88H200v16H146.42188a15.9479,15.9479,0,0,0-8.875,2.6875L117.57812,120H69.416a15.92344,15.92344,0,0,0-14.85547,10.05762L40,166.45947V64Z"></path></svg>`, 4, true),
_tmpl$7 = template(`<svg><path d="M32,208V64a8,8,0,0,1,8-8H93.33333a8,8,0,0,1,4.8,1.6l27.73334,20.8a8,8,0,0,0,4.8,1.6H200a8,8,0,0,1,8,8v24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$8 = template(`<svg><path d="M32,208l29.98845-74.97113A8,8,0,0,1,69.41626,128h48.16153a8,8,0,0,0,4.43761-1.3436l19.9692-13.3128A8,8,0,0,1,146.42221,112h82.47838a8,8,0,0,1,7.58947,10.52982L208,208Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"></path></svg>`, 4, true),
_tmpl$9 = template(`<svg><path d="M32,208V64a8,8,0,0,1,8-8H93.33333a8,8,0,0,1,4.8,1.6l27.73334,20.8a8,8,0,0,0,4.8,1.6H200a8,8,0,0,1,8,8v24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$10 = template(`<svg><path d="M32,208l29.98845-74.97113A8,8,0,0,1,69.41626,128h48.16153a8,8,0,0,0,4.43761-1.3436l19.9692-13.3128A8,8,0,0,1,146.42221,112h82.47838a8,8,0,0,1,7.58947,10.52982L208,208Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"></path></svg>`, 4, true),
_tmpl$11 = 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;
}()];
case "duotone":
return [_tmpl$3.cloneNode(true), 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;
}()];
case "fill":
return _tmpl$6.cloneNode(true);
case "light":
return [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 "thin":
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;
}()];
case "regular":
return [function () {
var _el$11 = _tmpl$4.cloneNode(true);
setAttribute(_el$11, "stroke", color);
return _el$11;
}(), function () {
var _el$12 = _tmpl$5.cloneNode(true);
setAttribute(_el$12, "stroke", color);
return _el$12;
}()];
default:
console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".');
return null;
}
};
var FolderNotchOpen = function FolderNotchOpen(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$13 = _tmpl$11.cloneNode(true),
_el$14 = _el$13.firstChild;
var _ref$ = ref;
typeof _ref$ === "function" ? _ref$(_el$13) : ref = _el$13;
setAttribute(_el$13, "width", size != null ? size : contextSize);
setAttribute(_el$13, "height", size != null ? size : contextSize);
setAttribute(_el$13, "fill", color != null ? color : contextColor);
setAttribute(_el$13, "transform", mirrored || contextMirrored ? "scale(-1, 1)" : undefined);
spread(_el$13, restContext, true, true);
spread(_el$13, restProps, true, true);
insert(_el$13, children, _el$14);
insert(_el$13, function () {
return renderPathFor(weight != null ? weight : contextWeight, color != null ? color : contextColor);
}, null);
return _el$13;
}();
};
export default FolderNotchOpen;
//# sourceMappingURL=FolderNotchOpen.esm.js.map