import { LayoutPosition } from '@rn-primitives/hooks'; import * as React from 'react'; import { LayoutRectangle } from 'react-native'; import { CheckboxItemProps, CheckboxItemRef, ContentProps, ContentRef, GroupProps, GroupRef, ItemProps, ItemRef, ItemIndicatorProps, ItemIndicatorRef, LabelProps, LabelRef, OverlayProps, OverlayRef, PortalProps, RadioGroupProps, RadioGroupRef, RadioItemProps, RadioItemRef, RootProps, RootRef, SeparatorProps, SeparatorRef, SubProps, SubRef, SubContentProps, SubContentRef, SubTriggerProps, SubTriggerRef, TriggerProps, TriggerRef } from './index.mjs'; import './dropdown-menu'; import '@rn-primitives/types'; interface IRootContext { open: boolean; onOpenChange: (open: boolean) => void; triggerPosition: LayoutPosition | null; setTriggerPosition: (triggerPosition: LayoutPosition | null) => void; contentLayout: LayoutRectangle | null; setContentLayout: (contentLayout: LayoutRectangle | null) => void; nativeID: string; } type RootComponentProps = RootProps & React.RefAttributes; declare const Root: { ({ asChild, onOpenChange: onOpenChangeProp, ref, ...viewProps }: RootComponentProps): React.JSX.Element; displayName: string; }; declare function useRootContext(): IRootContext; type TriggerComponentProps = TriggerProps & React.RefAttributes; declare const Trigger: { ({ asChild, onPress: onPressProp, disabled, ref, ...props }: TriggerComponentProps): React.JSX.Element; displayName: string; }; /** * @warning when using a custom ``, you might have to adjust the Content's sideOffset to account for nav elements like headers. */ declare function Portal({ forceMount, hostName, children }: PortalProps): React.JSX.Element | null; type OverlayComponentProps = OverlayProps & React.RefAttributes; declare const Overlay: { ({ asChild, forceMount, onPress: OnPressProp, closeOnPress, ref, ...props }: OverlayComponentProps): React.JSX.Element | null; displayName: string; }; type ContentComponentProps = ContentProps & React.RefAttributes; declare const Content: { ({ asChild, forceMount, align, side, sideOffset, alignOffset, avoidCollisions, onLayout: onLayoutProp, insets, style, disablePositioningStyle, ref, ...props }: ContentComponentProps): React.JSX.Element | null; displayName: string; }; type ItemComponentProps = ItemProps & React.RefAttributes; declare const Item: { ({ asChild, textValue, onPress: onPressProp, disabled, closeOnPress, ref, ...props }: ItemComponentProps): React.JSX.Element; displayName: string; }; type GroupComponentProps = GroupProps & React.RefAttributes; declare const Group: { ({ asChild, ref, ...props }: GroupComponentProps): React.JSX.Element; displayName: string; }; type LabelComponentProps = LabelProps & React.RefAttributes; declare const Label: { ({ asChild, ref, ...props }: LabelComponentProps): React.JSX.Element; displayName: string; }; type CheckboxItemComponentProps = CheckboxItemProps & React.RefAttributes; declare const CheckboxItem: { ({ asChild, checked, onCheckedChange, textValue, onPress: onPressProp, closeOnPress, disabled, ref, ...props }: CheckboxItemComponentProps): React.JSX.Element; displayName: string; }; type RadioGroupComponentProps = RadioGroupProps & React.RefAttributes; declare const RadioGroup: { ({ asChild, value, onValueChange, ref, ...props }: RadioGroupComponentProps): React.JSX.Element; displayName: string; }; type RadioItemComponentProps = RadioItemProps & React.RefAttributes; declare const RadioItem: { ({ asChild, value: itemValue, textValue, onPress: onPressProp, disabled, closeOnPress, ref, ...props }: RadioItemComponentProps): React.JSX.Element; displayName: string; }; type ItemIndicatorComponentProps = ItemIndicatorProps & React.RefAttributes; declare const ItemIndicator: { ({ asChild, forceMount, ref, ...props }: ItemIndicatorComponentProps): React.JSX.Element | null; displayName: string; }; type SeparatorComponentProps = SeparatorProps & React.RefAttributes; declare const Separator: { ({ asChild, decorative, ref, ...props }: SeparatorComponentProps): React.JSX.Element; displayName: string; }; type SubComponentProps = SubProps & React.RefAttributes; declare const Sub: { ({ asChild, defaultOpen, open: openProp, onOpenChange: onOpenChangeProp, ref, ...props }: SubComponentProps): React.JSX.Element; displayName: string; }; declare function useSubContext(): { open: boolean; onOpenChange: (value: boolean) => void; }; type SubTriggerComponentProps = SubTriggerProps & React.RefAttributes; declare const SubTrigger: { ({ asChild, textValue, onPress: onPressProp, disabled, ref, ...props }: SubTriggerComponentProps): React.JSX.Element; displayName: string; }; type SubContentComponentProps = SubContentProps & React.RefAttributes; declare const SubContent: ({ asChild, forceMount, ref, ...props }: SubContentComponentProps) => React.JSX.Element | null; export { CheckboxItem, Content, Group, Item, ItemIndicator, Label, Overlay, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, useRootContext, useSubContext };