import { DisplayProps } from '../../shared/outer-layout'; import { GlobalProps } from '../../shared/global'; import { ComponentChildren } from '../../shared/children'; import { AccessibilityVisibilityProps } from '../../shared/accessibility'; import { BaseTypographyProps } from '../../shared/typography'; export interface TextProps extends GlobalProps, AccessibilityVisibilityProps, BaseTypographyProps, DisplayProps { /** * The content of the Text. */ children?: ComponentChildren; /** * Provide semantic meaning and default styling to the text. * * Other presentation properties on `` override the default styling. * * @default 'generic' */ type?: TextType; } type TextType = /** * Indicate the text is contact information. Typically used for addresses. * * This must have `inline` layout (despite the default being `block` in HTML hosts). * * Surfaces may apply styling to this type. * * In an HTML host, the text will be rendered in an `
` element. * * @implementation vertical alignment should be `baseline` (`vertical-align: baseline`) * * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address */ 'address' /** * Indicate the text is no longer accurate or no longer relevant. One such use-case is discounted prices. * * Surfaces should apply styling to this type to suggest its content no longer applies. * * In an HTML host, the text will be rendered in a `` element. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s */ | 'redundant' /** * Indicate the text is marked or highlighted and relevant to the user’s current action. * One such use-case is to indicate the characters that matched a search query. * * Surfaces should apply styling to this type to draw attention to the content. * * In an HTML host, the text will be rendered in a `` element. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark */ | 'mark' /** * Indicate emphatic stress. Typically for words that have a stressed emphasis compared to surrounding text. * * Surfaces should apply styling to this type to distinguish it from surrounding text. Italicization is a common choice, but not required. * * In an HTML host, the text will be rendered in an `` element. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em */ | 'emphasis' /** * Indicate an offset from the normal prose of the text. Typically used to indicate * a foreign word, fictional character thoughts, or when the text refers to the definition of a word * instead of representing its semantic meaning. * * Surfaces should italicize this content by default. * * In an HTML host, the text will be rendered in a `` tag. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i */ | 'offset' /** * Indicate strong importance, seriousness, or urgency. * * Surfaces should render this content bold by default. * * In an HTML host, the text will be rendered in a `` tag. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong */ | 'strong' /** * Indicates the text is considered less important than the main content, but is still necessary for the reader to understand. * It can be used for secondary content but also for disclaimers, terms and conditions, or legal information. * * Surfaces should apply a smaller font size than the default size. * * In an HTML host, the text will be rendered in a `` element. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small */ | 'small' /** * No additional semantics or styling is applied. * * Surfaces must not apply any default styling to this type. * * In an HTML host, the text will be rendered in a `` tag. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span */ | 'generic'; export {};