import * as react from 'react'; import { Ref } from 'react'; import * as _heroui_system from '@heroui/system'; import { HTMLHeroUIProps, PropGetter } from '@heroui/system'; import { InputVariantProps, SlotsToClasses, InputSlots } from '@heroui/theme'; import { AriaTextFieldProps } from '@react-types/textfield'; interface Props extends Omit, keyof InputVariantProps> { /** * Ref to the DOM node. */ ref?: Ref; /** * Ref to the container DOM node. */ baseRef?: Ref; /** * Ref to the input wrapper DOM node. * This is the element that wraps the input label and the innerWrapper when the labelPlacement="inside" * and the input has start/end content. */ wrapperRef?: Ref; /** * Ref to the input inner wrapper DOM node. * This is the element that wraps the input and the start/end content when passed. */ innerWrapperRef?: Ref; /** * Element to be rendered in the left side of the input. */ startContent?: React.ReactNode; /** * Element to be rendered in the right side of the input. * if you pass this prop and the `onClear` prop, the passed element * will have the clear button props and it will be rendered instead of the * default clear button. */ endContent?: React.ReactNode; /** * Classname or List of classes to change the classNames of the element. * if `className` is passed, it will be added to the base slot. * * @example * ```ts * * ``` */ classNames?: SlotsToClasses; /** * Callback fired when the value is cleared. * if you pass this prop, the clear button will be shown. */ onClear?: () => void; /** * React aria onChange event. */ onValueChange?: (value: string) => void; } type UseInputProps = Props & Omit & InputVariantProps; declare function useInput(originalProps: UseInputProps): { Component: _heroui_system.As; classNames: SlotsToClasses<"description" | "base" | "label" | "errorMessage" | "input" | "helperWrapper" | "mainWrapper" | "inputWrapper" | "innerWrapper" | "clearButton"> | undefined; domRef: react.RefObject; label: react.ReactNode; description: react.ReactNode; startContent: react.ReactNode; endContent: react.ReactNode; labelPlacement: "inside" | "outside" | "outside-left" | "outside-top"; isClearable: boolean | undefined; hasHelper: boolean; hasStartContent: boolean; isLabelOutside: boolean; isOutsideLeft: boolean; isOutsideTop: boolean; isLabelOutsideAsPlaceholder: boolean; shouldLabelBeOutside: boolean; shouldLabelBeInside: boolean; hasPlaceholder: boolean; isInvalid: boolean; errorMessage: react.ReactNode; getBaseProps: PropGetter; getLabelProps: PropGetter; getInputProps: PropGetter; getMainWrapperProps: PropGetter; getInputWrapperProps: PropGetter; getInnerWrapperProps: PropGetter; getHelperWrapperProps: PropGetter; getDescriptionProps: PropGetter; getErrorMessageProps: PropGetter; getClearButtonProps: PropGetter; }; type UseInputReturn = ReturnType; export { type Props, type UseInputProps, type UseInputReturn, useInput };