quarkd
Version:
Mobile UI Components built on Web Components.
2 lines (1 loc) • 2.05 kB
JavaScript
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,a,l=(u=f,a=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(a){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=l.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="M652.544 140.458667a42.666667 42.666667 0 0 1 63.829333 56.405333l-3.584 4.010667-311.125333 310.314666 311.210667 312.021334a42.666667 42.666667 0 0 1 3.498666 56.32l-3.584 4.010666a42.666667 42.666667 0 0 1-56.32 3.498667l-4.010666-3.584-341.333334-342.186667a42.666667 42.666667 0 0 1-3.498666-56.32l3.584-4.010666 341.333333-340.48z" p-id="3480"></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-arrow-left")||customElements.define("quark-icon-arrow-left",u);