UNPKG

1.3 kBTypeScriptView Raw
1import { Placement as PopperPlacement, Options } from '@popperjs/core';
2import { NgbRTL } from './rtl';
3export declare function getPopperClassPlacement(placement: Placement, isRTL: boolean): PopperPlacement;
4export declare function getBootstrapBaseClassPlacement(baseClass: string, placement: PopperPlacement): string;
5export declare function getPopperOptions({ placement, baseClass }: PositioningOptions, rtl: NgbRTL): Partial<Options>;
6export type Placement = 'auto' | 'top' | 'bottom' | 'start' | 'left' | 'end' | 'right' | 'top-start' | 'top-left' | 'top-end' | 'top-right' | 'bottom-start' | 'bottom-left' | 'bottom-end' | 'bottom-right' | 'start-top' | 'left-top' | 'start-bottom' | 'left-bottom' | 'end-top' | 'right-top' | 'end-bottom' | 'right-bottom';
7export type PlacementArray = Placement | Array<Placement> | string;
8interface PositioningOptions {
9 hostElement: HTMLElement;
10 targetElement: HTMLElement;
11 placement: string | Placement | PlacementArray;
12 baseClass?: string;
13 updatePopperOptions?: (options: Partial<Options>) => Partial<Options>;
14}
15export declare function ngbPositioning(): {
16 createPopper(positioningOption: PositioningOptions): void;
17 update(): void;
18 setOptions(positioningOption: PositioningOptions): void;
19 destroy(): void;
20};
21export {};