UNPKG

@exadel/esl

Version:

Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components

46 lines (45 loc) 1.72 kB
import { MediaQueryCondition } from '../conditions/media-query-condition'; /** * ESL Screen Breakpoints registry * @author Yuliya Adamskaya, Alexey Stsefanovich (ala'n) * * Screen Breakpoint registry is used to provide custom breakpoints for {@link ESLMediaQuery} * * @implements IMediaQueryPreprocessor statically */ export declare abstract class ESLScreenBreakpoints { protected static readonly BP_REGEXP: RegExp; protected static readonly BP_NAME_REGEXP: RegExp; /** * Add or replace breakpoint shortcut that can be used inside ESLMediaQuery * @param name - name of shortcut * @param minWidth - min width for breakpoint * @param maxWidth - max width for breakpoint */ static add(name: string, minWidth: number, maxWidth: number): ESLScreenBreakpoint | undefined; /** Removes screen breakpoint */ static remove(name: string): boolean; /** @returns known breakpoint shortcut instance */ static get(name: string): ESLScreenBreakpoint | undefined; /** All available breakpoints names */ static get names(): string[]; static getMedia(term: string): string | undefined; /** @returns breakpoints shortcut replacement */ static process(term: string): MediaQueryCondition | undefined; } /** ESL Screen Breakpoint description */ export declare class ESLScreenBreakpoint { readonly name: string; readonly min: number; readonly max: number; constructor(name: string, min: number, max: number); get mediaQuery(): string; get mediaQueryGE(): string; get mediaQueryLE(): string; toString(): string; } declare global { export interface ESLLibrary { ScreenBreakpoints: typeof ESLScreenBreakpoints; } }