/// import { InputProps, UseNumberInputProps } from '@chakra-ui/react'; import { IconName } from "../../core/types"; import { IConnected } from '../Connected/types'; export declare type InputSize = 'default' | 'large'; export interface IInput extends InputProps, IConnected { /** * label for input */ label?: string; /** * icon name for left side of input */ icon?: IconName; /** * icon name for right side of input */ iconRight?: IconName; /** * placeholder */ placeholder?: string; /** * html autoFocus prop */ autoFocus?: boolean; /** * initial value for field */ initialValue?: string; /** * value for field */ value?: string | number; /** * id field */ id?: string; /** * used to set relative size when used with InputGroup */ flex?: number; /** * Render at the end of the input. */ renderEnd?: () => React.ReactNode; /** * Type of input */ type?: HTMLInputElement['type']; /** * The name of the input, which corresponds to the form data sent to the server on form submission. */ name?: string; /** * Removes border on input. */ borderless?: boolean; /** * This attribute specifies if the value of the control can be automatically completed by the browser. */ autocomplete?: HTMLInputElement['autocomplete']; /** * A regex pattern that the input's value must match to be considered valid. This can provide native browser validation based on the pattern. */ pattern?: HTMLInputElement['pattern']; maxLength?: HTMLInputElement['maxLength']; minLength?: HTMLInputElement['minLength']; 'data-testid'?: string; } export interface INumberInput extends UseNumberInputProps, IConnected { /** * initial value for number input */ initialValue?: number; /** * controlled value for number input */ value?: number | string; /** * max number for input */ max?: number; /** * min number for input */ min?: number; /** * step number for input */ step?: number; /** * A boolean value that determines whether the stepper controls (up and down arrows) * are displayed for a number input field. This property is optional and defaults to `true`. */ showStepper?: boolean; id?: string; name?: string; /** * used to set relative size when used with InputGroup */ flex?: number; 'data-testid'?: string; className?: string; } export interface IPasswordInput extends IInput { } export interface IInputGroup { children?: React.ReactNode; } export interface ISearchInput extends Omit { /** * Set the presence/absence of border */ borderless?: boolean; /** * Set the size of the text in the Input field */ size?: InputSize; } export declare type IInputIcon = { icon?: IconName | React.ReactElement; };