import { useId, useState } from 'react'; import { StoryPhone } from '~/components/auth/showcase/story-phone'; import { StorySteps } from '~/components/auth/showcase/story-steps'; import { BrandLockup } from '~/components/ui/brand-lockup'; import { Glow } from '~/components/ui/glow'; import { Text } from '~/components/ui/text'; import { LOGIN_STORY } from '~/data/auth/constants'; const fadeUp = 'linear-gradient(to top, black, transparent)'; const floorGrid = { backgroundImage: 'linear-gradient(var(--color-border-divider) 1px, transparent 1px), linear-gradient(90deg, var(--color-border-divider) 1px, transparent 1px)', backgroundSize: '64px 64px', maskImage: fadeUp, WebkitMaskImage: fadeUp, }; // Hidden on phones; under the form on tablets; the left side from 960px, with the text beside the phone from 1200px export function LoginShowcase() { const headingId = useId(); const [story, setStory] = useState({ step: 0, cycle: 0 }); // A new cycle restarts the progress bar, even when the current step is picked again const select = (step: number) => setStory((s) => ({ step, cycle: s.cycle + 1 })); const steps = { active: story.step, cycle: story.cycle, onSelect: select, onComplete: () => select((story.step + 1) % LOGIN_STORY.length) }; return ( ); }