UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

429 lines • 15.7 kB
import React from 'react'; import { ExtractProps } from '@workday/canvas-kit-react/common'; import { Item } from '@workday/canvas-kit-react/collection'; import { Box } from '@workday/canvas-kit-react/layout'; export interface TabPanelProps extends ExtractProps<typeof Box, never> { /** * The contents of the TabPanel. */ children: React.ReactNode; /** * The identifier of the tab. This identifier will be used in change events and for `initialTab`. * Must match the `data-id` of the associated tab item. If this property is not provided, it will * default to a string representation of the the zero-based index of the Tab when it was * initialized. */ 'data-id'?: string; /** * Part of the ARIA specification for tabs. By default, all `tabpanel` elements have a `tabIndex` * of `0` which makes the whole content area receive focus. If you have a focusable item near the * top of the tab panel content area, you may set `tabIndex` to `undefined` to prevent the tab * panel element from receiving focus. Only do this is a child of the tab panel can receive focus. */ tabIndex?: number; } export declare const useTabsPanel: import("@workday/canvas-kit-react/common").BehaviorHook<{ state: { getId: (item: any) => string; orientation: import("@workday/canvas-kit-react/collection").Orientation; panels: Item<any>[]; panelIndexRef: React.MutableRefObject<number>; hiddenIds: string[]; itemSizeCache: Record<string, number>; itemWidthCache: Record<string, number>; containerSize: number; containerWidth: number; containerGap: number; overflowTargetWidth: number; 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>; id: string; indexRef: React.MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: Item<any>[]; }; events: { registerPanel: (data: { id: string; textValue: string; }) => void; unregisterPanel: (data: { id: string; }) => void; select(data: { id: string; }): void; setContainerSize(data: { width?: number | undefined; height?: number | undefined; }): void; setContainerWidth(data: { width?: number | undefined; }): void; setContainerGap(data: { size: number; }): void; setOverflowTargetSize(data: { width: number; height: number; }): void; setOverflowTargetWidth(data: { width: number; }): void; addItemWidth(data: { id: string; width: number; }): void; addItemSize(data: { id: string; width: number; height: number; }): void; removeItemSize(data: { id: string; }): void; removeItemWidth(data: { id: string; }): void; addHiddenKey(data: { id: string; }): void; removeHiddenKey(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; }; menu: { 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: 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("@workday/canvas-kit-react/collection").SelectionManager; navigation: import("@workday/canvas-kit-react/collection").NavigationManager; getId: (item: any) => string; }; selection: import("@workday/canvas-kit-react/collection").SelectionManager; navigation: import("@workday/canvas-kit-react/collection").NavigationManager; getId: (item: any) => string; }, { readonly role: "tabpanel"; readonly 'aria-labelledby': string; readonly hidden: boolean; readonly id: string; readonly tabIndex: 0; }>; export declare const TabsPanel: import("@workday/canvas-kit-react/common").ElementComponentM<"div", TabPanelProps, { state: { getId: (item: any) => string; orientation: import("@workday/canvas-kit-react/collection").Orientation; panels: Item<any>[]; panelIndexRef: React.MutableRefObject<number>; hiddenIds: string[]; itemSizeCache: Record<string, number>; itemWidthCache: Record<string, number>; containerSize: number; containerWidth: number; containerGap: number; overflowTargetWidth: number; 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>; id: string; indexRef: React.MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: Item<any>[]; }; events: { registerPanel: (data: { id: string; textValue: string; }) => void; unregisterPanel: (data: { id: string; }) => void; select(data: { id: string; }): void; setContainerSize(data: { width?: number | undefined; height?: number | undefined; }): void; setContainerWidth(data: { width?: number | undefined; }): void; setContainerGap(data: { size: number; }): void; setOverflowTargetSize(data: { width: number; height: number; }): void; setOverflowTargetWidth(data: { width: number; }): void; addItemWidth(data: { id: string; width: number; }): void; addItemSize(data: { id: string; width: number; height: number; }): void; removeItemSize(data: { id: string; }): void; removeItemWidth(data: { id: string; }): void; addHiddenKey(data: { id: string; }): void; removeHiddenKey(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; }; menu: { 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: 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("@workday/canvas-kit-react/collection").SelectionManager; navigation: import("@workday/canvas-kit-react/collection").NavigationManager; getId: (item: any) => string; }; selection: import("@workday/canvas-kit-react/collection").SelectionManager; navigation: import("@workday/canvas-kit-react/collection").NavigationManager; getId: (item: any) => string; }>; //# sourceMappingURL=TabsPanel.d.ts.map