import React, { CSSProperties, Ref, WeakValidationMap, ValidationMap } from 'react'; import { Composition } from '@bem-react/core'; import type { TextOverflowValue } from './_overflow/Text_overflow'; declare type ComponentType = React.ComponentType<{ ref?: Ref; style?: CSSProperties; className?: string; }>; export declare type TextElementType = keyof React.ReactHTML | ComponentType; declare type CommonProps = { /** * Задает отображение переполненного текста */ overflow?: TextOverflowValue; /** * Максимальное количество строк текста (работает в связке с overflow) * @default 1 */ maxLines?: number; /** * Задает типографику текста в компоненте. */ typography?: unknown; }; declare type Props = CommonProps & { ref?: T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] extends React.ClassAttributes ? Ref : never : T extends React.ComponentType<{ ref?: infer R; }> ? R : never; /** * Тип элемента для отображения как (строка или компонент). * @default "span" */ as?: T; }; export declare type TextProps = Props & Omit, keyof Props>; export declare const cnText: import("@bem-react/classname").ClassNameFormatter; export declare type Text = { (props: TextProps & U): React.ReactElement | null; propTypes?: WeakValidationMap; contextTypes?: ValidationMap; defaultProps?: Partial; displayName?: string; }; export declare type PropsOfText, T extends TextElementType = 'span'> = C extends Text ? TextProps & U : never; /** * Базовый примитив представления текстовых данных. * @param { TextProps } props */ export declare const Text: Text<{}>; export declare function enhanceText, P = {}>(hoc: H, Comp?: Text

): Text

? T : never)>; export {};