UNPKG

quarkd

Version:

Mobile UI Components built on Web Components.

2 lines (1 loc) 2.09 kB
import{d as t,a as e,f as n,r as o,w as i,s as r,M as c,h as s}from"./index22.js";var u=function(s){n(f,s);var u,l,a=(u=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,o=t(u);if(l){var i=t(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return e(this,n)});function f(){var t;return o(this,f),(t=a.call(this)).attachShadow({mode:"open"}).innerHTML="\n <style>\n ".concat(i,'\n </style>\n <svg class="icon" id="icon" aria-hidden="true" viewBox="0 0 1024 1024">\n ').concat('<path d="M260.821333 200.96l4.010667 3.541333L512 451.626667l247.168-247.125334a42.666667 42.666667 0 0 1 63.872 56.32l-3.541333 4.010667L572.373333 512l247.125334 247.168a42.666667 42.666667 0 0 1-56.32 63.872l-4.010667-3.541333L512 572.373333l-247.168 247.125334a42.666667 42.666667 0 0 1-63.872-56.32l3.541333-4.010667L451.626667 512 204.501333 264.832a42.666667 42.666667 0 0 1 56.32-63.872z" p-id="4080"></path>',"\n </svg>\n "),t.icon=t.shadowRoot.getElementById("icon"),t}return r(f,[{key:"connectedCallback",value:function(){this.upgradeProperty()}},{key:"attributeChangedCallback",value:function(t,e,n){if("color"===t)this.icon.style.color=n;else if("size"===t){var o=this.getFontSize();this.icon.style.fontSize="".concat(o)}}},{key:"upgradeProperty",value:function(){this.size=this.size,this.color=this.color}},{key:"getFontSize",value:function(){return c(this.size)}},{key:"size",get:function(){return this.getAttribute("size")},set:function(t){this.setAttribute("size",t)}},{key:"color",get:function(){return this.getAttribute("color")},set:function(t){this.setAttribute("color",t)}}],[{key:"observedAttributes",get:function(){return["size","color"]}}]),f}(s(HTMLElement));customElements.get("quark-icon-close")||customElements.define("quark-icon-close",u);