UNPKG

@fe6/icon-img

Version:

Water Icon 的纯 HTML 图标

10 lines (9 loc) 4.29 kB
var IconsBytedTheme=function(c){"use strict";var v={size:"1em",spin:!1,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{outStrokeColor:"#333",outFillColor:"transparent"},filled:{outStrokeColor:"#333",outFillColor:"#fff"},twoTone:{outStrokeColor:"#333",outFillColor:"#2f88ff"},multiColor:{outStrokeColor:"#333",outFillColor:"#2f88ff",innerStrokeColor:"#fff",innerFillColor:"#43ccf8"}},prefix:"cube"},f=function(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)},C=function(l,r,e){var o=r?.colors||[],t=[],n=r?.theme||e.theme;switch(n){case"outline":t.push(typeof o[0]=="string"?o[0]:e.colors.outline.outStrokeColor),t.push(typeof o[1]=="string"?o[1]:e.colors.outline.outFillColor),t.push(typeof o[0]=="string"?o[0]:e.colors.outline.outStrokeColor),t.push(typeof o[1]=="string"?o[1]:e.colors.outline.outFillColor);break;case"filled":t.push(typeof o[0]=="string"?o[0]:e.colors.filled.outStrokeColor),t.push(typeof o[0]=="string"?o[0]:e.colors.filled.outStrokeColor),t.push(typeof o[1]=="string"?o[1]:e.colors.filled.outFillColor),t.push(typeof o[1]=="string"?o[1]:e.colors.filled.outFillColor);break;case"twoTone":t.push(typeof o[0]=="string"?o[0]:e.colors.twoTone.outStrokeColor),t.push(typeof o[1]=="string"?o[1]:e.colors.twoTone.outFillColor),t.push(typeof o[0]=="string"?o[0]:e.colors.twoTone.outStrokeColor),t.push(typeof o[1]=="string"?o[1]:e.colors.twoTone.outFillColor);break;case"multiColor":t.push(typeof o[0]=="string"?o[0]:e.colors.multiColor.outStrokeColor),t.push(typeof o[1]=="string"?o[1]:e.colors.multiColor.outFillColor),t.push(typeof o[2]=="string"?o[2]:e.colors.multiColor.innerStrokeColor),t.push(typeof o[3]=="string"?o[3]:e.colors.multiColor.innerFillColor);break}return{size:r?.size||e.size,strokeWidth:r?.strokeWidth||e.strokeWidth,strokeLinecap:r?.strokeLinecap||e.strokeLinecap,strokeLinejoin:r?.strokeLinejoin||e.strokeLinejoin,colors:t,svg:r?.svg||"",id:l}},k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",m=function(l,r){for(var e="",o=0,t=l.length,n,s,u,i=r?g:k;o<t;){if(n=l.charCodeAt(o++)&255,o===t){e+=i.charAt(n>>2),e+=i.charAt((n&3)<<4),e+="==";break}if(s=l.charCodeAt(o++),o===t){e+=i.charAt(n>>2),e+=i.charAt((n&3)<<4|(s&240)>>4),e+=i.charAt((s&15)<<2),e+="=";break}u=l.charCodeAt(o++),e+=i.charAt(n>>2),e+=i.charAt((n&3)<<4|(s&240)>>4),e+=i.charAt((s&15)<<2|(u&192)>>6),e+=i.charAt(u&63)}return e},p=function(l){var r="",e,o,t=l.length;for(e=0;e<t;e++)o=l.charCodeAt(e),o>=1&&o<=127?r+=l.charAt(e):o>2047?(r+=String.fromCharCode(224|o>>12&15),r+=String.fromCharCode(128|o>>6&63),r+=String.fromCharCode(128|o>>0&63)):(r+=String.fromCharCode(192|o>>6&31),r+=String.fromCharCode(128|o>>0&63));return r},y=v,S=function(){return y},L=function(l,r,e){return function(o){var t=S(),n=["".concat(t.prefix,"-icon")];n.push("".concat(t.prefix,"-icon-").concat(l)),r&&t.rtl&&n.push("".concat(t.prefix,"-icon-rtl")),o!=null&&o.spin&&n.push("".concat(t.prefix,"-icon-spin"));var s=C(f(),o,t),u=e(s),i=m(p(u)),h="data:image/svg+xml;base64,".concat(i);return o!=null&&o.base64?h:'<span class="'.concat(n.join(" "),`"> <img class="`).concat(t.prefix,'-icon-img" src="').concat(h,`" /> </span>`)}},d=function(l){var r,e;return`<?xml version="1.0" encoding="UTF-8"?> <svg width="`.concat(l.size,'" height="').concat(l.size,`" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <g> <rect width="48" height="48" fill="white" fill-opacity="0.01" stroke-linejoin="`).concat(l.strokeLinejoin,'" stroke-width="').concat(l.strokeWidth,`" stroke="none" fill-rule="evenodd"/> <path d="M18,6 C18,9.3137085 20.6862915,12 24,12 C27.3137085,12 30,9.3137085 30,6 L35.4545455,6 L42,15.8181818 L36.2727273,20.7272727 L36.2727273,42 L11.7272727,42 L11.7272727,20.7272727 L6,15.8181818 L12.5454545,6 L18,6 Z" stroke="`).concat((r=l.colors)===null||r===void 0?void 0:r[0],'" stroke-width="').concat(l.strokeWidth,'" fill="').concat((e=l.colors)===null||e===void 0?void 0:e[1],'" fill-rule="nonzero" stroke-linejoin="').concat(l.strokeLinejoin,`"/> </g>; </svg>`)},w=L("byted-theme",!1,d);return c.default=w,c.getIconBytedThemeSvgHtml=d,Object.defineProperty(c,"__esModule",{value:!0}),c}({});