nextuiq
Version:
NextUIQ is a modern, lightweight, and developer-friendly UI component library for React and Next.js. Built with TypeScript and Tailwind CSS, it offers customizable, accessible, and performance-optimized components with built-in dark mode, theme customizat
2 lines (1 loc) • 1.78 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index46.js"),t=require("./index38.js");function r(t){return e.jsxRuntimeExports.jsx("svg",{...t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsxRuntimeExports.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}exports.StepIndicator=({currentStep:s,totalSteps:o,completedSteps:n,titles:i,onStepClick:l})=>e.jsxRuntimeExports.jsxs("div",{className:"relative",children:[e.jsxRuntimeExports.jsx("div",{className:"absolute top-4 left-0 right-0 h-0.5 bg-[oklch(var(--theme-border))]"}),e.jsxRuntimeExports.jsx("div",{className:"relative flex justify-between",children:Array.from({length:o}).map(((o,c)=>{const a=n.includes(c),m=s===c;return e.jsxRuntimeExports.jsxs("button",{onClick:()=>l?.(c),className:t.cn("flex flex-col items-center space-y-2","relative z-10 cursor-pointer"),disabled:!a&&!m,children:[e.jsxRuntimeExports.jsx("div",{className:t.cn("h-8 w-8 rounded-full","flex items-center justify-center","border-2 transition-colors",a&&"bg-[oklch(var(--theme-primary))] border-[oklch(var(--theme-primary))]",m&&"border-[oklch(var(--theme-primary))]",!a&&!m&&"border-[oklch(var(--theme-border))] bg-[oklch(var(--theme-background))]"),children:a?e.jsxRuntimeExports.jsx(r,{className:"h-4 w-4 text-[oklch(var(--theme-primary-foreground))]"}):e.jsxRuntimeExports.jsx("span",{className:t.cn("text-sm font-medium",m&&"text-[oklch(var(--theme-primary))]",!m&&"text-[oklch(var(--theme-muted-foreground))]"),children:c+1})}),e.jsxRuntimeExports.jsx("span",{className:t.cn("text-sm font-medium",(a||m)&&"text-[oklch(var(--theme-foreground))]",!a&&!m&&"text-[oklch(var(--theme-muted-foreground))]"),children:i[c]})]},c)}))})]});