@cbpds/web-components
Version:
Web components for the CBP Design System.
14 lines (13 loc) • 920 B
TypeScript
export declare const createNamespaceKey: (prefix?: string) => string;
export declare const setCSSProps: <T extends {
[key: string]: any;
}>(host: HTMLElement, { ...props }: T) => void;
export declare const getInvertedContext: (context: undefined | 'light-inverts' | 'light-always' | 'dark-inverts' | 'dark-always') => 'light-inverts' | 'light-always' | 'dark-inverts' | 'dark-always';
export declare const getFocusableElements: (scope: HTMLElement) => Element[];
export declare const debounce: (callback: any, wait: any, prevent?: boolean) => (...args: any[]) => void;
export declare const getElementAttrs: (el: HTMLElement) => {
[key: string]: any;
};
export declare const clamp: (min: number, n: number, max: number) => number;
export declare const doKeyboardNav: (collection: any[], key: any, focusIndex?: number) => number;
export declare const clickAwayListener: (host: HTMLElement, callback: any) => void;