UNPKG

@fe6/icon-img

Version:

Water Icon 的纯 HTML 图标

8 lines (7 loc) 3.99 kB
var IconsBytedFullwidth=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,t){var o=r?.colors||[],e=[],i=r?.theme||t.theme;switch(i){case"outline":e.push(typeof o[0]=="string"?o[0]:t.colors.outline.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:t.colors.outline.outFillColor),e.push(typeof o[0]=="string"?o[0]:t.colors.outline.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:t.colors.outline.outFillColor);break;case"filled":e.push(typeof o[0]=="string"?o[0]:t.colors.filled.outStrokeColor),e.push(typeof o[0]=="string"?o[0]:t.colors.filled.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:t.colors.filled.outFillColor),e.push(typeof o[1]=="string"?o[1]:t.colors.filled.outFillColor);break;case"twoTone":e.push(typeof o[0]=="string"?o[0]:t.colors.twoTone.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:t.colors.twoTone.outFillColor),e.push(typeof o[0]=="string"?o[0]:t.colors.twoTone.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:t.colors.twoTone.outFillColor);break;case"multiColor":e.push(typeof o[0]=="string"?o[0]:t.colors.multiColor.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:t.colors.multiColor.outFillColor),e.push(typeof o[2]=="string"?o[2]:t.colors.multiColor.innerStrokeColor),e.push(typeof o[3]=="string"?o[3]:t.colors.multiColor.innerFillColor);break}return{size:r?.size||t.size,strokeWidth:r?.strokeWidth||t.strokeWidth,strokeLinecap:r?.strokeLinecap||t.strokeLinecap,strokeLinejoin:r?.strokeLinejoin||t.strokeLinejoin,colors:e,svg:r?.svg||"",id:l}},p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",g=function(l,r){for(var t="",o=0,e=l.length,i,s,u,n=r?k:p;o<e;){if(i=l.charCodeAt(o++)&255,o===e){t+=n.charAt(i>>2),t+=n.charAt((i&3)<<4),t+="==";break}if(s=l.charCodeAt(o++),o===e){t+=n.charAt(i>>2),t+=n.charAt((i&3)<<4|(s&240)>>4),t+=n.charAt((s&15)<<2),t+="=";break}u=l.charCodeAt(o++),t+=n.charAt(i>>2),t+=n.charAt((i&3)<<4|(s&240)>>4),t+=n.charAt((s&15)<<2|(u&192)>>6),t+=n.charAt(u&63)}return t},m=function(l){var r="",t,o,e=l.length;for(t=0;t<e;t++)o=l.charCodeAt(t),o>=1&&o<=127?r+=l.charAt(t):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,w=function(){return y},S=function(l,r,t){return function(o){var e=w(),i=["".concat(e.prefix,"-icon")];i.push("".concat(e.prefix,"-icon-").concat(l)),r&&e.rtl&&i.push("".concat(e.prefix,"-icon-rtl")),o!=null&&o.spin&&i.push("".concat(e.prefix,"-icon-spin"));var s=C(f(),o,e),u=t(s),n=g(m(u)),h="data:image/svg+xml;base64,".concat(n);return o!=null&&o.base64?h:'<span class="'.concat(i.join(" "),`"> <img class="`).concat(e.prefix,'-icon-img" src="').concat(h,`" /> </span>`)}},d=function(l){var r;return`<?xml version="1.0" encoding="UTF-8"?> <svg width="`.concat(l.size,'" height="').concat(l.size,`" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="48" height="48" fill="white" fill-opacity="0.01"/> <path d="M42 6V42M17 19L12 24M12 24L17 29M12 24H36M31 19L36 24M36 24L31 29M6 6L6 42" stroke="`).concat((r=l.colors)===null||r===void 0?void 0:r[0],'" stroke-width="').concat(l.strokeWidth,'" stroke-linecap="').concat(l.strokeLinecap,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/> </svg>`)},F=S("byted-fullwidth",!1,d);return c.default=F,c.getIconBytedFullwidthSvgHtml=d,Object.defineProperty(c,"__esModule",{value:!0}),c}({});