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:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user