feat(mui): 200-250ms interaction motion (button press/hover lift, input focus ring, card/chip transitions)

Buttons: 150ms press scale(0.97) + ripple; contained-primary hover lift + glow (gradient can't transition so animate transform/shadow/filter). Outlined inputs: soft brand focus ring fades in 200ms + outline color transition. Cards/chips: shadow transitions. Honors prefers-reduced-motion. Easing matches legacy cubic-bezier(0.4,0,0.2,1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-06 19:50:40 +02:00
parent 9791166ed6
commit e511e203b9
2 changed files with 57 additions and 2 deletions

View File

@@ -49,4 +49,13 @@ describe("MUI theme", () => {
const card = theme.components?.MuiCard?.styleOverrides?.root as any;
expect(card?.borderRadius).toBe(16);
});
it("adds 200-300ms interaction motion (press + focus ring)", () => {
const btn = theme.components?.MuiButton?.styleOverrides?.root as any;
expect(btn?.transition).toContain("transform");
expect(btn?.["&:active"]?.transform).toBe("scale(0.97)");
const input = theme.components?.MuiOutlinedInput?.styleOverrides
?.root as any;
expect(input?.["&.Mui-focused"]?.boxShadow).toContain("rgba");
});
});