UNPKG

@undp/design-system-react

Version:

React based design system for UNDP

2 lines 1.5 kB
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-Dd9-5CFr.cjs"),t=require("./check-Dar4Dnvz.cjs");let n=require("react/jsx-runtime");function r({className:r,steps:i,currentStep:a=0,unfinishedStepsClassName:o,finishedStepsClassName:s,activeStepsClassName:c,...l}){return(0,n.jsx)(`ol`,{...l,className:e.t(`flex w-full list-none items-center justify-between gap-3 text-center text-base text-content-primary`,r),children:i.map((r,l)=>(0,n.jsx)(`li`,{className:e.t(`flex grow items-center`,l===i.length-1?`grow-0`:`grow`,l+1<a?s:l+1===a?c:o),children:(0,n.jsxs)(`div`,{className:`flex grow items-center gap-3`,children:[(0,n.jsx)(`div`,{className:e.t(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full`,l+1<a?`bg-info`:l+1===a?`bg-foreground-soft`:`bg-surface`),children:l+1<a?(0,n.jsx)(t.t,{className:`h-4 w-4 shrink-0 stroke-background`}):(0,n.jsx)(`div`,{className:l+1===a?`text-content-reverse text-sm`:`text-content-primary text-sm`,children:l+1})}),(0,n.jsxs)(`div`,{className:`flex shrink-0 flex-col`,children:[(0,n.jsx)(`div`,{className:e.t(`text-left font-normal text-base rtl:text-right`,l+1<a?`text-info`:`text-content-primary`),children:r.title}),r.description?(0,n.jsx)(`div`,{className:e.t(`text-left text-content-tertiary text-sm rtl:text-right`),children:r.description}):null]}),l===i.length-1?null:(0,n.jsx)(`div`,{className:`h-px w-full grow bg-surface`})]})},r.title))})}exports.Stepper=r; //# sourceMappingURL=Stepper.cjs.map