diff --git a/frontend/apps/artcraft-webapp/src/components/motion/reveal.tsx b/frontend/apps/artcraft-webapp/src/components/motion/reveal.tsx index 9a4a118b1d..e7760a7151 100644 --- a/frontend/apps/artcraft-webapp/src/components/motion/reveal.tsx +++ b/frontend/apps/artcraft-webapp/src/components/motion/reveal.tsx @@ -102,20 +102,28 @@ export function Reveal({ const reduceMotion = useReducedMotion(); const MotionTag = motionTag(as); + // When `inView` is left undefined the element behaves as a stagger child: + // it inherits the parent RevealGroup's orchestration and must NOT drive its + // own initial/animate props (that would override the cascade). + const standalone = inView !== undefined; + + // Only a standalone reveal sets its own `delay`. For a stagger child the + // delay MUST be omitted: framer-motion lets a child's explicit transition + // `delay` override the parent's `staggerChildren`/`delayChildren`, so leaving + // it in (even as 0) collapses the cascade and every child animates at once. const variants: Variants = { initial: reduceMotion ? { opacity: 0 } : { opacity: 0, y }, animate: { opacity: 1, y: 0, - transition: { duration: DUR_SLOW, ease: EASE_OUT, delay }, + transition: { + duration: DUR_SLOW, + ease: EASE_OUT, + ...(standalone ? { delay } : {}), + }, }, }; - // When `inView` is left undefined the element behaves as a stagger child: - // it inherits the parent RevealGroup's orchestration and must NOT drive its - // own initial/animate props (that would override the cascade). - const standalone = inView !== undefined; - return ( { /> - -
{ @@ -87,93 +85,108 @@ const Login = () => { )} -
- - setEmail(e.target.value)} - placeholder="you@example.com or username" - inputClassName="w-full bg-black/40 border border-white/10 focus:border-primary/50 rounded-xl px-4 py-3 text-white placeholder-white/20 outline-none transition-colors" - /> -
-
-
-
-
setPassword(e.target.value)} - placeholder="Min. 8 characters" - inputClassName="w-full bg-black/40 border border-white/10 focus:border-primary/50 rounded-xl px-4 py-3 text-white placeholder-white/20 outline-none transition-colors pr-12" + type="text" + value={email} + onChange={(e) => setEmail(e.target.value)} + placeholder="you@example.com or username" + inputClassName="w-full bg-black/40 border border-white/10 focus:border-primary/50 rounded-xl px-4 py-3 text-white placeholder-white/20 outline-none transition-colors" /> - +
+ + + + -
- - -
- -
+ {isLoading ? ( + + ) : ( + "Log in" + )} + + + -
- -
-
-
- - or - - + {/* Secondary sign-in options pick up the same cascade just after the + fields (delay continues from the form group's three children above: + 0.04 + 3 × 0.08). */} + + +
+
+
+ + or + + - - - + + + - - - Don't have an account?{" "} - - Sign up - - - + + + Don't have an account?{" "} + + Sign up + + + );