import * as react from 'react'; import { Ref } from 'react'; import * as _nextui_org_system from '@nextui-org/system'; import { HTMLNextUIProps, PropGetter } from '@nextui-org/system'; import { InputVariantProps, SlotsToClasses, InputSlots } from '@nextui-org/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: _nextui_org_system.As; classNames: SlotsToClasses<"base" | "input" | "label" | "description" | "errorMessage" | "mainWrapper" | "inputWrapper" | "innerWrapper" | "helperWrapper" | "clearButton"> | undefined; domRef: react.RefObject; label: react.ReactNode; description: react.ReactNode; startContent: react.ReactNode; endContent: react.ReactNode; labelPlacement: "outside" | "outside-left" | "inside" | undefined; isClearable: boolean | undefined; hasHelper: boolean; hasStartContent: boolean; isLabelOutside: boolean; isOutsideLeft: boolean; isLabelOutsideAsPlaceholder: boolean; shouldLabelBeOutside: boolean; shouldLabelBeInside: boolean; hasPlaceholder: boolean; isInvalid: boolean; errorMessage: react.ReactNode; getBaseProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getLabelProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getInputProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getMainWrapperProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getInputWrapperProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getInnerWrapperProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getHelperWrapperProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getDescriptionProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getErrorMessageProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getClearButtonProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; }; type UseInputReturn = ReturnType; export { Props, UseInputProps, UseInputReturn, useInput };