import React from "react"; import { SpaceProps } from "styled-system"; import { TagProps } from "../../__internal__/utils/helpers/tags"; import type { TypographyProps as NextTypographyProps } from "./__internal__/__next__/"; export declare const VARIANT_TYPES: readonly ["h1-large", "h1", "h2", "h3", "h4", "h5", "segment-header", "section-heading", "segment-header-small", "segment-subheader", "section-subheading", "segment-subheader-alt", "p", "span", "small", "big", "sup", "sub", "strong", "b", "em", "ul", "ol"]; export type VariantTypes = (typeof VARIANT_TYPES)[number]; export interface TypographyProps extends SpaceProps, TagProps, Pick { /** Override the variant component */ as?: React.ElementType; /** Set the ID attribute of the Typography component */ id?: string; /** Content to be rendered inside the Typography component */ children?: React.ReactNode; /** * The visual style to apply to the component. Supported variants include: * h1, h2, h3, h4, h5, section-heading, section-subheading, p (default), * sup, sub, strong, b, ul, ol * * The following variant values are deprecated with recommended alternatives: * - "h1-large" -> use "h1" instead * - "segment-header" -> use "section-heading" instead * - "segment-header-small" -> use "section-subheading" instead * - "segment-subheader" / "segment-subheader-alt" -> use "h5" instead * - "span" -> use "p" instead * - "small" -> use "p" with the `size` prop set to "M" * - "big" -> use "h5" or "h4" depending on context, or "p" with `size` prop set to "L" * - "em" -> use "strong" or "b" for semantic emphasis */ variant?: VariantTypes; /** * @deprecated Use the new `size` prop for paragraphs or choose the appropriate variant for other variants. This prop will eventually be removed. * Override the variant font-size */ fontSize?: string; /** * @deprecated Use the new `weight` prop for paragraphs or choose the appropriate variant for other variants. This prop will eventually be removed. * Override the variant font-weight */ fontWeight?: string; /** * @deprecated Choose the appropriate variant for your use case, as each variant has its own line-height. This prop will eventually be removed. * Override the variant line-height */ lineHeight?: string; /** Override the variant text-transform */ textTransform?: string; /** Override the variant text-decoration */ textDecoration?: string; /** Override the variant display */ display?: string; /** * @deprecated This prop no longer has any effect. This prop will eventually be removed. * Override the list-style-type */ listStyleType?: string; /** Override the white-space */ whiteSpace?: string; /** Override the word-break */ wordBreak?: string; /** Override the word-wrap */ wordWrap?: string; /** Override the text-align */ textAlign?: string; /** Override the text-overflow */ textOverflow?: string; /** * @deprecated Use `textOverflow` and `whiteSpace` props instead. This prop will eventually be removed. * Apply truncation */ truncate?: boolean; /** * @deprecated This prop no longer has any effect. This prop will eventually be removed. * Override the color style. If a white colour is needed, use the `inverse` prop instead. */ color?: string; /** * @deprecated This prop no longer has any effect. This prop will eventually be removed. * Override the backgroundColor style */ backgroundColor?: string; /** * @deprecated This prop no longer has any effect. This prop will eventually be removed. * Override the bg value shorthand for backgroundColor */ bg?: string; /** * @deprecated This prop no longer has any effect. This prop will eventually be removed. * Override the opacity value */ opacity?: string | number; /** Set whether it will be visually hidden * NOTE: This is for screen readers only and will make a lot of the other props redundant */ screenReaderOnly?: boolean; /** * @deprecated * @private * @ignore * Override the default color of the rendered element to match disabled styling * */ isDisabled?: boolean; /** Make the element an aria-live region */ "aria-live"?: "off" | "assertive" | "polite"; /** Set the role of the element when it is a live region */ role?: "status" | "alert"; /** @private @ignore Set whether the component should be recognised by assistive technologies */ "aria-hidden"?: "true" | "false"; /** * @private * @internal * @ignore * Sets className for component. INTERNAL USE ONLY. */ className?: string; /** @private @internal @ignore */ "data-component"?: string; } export declare const Typography: { ({ variant, as, id, fluid, inverse, size, tint, weight, truncate, color, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: TypographyProps): React.JSX.Element; displayName: string; }; export default Typography;