UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

3 lines 1.06 kB
'use client'; import{a as t}from"./chunk-JHY5O65W.js";import{a as s}from"./chunk-G6AC72TO.js";import{b as a}from"./chunk-CMFNILWJ.js";import{a as r,b as u}from"./chunk-XYM7TA65.js";import v from"lodash/fp/isFunction";import w from"lodash/fp/omit";import y from"lodash/fp/range";import{jsx as f}from"react/jsx-runtime";var N=({current:e=0,currentAs:m="step",getValueLabel:l,length:o,max:_=100,value:c=0,...i})=>{let $=v(l)?l(e,o):l!==null?`${e} / ${o}`:void 0;return f("div",{"aria-label":$,className:u(`${a}-${t}`,`${a}-${t}--current-as-${m}`,"flex max-w-full gap-1",i.className),title:$,...w(["className"],i),children:y(0,o).map(p=>p!==e?f(s,{className:r(`${a}-${t}__step`,"w-full !max-w-5"),getValueLabel:null,max:1,value:e>p?1:0,...e>p?{"data-completed":!0}:{},...e===p?{"data-active":!0}:{}},p):f(s,{className:r(`${a}-${t}__step`,`${a}-${t}__step--current`,"w-full",m==="step"?"!max-w-5":""),getValueLabel:null,max:m==="step"?5:_,value:m==="step"?1:c},p))})};N.displayName="Stepper";var F=N;export{N as a,F as b}; //# sourceMappingURL=chunk-QRLTT3WF.js.map