/** * CSS Variable Generation * * Generates CSS custom properties for theming consent pages. * * @module @kya-os/consent/styles/css-variables */ import type { ConsentBranding, ConsentCSSVars } from "../types/branding.types.js"; /** * CSS variable names used in consent pages */ export declare const CSS_VAR_NAMES: { readonly PRIMARY: "--consent-primary"; readonly SECONDARY: "--consent-secondary"; readonly PRIMARY_RGB: "--consent-primary-rgb"; readonly SECONDARY_RGB: "--consent-secondary-rgb"; readonly BACKGROUND: "--consent-background"; readonly TEXT_PRIMARY: "--consent-text-primary"; readonly TEXT_SECONDARY: "--consent-text-secondary"; readonly BORDER: "--consent-border"; }; export type CSSVarName = (typeof CSS_VAR_NAMES)[keyof typeof CSS_VAR_NAMES]; /** * Convert hex color to RGB string * * @param hex - Hex color string (e.g., '#2563EB') * @returns RGB string (e.g., '37, 99, 235') */ export declare function hexToRgb(hex: string): string; /** * Generate CSS variables from branding configuration * * @param branding - Branding config (optional fields) * @returns CSS variable object with resolved values */ export declare function generateCSSVariables(branding?: ConsentBranding): ConsentCSSVars; /** * Generate CSS variable declarations as a style string * * @param branding - Branding config * @returns CSS style string (e.g., "--consent-primary: #2563EB;") */ export declare function generateCSSVariableString(branding?: ConsentBranding): string; /** * Generate CSS variable declarations with all theme colors * * @param branding - Branding config * @returns Complete CSS variable declarations including derived colors */ export declare function generateFullCSSVariables(branding?: ConsentBranding): Record; /** * Generate a style attribute value with CSS variables * * @param branding - Branding config * @returns Style attribute value for inline styling * * @example * ```html *
...
* ``` */ export declare function generateStyleAttribute(branding?: ConsentBranding): string; /** * Generate a :root CSS block with all variables * * @param branding - Branding config * @returns CSS :root block * * @example * ```css * :root { * --consent-primary: #2563EB; * --consent-secondary: #DBEAFE; * } * ``` */ export declare function generateRootCSSBlock(branding?: ConsentBranding): string; //# sourceMappingURL=css-variables.d.ts.map