import * as _popperjs_core from '@popperjs/core'; import { Modifier, Placement, VirtualElement } from '@popperjs/core'; import { Token, PropGetter } from '@yamada-ui/core'; type PopperProperty = (typeof popperProperties)[number]; declare const popperProperties: readonly ["enabled", "offset", "gutter", "preventOverflow", "flip", "matchWidth", "boundary", "eventListeners", "strategy", "placement", "modifiers"]; interface UsePopperProps { /** * The boundary area for the popper. Used within the `preventOverflow` modifier. * * @default 'clippingParents' */ boundary?: "clippingParents" | "scrollParent" | HTMLElement; /** * Whether the popper.js should be enabled. * * @default true */ enabled?: boolean; /** * If provided, determines whether the popper will reposition itself on `scroll` and `resize` of the window. * * @default true */ eventListeners?: { resize?: boolean; scroll?: boolean; } | boolean; /** * If `true`, the popper will change its placement and flip when it's about to overflow its boundary area. * * @default true */ flip?: boolean; /** * The distance or margin between the reference and popper. * It is used internally to create an `offset` modifier. * * @default 8 */ gutter?: Token; /** * If `true`, the popper will match the width of the reference at all times. * It's useful for `autocomplete`, `date-picker` and `select` patterns. * * @default false */ matchWidth?: boolean; /** * Array of popper.js modifiers. * Check the docs to see the list of possible modifiers you can pass. * * @see Docs https://popper.js.org/docs/v2/modifiers/ */ modifiers?: Partial>[]; /** * The main and cross-axis offset to displace popper element from its reference element. */ offset?: [number, number]; /** * The placement of the popper relative to its reference. * * @default 'bottom' */ placement?: Token; /** * If `true`, will prevent the popper from being cut off and ensure it's visible within the boundary area. * * @default true */ preventOverflow?: boolean; /** * The CSS positioning strategy to use. * * @default 'absolute' */ strategy?: "absolute" | "fixed"; } declare const usePopper: ({ boundary, enabled, eventListeners, flip, gutter: _gutter, matchWidth, modifiers, offset, placement: _placement, preventOverflow, strategy, }?: UsePopperProps) => { forceUpdate: () => void | undefined; popperRef: (el: null | T) => void; referenceRef: (el: null | T) => void; transformOrigin: string; update: () => Promise | undefined>; getPopperProps: PropGetter<"div", undefined>; getReferenceProps: PropGetter<"div", undefined>; }; type UsePopperReturn = ReturnType; export { type PopperProperty, type UsePopperProps, type UsePopperReturn, popperProperties, usePopper };