@muraldevkit/ui-toolkit 4.35.1 → 4.35.2-dev-mSSR.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Alignment, Position } from './constants';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Calculates the position of the menu based on alignment and viewport constraints.
|
|
4
4
|
*
|
|
5
|
-
* @param menuAlign -
|
|
6
|
-
* @param offset -
|
|
7
|
-
* @param elementRect -
|
|
8
|
-
* @param triggerRect -
|
|
9
|
-
* @returns
|
|
5
|
+
* @param {Alignment} menuAlign - The alignment configuration for the menu.
|
|
6
|
+
* @param {number} offset - The offset distance between the menu and the trigger.
|
|
7
|
+
* @param {DOMRect} elementRect - The bounding rectangle of the menu element.
|
|
8
|
+
* @param {DOMRect} [triggerRect] - The bounding rectangle of the trigger element.
|
|
9
|
+
* @returns {Position} The calculated position of the menu.
|
|
10
10
|
*/
|
|
11
11
|
export declare const calculatePosition: (menuAlign: Alignment, offset: number, elementRect: DOMRect, triggerRect?: DOMRect) => Position;
|