import type { TextStyle } from 'react-native'; /** * A Figma font-style name (`font/…/weight`). These are the only cuts the design * uses, so a literal `fontWeight` in a component is a smell that should route * through the token instead. */ export type FunkitFontStyleName = 'Regular' | 'Medium' | 'SemiBold'; /** Logical weight a component's `Text` can request; maps onto `font/body/weight/*`. */ export type FunkitFontWeight = 'base' | 'medium' | 'semibold'; /** `font/*` — body and header typography. Family is shared by both in Light/Dark. */ export interface FunkitFontTokens { body: { /** * `font/body/family`. The Fun Variables value is `Inter`, so the host must * register `Inter-Regular` / `Inter-Medium` (see {@link fontFamilyForWeight}); * if it doesn't, RN falls back to the platform system font. */ family: string; weight: Record; size: { base: number; detail: number; }; leading: { base: number; detail: number; }; }; header: { family: string; weight: FunkitFontStyleName; alignment: 'Left' | 'Center' | 'Right'; size: { title: number; subtitle: number; drawerTitle: number; amountInput: number; amountSummary: number; }; }; } /** One button state's fill (`background/button/*` — only `default` + `pressed`). */ export interface ButtonSurface { default: string; pressed: string; } /** * The full token set for one mode — a one-to-one mirror of the Fun Variables * Figma variable groups. */ export interface FunkitTokens { background: { modal: string; secondary: string; button: { primary: ButtonSurface; secondary: ButtonSurface; tertiary: ButtonSurface; icon: ButtonSurface; destructive: ButtonSurface & { disabled: string; }; }; pill: { default: string; pressed: string; disabled: string; }; /** * Overlay dimming the host app behind the flow sheet. NOT yet a Fun Variable * — the design (13315:9391) hardcodes it — so it lives here to stay * per-client overridable. Fold it in when the export gains the variable. */ overlay: string; }; /** `opacity/disabled` — a percentage (0–100); divide by 100 for RN `opacity`. */ opacity: { disabled: number; }; content: { elements: { primary: string; secondary: string; success: string; error: string; hyperlink: string; warning: string; /** `Content/Watermark` — the SDK attribution, alpha baked in. */ watermark: string; /** `content/tertiary` — a placeholder, and the caption under one. */ tertiary: string; /** `content/ghosted` — the disc a back chevron sits on. */ ghosted: string; }; button: { primary: { default: string; loadingAlpha: string; }; secondary: { default: string; loadingAlpha: string; }; tertiary: { default: string; }; icon: { default: string; }; destructive: { default: string; loadingAlpha: string; }; }; }; border: { radius: { modal: number; element: number; elementInner: number; button: number; }; modal: { default: string; weight: number; }; elements: { default: { color: string; weight: number; }; selected: { color: string; weight: number; }; }; button: { primary: string; secondary: string; weight: number; }; }; /** * `form/*` — the filled boxes a form is drawn as. * * Local to the KYC design file, NOT yet Fun Variables, so these live here to * stay per-client overridable (as `background/overlay` does). Fold them into * the mirror when the export gains them. */ form: { /** `form/field` — the field fill. */ field: string; /** `palette/palegrey` — the code box the next digit lands in. */ fieldNext: string; /** The rule between two rows of a grouped card. No variable names it. */ divider: string; /** * A field whose answer is refused, and the round's own error, which is * drawn as a field-sized banner (259:12593). * * The design keeps one pale yellow across both modes, so what sits on it * is dark in both rather than following `content/primary`. */ fieldInvalid: { fill: string; content: string; placeholder: string; }; /** * The round's own error, drawn as a tinted notice under the fields * (1898:3254). A tenth of its own gold, so it reads as a note rather than * as another refused field. */ errorNotice: { fill: string; content: string; }; }; font: FunkitFontTokens; spacing: { padding: { elements: { horizontal: number; }; modal: { horizontal: number; }; }; heights: { topBar: number; button: number; }; }; brand: { primary: string; }; button: { icon: { size: { xs: number; sm: number; md: number; lg: number; }; }; size: { xs: number; sm: number; md: number; lg: number; }; }; } /** * Resolves a font family + Figma style name to the concrete native font-family * name the host must register — e.g. `('Inter', 'Medium')` → `'Inter-Medium'`. * * This is connect-rn's whole answer to a React Native / Expo quirk: you cannot * reliably select a custom font's weight via `fontWeight`. Android matches custom * fonts by exact family-name string, and a font loaded at runtime (`expo-font`) * registers one native Typeface per name — so `fontWeight: '500'` on * `fontFamily: 'Inter'` is silently ignored and every weight renders identically. * Weight therefore has to be baked into the family name, and every text style * goes through here. */ export declare function fontFamilyForWeight(family: string, styleName: FunkitFontStyleName): string; /** Figma font-style name → CSS numeric weight (for the Swapped WebView / RN `fontWeight`). */ export declare const FONT_STYLE_CSS_WEIGHT: Record; export declare const lightTokens: FunkitTokens; export declare const darkTokens: FunkitTokens; //# sourceMappingURL=tokens.d.ts.map