import { TextFieldProps as MuiTextFieldProps } from '@material-ui/core'; import { ChangeEvent, CSSProperties } from 'react'; import { Props as InputMaskProps } from 'react-input-mask'; export declare type TextFieldProps = MuiTextFieldProps & { /** * non MUI prop to allow overwriting the default background color */ customBackgroundColor?: string; /** * non MUI prop to allow setting readonly on the input element */ readOnly?: boolean; }; export declare type ValidatedTextFieldProps = Omit & { /** * regular expression that will be used to validate the input */ validationRegEx: RegExp; /** * a callback that will be fired when the email is not valid * could be used to update the helper text */ onError?: (isValid: boolean) => void; }; export declare type MaskedTextFieldProps = InputMaskProps & { textFieldProps: TextFieldProps; }; export declare type CurrencyTextFieldProps = TextFieldProps & { currency: string; value?: string; onCurrencyChange?: (value: string) => void; }; export declare type InlineTextFieldProps = Omit & { /** * a callnack that will be triggered when the user clicks save or cancel * on cancel will NOT pass an event */ onChange?: (event?: ChangeEvent) => void; /** * a style passed to the form container */ containerStyle?: CSSProperties; /** * is the textfield a label aka. it will not show input styling before hover * @default false */ isLabel?: boolean; /** * when set to true, the textfield will have the size of the value +1, so it will expand with the value, otherwise it will have the deffault width * @default false */ compact?: boolean; /** * what action should be triggered when the user click away * @default ABORT */ clickAwayAction?: 'SAVE' | 'ABORT'; /** * the style of the label and the text inside the textfield */ labelStyle?: CSSProperties; /** * field size * @default 'meduim' */ size?: 'medium' | 'verySmall' | 'small' | 'large' | 'veryLarge' | 'adaptive'; /** * show end adornment * @default true */ showEndAdornment?: boolean; /** * Allows to position controls outside of form */ shouldRenderControlsOutsideForm?: boolean; };