@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
38 lines (37 loc) • 1.23 kB
TypeScript
import { NeonMode } from '@/model/common/color/NeonMode';
/**
* Utility for managing Neon's light/dark mode & defaulting to the user's preference. See
* <a href="https://aotearoan.github.io/neon/design/theming#dark-mode">Dark mode</a>.
*/
export declare class NeonModeUtils {
private static defaultMode;
private static mode;
private static callback;
/**
* Set the initial mode.
*
* @param defaultMode The initial mode to set
* @param callback An optional callback to be triggered when using NeonMode.System indicating changes in the current
* light/dark mode set internally by this class.
*/
static init(defaultMode?: NeonMode, callback?: (isDark: boolean) => void): void;
/**
* Remove system listeners
*
*/
static destroy(): void;
/**
* Switch the current mode.
* @param mode the mode to switch to.
*/
static switchMode(mode: NeonMode): void;
/**
* Get the current mode.
*
* @returns The current user light or dark mode.
*/
static getMode(): NeonMode;
static onDarkChange(e: MediaQueryListEvent): void;
static onLightChange(e: MediaQueryListEvent): void;
private static updateClasses;
}