//
export interface IFormProps extends React.HTMLAttributes {
className?: string;
children: React.ReactNode;
labelText?: string;
helperText?: string;
formFooter?: React.ReactNode;
}
export interface IWithTextFieldProps {
labelText?: string;
inline?: boolean;
description?: React.ReactNode;
error?: string;
labelAdornment?: React.ReactNode;
labelRightNode?: React.ReactNode;
fieldClassName?: string;
}
export interface IFormGroupProps extends React.HTMLAttributes {
className?: string;
labelText?: string;
helperText?: string;
children: React.ReactNode;
}
export interface ISelectProps {
className?: string;
dataTestId?: string;
id?: string;
error?: string;
isOpen?: boolean;
searchEmptyState?: React.ReactNode;
items: {
key: string;
props: {
[key: string]: any;
};
}[];
searchProperty?: string | string[];
search?: boolean;
placeholder?: React.ReactNode;
searchPlaceholder?: string;
selected: string | number;
openedOnInit?: boolean;
disabled?: boolean;
required?: boolean;
getItemBody(props: { [key: string]: any }): React.ReactNode;
getSelectedItemBody(props: { [key: string]: any }): React.ReactNode;
onItemSelect(itemKey: string | number): void;
onDropdownToggle?(isOpen: boolean): any;
onSearchPhraseChange?: (searchPhrase: string) => void;
selectHeader?: string;
}
export interface ISelectFieldProps extends ISelectProps, IWithTextFieldProps {
id: string;
className?: string;
}
export interface IMultiSelectProps {
className?: string;
dataTestId?: string;
disabled?: boolean;
error?: string;
id?: string;
isOpen?: boolean;
items: {
key: string;
props: {
[key: string]: any;
};
}[];
maxItemsContainerHeight: number;
openedOnInit?: boolean;
placeholder?: string;
search?: boolean;
searchProperty?: string | string[];
selected: string[] | number[];
shouldCloseOnSelect?: boolean;
toggleAllOptions?: {
selectLabel: string;
clearLabel: string;
onToggleAll(values?: string[] | number[]): any;
};
getItemBody(props: { [key: string]: any }): React.ReactNode;
getSelectedItemBody(props: { [key: string]: any }): React.ReactNode;
onDropdownToggle?(isOpen: boolean): any;
onItemSelect(itemKey: string | number): any;
onItemRemove(itemKey: string | number): any;
}
export interface IMultiSelectFieldProps
extends IMultiSelectProps,
IWithTextFieldProps {
id: string;
className?: string;
}
export interface IInputProps
extends React.InputHTMLAttributes {
width?: string;
error?: string;
ref?: React.Ref | React.Ref>;
}
export interface IInputFieldProps extends IInputProps, IWithTextFieldProps {
id: string;
inputWidth?: string;
}
export interface ITextFieldProps extends IWithTextFieldProps {
className?: string;
}
export interface ITextAreaProps
extends React.TextareaHTMLAttributes {
error?: string;
width?: string;
ref?:
| React.Ref
| React.Ref>;
}
export interface ITextAreaFieldProps
extends ITextAreaProps,
IWithTextFieldProps {
id: string;
textareaWidth?: string;
}
export interface INumericInputProps {
value: string;
id?: string;
className?: string;
style?: React.CSSProperties;
error?: string;
max?: number;
min?: number;
noControls?: boolean;
width?: string;
onChange(value: string): void;
}
export interface INumericInputFieldProps
extends INumericInputProps,
IWithTextFieldProps {
id: string;
}
export interface ICheckboxFieldProps
extends React.InputHTMLAttributes {
checked: boolean;
description?: React.ReactNode;
}
export interface IRadioButtonProps
extends React.InputHTMLAttributes {
checked?: boolean;
description?: React.ReactNode;
}
export interface IFieldGroupProps extends React.HTMLAttributes {
children: React.ReactNode;
description?: React.ReactNode;
error?: string;
inline?: boolean;
stretch?: boolean;
}
type ISearchBarHtmlProps = Omit, 'onChange'>, 'onSubmit'>;
export interface ISearchBarProps extends ISearchBarHtmlProps {
placeholder?: string;
value?: string;
loading?: boolean;
collapsable?: boolean;
expandOnFocus?: boolean;
collapseOnBlur?: boolean;
debounceTime?: number;
error?: string;
onChange?(value: string): void;
onSubmit?(value: string): void;
onClear?(value: string): void;
onKeyDown?(event): void;
onCollapse?(): void;
onExpand?(): void;
}
export var CheckboxField: React.ComponentType;
export var FieldGroup: React.ComponentType;
export var Form: React.ComponentType;
export var FormGroup: React.ComponentType;
export var Input: React.ComponentType;
export var InputField: React.ComponentType;
export var MultiSelect: React.ComponentType;
export var MultiSelectField: React.ComponentType;
export var NumericInput: React.ComponentType;
export var NumericInputField: React.ComponentType;
export var RadioButton: React.ComponentType;
export var Select: React.ComponentType;
export var SelectField: React.ComponentType;
export var TextField: React.ComponentType;
export var TextArea: React.ComponentType;
export var TextAreaField: React.ComponentType;
export var SearchBar: React.ComponentType;