/** * Spacing design tokens for BeatUI. * * Defines a spacing scale based on a configurable base unit (`0.25rem` by default). * Spacing values are expressed as CSS `calc()` expressions referencing the base * spacing variable, allowing the entire scale to be adjusted by changing a single value. * * @module */ /** * The base spacing unit used as the foundation for the spacing scale. * * @default '0.25rem' */ export declare const baseSpacing = "0.25rem"; /** * Spacing scale definitions mapping size names to CSS values. * All values (except `none`, `px`, `base`, and `full`) are computed * as multiples of `var(--spacing-base)`. * * | Name | Value | Approx | * |------|----------------------------------|--------| * | none | 0 | 0 | * | px | 1px | 1px | * | base | 0.25rem | 4px | * | 2xs | base / 4 | 1px | * | xs | base / 2 | 2px | * | sm | base | 4px | * | smh | base * 1.5 | 6px | * | md | base * 2 | 8px | * | mdh | base * 3 | 12px | * | lg | base * 4 | 16px | * | lgh | base * 5 | 20px | * | xl | base * 6 | 24px | * | 2xl | base * 8 | 32px | * | 2xlh | base * 10 | 40px | * | 3xl | base * 12 | 48px | * | 4xl | base * 16 | 64px | * | full | 2000px | 2000px | */ export declare const spacing: { readonly none: "0"; readonly px: "1px"; readonly base: "0.25rem"; readonly '2xs': "calc(var(--spacing-base) / 4)"; readonly xs: "calc(var(--spacing-base) / 2)"; readonly sm: "var(--spacing-base)"; readonly smh: "calc(var(--spacing-base) * 1.5)"; readonly md: "calc(var(--spacing-base) * 2)"; readonly mdh: "calc(var(--spacing-base) * 3)"; readonly lg: "calc(var(--spacing-base) * 4)"; readonly lgh: "calc(var(--spacing-base) * 5)"; readonly xl: "calc(var(--spacing-base) * 6)"; readonly '2xl': "calc(var(--spacing-base) * 8)"; readonly '2xlh': "calc(var(--spacing-base) * 10)"; readonly '3xl': "calc(var(--spacing-base) * 12)"; readonly '4xl': "calc(var(--spacing-base) * 16)"; readonly full: "2000px"; }; /** * Union type of all available spacing size names. */ export type SpacingName = keyof typeof spacing; /** * Returns the CSS custom property name for a spacing size. * * @param size - The spacing size name * @returns The CSS variable name (e.g., `'--spacing-md'`) * * @example * ```ts * getSpacingVarName('md') // '--spacing-md' * ``` */ export declare function getSpacingVarName(size: SpacingName): string; /** * Returns a CSS `var()` expression referencing the spacing custom property. * * @param size - The spacing size name * @returns A CSS `var()` string (e.g., `'var(--spacing-md)'`) * * @example * ```ts * getSpacingVar('md') // 'var(--spacing-md)' * ``` */ export declare function getSpacingVar(size: SpacingName): string; /** * Generates CSS custom property declarations for all spacing tokens. * * @returns A record mapping CSS variable names to their spacing values * * @example * ```ts * const vars = generateSpacingVariables() * // vars['--spacing-md'] === 'calc(var(--spacing-base) * 2)' * ``` */ export declare function generateSpacingVariables(): Record; /** * Tuple of all semantic spacing names, used for stack/gap spacing roles. */ export declare const semanticSpacingNames: readonly ["stack-2xs", "stack-xs", "stack-sm", "stack-md", "stack-lg", "stack-xl"]; /** * Union type of all semantic spacing names. */ export type SemanticSpacingName = (typeof semanticSpacingNames)[number]; /** * Partial record for overriding default semantic spacing values. */ export type SemanticSpacingOverrides = Partial>; /** * Returns the CSS custom property name for a semantic spacing name. * * @param name - The semantic spacing name * @returns The CSS variable name (e.g., `'--spacing-stack-md'`) * * @example * ```ts * getSemanticSpacingVarName('stack-md') // '--spacing-stack-md' * ``` */ export declare function getSemanticSpacingVarName(name: SemanticSpacingName): string; /** * Generates CSS custom property declarations for semantic spacing tokens, * merging defaults with any provided overrides. * * @param overrides - Optional overrides for semantic spacing values * @returns A record mapping CSS variable names to their values * * @example * ```ts * const vars = generateSemanticSpacingVariables({ 'stack-md': '1rem' }) * // vars['--spacing-stack-md'] === '1rem' * ``` */ export declare function generateSemanticSpacingVariables(overrides?: SemanticSpacingOverrides): Record;