UNPKG

apphouse

Version:

Component library for React that uses observable state management and theme-able components.

37 lines (36 loc) 1.49 kB
export declare const TOKEN_KEY_SEPARATOR = "."; export declare const TOKEN_PATH_PREFIX = "tokens"; export declare const TOKEN_PATH_COLORS = "colors"; export declare const tokenTypes: readonly ["borderWidth", "color", "fontFamily", "fontSize", "fontStyle", "fontWeight", "iconSize", "letterSpacing", "lineHeight", "mediaQuery", "opacity", "radius", "size", "spacings", "zIndex"]; export declare const TokenPropertyMapping: Record<string, string>; export type TokenTypeOption = (typeof tokenTypes)[number] | string; export declare const defaultFontFamilyIdTypes: string[]; /** * Tokens are a platform-agnostic format but they can be used in platform-specific code. * There are three kinds of tokens: reference, system, and component. Material Design currently * uses reference and system tokens; component tokens are in development. * Tokens help maintain alignment and consistency in a design system. */ export interface TokenType { /** * The key of the token ex. xSmall, large, medium */ key: string; /** * The raw value for the token ex. 8px, 16px, 24px */ value: string | number; /** * The type of token ex. spacing, backgroundColor, radius, etc.. */ type: TokenTypeOption; /** * The theme id for which this palette is for */ themeId?: string; /** * When palette is copied or imported from another theme it will have a * reference to the original theme id */ referenceThemeId?: string; }