Back to Fluentui

React Overflow.Api

packages/react-components/react-overflow/library/etc/react-overflow.api.md

4.40.2-hotfix23.7 KB
Original Source

API Report File for "@fluentui/react-overflow"

Do not edit this file. It is a report generated by API Extractor.

ts

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';

// @public (undocumented)
export const DATA_OVERFLOW_DIVIDER = "data-overflow-divider";

// @public (undocumented)
export const DATA_OVERFLOW_ITEM = "data-overflow-item";

// @public (undocumented)
export const DATA_OVERFLOW_MENU = "data-overflow-menu";

// @public (undocumented)
export const DATA_OVERFLOWING = "data-overflowing";

// @public (undocumented)
export interface OnOverflowChangeData extends OverflowState {
}

// @public
export const Overflow: React_2.ForwardRefExoticComponent<Partial<Pick<ObserveOptions, "padding" | "overflowDirection" | "overflowAxis" | "minimumVisible" | "hasHiddenItems">> & {
    children: React_2.ReactElement;
    onOverflowChange?: (ev: null, data: OverflowState) => void;
} & React_2.RefAttributes<unknown>>;

// @public
export const OverflowDivider: React_2.ForwardRefExoticComponent<OverflowDividerProps & React_2.RefAttributes<unknown>>;

// @public
export const OverflowItem: React_2.ForwardRefExoticComponent<OverflowItemProps & React_2.RefAttributes<unknown>>;

// @public
export type OverflowItemProps = {
    id: string;
    groupId?: string;
    children: React_2.ReactElement;
} & ({
    pinned?: boolean;
    priority?: never;
} | {
    pinned?: never;
    priority?: number;
});

// @public
export type OverflowProps = Partial<Pick<ObserveOptions, 'overflowAxis' | 'overflowDirection' | 'padding' | 'minimumVisible' | 'hasHiddenItems'>> & {
    children: React_2.ReactElement;
    onOverflowChange?: (ev: null, data: OverflowState) => void;
};

// @public (undocumented)
export function useIsOverflowGroupVisible(id: string): OverflowGroupState;

// @public (undocumented)
export function useIsOverflowItemVisible(id: string): boolean;

// @internal (undocumented)
export const useOverflowContainer: <TElement extends HTMLElement>(update: OnUpdateOverflow, options: Omit<ObserveOptions, "onUpdateOverflow">) => UseOverflowContainerReturn<TElement>;

// @internal (undocumented)
export interface UseOverflowContainerReturn<TElement extends HTMLElement> extends Pick<OverflowContextValue, 'registerItem' | 'updateOverflow' | 'registerOverflowMenu' | 'registerDivider'> {
    containerRef: React_2.RefObject<TElement | null>;
}

// @internal (undocumented)
export const useOverflowContext: <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) => SelectedValue;

// @public (undocumented)
export const useOverflowCount: () => number;

// @internal
export function useOverflowDivider<TElement extends HTMLElement>(groupId?: string): React_2.RefObject<TElement | null>;

// @internal
export function useOverflowItem<TElement extends HTMLElement>(id: string, priority?: number, groupId?: string, pinned?: boolean): React_2.RefObject<TElement | null>;

// @public (undocumented)
export function useOverflowMenu<TElement extends HTMLElement>(id?: string): {
    ref: React_2.MutableRefObject<TElement | null>;
    overflowCount: number;
    isOverflowing: boolean;
};

// @public
export function useOverflowVisibility(): {
    itemVisibility: Record<string, boolean>;
    groupVisibility: Record<string, OverflowGroupState>;
};

// (No @packageDocumentation comment for this package)