"use client"; import * as React from "react"; import { cn } from "../../lib/utils"; import { motion, HTMLMotionProps } from "framer-motion"; // Import motion and HTMLMotionProps // Extend HTMLMotionProps instead of React.InputHTMLAttributes directly // HTMLMotionProps already includes React.InputHTMLAttributes export interface InputProps extends HTMLMotionProps<"input"> {} const Input = React.forwardRef( ({ className, type, ...props }, ref) => { const [isFocused, setIsFocused] = React.useState(false); return ( { setIsFocused(true); props.onFocus?.(e); // Call original onFocus if it exists }} onBlur={(e) => { setIsFocused(false); props.onBlur?.(e); // Call original onBlur if it exists }} // Animate properties based on isFocused state animate={{ scale: isFocused ? 1.005 : 1, // Slight scale up when focused }} transition={{ type: "spring", stiffness: 400, damping: 20, duration: 0.1 // Keep duration very short }} {...props} /> ); } ); Input.displayName = "Input"; export { Input };