UNPKG

@particle-network/ui-shared

Version:

Shared utilities for Particle Network design system

32 lines (31 loc) 1.75 kB
export type UXForegroundColor = 'default' | 'white' | 'foreground' | 'secondary' | 'tertiary' | 'primary' | 'success' | 'danger' | 'alert' | 'warning' | 'gold' | 'bullish' | 'bearish'; export type UXBackgroundColor = 'bg-default' | 'bg-300' | 'bg-200' | 'bg-400' | 'divider' | 'transparent' | 'overlay'; export type UXColor = UXForegroundColor | UXBackgroundColor; export interface DynamicColors { bullish?: string; bearish?: string; } export type ThemeColors = Record<UXColor, string>; export declare const colorMap: Record<'dark' | 'light', Record<UXColor, string>>; export declare const foregroundColorList: readonly ["default", "secondary", "tertiary", "primary", "success", "danger", "alert", "warning", "gold", "bullish", "bearish"]; export declare const colorToCSSVariable: { readonly default: "--heroui-foreground"; readonly foreground: "--heroui-foreground"; readonly secondary: "--heroui-foreground-300"; readonly white: "--color-white"; readonly tertiary: "--heroui-foreground-100"; readonly primary: "--heroui-primary"; readonly success: "--heroui-success"; readonly danger: "--heroui-danger"; readonly alert: "--heroui-alert"; readonly warning: "--heroui-warning"; readonly gold: "--heroui-gold"; readonly bullish: "--bullish-color"; readonly bearish: "--bearish-color"; }; export type ColorString = `#${string}`; export declare function hexColorToHSLValue(hex: ColorString): string; export declare function hexColorToHSL(hex: ColorString): string; export declare function hslToHex(hslStr: string): string; export declare const getHexColorFromCSSVariable: (color: UXForegroundColor) => string; export declare const setColorWithOpacity: (color: string, opacity: number) => string;