import { ComponentPropsWithRef } from "react"; import { StyleProp, Text, TextStyle } from "react-native"; import type { IOColors } from "../../core"; import { IOFontFamily, IOFontWeight } from "../../utils/fonts"; import { RequiredAll } from "../../utils/types"; /** * Define the font size values for the typography elements */ export type FontSize = "regular" | "small" | "mini"; export declare const fontSizeMapping: Record; export declare const lineHeightMapping: Record; /** * Define the font name values for the typography elements */ export type FontType = { font?: IOFontFamily; }; /** * The style exported for the typography elements, without the fields characterizing the font style */ type TypographyStyle = StyleProp>; /** * Define a generic type for props used by all the typography leaf components */ export type TypographyProps = { weight?: WeightPropsType; color?: ColorsPropsType; }; type DefaultTypographyProps = TypographyProps; /** * A default function used to calculate the weight and color with some fallback values if not specified. * @param defaultWeight the default weight value to use if weight is not defined * @param defaultColor the default color value to use if color is not defined * @param weight the optional weight value * @param color the optional color value */ export declare function calculateWeightColor(defaultWeight: WeightPropsType, defaultColor: ColorsPropsType, weight?: WeightPropsType, color?: ColorsPropsType): RequiredTypographyProps; /** * Define the common props interface for all the leaf Typography components. * In addition to the {@link DefaultTypographyProps} all the {@link Text} props are allowed (`style` excluded) */ export type ExternalTypographyProps = T extends DefaultTypographyProps ? Omit, "style"> & T & { style?: TypographyStyle; } : never; /** * Define mandatory all the keys of {@link TypographyProps} */ export type RequiredTypographyProps = RequiredAll>; export {}; //# sourceMappingURL=common.d.ts.map