UNPKG

@hyper.fun/ionicons4-ios-bug

Version:

👉 https://hyper.fun/c/ionicons4-ios-bug/1.3.0

93 lines (87 loc) • 4.84 kB
/******/ // The require scope /******/ var __wp_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __wp_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__wp_require__.o(definition, key) && !__wp_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __wp_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /************************************************************************/ var __wp_exports__ = {}; // EXPORTS __wp_require__.d(__wp_exports__, { "Z": () => (/* binding */ AwesomeHfc) }); ;// CONCATENATED MODULE: ./.hfc/propnames.js /* harmony default export */ const propnames = ([["size","class","color"],[],[]]); ;// CONCATENATED MODULE: ./src/index.ts const svgAttrs = [["xmlns","http://www.w3.org/2000/svg"],["x","0px"],["y","0px"],["viewBox","0 0 512 512"],["enable-background","new 0 0 512 512"],["space","preserve"]]; const svgHtml = "<g> <path d=\"M374.6,127.3C345.4,88.5,303.1,64,256,64c-47.1,0-89.4,24.5-118.6,63.3c6.4,15.6,15.8,30,28.1,42.3c24.2,24.2,56.3,37.5,90.5,37.5c34.2,0,66.3-13.3,90.5-37.5C358.8,157.3,368.3,143,374.6,127.3z\"></path> <path d=\"M122,150c0,0-3.8-1.6-5.9-3.3c-2.1-1.7-5-4.9-6.5-8.4c5.4-11.3,1.2-25-9.9-31.3c-11.8-6.6-26.9-2.2-33.1,10c-4.5,8.9-2.9,19.8,3.8,27.1c1.8,1.9,3.7,3.4,5.7,4.6c2.8,1.6,4.9,4,6.4,6.8c2.7,5.2,6.4,10.7,11.1,14.6c4.2,3.5,8.8,7.1,15.2,10.7c-7.2,20.3-11.6,42.3-12.5,65.4c-11,0.2-18.6,2.1-25.5,4.1c-4.2,1.2-8.2,3.4-11.8,5.9c-1-0.1-1.9-0.2-2.9-0.2c-13.8,0-24.8,11.6-24,25.6c0.7,11.8,10.3,21.5,22.2,22.4c11,0.8,20.6-5.9,24.3-15.5c2-5.3,6.7-9.2,12.4-9.9c1.9-0.2,3.9-0.4,6.2-0.4c3.2,33,13.3,63.5,28.6,89.2c-14.2,11-22.9,23-26.6,36.3c0,0-0.8,0.4-1.9,1.4c-1,0.8-1.9,1.6-2.8,2.6c-8.9,9.9-8.1,25,1.8,33.9c9.9,8.9,25,8.1,33.9-1.8c6.2-6.9,7.6-16.3,4.6-24.5c-2.2-6-0.7-12.7,3.9-17c1.6-1.5,3.5-3.1,5.7-4.9c27.1,31.7,59.4,52,99.7,54.4V232.9C190.8,230,144.4,195.3,122,150z\"></path> <path d=\"M456,256.1c-1,0-2,0.1-2.9,0.2c-3.6-2.5-7.7-4.6-11.8-5.9c-6.9-2-14.4-3.9-25.5-4.1c-1-23.1-5.4-45.2-12.5-65.4c6.4-3.6,11-7.2,15.2-10.7c4.9-4.1,8.7-10,11.5-15.3c1.3-2.5,3.3-4.5,5.8-5.9c0,0,0.1,0,0.1-0.1c11.6-6.5,15.7-21.1,9.2-32.7c-6.5-11.6-21.1-15.7-32.7-9.2c-11.1,6.2-15.3,19.9-9.9,31.3c-1.6,3.4-3.4,5.7-6.5,8.4c-2.3,2-5.9,4.3-5.9,4.3c-22.4,45.3-68.8,79-122,81.9V448c40.3-2.4,72.6-22.8,99.7-54.4c2.1,1.7,3.9,3.2,5.4,4.6c4.8,4.4,6.4,11.3,4.2,17.5c-3,8.1-1.5,17.5,4.7,24.3c8.9,9.9,24,10.7,33.9,1.8c9.9-8.9,10.7-24,1.8-33.9c-0.9-1-1.8-1.8-2.8-2.6c-1.1-0.9-1.9-1.4-1.9-1.4c-3.7-13.3-12.4-25.3-26.6-36.3c15.3-25.7,25.4-56.2,28.6-89.2c2.1,0,4.1,0.2,5.9,0.4c5.9,0.7,10.7,4.7,12.9,10.2c3.7,9.4,13.2,15.9,24.1,15.1c11.8-0.9,21.4-10.5,22.2-22.4C480.8,267.7,469.8,256.1,456,256.1z\"></path> </g>"; class AwesomeHfc { constructor(container, props) { this.container = container; for (let i = 0; i < svgAttrs.length; i++) { container.setAttribute(svgAttrs[i][0], svgAttrs[i][1]); } this.render(props); container.innerHTML = svgHtml; } changed(props) { this.render(props); } disconnected() { } render(props) { if (props.attrs.size) { this.container.setAttribute("width", props.attrs.size); this.container.setAttribute("height", props.attrs.size); } if (props.attrs.class) { this.container.setAttributeNS(null, "class", props.attrs.class); } if (props.attrs.color) { this.container.style.fill = props.attrs.color; this.container.style.color = props.attrs.color; } bindToElement(this.container, props.others); } } AwesomeHfc.tag = "svg"; AwesomeHfc.props = propnames; function bindToElement(elem, obj) { for (let i = 0, keys = Object.keys(obj); i < keys.length; i++) { const key = keys[i]; const value = obj[key]; if (key === "style") { if (typeof value === "object") { Object.assign(elem.style, value); } else { elem.style.cssText += value; } continue; } if (typeof value === "function") { elem[key] = function (event) { value(event); }; } else { elem.setAttribute(key, value); } } } var __wp_exports__default = __wp_exports__.Z; export { __wp_exports__default as default };