UNPKG

@wix/design-system

Version:

@wix/design-system

47 lines 1.95 kB
import React from 'react'; import { EllipsisState, EllipsisProps } from './Ellipsis.types'; type DefaultProps = Required<Pick<EllipsisProps, 'ellipsis' | 'appendTo' | 'placement' | 'flip' | 'fixed' | 'zIndex' | 'enterDelay' | 'exitDelay' | 'showTooltip'>>; type Props = EllipsisProps & DefaultProps; declare class Ellipsis extends React.PureComponent<EllipsisProps, EllipsisState> { static defaultProps: DefaultProps; private ref; private tooltipRef; constructor(props: Props); /** * Once text component has rendered, * Update text content and tooltip active state * @private */ _onTextRendered: () => void; /** * An ellipsis is considered active when either the text's scroll width/height is wider than it's container or itself. * @private */ _updateIsActive: () => void; _getTextContent: () => string | null; _checkShouldBeActive: () => boolean; _isOverflowingHorizontally: () => boolean; _isOverflowingVertically: () => boolean; /** * A callback for resizing the window, must be debounced in order to improve performance. * @private */ _debouncedUpdate: import("lodash").DebouncedFunc<() => void>; componentDidMount(): void; _renderText(): React.JSX.Element; render(): React.JSX.Element; static getDerivedStateFromProps(props: EllipsisProps, state: EllipsisState & { prevRender: EllipsisProps['render']; prevEllipsis: EllipsisProps['ellipsis']; prevMaxLines: EllipsisProps['maxLines']; }): { textRendered: boolean; prevRender: (renderProps: import("./Ellipsis.types").RenderProps) => React.ReactElement; prevEllipsis: boolean | undefined; prevMaxLines: number | undefined; } | null; componentDidUpdate(prevProps: EllipsisProps, prevState: EllipsisState): void; componentWillUnmount(): void; } export default Ellipsis; //# sourceMappingURL=Ellipsis.d.ts.map