import { cva } from 'class-variance-authority'; import { Text } from '~/components/ui/text'; import { LOGIN_STORY_STEP_MS, type LoginStoryStep } from '~/data/auth/constants'; import { cn } from '~/lib/utils'; const shell = cva('relative flex cursor-pointer overflow-hidden text-left ring-1 ring-inset transition-colors duration-200', { variants: { layout: { card: 'w-full gap-4 rounded-card-sm px-4 pt-3.5 pb-4 hover:bg-surface-dialog', pill: 'h-[38px] items-center gap-2 whitespace-nowrap rounded-full px-3.5', }, active: { true: 'bg-surface', false: '' }, }, compoundVariants: [ { layout: 'card', active: true, className: 'ring-border-dialog' }, { layout: 'card', active: false, className: 'ring-transparent' }, { layout: 'pill', active: true, className: 'ring-border-control' }, { layout: 'pill', active: false, className: 'ring-border-divider' }, ], }); interface StoryStepProps { step: LoginStoryStep; // card: number, title and description (wide layout); pill: number and title layout: 'card' | 'pill'; active: boolean; // Restarts the progress bar cycle: number; onSelect: () => void; onComplete: () => void; } export function StoryStep({ step, layout, active, cycle, onSelect, onComplete }: StoryStepProps) { const card = layout === 'card'; return ( ); }