@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
413 lines • 16.5 kB
TypeScript
import { ExtractProps } from '@workday/canvas-kit-react/common';
import { ListBox, ListProps } from '@workday/canvas-kit-react/collection';
export interface MenuListProps<T = any> extends Omit<ExtractProps<typeof ListBox, never>, 'children'> {
/**
* The label text of the MenuList.
*/
children: ListProps<T>['children'];
}
export declare const useMenuList: import("@workday/canvas-kit-react/common").BehaviorHook<{
state: {
stackRef: import("react").RefObject<HTMLDivElement>;
targetRef: import("react").RefObject<HTMLButtonElement>;
initialFocusRef: import("react").RefObject<any> | undefined;
returnFocusRef: import("react").RefObject<any> | undefined;
placement: import("@popperjs/core").Placement;
id: string;
visibility: "hidden" | "visible";
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject<HTMLDivElement>;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject<number>;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: import("@workday/canvas-kit-react/collection").Item<any>[];
mode: "multiple" | "single";
};
events: {
updatePlacement(data: {
placement: import("@popperjs/core").Placement;
}): void;
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
hide(event?: Event | import("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 | import("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;
};
UNSTABLE_parentModel: {
state: {
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject<HTMLDivElement>;
id: string;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject<number>;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: import("@workday/canvas-kit-react/collection").Item<any>[];
};
events: {
select(data: {
id: string;
}): void;
selectAll(): void;
unselectAll(): void;
setSelectedIds(ids: string[] | "all"): void;
remove(data: {
id: string;
nextId?: string | undefined;
event?: Event | import("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("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
UNSTABLE_parentModel: {
state: {
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject<HTMLDivElement>;
id: string;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject<number>;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: import("@workday/canvas-kit-react/collection").Item<any>[];
};
events: {
select(data: {
id: string;
}): void;
selectAll(): void;
unselectAll(): void;
setSelectedIds(ids: string[] | "all"): void;
remove(data: {
id: string;
nextId?: string | undefined;
event?: Event | import("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("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
} | undefined;
};
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
}, import("@workday/canvas-kit-react/common").RemoveNulls<import("@workday/canvas-kit-react/common").MergeProps<{
readonly role: "menu";
readonly 'aria-labelledby': string;
readonly 'aria-orientation': "horizontal" | "vertical";
}, 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<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, {}>>>>>>>>;
export declare const menuListStencil: import("@workday/canvas-kit-styling").Stencil<{
orientation: {
vertical: {
flexDirection: string;
};
horizontal: {
flexDirection: string;
};
};
}, {}, {}, never, never>;
export declare const MenuList: import("@workday/canvas-kit-react/common").ElementComponentM<"div", MenuListProps<any>, {
state: {
stackRef: import("react").RefObject<HTMLDivElement>;
targetRef: import("react").RefObject<HTMLButtonElement>;
initialFocusRef: import("react").RefObject<any> | undefined;
returnFocusRef: import("react").RefObject<any> | undefined;
placement: import("@popperjs/core").Placement;
id: string;
visibility: "hidden" | "visible";
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject<HTMLDivElement>;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject<number>;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: import("@workday/canvas-kit-react/collection").Item<any>[];
mode: "multiple" | "single";
};
events: {
updatePlacement(data: {
placement: import("@popperjs/core").Placement;
}): void;
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
hide(event?: Event | import("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 | import("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;
};
UNSTABLE_parentModel: {
state: {
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject<HTMLDivElement>;
id: string;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject<number>;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: import("@workday/canvas-kit-react/collection").Item<any>[];
};
events: {
select(data: {
id: string;
}): void;
selectAll(): void;
unselectAll(): void;
setSelectedIds(ids: string[] | "all"): void;
remove(data: {
id: string;
nextId?: string | undefined;
event?: Event | import("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("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
UNSTABLE_parentModel: {
state: {
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject<HTMLDivElement>;
id: string;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject<number>;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: import("@workday/canvas-kit-react/collection").Item<any>[];
};
events: {
select(data: {
id: string;
}): void;
selectAll(): void;
unselectAll(): void;
setSelectedIds(ids: string[] | "all"): void;
remove(data: {
id: string;
nextId?: string | undefined;
event?: Event | import("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("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
} | undefined;
};
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
}>;
//# sourceMappingURL=MenuList.d.ts.map