refactor(views): UploadView module, re-export, stories
- Module upload-view: types, useUploadView, Stepper, Step1/2/3, Skeleton
- Layout: min-h-layout-page, max-h-96 (no arbitrary values)
- Re-export from UploadView.tsx
- Stories: Default, Loading (Skeleton), Empty, Error
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 00:12:24 +00:00
|
|
|
import { Check } from 'lucide-react';
|
|
|
|
|
import { UPLOAD_VIEW_STEPS } from './types';
|
|
|
|
|
import type { UploadViewStep } from './types';
|
|
|
|
|
|
|
|
|
|
interface UploadViewStepperProps {
|
|
|
|
|
step: UploadViewStep;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function UploadViewStepper({ step }: UploadViewStepperProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex items-center justify-between mb-8 px-4">
|
|
|
|
|
{UPLOAD_VIEW_STEPS.map((s, i) => (
|
|
|
|
|
<div key={s.num} className="flex items-center gap-4">
|
|
|
|
|
<div
|
2026-02-07 13:54:19 +00:00
|
|
|
className={`w-8 h-8 rounded-full flex items-center justify-center font-bold text-sm transition-all duration-[var(--duration-normal)] ${step >= s.num ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground'}`}
|
refactor(views): UploadView module, re-export, stories
- Module upload-view: types, useUploadView, Stepper, Step1/2/3, Skeleton
- Layout: min-h-layout-page, max-h-96 (no arbitrary values)
- Re-export from UploadView.tsx
- Stories: Default, Loading (Skeleton), Empty, Error
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 00:12:24 +00:00
|
|
|
>
|
|
|
|
|
{step > s.num ? <Check className="w-5 h-5" /> : s.num}
|
|
|
|
|
</div>
|
|
|
|
|
<span
|
|
|
|
|
className={`${step >= s.num ? 'text-white' : 'text-kodo-content-dim'} font-medium hidden md:block`}
|
|
|
|
|
>
|
|
|
|
|
{s.label}
|
|
|
|
|
</span>
|
|
|
|
|
{i < UPLOAD_VIEW_STEPS.length - 1 && (
|
2026-02-07 13:54:19 +00:00
|
|
|
<div className="w-12 h-px bg-border mx-4 hidden md:block opacity-50" />
|
refactor(views): UploadView module, re-export, stories
- Module upload-view: types, useUploadView, Stepper, Step1/2/3, Skeleton
- Layout: min-h-layout-page, max-h-96 (no arbitrary values)
- Re-export from UploadView.tsx
- Stories: Default, Loading (Skeleton), Empty, Error
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 00:12:24 +00:00
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|