import type { SizeTokens, TamaguiElement } from '@tamagui/core'; import type { PopupTriggerMap } from '@tamagui/floating'; import type { Coords, OffsetOptions, Placement, SizeOptions, Strategy, UseFloatingReturn } from '@tamagui/floating'; import { flip, shift } from '@tamagui/floating'; import type { SizableStackProps, YStackProps } from '@tamagui/stacks'; import * as React from 'react'; type ShiftProps = typeof shift extends (options: infer Opts) => void ? Opts : never; type FlipProps = typeof flip extends (options: infer Opts) => void ? Opts : never; export type PopperContextShared = { open: boolean; size?: SizeTokens; hasFloating: boolean; arrowStyle?: Partial & { centerOffset: number; }; placement?: Placement; arrowRef: any; onArrowSize?: (val: number) => void; transformOrigin?: { x: string; y: string; }; }; export type PopperContextValue = UseFloatingReturn & PopperContextShared; export declare const PopperContextFast: import("@tamagui/core").StyledContext; export declare const PopperPositionContext: >(defaultValues?: VariantProps, namespace?: string) => import("@tamagui/core").StyledContext; export declare const usePopperContext: (scope?: string) => PopperContextValue, PopperProviderFast: React.Provider & React.ProviderExoticComponent & { children?: React.ReactNode; scope?: string; }>; export type PopperContextSlowValue = Pick & { onHoverReference?: (event: any) => void; onLeaveReference?: () => void; triggerElements?: PopupTriggerMap; }; export declare const PopperContextSlow: import("@tamagui/core").StyledContext; export declare const usePopperContextSlow: (scope?: string) => PopperContextSlowValue, PopperProviderSlow: React.Provider & React.ProviderExoticComponent & { children?: React.ReactNode; scope?: string; }>; export declare const PopperProvider: ({ scope, children, ...context }: PopperContextValue & { scope?: string; children?: React.ReactNode; }) => import("react/jsx-runtime").JSX.Element; export type PopperProps = { /** * Popper is a component used by other components to create interfaces, so scope is required * For example Popover uses it internally and sets a default "POPOVER_SCOPE". */ scope?: string; /** * Optional, will disable measuring updates when open is false for better performance * */ open?: boolean; size?: SizeTokens; children?: React.ReactNode; /** * Determine the preferred placement of the content in relation to the trigger */ placement?: Placement; /** * Shifts content horizontally to stay within viewport. * Pass an object to override shift options (mainAxis, crossAxis, padding, etc). * Defaults: { mainAxis: true, crossAxis: false, padding: 10 } * @see https://floating-ui.com/docs/shift */ stayInFrame?: ShiftProps | boolean; /** * Allows content to switch sides when space is limited. * @see https://floating-ui.com/docs/flip */ allowFlip?: FlipProps | boolean; /** * Resizes the content to fix inside the screen when space is limited * @see https://floating-ui.com/docs/size */ resize?: boolean | Omit; /** * Choose between absolute or fixed positioning */ strategy?: Strategy; /** * Move the content away from the trigger * @see https://floating-ui.com/docs/offset */ offset?: OffsetOptions; disableRTL?: boolean; passThrough?: boolean; }; export type PopperSetupOptions = { disableRTL?: boolean; }; export declare function setupPopper(options?: PopperSetupOptions): void; export declare function Popper(props: PopperProps): import("react/jsx-runtime").JSX.Element; export type PopperAnchorExtraProps = { virtualRef?: React.RefObject; scope?: string; }; export type PopperAnchorProps = YStackProps; export declare const PopperAnchor: import("@tamagui/core").TamaguiComponent, keyof PopperAnchorExtraProps> & PopperAnchorExtraProps, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & PopperAnchorExtraProps, import("@tamagui/core").StackStyleBase, { elevation?: number | SizeTokens | undefined; fullscreen?: boolean | undefined; }, import("@tamagui/core").StaticConfigPublic>; export type PopperContentProps = SizableStackProps & { scope?: string; /** * Enable smooth animation when the content position changes (e.g., when flipping sides) */ animatePosition?: boolean | 'even-when-repositioning'; /** @deprecated Use `animatePosition` instead */ enableAnimationForPositionChange?: boolean | 'even-when-repositioning'; passThrough?: boolean; }; export declare const PopperContentFrame: import("@tamagui/core").TamaguiComponent; export declare const PopperContent: React.ForwardRefExoticComponent & import("@tamagui/core").WithThemeValues & { size?: import("@tamagui/core").SizeTokens | undefined; unstyled?: boolean | undefined; elevation?: number | import("@tamagui/core").SizeTokens | undefined; transparent?: boolean | undefined; fullscreen?: boolean | undefined; circular?: boolean | undefined; elevate?: boolean | undefined; bordered?: boolean | undefined; chromeless?: boolean | "all" | undefined; } & import("@tamagui/core").WithShorthands> & import("@tamagui/core").WithPseudoProps & { size?: import("@tamagui/core").SizeTokens | undefined; unstyled?: boolean | undefined; elevation?: number | import("@tamagui/core").SizeTokens | undefined; transparent?: boolean | undefined; fullscreen?: boolean | undefined; circular?: boolean | undefined; elevate?: boolean | undefined; bordered?: boolean | undefined; chromeless?: boolean | "all" | undefined; } & import("@tamagui/core").WithShorthands>> & import("@tamagui/core").WithMediaProps> & { scope?: string; /** * Enable smooth animation when the content position changes (e.g., when flipping sides) */ animatePosition?: boolean | "even-when-repositioning"; /** @deprecated Use `animatePosition` instead */ enableAnimationForPositionChange?: boolean | "even-when-repositioning"; passThrough?: boolean; } & React.RefAttributes>; export type PopperArrowExtraProps = { offset?: number; size?: SizeTokens; scope?: string; /** * Enable smooth animation when the arrow position changes */ animatePosition?: boolean; }; export type PopperArrowProps = YStackProps & PopperArrowExtraProps; export declare const PopperArrowFrame: import("@tamagui/core").TamaguiComponent; export declare const PopperArrow: React.ForwardRefExoticComponent, keyof import("@tamagui/stacks").StackVariants> & import("@tamagui/stacks").StackVariants & PopperArrowExtraProps & React.RefAttributes>; export {}; //# sourceMappingURL=Popper.d.ts.map