index.433fb09b.js 908 B

1
  1. import{t as g,v as u,z as l,d as p,y as h,U as m,c as s,D as k}from"./index.1c621181.js";const[y,i]=g("progress"),P={color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:u,pivotColor:String,trackColor:String,strokeWidth:l,percentage:{type:l,default:0,validator:t=>t>=0&&t<=100}};var f=p({name:y,props:P,setup(t){const c=h(()=>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:m(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=k(f);export{S as P};