diff --git a/shop/components/wizard/progress-stepper.tsx b/shop/components/wizard/progress-stepper.tsx index cc7bca2..f571f6c 100644 --- a/shop/components/wizard/progress-stepper.tsx +++ b/shop/components/wizard/progress-stepper.tsx @@ -1,5 +1,7 @@ 'use client' +import React from 'react' +import { motion } from 'framer-motion' import { Check } from 'lucide-react' interface ProgressStepperProps { @@ -7,32 +9,64 @@ interface ProgressStepperProps { basketItemsCount: number } +const STEP_LABELS = ['Kunde', 'Modell', 'Software', 'Abschluss'] + export function ProgressStepper({ step, basketItemsCount }: ProgressStepperProps) { + // Calculate progress percentage for active line (Step 1: 0%, Step 2: 33.3%, Step 3: 66.6%, Step 4: 100%) + const progressPercent = ((step - 1) / 3) * 100 + return ( -
+
-
- {[1, 2, 3, 4].map(s => ( -
-
= s - ? 'bg-blue-600 text-white scale-110 shadow-[0_0_15px_rgba(59,130,246,0.5)]' - : 'bg-slate-800 text-slate-400' - }`} - > - {step > s ? : s} + {/* Static Background Line */} +
+ + {/* Animated Active Line (bg-sky-500) */} + + + {[1, 2, 3, 4].map(s => { + const isDone = step > s + const isActive = step === s + + return ( +
+ + {isDone ? : s} + + + + {STEP_LABELS[s - 1]} + {s === 3 && basketItemsCount > 0 && ( + + {basketItemsCount} + + )} +
- = s ? 'text-blue-400' : 'text-slate-500'} flex items-center gap-1`}> - {s === 1 ? 'Kunde' : s === 2 ? 'Modell' : s === 3 ? 'Software' : 'Abschluss'} - {s === 3 && basketItemsCount > 0 && ( - - {basketItemsCount} - - )} - -
- ))} + ) + })}
) diff --git a/shop/components/wizard/summary-sidebar.tsx b/shop/components/wizard/summary-sidebar.tsx index 498524c..16187f4 100644 --- a/shop/components/wizard/summary-sidebar.tsx +++ b/shop/components/wizard/summary-sidebar.tsx @@ -69,10 +69,11 @@ export function SummarySidebar({ prevStep, }: SummarySidebarProps) { return ( - - - Zusammenfassung - +
+ + + Zusammenfassung + {visibleCategories.map(cat => { const sel = selections[cat.id] @@ -292,6 +293,7 @@ export function SummarySidebar({ Zurück zum Abrechnungsmodell - + +
) }