1 line
1.4 KiB
JavaScript
1 line
1.4 KiB
JavaScript
import{a as h,j as o}from"./vendor-react-BHG7lGYR.js";import{d as e}from"./index-BWcMVITa.js";const f=h.forwardRef(({value:i,max:l=100,variant:c="default",color:x="cyan",labelLeft:s,labelRight:d,className:n,...r},t)=>{const a=Math.min(100,Math.max(0,i/l*100)),m={cyan:"bg-kodo-cyan",magenta:"bg-kodo-magenta",lime:"bg-kodo-lime",gold:"bg-kodo-gold"},g={gold:"from-kodo-gold to-orange-500"};return c==="gaming"?o.jsxs("div",{className:e("relative",n),ref:t,...r,children:[o.jsx("div",{className:"h-4 bg-kodo-void rounded-full overflow-hidden border border-kodo-gold/30",children:o.jsx("div",{className:e("h-full bg-gradient-to-r shadow-[0_0_10px_rgba(255,215,0,0.5)] transition-all duration-500",g.gold),style:{width:`${a}%`}})}),(s||d)&&o.jsxs("div",{className:"flex justify-between text-[10px] font-mono font-bold text-kodo-gold mt-1 uppercase tracking-wider",children:[o.jsx("span",{children:s}),o.jsx("span",{children:d})]})]}):o.jsxs("div",{className:e("w-full",n),ref:t,...r,children:[o.jsx("div",{className:"h-2 bg-kodo-steel rounded-full overflow-hidden",children:o.jsx("div",{className:e("h-full transition-all duration-300 shadow-[0_0_10px_currentColor]",m[x]),style:{width:`${a}%`}})}),(s||d)&&o.jsxs("div",{className:"flex justify-between text-xs text-kodo-content-dim mt-1 font-mono",children:[o.jsx("span",{children:s}),o.jsx("span",{children:d})]})]})});f.displayName="Progress";export{f as P};
|