/** * Typography Utilities for Relative Font Sizing * * This module provides utilities for creating scalable font sizes * based on a configurable base size. All font sizes are derived * from the base using ratios, enabling easy accessibility scaling. * * @example * // Default sizing (base = 14px) * const sizes = createFontSizes(); // tn=10px, xs=12px, sm=14px, xl=18px * * // Large accessibility mode (base = 16px) * const largeSizes = createFontSizes(16); // tn=11.4px, xs=13.7px, sm=16px, xl=20.6px */ /** * Default base font size in pixels. * This matches the current production value. */ export declare const DEFAULT_BASE_FONT_SIZE = 14; /** * Font size ratios relative to base. * These ratios are calculated to match the current pixel values * when base = 14px: * - tn: 10px → 10/14 = 0.714 (tiny) * - xs: 12px → 12/14 = 0.857 * - sm: 14px → 14/14 = 1.0 * - base: 14px → 14/14 = 1.0 * - md: 14.5px → 14.5/14 = 1.036 * - lg: 15px → 15/14 = 1.071 * - xl: 18px → 18/14 = 1.286 */ export declare const FONT_SIZE_RATIOS: { readonly tn: number; readonly xs: number; readonly sm: number; readonly base: number; readonly md: number; readonly lg: number; readonly xl: number; }; /** * Font size preset names for common accessibility configurations. */ export declare const FONT_SCALE_PRESETS: { readonly compact: 12; readonly normal: 14; readonly comfortable: 16; readonly large: 18; }; export type FontScalePreset = keyof typeof FONT_SCALE_PRESETS; /** * Typography configuration options. */ export interface TypographyConfig { /** * Base font size in pixels. All other sizes are derived from this value. * @default 14 */ baseFontSize?: number; } /** * Generated font sizes type. */ export interface FontSizes { tn: string; xs: string; sm: string; base: string; md: string; lg: string; xl: string; icons: string; } /** * Creates font sizes based on a configurable base size. * All sizes are calculated using ratios relative to the base. * * @param baseFontSize - The base font size in pixels (default: 14) * @returns Font sizes object with pixel values as strings * * @example * // Default (14px base) * createFontSizes(); * // { tn: '10px', xs: '12px', sm: '14px', base: '14px', md: '14.5px', lg: '15px', xl: '18px', icons: '24px' } * * @example * // Large accessibility mode (16px base) * createFontSizes(16); * // { tn: '11.4px', xs: '13.7px', sm: '16px', base: '16px', md: '16.6px', lg: '17.1px', xl: '20.6px', icons: '24px' } */ export declare function createFontSizes(baseFontSize?: number): FontSizes; /** * Creates font sizes from a preset name. * * @param preset - The preset name ('compact', 'normal', 'comfortable', 'large') * @returns Font sizes object with pixel values as strings * * @example * createFontSizesFromPreset('large'); * // { tn: '12.9px', xs: '15.4px', sm: '18px', base: '18px', md: '18.6px', lg: '19.3px', xl: '23.1px', icons: '24px' } */ export declare function createFontSizesFromPreset(preset: FontScalePreset): FontSizes; //# sourceMappingURL=typography.d.ts.map