import { ComponentPropsWithRef } from "react"; import { AccessibilityRole, GestureResponderEvent, Text, TextStyle } from "react-native"; import { IOColors } from "../../core"; import { IOFontFamily, IOFontWeight } from "../../utils/fonts"; /** * We exclude all of the following props when we define a new * typographic style in which all of these visual attributes * are already defined. */ export type IOTextStyle = Omit; export type TypographicStyleProps = Omit & { textStyle?: IOTextStyle; style?: IOTextStyle; } & { color?: IOTextBaseProps["color"]; }; /** * The specific properties needed to calculate the font style using {@link makeFontStyleObject} (these information * cannot be included in the default StyleProp */ type IOTextBaseProps = { size?: number; weight?: IOFontWeight; color?: IOColors; font?: IOFontFamily; lineHeight?: TextStyle["lineHeight"]; fontStyle?: TextStyle["fontStyle"]; textStyle?: IOTextStyle; style?: IOTextStyle; }; type IOTextExcludedProps = Omit, "style">; export type IOTextProps = IOTextBaseProps & IOTextExcludedProps; /** * Extend `TypographicStyleProps` with extra props for styles that * can be used as links */ export type TypographicStyleAsLinkProps = { color?: IOColors; asLink: true; avoidPressable?: true; onPress: (event: GestureResponderEvent) => void; accessibilityRole?: Extract; } | { color?: IOColors; asLink?: false; avoidPressable?: false; }; /** * `IOText` is the core Typography component used to render a text. * It accepts all the default text style `StyleProp` (excluding the ones already applied) in addition with {@link IOTextBaseProps} * used to calculate at runtime the platform-dependent styles. * @param props * @constructor */ export declare const IOText: ({ color, size, font, lineHeight, weight, fontStyle, textStyle, style, children, allowFontScaling, maxFontSizeMultiplier, ref, ...props }: IOTextProps) => import("react/jsx-runtime").JSX.Element; export declare const AnimatedIOText: import("react-native-reanimated/lib/typescript/createAnimatedComponent").AnimatedComponentType, ({ color, size, font, lineHeight, weight, fontStyle, textStyle, style, children, allowFontScaling, maxFontSizeMultiplier, ref, ...props }: IOTextProps) => import("react/jsx-runtime").JSX.Element>; export {}; //# sourceMappingURL=IOText.d.ts.map