import { default as React } from 'react'; import { GetColorProps } from '../../utils/color'; import { ResponsiveValueType, TextSize as RawTextSize } from '../../utils/ui'; import { IconSizeType, OpacityRange } from '../../utils/ui/ui.types'; export type TextSize = RawTextSize; export type ResponsiveTextSize = TextSize | string | number; export type ResponsiveIconSize = IconSizeType | string | number; export type TextWeight = 'thin' | 'regular' | 'bold' | 'bolder'; export type TextSpecificOpacity = '0' | '25' | '50' | '75' | '100'; export type TextOpacity = TextSpecificOpacity | OpacityRange; export type TextAs = 'span' | 'div' | 'p' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; export type TextLetterSpacing = 'small' | 'large' | 'xlarge'; export type TextFamaly = 'primary' | 'secondary'; interface TextPropsBase { as?: TextAs; centered?: boolean; truncated?: boolean; /** * If it'll be a multiline text, use this to add extra spacing between lines */ typographic?: boolean; /** * Will remove vertical trim feature based on before and after pseudo elements with negative margins */ verticalTrimDisabled?: boolean; /** * Allow users to select text */ userSelectable?: boolean; uppercase?: boolean; underlined?: boolean; strikethrough?: boolean; size?: ResponsiveValueType; weight?: TextWeight; letterSpacing?: TextLetterSpacing; lineHeight?: ResponsiveValueType; paragraphSpacing?: ResponsiveValueType; family?: TextFamaly; children?: React.ReactNode; className?: string; style?: React.CSSProperties; htmlFor?: string; id?: string; } export interface TextColorProps extends GetColorProps { opacity?: TextOpacity; } export interface TextProps extends TextPropsBase, TextColorProps { } export type TextPropsWithRef = TextProps & { ref?: React.Ref; }; export {};