import type { OnboardingShellProps } from './types.js'; /** * Onboarding shell — step indicator, navigation, progress bar. * Wraps arbitrary step content provided via children. * Styled via CSS custom properties (inherits --bl-* from host app). */ export function OnboardingShell({ steps, currentStep, onNext, onBack, onComplete, children, className, }: OnboardingShellProps) { const isFirst = currentStep === 0; const isLast = currentStep === steps.length - 1; const progress = steps.length > 1 ? ((currentStep + 1) / steps.length) * 100 : 100; return (
{/* Progress bar */}
{/* Step indicator */}
{steps.map((step, i) => (
{i < currentStep ? '✓' : i + 1} {step.label}
))}
{/* Step content */}
{children}
{/* Navigation */}
); }