import { CSSProperties, DOMAttributes } from 'react'; import { InputProps } from '@material-ui/core/Input'; import { RcBaseProps, RcClassesProps, RcPaletteKeys, RcTypographyKeys } from '../../foundation'; import { RcTooltipProps } from '../Tooltip'; declare type RcInlineEditableOnChangeReason = 'leave' | 'confirm'; declare type RcInlineEditableProps = { /** inline value */ value: string; /** * trigger when value change apply * * reason: * - leave: trigger when blur input * - confirm: trigger when keydown enter */ onChange?: (value: string, reason?: RcInlineEditableOnChangeReason) => void; /** text variant, default is `body1` */ variant?: RcTypographyKeys; /** color for apply to text, support full palette, default is `neutral.f06` */ color?: RcPaletteKeys; /** maxLength of that value */ maxLength?: number; /** * If `true`, a textarea element will be rendered instead of an input. */ multiline?: boolean; /** * If `true`, the editable state will be saving mode */ saving?: boolean; /** * If `true`, the editable state will be disable, just plain string render. */ disabled?: boolean; /** * The short hint displayed in the input before the user enters a value. */ placeholder?: string; /** * class apply to root component */ className?: string; /** * class apply to root component */ style?: CSSProperties; /** * If `true`, the input will take up the full width of its container. */ fullWidth?: boolean; /** apply title on label */ title?: string; /** props for pass into `RcTooltip` when is not editing */ TooltipProps?: RcBaseProps; /** @deprecated not need set anymore */ shouldRemoveNode?: boolean; /** @deprecated use `data-test-automation-id="your-key"` directly */ automationId?: string; /** * @deprecated * use `onChange` to replace that, if your have async method, * should set `saving` when async method not complete */ onSave?: (draft: string) => void; /** @deprecated use `TooltipProps` with `title` to replace that */ tooltipTitle?: string; /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. */ inputProps?: InputProps['inputProps']; } & Pick, 'onKeyDown' | 'onFocus' | 'onBlur' | 'onMouseDown'> & RcClassesProps<'placeholder' | 'label' | 'textField' | 'saving'>; declare const RcInlineEditable: import("styled-components").StyledComponentClass & { theme?: import("../../foundation").RcTheme | undefined; }>; export { RcInlineEditable }; export type { RcInlineEditableProps };