import { ContextSelector } from '@fluentui/react-context-selector'; import type { ObserveOptions } from '@fluentui/priority-overflow'; import type { OnUpdateOverflow } from '@fluentui/priority-overflow'; import type { OverflowDividerEntry } from '@fluentui/priority-overflow'; import { OverflowGroupState } from '@fluentui/priority-overflow'; import type { OverflowItemEntry } from '@fluentui/priority-overflow'; import * as React_2 from 'react'; export declare const DATA_OVERFLOW_DIVIDER = "data-overflow-divider"; export declare const DATA_OVERFLOW_ITEM = "data-overflow-item"; export declare const DATA_OVERFLOW_MENU = "data-overflow-menu"; export declare const DATA_OVERFLOWING = "data-overflowing"; /** * Provides an OverflowContext for OverflowItem descendants. */ export declare const Overflow: React_2.ForwardRefExoticComponent> & { children: React_2.ReactElement; } & React_2.RefAttributes>; /** * @internal */ declare interface OverflowContextValue { itemVisibility: Record; groupVisibility: Record; hasOverflow: boolean; registerItem: (item: OverflowItemEntry) => () => void; registerOverflowMenu: (el: HTMLElement) => () => void; registerDivider: (divider: OverflowDividerEntry) => () => void; updateOverflow: (padding?: number) => void; } /** * Attaches overflow item behavior to its child registered with the OverflowContext. * It does not render an element of its own. */ export declare const OverflowDivider: React_2.ForwardRefExoticComponent>; /** * OverflowDividerProps */ declare type OverflowDividerProps = { /** * Assigns the item to a group, group visibility can be watched. */ groupId: string; /** * The single child that has overflow item behavior attached. */ children: React_2.ReactElement; }; /** * Attaches overflow item behavior to its child registered with the OverflowContext. * It does not render an element of its own. * * Behaves similarly to other `*Trigger` components in Fluent UI React. */ export declare const OverflowItem: React_2.ForwardRefExoticComponent>; /** * OverflowItemProps */ export declare type OverflowItemProps = { /** * The unique identifier for the item used by the overflow manager. */ id: string; /** * Assigns the item to a group, group visibility can be watched. */ groupId?: string; /** * A higher priority means the item overflows later. */ priority?: number; /** * The single child that has overflow item behavior attached. */ children: React_2.ReactElement; }; /** * Overflow Props */ export declare type OverflowProps = Partial> & { children: React_2.ReactElement; }; /** * @param id - unique identifier for a group of overflow items * @returns visibility state of the group */ export declare function useIsOverflowGroupVisible(id: string): OverflowGroupState; /** * @param id - unique identifier for the item used by the overflow manager * @returns visibility state of an overflow item */ export declare function useIsOverflowItemVisible(id: string): boolean; /** * @internal * @param update - Callback when overflow state changes * @param options - Options to configure the overflow container * @returns - ref to attach to an intrinsic HTML element and imperative functions */ export declare const useOverflowContainer: (update: OnUpdateOverflow, options: Omit) => UseOverflowContainerReturn; /** * @internal */ export declare interface UseOverflowContainerReturn extends Pick { /** * Ref to apply to the container that will overflow */ containerRef: React_2.RefObject; } /** * @internal */ export declare const useOverflowContext: (selector: ContextSelector) => SelectedValue; /** * @returns Number of items that are overflowing */ export declare const useOverflowCount: () => number; /** * @internal * Registers an overflow item * @param groupId - assigns the item to a group, group visibility can be watched * @returns ref to assign to an intrinsic HTML element */ export declare function useOverflowDivider(groupId?: string): React_2.RefObject; /** * @internal * Registers an overflow item * @param id - unique identifier for the item used by the overflow manager * @param priority - higher priority means the item overflows later * @param groupId - assigns the item to a group, group visibility can be watched * @returns ref to assign to an intrinsic HTML element */ export declare function useOverflowItem(id: string, priority?: number, groupId?: string): React_2.RefObject; export declare function useOverflowMenu(id?: string): { ref: React_2.RefObject; overflowCount: number; isOverflowing: boolean; }; /** * A hook that returns the visibility status of all items and groups. * * ⚠️ Heads up! * * This hook will cause the component it is in to re-render for every single time an item overflows or becomes * visible - use with caution * @returns visibility status of all items and groups */ export declare function useOverflowVisibility(): { itemVisibility: Record; groupVisibility: Record; }; export { }