UNPKG

ngxsmk-tel-input

Version:

Angular international telephone input (intl-tel-input UI + libphonenumber-js validation). ControlValueAccessor. SSR-safe.

46 lines 1.81 kB
import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; export type Theme = 'light' | 'dark' | 'auto'; export declare class ThemeService { private readonly platformId; private readonly themeSubject; private readonly currentThemeSubject; readonly theme$: Observable<Theme>; readonly currentTheme$: Observable<"light" | "dark">; constructor(); /** Get current theme preference */ getTheme(): Theme; /** Get current resolved theme (light or dark) */ getCurrentTheme(): 'light' | 'dark'; /** Set theme preference */ setTheme(theme: Theme): void; /** Toggle between light and dark themes */ toggleTheme(): void; /** Initialize theme from saved preference or system */ private initializeTheme; /** Apply theme to document and components */ private applyTheme; /** Update all tel-input components with the new theme */ private updateTelInputComponents; /** Resolve theme to light or dark */ private resolveTheme; /** Detect system theme preference */ private detectSystemTheme; /** Setup listener for system theme changes */ private setupSystemThemeListener; /** Update CSS custom properties for theme */ private updateCSSVariables; /** Save theme preference to localStorage */ private saveThemePreference; /** Get saved theme preference from localStorage */ private getSavedThemePreference; /** Check if dark theme is active */ isDarkTheme(): boolean; /** Check if light theme is active */ isLightTheme(): boolean; /** Check if auto theme is set */ isAutoTheme(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>; } //# sourceMappingURL=theme.service.d.ts.map