UNPKG

quarkd

Version:

Mobile UI Components built on Web Components.

2 lines (1 loc) 1.93 kB
import{_ as t,a as r}from"../typeof.js";import{_ as n,a as e,b as o,c as a,H as s,A as i,d as c,N as l,B as u}from"../index2.js";import{_ as p}from"../defineProperty.js";function h(t){var r=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}}();return function(){var o,a=n(t);if(r){var s=n(this).constructor;o=Reflect.construct(a,arguments,s)}else o=a.apply(this,arguments);return e(this,o)}}var f=function(n){o(c,s);var e=h(c);function c(){var r;t(this,c);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),p(a(r),"color","linear-gradient(90deg, #FFC91C 0%, #FB990F 100%)"),p(a(r),"value",""),p(a(r),"showtext",!1),r}return r(c,[{key:"render",value:function(){return s.h(i,null,s.h("div",{class:"wrap",part:"root"},s.h("div",{class:"progress active",part:"progress",style:{background:this.color,width:"".concat(this.value,"%")}})),s.h("slot",{name:"percent"},this.showtext&&s.h("span",{class:"value",part:"value"},this.value,"%")))}}]),c}();c([l()],f.prototype,"color",void 0),c([l()],f.prototype,"value",void 0),c([l({type:Boolean})],f.prototype,"showtext",void 0);var d=f=c([u({tag:"quark-progress",style:":host {\n height: 1.06667vw;\n border-radius: 0.8vw;\n color: #242729;\n font-size: 3.2vw;\n display: flex;\n flex: 1 auto;\n width: 100%;\n align-items: center;\n}\n\n:host .wrap {\n width: inherit;\n height: inherit;\n border-radius: inherit;\n background: var(--progress-box-background, #f0f3f5);\n}\n\n:host .progress {\n height: inherit;\n border-radius: inherit;\n}\n\n:host span {\n margin-left: var(--progress-margin-left, 3.2vw);\n background: transparent !important;\n display: inline-block;\n}\n"})],f);export{d as default};