import { type CSSProperties } from "react"; import { InputDescription } from "./InputDescription/InputDescription"; import { InputError } from "./InputError/InputError"; import { InputLabel } from "./InputLabel/InputLabel"; import { InputPlaceholder } from "./InputPlaceholder/InputPlaceholder"; import { InputWrapper } from "./InputWrapper/InputWrapper"; import { type PolymorphicComponentProps } from "../Polymorphic"; import type { ThemeColor, ThemeRadius, ThemeSize } from "../theme.types"; export interface InputOwnProps { /** Content section rendered on the left side of the input */ leftSection?: React.ReactNode; /** Left section width, used to set `width` of the section and input `padding-left`, by default equals to the input height */ leftSectionWidth?: CSSProperties["width"]; /** Sets `pointer-events` styles on the `rightSection` element * @default "none" */ leftSectionPointerEvents?: React.CSSProperties["pointerEvents"]; /** Content section rendered on the right side of the input */ rightSection?: React.ReactNode; /** Right section width, used to set `width` of the section and input `padding-right`, by default equals to the input height */ rightSectionWidth?: CSSProperties["width"]; /** Sets `pointer-events` styles on the `rightSection` element * @default "none" */ rightSectionPointerEvents?: React.CSSProperties["pointerEvents"]; /** Props passed down to the root element of the `Input` component */ wrapperProps?: Record; /** Sets `required` attribute on the `input` element */ required?: boolean; /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem * @default "md" */ radius?: ThemeRadius; /** Sets `disabled` attribute on the `input` element */ disabled?: boolean; /** Controls input `height` and horizontal `padding` * @default "sm" */ size?: ThemeSize; /** Determines whether the input should have `cursor: pointer` style * @default false */ pointer?: boolean; /** Determines whether the input should have red border and red text color when the `error` prop is set * @default true */ withErrorStyles?: boolean; /** Determines whether the input should have error styles and `aria-invalid` attribute */ error?: React.ReactNode; /** Determines whether the input can have multiple lines, for example when `component="textarea"` * @default false */ multiline?: boolean; /** Determines whether `aria-` and other accessibility attributes should be added to the input * @default true */ withAria?: boolean; /** input variant * @default "outline" */ variant?: "outline" | "default" | "ghost"; color?: ThemeColor; slots?: { left?: string; input?: string; right?: string; }; } export type InputProps = PolymorphicComponentProps; declare const defaultElement = "input"; /** 多态组件 */ export declare function Input(props: InputProps): import("react").JSX.Element; export declare namespace Input { var Wrapper: typeof InputWrapper; var Label: typeof InputLabel; var Error: typeof InputError; var Description: typeof InputDescription; var Placeholder: typeof InputPlaceholder; } export {};