UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

114 lines 5.06 kB
import React from 'react'; /** * `useComboboxInput` Adds all attributes necessary to start with a {@link ComboboxInput Combobox.Input}. It opens the * menu with arrow keys, uses {@link useListActiveDescendant}, and handles keyboard arrows to * navigate items of the menu. You may also compose this hook to add more specific behaviors for * your {@link ComboboxInput Combobox.Input}. */ export declare const useComboboxInput: 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("../../../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: { id: string; 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; }, import("@workday/canvas-kit-react/common").RemoveNulls<import("@workday/canvas-kit-react/common").MergeProps<{ readonly onKeyDown: (event: React.KeyboardEvent) => void; readonly onBlur: (event: React.FocusEvent) => void; readonly onClick: (event: React.MouseEvent) => void; readonly value: string | undefined; readonly role: "combobox"; readonly 'aria-haspopup': "listbox"; readonly 'aria-expanded': boolean; readonly 'aria-autocomplete': "list"; readonly 'aria-controls': `${string}-list`; readonly 'aria-activedescendant': null | undefined; readonly id: string; readonly ref: (instance: unknown) => void; }, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{ readonly onKeyDown: (event: React.KeyboardEvent<Element>) => void; }, import("@workday/canvas-kit-react/common").MergeProps<{ readonly 'aria-activedescendant': string | undefined; }, import("@workday/canvas-kit-react/common").MergeProps<{ readonly onKeyDown: (event: React.KeyboardEvent<Element>) => void; }, import("@workday/canvas-kit-react/common").MergeProps<{ readonly ref: (instance: unknown) => void; readonly onClick: (event: React.MouseEvent<Element, MouseEvent>) => void; }, {}>>>>>>>>; //# sourceMappingURL=useComboboxInput.d.ts.map