PageSourceSearch

https://tailwindadmin-tanstack-pro-dark.netlify.app/assets/progress-n5RJFQhx.js

js tailwindadmin-tanstack-pro-dark.netlify.app collected 2026-10-03 11:30:21 UTC 3,569 bytes, 6 lines download raw bytes

1import{r as c,j as l}from"./main-BkpAS6Tt.js";import{c as M}from"./index-QqyytP6n.js";import{c as R}from"./index-Cft9Cwv8.js";import{c as h}from"./utils-4perknFd.js";function V(e,r=[]){let n=[];function s(u,i){const o=c.createContext(i);o.displayName=u+"Context";const a=n.length;n=[...n,i];const d=p=>{const{scope:m,children:x,...f}=p,E=m?.[e]?.[a]||o,I=c.useMemo(()=>f,Object.values(f));return l.jsx(E.Provider,{value:I,children:x})};d.displayName=u+"Provider";function b(p,m){const x=m?.[e]?.[a]||o,f=c.useContext(x);if(f)return f;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${u}\``)}return[d,b]}const t=()=>{const u=n.map(i=>c.createContext(i));return function(o){const a=o?.[e]||u;return c.useMemo(()=>({[`__scope${e}`]:{...o,[e]:a}}),[o,a])}};return t.scopeName=e,[s,A(t,...r)]}function A(...e){const r=e[0];if(e.length===1)return r;const n=()=>{const s=e.map(t=>({useScope:t(),scopeName:t.scopeName}));return function(u){const i=s.reduce((o,{useScope:a,scopeName:d})=>{const p=a(u)[`__scope${d}`];return{...o,...p}},{});return c.useMemo(()=>({[`__scope${r.scopeName}`]:i}),[i])}};return n.scopeName=r.scopeName,n}var D=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],y=D.reduce((e,r)=>{const n=M(`Primitive.${r}`),s=c.forwardRef((t,u)=>{const{asChild:i,...o}=t,a=i?n:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...o,ref:u})});return s.displayName=`Primitive.${r}`,{...e,[r]:s}},{}),g="Progress",P=100,[O]=V(g),[L,T]=O(g),$=c.forwardRef((e,r)=>{const{__scopeProgress:n,value:s=null,max:t,getValueLabel:u=k,...i}=e;(t||t===0)&&!N(t)&&console.error(G(`${t}`,"Progress"));const o=N(t)?t:P;s!==null&&!w(s,o)&&console.error(X(`${s}`,"Progress"));const a=w(s,o)?s:null,d=v(a)?u(a,o):void 0;return l.jsx(L,{scope:n,value:a,max:o,children:l.jsx(y.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":v(a)?a:void 0,"aria-valuetext":d,role:"progressbar","data-state":_(a,o),"data-value":a??void 0,"data-max":o,...i,ref:r})})});$.displayName=g;var S="ProgressIndicator",C=c.forwardRef((e,r)=>{const{__scopeProgress:n,...s}=e,t=T(S,n);return l.jsx(y.div,{"data-state":_(t.value,t.max),"data-value":t.value??void 0,"data-max":t.max,...s,ref:r})});C.displayName=S;function k(e,r){return`${Math.round(e/r*100)}%`}function _(e,r){return e==null?"indeterminate":e===r?"complete":"loading"}function v(e){return typeof e=="number"}function N(e){return v(e)&&!isNaN(e)&&e>0}function w(e,r){return v(e)&&!isNaN(e)&&e<=r&&e>=0}function G(e,r){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${P}\`.`}function X(e,r){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${r}\`. The \`value\` prop must be:
2  - a positive number
3  - less than the value passed to \`max\` (or ${P} if no \`max\` prop is set)
4  - \`null\` or \`undefined\` if the progress is indeterminate.
5
6Defaulting to \`null\`.`}var j=$,B=C;const F=R("h-full w-full flex-1 transition-all",{variants:{variant:{default:"bg-primary",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"default"}}),H=c.forwardRef(({className:e,value:r,variant:n,...s},t)=>l.jsx(j,{ref:t,className:h("relative h-1 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-white/15",e),...s,children:l.jsx(B,{className:h(F({variant:n})),style:{transform:`translateX(-${100-(r||0)}%)`}})}));H.displayName=j.displayName;export{H as P};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.