/** @module @airtable/blocks/ui: Input */ /** */ import PropTypes from 'prop-types'; import * as React from 'react'; import { EnumType } from '../private_utils'; import { MaxWidthProps, MinWidthProps, WidthProps, FlexItemSetProps, PositionSetProps, MarginProps } from './system'; import { TooltipAnchorProps } from './types/tooltip_anchor_props'; import { ControlSizeProp } from './control_sizes'; export declare const ValidInputType: { number: "number"; search: "search"; time: "time"; url: "url"; text: "text"; email: "email"; tel: "tel"; month: "month"; week: "week"; date: "date"; "datetime-local": "datetime-local"; password: "password"; }; /** * Style props shared between the {@link Input} and {@link InputSynced} components. Accepts: * * {@link FlexItemSetProps} * * {@link MarginProps} * * {@link MaxWidthProps} * * {@link MinWidthProps} * * {@link PositionSetProps} * * {@link WidthProps} * * @noInheritDoc */ export interface InputStyleProps extends MaxWidthProps, MinWidthProps, WidthProps, FlexItemSetProps, PositionSetProps, MarginProps { } export declare const inputStylePropTypes: { [x: string]: PropTypes.Validator; }; /** * Props shared between the {@link Input} and {@link InputSynced} components. * * @noInheritDoc */ export interface SharedInputProps extends InputStyleProps, TooltipAnchorProps { /** The size of the input. Defaults to `default`. */ size?: ControlSizeProp; /** The `type` for the input. Defaults to `text`. */ type?: EnumType; /** The `disabled` attribute. */ disabled?: boolean; /** The `required` attribute. */ required?: boolean; /** The `spellcheck` attribute. */ spellCheck?: boolean; /** The `tabindex` attribute. */ tabIndex?: number; /** The `name` attribute. */ name?: string; /** The `id` attribute. */ id?: string; /** The `autoFocus` attribute. */ autoFocus?: boolean; /** The `max` attribute. */ max?: number | string; /** The `maxLength` attribute. */ maxLength?: number; /** The placeholder for the input. */ placeholder?: string; /** The `minLength` attribute. */ minLength?: number; /** The `step` attribute. */ step?: number | string; /** The `pattern` attribute. */ pattern?: string; /** The `readOnly` attribute. */ readOnly?: boolean; /** The `autoComplete` attribute. */ autoComplete?: string; /** Additional styles to apply to the input. */ style?: React.CSSProperties; /** Additional class names to apply to the input, separated by spaces. */ className?: string; /** A function to be called when the input changes. */ onChange?(e: React.ChangeEvent): unknown; /** A function to be called when the input loses focus. */ onBlur?(e: React.FocusEvent): unknown; /** A function to be called when the input gains focus. */ onFocus?(e: React.FocusEvent): unknown; /** A space separated list of label element IDs. */ ['aria-labelledby']?: string; /** A space separated list of description element IDs. */ ['aria-describedby']?: string; /** The `min` attribute. */ min?: number | string; } export declare const SupportedInputType: { number: "number"; search: "search"; time: "time"; url: "url"; text: "text"; email: "email"; tel: "tel"; month: "month"; week: "week"; date: "date"; "datetime-local": "datetime-local"; password: "password"; }; /** * Supported types for the {@link Input} component. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#%3Cinput%3E_types) for more information. */ type SupportedInputType = EnumType; export declare const sharedInputPropTypes: { onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>; onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>; onClick: PropTypes.Requireable<(...args: any[]) => any>; hasOnClick: PropTypes.Requireable; size: PropTypes.Validator; type: PropTypes.Requireable<"number" | "search" | "time" | "url" | "text" | "email" | "tel" | "month" | "week" | "date" | "datetime-local" | "password">; placeholder: PropTypes.Requireable; disabled: PropTypes.Requireable; required: PropTypes.Requireable; spellCheck: PropTypes.Requireable; tabIndex: PropTypes.Requireable; autoFocus: PropTypes.Requireable; max: PropTypes.Requireable>; maxLength: PropTypes.Requireable; min: PropTypes.Requireable>; minLength: PropTypes.Requireable; step: PropTypes.Requireable>; pattern: PropTypes.Requireable; readOnly: PropTypes.Requireable; autoComplete: PropTypes.Requireable; onChange: PropTypes.Requireable<(...args: any[]) => any>; onBlur: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; style: PropTypes.Requireable; className: PropTypes.Requireable; 'aria-labelledby': PropTypes.Requireable; 'aria-describedby': PropTypes.Requireable; }; /** * Props for the {@link Input} component. Also accepts: * * {@link InputStyleProps} * * @docsPath UI/components/Input */ export interface InputProps extends SharedInputProps { /** The input's current value. */ value: string; } declare const ForwardedRefInput: React.ForwardRefExoticComponent>; export default ForwardedRefInput; //# sourceMappingURL=input.d.ts.map