@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
3 lines • 1.01 kB
JavaScript
'use client';
import{a as t}from"./chunk-JHY5O65W.js";import{b as s}from"./chunk-QHJFJKX7.js";import{b as m}from"./chunk-CMFNILWJ.js";import{a as r,b as N}from"./chunk-XYM7TA65.js";import w from"lodash/fp/isFunction";import y from"lodash/fp/omit";import P from"lodash/fp/range";import{jsx as l}from"react/jsx-runtime";var _=({current:p=0,currentAs:e="step",getValueLabel:f,length:o,max:c=100,value:v=0,...$})=>{let i=w(f)?f(p,o):`${p} / ${o}`;return l("div",{"aria-label":i,className:N(`${m}-${t}`,`${m}-${t}--current-as-${e}`,"flex max-w-full gap-1",$.className),title:i,...y(["className"],$),children:P(0,o).map(a=>a!==p?l(s,{className:r(`${m}-${t}__step`,"w-full !max-w-5"),max:1,value:p>a?1:0,...p>a?{"data-completed":!0}:{},...p===a?{"data-active":!0}:{}},a):l(s,{className:r(`${m}-${t}__step`,`${m}-${t}__step--current`,"w-full",e==="step"?"!max-w-5":""),max:e==="step"?5:c,value:e==="step"?1:v},a))})};_.displayName="Stepper";var R=_;export{_ as a,R as b};
//# sourceMappingURL=chunk-S7SID4UH.js.map