import { TgphComponentProps, TgphElement } from '@telegraph/helpers'; import { Text } from '@telegraph/typography'; import { ReactNode } from 'react'; import { TooltipIfTruncated } from '../TooltipIfTruncated'; import { Split, TruncatePriority, TruncateVariant, TruncatedTextMode } from './TruncatedText.types'; export type { CustomSplitFn, Split, SplitOffset, TruncatedTextMode, TruncatePriority, TruncateVariant, } from './TruncatedText.types'; export type TruncatedTextProps = { tooltipProps?: Partial>; /** * `truncate` (default) clips the end, `fruncate` the start, and `middle` * elides the middle — all with native `text-overflow: ellipsis`, so they clip * on glyph boundaries (never mid-glyph) and need no imported CSS. `middle` * requires string children. A `fade` `variant` or a custom `marker` upgrades * to the CSS engine (modern browsers only; constrain the engine clip box via * `style`, not `maxWidth`). */ mode?: TruncatedTextMode; /** Ellipsis (default) vs. a soft fade into the background. `fade` uses the engine. */ variant?: TruncateVariant; /** A custom overflow marker (defaults to the native ellipsis). Uses the engine. */ marker?: ReactNode; /** `middle` mode: where to split the string. */ split?: Split; /** `middle` mode: which end stays whole; the other truncates (one ellipsis). */ priority?: TruncatePriority; } & TgphComponentProps>; declare const TruncatedText: (truncatedTextProps: TruncatedTextProps) => import("react").JSX.Element; export { TruncatedText }; //# sourceMappingURL=TruncatedText.d.ts.map