@workday/canvas-kit-preview-react
Version:
Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.
331 lines • 13.5 kB
TypeScript
import React from 'react';
export interface MultiSelectedItemProps {
/**
* Remove label on a MultiSelectedItem. In English, the label may be "Remove" and the screen
* reader will read out "Remove {option}".
*
* @default "remove"
*/
removeLabel?: string;
}
export declare const useMultiSelectedItem: 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("@workday/canvas-kit-react/collection").VirtualItem[];
totalSize: number;
scrollToOffset: (index: number, options?: import("@workday/canvas-kit-react/collection").ScrollToOffsetOptions | undefined) => void;
scrollToIndex: (index: number, options?: import("@workday/canvas-kit-react/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("@workday/canvas-kit-react/collection").Item<any>[];
mode: "multiple" | "single";
value: string | undefined;
inputRef: React.RefObject<HTMLInputElement>;
width: number;
};
events: {
setWidth(width: number): void;
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: {
item: any;
textValue: string;
}): void;
unregisterItem(data: {
id: string;
}): void;
updateItemHeight(data: {
value: number;
}): void;
};
onFilterChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
selected: {
state: {
cursorId: string;
selectedIds: string[] | "all";
unselectedIds: string[];
columnCount: number;
pageSizeRef: React.MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: {
virtualItems: import("@workday/canvas-kit-react/collection").VirtualItem[];
totalSize: number;
scrollToOffset: (index: number, options?: import("@workday/canvas-kit-react/collection").ScrollToOffsetOptions | undefined) => void;
scrollToIndex: (index: number, options?: import("@workday/canvas-kit-react/collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
measure: () => void;
};
UNSTABLE_defaultItemHeight: number;
containerRef: React.RefObject<HTMLDivElement>;
id: string;
orientation: "horizontal" | "vertical";
indexRef: 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 | 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: {
item: any;
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;
};
}, import("@workday/canvas-kit-react/common").RemoveNulls<import("@workday/canvas-kit-react/common").MergeProps<{
readonly 'aria-selected': true;
}, import("@workday/canvas-kit-react/common").MergeProps<{
readonly onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
readonly onClick: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
}, import("@workday/canvas-kit-react/common").MergeProps<{
readonly onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
readonly onClick: () => void;
readonly 'data-focus-id': `${string}-undefined` | `${string}-${string}`;
readonly tabIndex: 0 | -1;
}, import("@workday/canvas-kit-react/common").MergeProps<{
readonly ref: (instance: HTMLElement | null) => void;
readonly 'data-id': string;
readonly disabled: true | undefined;
readonly item: null;
readonly virtual: null;
readonly 'aria-setsize': number | undefined;
readonly 'aria-posinset': number | undefined;
readonly style: React.CSSProperties;
readonly id: string;
}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, {}>>>>>>>>;
export declare const MultiSelectedItem: import("@workday/canvas-kit-react/common").ElementComponentM<"span", MultiSelectedItemProps, {
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("@workday/canvas-kit-react/collection").VirtualItem[];
totalSize: number;
scrollToOffset: (index: number, options?: import("@workday/canvas-kit-react/collection").ScrollToOffsetOptions | undefined) => void;
scrollToIndex: (index: number, options?: import("@workday/canvas-kit-react/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("@workday/canvas-kit-react/collection").Item<any>[];
mode: "multiple" | "single";
value: string | undefined;
inputRef: React.RefObject<HTMLInputElement>;
width: number;
};
events: {
setWidth(width: number): void;
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: {
item: any;
textValue: string;
}): void;
unregisterItem(data: {
id: string;
}): void;
updateItemHeight(data: {
value: number;
}): void;
};
onFilterChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
selected: {
state: {
cursorId: string;
selectedIds: string[] | "all";
unselectedIds: string[];
columnCount: number;
pageSizeRef: React.MutableRefObject<number>;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: {
virtualItems: import("@workday/canvas-kit-react/collection").VirtualItem[];
totalSize: number;
scrollToOffset: (index: number, options?: import("@workday/canvas-kit-react/collection").ScrollToOffsetOptions | undefined) => void;
scrollToIndex: (index: number, options?: import("@workday/canvas-kit-react/collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
measure: () => void;
};
UNSTABLE_defaultItemHeight: number;
containerRef: React.RefObject<HTMLDivElement>;
id: string;
orientation: "horizontal" | "vertical";
indexRef: 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 | 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: {
item: any;
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;
};
}>;
//# sourceMappingURL=MultiSelectedItem.d.ts.map