index-4eef0c56.js 910 B

1
  1. import{c as g,d as u,e as p,a as s,t as h,n as l,o as k,k as m}from"./index-540f5a00.js";const[P,i]=g("progress"),f={color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:h,pivotColor:String,trackColor:String,strokeWidth:l,percentage:{type:l,default:0,validator:t=>+t>=0&&+t<=100}};var y=u({name:P,props:f,setup(t){const c=p(()=>t.inactive?void 0:t.color),d=()=>{const{textColor:n,pivotText:e,pivotColor:a,percentage:o}=t,r=e!=null?e:`${o}%`;if(t.showPivot&&r){const v={color:n,left:`${+o}%`,transform:`translate(-${+o}%,-50%)`,background:a||c.value};return s("span",{style:v,class:i("pivot",{inactive:t.inactive})},[r])}};return()=>{const{trackColor:n,percentage:e,strokeWidth:a}=t,o={background:n,height:k(a)},r={width:`${e}%`,background:c.value};return s("div",{class:i(),style:o},[s("span",{class:i("portion",{inactive:t.inactive}),style:r},null),d()])}}});const S=m(y);export{S as P};