UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

416 lines • 16.5 kB
import * as React from 'react'; export interface MenuTargetProps { children?: React.ReactNode; } export declare const useMenuTargetBase: import("@workday/canvas-kit-react/common").BehaviorHook<{ state: { stackRef: React.RefObject<HTMLDivElement>; targetRef: React.RefObject<HTMLButtonElement>; initialFocusRef: React.RefObject<any> | undefined; returnFocusRef: React.RefObject<any> | undefined; placement: import("@popperjs/core").Placement; id: string; visibility: "hidden" | "visible"; selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string; columnCount: number; pageSizeRef: React.MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: { virtualItems: import("../..").VirtualItem[]; totalSize: number; scrollToOffset: (index: number, options?: import("../..").ScrollToOffsetOptions | undefined) => void; scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void; measure: () => void; }; UNSTABLE_defaultItemHeight: number; containerRef: React.RefObject<HTMLDivElement>; orientation: "horizontal" | "vertical"; indexRef: React.MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; mode: "multiple" | "single"; }; events: { updatePlacement(data: { placement: import("@popperjs/core").Placement; }): void; show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | React.SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; }, { readonly id: string; readonly 'aria-haspopup': "true"; readonly 'aria-expanded': boolean; readonly onKeyDown: (event: React.KeyboardEvent) => void; }>; export declare const useMenuTarget: import("@workday/canvas-kit-react/common").BehaviorHook<{ state: { stackRef: React.RefObject<HTMLDivElement>; targetRef: React.RefObject<HTMLButtonElement>; initialFocusRef: React.RefObject<any> | undefined; returnFocusRef: React.RefObject<any> | undefined; placement: import("@popperjs/core").Placement; id: string; visibility: "hidden" | "visible"; selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string; columnCount: number; pageSizeRef: React.MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: { virtualItems: import("../..").VirtualItem[]; totalSize: number; scrollToOffset: (index: number, options?: import("../..").ScrollToOffsetOptions | undefined) => void; scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void; measure: () => void; }; UNSTABLE_defaultItemHeight: number; containerRef: React.RefObject<HTMLDivElement>; orientation: "horizontal" | "vertical"; indexRef: React.MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; mode: "multiple" | "single"; }; events: { updatePlacement(data: { placement: import("@popperjs/core").Placement; }): void; show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | React.SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; }, import("@workday/canvas-kit-react/common").RemoveNulls<import("@workday/canvas-kit-react/common").MergeProps<{ readonly id: string; readonly 'aria-haspopup': "true"; readonly 'aria-expanded': boolean; readonly onKeyDown: (event: React.KeyboardEvent) => void; }, import("@workday/canvas-kit-react/common").MergeProps<{ readonly ref: (instance: unknown) => void; readonly onClick: (event: React.MouseEvent<Element, MouseEvent>) => void; }, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, {}>>>>>>>>; export declare const useMenuTargetContext: import("@workday/canvas-kit-react/common").BehaviorHook<{ state: { stackRef: React.RefObject<HTMLDivElement>; targetRef: React.RefObject<HTMLButtonElement>; initialFocusRef: React.RefObject<any> | undefined; returnFocusRef: React.RefObject<any> | undefined; placement: import("@popperjs/core").Placement; id: string; visibility: "hidden" | "visible"; selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string; columnCount: number; pageSizeRef: React.MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: { virtualItems: import("../..").VirtualItem[]; totalSize: number; scrollToOffset: (index: number, options?: import("../..").ScrollToOffsetOptions | undefined) => void; scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void; measure: () => void; }; UNSTABLE_defaultItemHeight: number; containerRef: React.RefObject<HTMLDivElement>; orientation: "horizontal" | "vertical"; indexRef: React.MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; mode: "multiple" | "single"; }; events: { updatePlacement(data: { placement: import("@popperjs/core").Placement; }): void; show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | React.SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; }, import("@workday/canvas-kit-react/common").RemoveNulls<import("@workday/canvas-kit-react/common").MergeProps<{ readonly id: string; readonly 'aria-haspopup': "true"; readonly 'aria-expanded': boolean; readonly onKeyDown: (event: React.KeyboardEvent) => void; }, import("@workday/canvas-kit-react/common").MergeProps<{ readonly ref: (instance: unknown) => void; readonly onContextMenu: (event: React.MouseEvent<Element, MouseEvent>) => void; }, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, {}>>>>>>>>; export declare const MenuTarget: import("@workday/canvas-kit-react/common").ElementComponentM<import("@workday/canvas-kit-react/common").ElementComponent<"button", import("@workday/canvas-kit-react/button").SecondaryButtonProps>, MenuTargetProps, { state: { stackRef: React.RefObject<HTMLDivElement>; targetRef: React.RefObject<HTMLButtonElement>; initialFocusRef: React.RefObject<any> | undefined; returnFocusRef: React.RefObject<any> | undefined; placement: import("@popperjs/core").Placement; id: string; visibility: "hidden" | "visible"; selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string; columnCount: number; pageSizeRef: React.MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: { virtualItems: import("../..").VirtualItem[]; totalSize: number; scrollToOffset: (index: number, options?: import("../..").ScrollToOffsetOptions | undefined) => void; scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void; measure: () => void; }; UNSTABLE_defaultItemHeight: number; containerRef: React.RefObject<HTMLDivElement>; orientation: "horizontal" | "vertical"; indexRef: React.MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; mode: "multiple" | "single"; }; events: { updatePlacement(data: { placement: import("@popperjs/core").Placement; }): void; show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | React.SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; }>; export declare const MenuTargetContext: import("@workday/canvas-kit-react/common").ElementComponentM<import("@workday/canvas-kit-react/common").ElementComponent<"button", import("@workday/canvas-kit-react/button").SecondaryButtonProps>, MenuTargetProps, { state: { stackRef: React.RefObject<HTMLDivElement>; targetRef: React.RefObject<HTMLButtonElement>; initialFocusRef: React.RefObject<any> | undefined; returnFocusRef: React.RefObject<any> | undefined; placement: import("@popperjs/core").Placement; id: string; visibility: "hidden" | "visible"; selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string; columnCount: number; pageSizeRef: React.MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: { virtualItems: import("../..").VirtualItem[]; totalSize: number; scrollToOffset: (index: number, options?: import("../..").ScrollToOffsetOptions | undefined) => void; scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void; measure: () => void; }; UNSTABLE_defaultItemHeight: number; containerRef: React.RefObject<HTMLDivElement>; orientation: "horizontal" | "vertical"; indexRef: React.MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; mode: "multiple" | "single"; }; events: { updatePlacement(data: { placement: import("@popperjs/core").Placement; }): void; show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | React.SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; }>; //# sourceMappingURL=MenuTarget.d.ts.map