import * as React from 'react'; import * as PropTypes from 'prop-types'; import { FormComponent, FormComponentProps, FormComponentValidity } from '@progress/kendo-react-common'; import { InputChangeEvent } from './interfaces/InputChangeEvent'; /** * @hidden */ declare type Omit = Pick>; /** * Represents the props of the [KendoReact Input component]({% slug overview_textbox %}). * Extends the [native input props](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement). */ export interface InputProps extends Omit, 'onChange'>, FormComponentProps { /** * Renders a floating label for the Input component. */ label?: string; /** * Represents the Input value. */ value?: string | string[] | number; /** * Represents the Input default value. */ defaultValue?: string | string[]; /** * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute). * For example these elements could contain error or hint message. */ ariaDescribedBy?: string; /** * Identifies the element(s) which will label the component. */ ariaLabelledBy?: string; /** * Defines a string value that labels an interactive element. */ ariaLabel?: string; /** * Triggered after value change. */ onChange?: (event: InputChangeEvent) => void; } /** * @hidden */ export interface InputState { value?: string | string[] | number; } /** @hidden */ export declare class InputWithoutContext extends React.Component implements FormComponent { static displayName: string; /** * @hidden */ static propTypes: { label: PropTypes.Requireable; validationMessage: PropTypes.Requireable; required: PropTypes.Requireable; validate: PropTypes.Requireable; id: PropTypes.Requireable; ariaLabelledBy: PropTypes.Requireable; ariaDescribedBy: PropTypes.Requireable; ariaLabel: PropTypes.Requireable; }; /** * @hidden */ static defaultProps: { defaultValue: string; required: boolean; validityStyles: boolean; }; private _input; private _inputId; private valueDuringOnChange?; constructor(props: InputProps); /** * @hidden */ focus: () => void; /** * Gets the native input element of the Input component. */ get element(): HTMLInputElement | null; /** * Gets the value of the Input. */ get value(): string | string[] | number | undefined; /** * Gets the `name` property of the Input. */ get name(): string | undefined; /** * Represents the validity state into which the Input is set. */ get validity(): FormComponentValidity; /** * @hidden */ protected get validityStyles(): boolean; /** * @hidden */ componentDidMount(): void; /** * @hidden */ componentDidUpdate(): void; /** * @hidden */ render(): JSX.Element; protected isInvalid: (state: Object) => boolean; /** * @hidden */ protected setValidity: () => void; private handleChange; /** * @hidden */ private handleAutoFill; } /** * Represents the PropsContext of the `Input` component. * Used for global configuration of all `Input` instances. * * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article. */ export declare const InputPropsContext: React.Context<(p: InputProps) => InputProps>; /** * Represent the `ref` of the Input component. */ export interface InputHandle extends Pick { /** * Gets the native input element of the Input component. */ element: HTMLInputElement | null; /** * Gets the `name` property of the Input. */ name: string | undefined; /** * Represents the validity state into which the Input is set. */ validity: FormComponentValidity; /** * Gets the value of the Input. */ value: string | string[] | number | undefined; } /** @hidden */ export declare type Input = InputHandle; /** * Represents the [KendoReact Input component]({% slug overview_textbox %}). * * Accepts properties of type [InputProps]({% slug api_inputs_inputprops %}). * Obtaining the `ref` returns an object of type [InputHandle]({% slug api_inputs_inputhandle %}). */ export declare const Input: React.ForwardRefExoticComponent>; export {};