@aveonline/ui-react
Version:
Home base for Aveonline design system - ecosystem react
110 lines (109 loc) • 2.39 kB
TypeScript
/// <reference types="react" />
import { IColor, IKind } from '../../atoms/Icon';
import { ITooltipProps } from '../../atoms/Tooltip/ITooltip';
import type { IFieldCustom } from './IFieldCustom';
export interface IField {
/**
* ID available for link form
*/
id?: string;
/**
* Name available for link form
*/
name?: string;
/**
* Value for default
*/
value?: string;
/**
* For disabled input with attribute disabled
*/
isDisabled?: boolean;
/**
* For inactive input with attribute readonly
*/
isReadOnly?: boolean;
/**
* Text for show description input
*/
placeholder?: string;
/**
* Determine the height
*/
size?: 'sm' | 'default';
/**
* Attribute autocomplete for default 'off' no show info
*/
autoComplete?: 'on' | 'off' | 'nope';
/**
* Message error
*/
error?: string;
/**
* Active and desactive description error
*/
showErrorText?: boolean;
/**
* Validation boolean for error
*/
isError?: boolean;
/**
* Name icon for position left
*/
iconLeft?: IKind;
/**
* Name icon for position right
*/
iconRight?: IKind;
/**
* Color icon of IColor
*/
iconColor?: IColor;
/**
* Message for help to user
*/
helpText?: string;
/**
* Custom logo
*/
logo?: 'google-maps' | undefined;
/**
* Types availables for input - text for default
*/
type?: 'text' | 'number' | 'password' | 'date';
/**
* Event handler for emit value from input
*/
onChange?: (value: string) => void;
/**
* Event handler for when blur
*/
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
/**
* Active tooltip for icon right
*/
placemantTooltipIcon?: 'rigth' | 'left';
tooltip?: ITooltipProps & {
isActive?: boolean;
};
/**
* Types input custom
*/
variant?: 'currency' | 'custom' | '' | 'mask';
withouStyle?: boolean;
classNames?: string;
/**
* All props for custom input
*/
custom?: IFieldCustom;
/**
* Available title tooltip navegator
*/
hasTitle?: boolean;
/**
* Title tooltip navegator
*/
title?: string;
_t?: (text: string) => string;
useT?: boolean;
}