2026-04-18 18:51:53 +00:00
|
|
|
import * as React from "react";
|
|
|
|
|
|
2026-08-11 00:00:22 +08:00
|
|
|
import { formControlFocusClassName } from "@/components/ui/form-control";
|
2026-04-18 18:51:53 +00:00
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
|
|
|
|
|
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
|
|
|
|
|
|
|
|
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
|
|
({ className, type, ...props }, ref) => {
|
|
|
|
|
return (
|
|
|
|
|
<input
|
|
|
|
|
type={type}
|
|
|
|
|
className={cn(
|
2026-08-14 07:07:09 +09:00
|
|
|
"flex h-10 w-full rounded-control border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
2026-08-11 00:00:22 +08:00
|
|
|
formControlFocusClassName,
|
2026-04-18 18:51:53 +00:00
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
ref={ref}
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
Input.displayName = "Input";
|
|
|
|
|
|
|
|
|
|
export { Input };
|