export declare function $position($document: any, $window: any): {
/**
* Provides a raw DOM element from a jQuery/jQLite element.
*
* @param {element} elem - The element to convert.
*
* @returns {element} A HTML element.
*/
getRawNode: (elem: any) => any;
/**
* Provides a parsed number for a style property. Strips
* units and casts invalid numbers to 0.
*
* @param {string} value - The style value to parse.
*
* @returns {number} A valid number.
*/
parseStyle: (value: any) => any;
/**
* Provides the closest positioned ancestor.
*
* @param {element} element - The element to get the offest parent for.
*
* @returns {element} The closest positioned ancestor.
*/
offsetParent: (elem: any) => any;
/**
* Provides the scrollbar width, concept from TWBS measureScrollbar()
* function in https://github.com/twbs/bootstrap/blob/master/js/modal.js
*
* @returns {number} The width of the browser scollbar.
*/
scrollbarWidth: () => any;
/**
* Provides the closest scrollable ancestor.
* A port of the jQuery UI scrollParent method:
* https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
*
* @param {element} elem - The element to find the scroll parent of.
* @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,
* default is false.
*
* @returns {element} A HTML element.
*/
scrollParent: (elem: any, includeHidden: any) => any;
/**
* Provides read-only equivalent of jQuery's position function:
* http://api.jquery.com/position/ - distance to closest positioned
* ancestor. Does not account for margins by default like jQuery position.
*
* @param {element} elem - The element to caclulate the position on.
* @param {boolean=} [includeMargins=false] - Should margins be accounted
* for, default is false.
*
* @returns {object} An object with the following properties:
*
* - **width**: the width of the element
* - **height**: the height of the element
* - **top**: distance to top edge of offset parent
* - **left**: distance to left edge of offset parent
*
*/
position: (elem: any, includeMargins: any) => {
width: number;
height: number;
top: number;
left: number;
};
/**
* Provides read-only equivalent of jQuery's offset function:
* http://api.jquery.com/offset/ - distance to viewport. Does
* not account for borders, margins, or padding on the body
* element.
*
* @param {element} elem - The element to calculate the offset on.
*
* @returns {object} An object with the following properties:
*
* - **width**: the width of the element
* - **height**: the height of the element
* - **top**: distance to top edge of viewport
* - **right**: distance to bottom edge of viewport
*
*/
offset: (elem: any) => {
width: number;
height: number;
top: number;
left: number;
};
/**
* Provides offset distance to the closest scrollable ancestor
* or viewport. Accounts for border and scrollbar width.
*
* Right and bottom dimensions represent the distance to the
* respective edge of the viewport element. If the element
* edge extends beyond the viewport, a negative value will be
* reported.
*
* @param {element} elem - The element to get the viewport offset for.
* @param {boolean=} [useDocument=false] - Should the viewport be the document element instead
* of the first scrollable element, default is false.
* @param {boolean=} [includePadding=true] - Should the padding on the offset parent element
* be accounted for, default is true.
*
* @returns {object} An object with the following properties:
*
* - **top**: distance to the top content edge of viewport element
* - **bottom**: distance to the bottom content edge of viewport element
* - **left**: distance to the left content edge of viewport element
* - **right**: distance to the right content edge of viewport element
*
*/
viewportOffset: (elem: any, useDocument: any, includePadding: any) => {
top: number;
bottom: number;
left: number;
right: number;
};
/**
* Provides an array of placement values parsed from a placement string.
* Along with the 'auto' indicator, supported placement strings are:
*
* - top: element on top, horizontally centered on host element.
* - top-left: element on top, left edge aligned with host element left edge.
* - top-right: element on top, lerightft edge aligned with host element right edge.
* - bottom: element on bottom, horizontally centered on host element.
* - bottom-left: element on bottom, left edge aligned with host element left edge.
* - bottom-right: element on bottom, right edge aligned with host element right edge.
* - left: element on left, vertically centered on host element.
* - left-top: element on left, top edge aligned with host element top edge.
* - left-bottom: element on left, bottom edge aligned with host element bottom edge.
* - right: element on right, vertically centered on host element.
* - right-top: element on right, top edge aligned with host element top edge.
* - right-bottom: element on right, bottom edge aligned with host element bottom edge.
*
* A placement string with an 'auto' indicator is expected to be
* space separated from the placement, i.e: 'auto bottom-left' If
* the primary and secondary placement values do not match 'top,
* bottom, left, right' then 'top' will be the primary placement and
* 'center' will be the secondary placement. If 'auto' is passed, true
* will be returned as the 3rd value of the array.
*
* @param {string} placement - The placement string to parse.
*
* @returns {array} An array with the following values
*
* - **[0]**: The primary placement.
* - **[1]**: The secondary placement.
* - **[2]**: If auto is passed: true, else undefined.
*
*/
parsePlacement: (placement: any) => any;
/**
* Provides coordinates for an element to be positioned relative to
* another element. Passing 'auto' as part of the placement parameter
* will enable smart placement - where the element fits. i.e:
* 'auto left-top' will check to see if there is enough space to the left
* of the hostElem to fit the targetElem, if not place right (same for secondary
* top placement). Available space is calculated using the viewportOffset
* function.
*
* @param {element} hostElem - The element to position against.
* @param {element} targetElem - The element to position.
* @param {string=} [placement=top] - The placement for the targetElem,
* default is 'top'. 'center' is assumed as secondary placement for
* 'top', 'left', 'right', and 'bottom' placements. Available placements are:
*
* - top
* - top-right
* - top-left
* - bottom
* - bottom-left
* - bottom-right
* - left
* - left-top
* - left-bottom
* - right
* - right-top
* - right-bottom
*
* @param {boolean=} [appendToBody=false] - Should the top and left values returned
* be calculated from the body element, default is false.
*
* @returns {object} An object with the following properties:
*
* - **top**: Value for targetElem top.
* - **left**: Value for targetElem left.
* - **placement**: The resolved placement.
*
*/
positionElements: (hostElem: any, targetElem: any, placement: any, appendToBody: any) => {
top: number;
left: number;
placement: string;
};
/**
* Provides a way for positioning tooltip & dropdown
* arrows when using placement options beyond the standard
* left, right, top, or bottom.
*
* @param {element} elem - The tooltip/dropdown element.
* @param {string} placement - The placement for the elem.
*/
positionArrow: (elem: any, placement: any) => void;
};
export declare namespace $position {
var $inject: string[];
}