UNPKG

@sap-ux/ui-components

Version:
54 lines 2.05 kB
export interface CalloutCollisionTransformProps { container: string; target: string; absolute?: boolean; } /** * This class is responsible for Dialog/Container element transformation to avoid collision/overlap between Callout/Dropdown Menu and target element. * In example when multi select dropdown is used inside dialog with actions, * then class will apply transformation dialog to make sure that dialog actions and dropdown menu is visible. */ export declare class CalloutCollisionTransform { private props; private source; private callout; private placeholder?; private originalStyle; /** * Initializes class with options. * * @param source Source element. * @param callout Dropdown menu/callout element. * @param props Transformation properties. */ constructor(source: React.RefObject<HTMLElement>, callout: React.RefObject<HTMLElement>, props?: CalloutCollisionTransformProps); /** * Method creates placeholder element with given size. * * @param size Size of placeholder. * @returns HTML element for placeholder. */ private createPlaceholder; /** * Method returns DOM elements and rectangles of associated elements(container, target, callout). * * @returns DOM elements and rectangles of associated elements. */ private getElements; /** * Method calculates callout overlap with target and applies transformation to make target visible. */ applyTransformation(): void; /** * Method resets current applied transformation. */ resetTransformation(): void; /** * Method prevents callout dismiss/close if focus/click on target elements. * * @param event Triggered event to check. * @returns Returns true if callout should not be closed. */ preventDismissOnEvent(event: Event | React.FocusEvent<Element> | React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>): boolean; } //# sourceMappingURL=CalloutCollisionTransform.d.ts.map