UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

70 lines (69 loc) 2.47 kB
import * as React from 'react'; import type { PolymorphicForwardRefComponent } from '../../utils/index.js'; import { ListItem } from '../List/ListItem.js'; type TransferListListboxWrapperOwnProps = {}; type TransferListItemOwnProps = { /** * Callback fired when the the active state changes. */ onActiveChange?: (value: boolean) => void; } & React.ComponentProps<typeof ListItem>; type TransferListListboxLabelOwnProps = { /** * Text label that is wrapped by `TransferList.ListboxLabel` */ children?: string; }; /** * The TransferList component is used to display a list within a box * @example * <TransferList> * <TransferList.ListboxWrapper> * <TransferList.Listbox> * <TransferList.Item>Item 1</TransferList.Item> * <TransferList.Item>Item 2</TransferList.Item> * <TransferList.Item>Item 3</TransferList.Item> * <TransferList.Item>Item 4</TransferList.Item> * <TransferList.Item>Item 5</TransferList.Item> * <TransferList.Item>Item 6</TransferList.Item> * </TransferList.Listbox> * </TransferList.ListboxWrapper> * </TransferList> */ export declare const TransferList: PolymorphicForwardRefComponent<"div", {}> & { /** * TransferList listbox wrapper subcomponent */ ListboxWrapper: PolymorphicForwardRefComponent<"div", TransferListListboxWrapperOwnProps>; /** * TransferList listbox subcomponent */ Listbox: PolymorphicForwardRefComponent<"ul", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as"> & { as?: "div" | undefined; }>; /** * TransferList item subcomponent. * * Renders a `ListItem` and is compatible with `ListItem`'s [subcomponents](https://itwinui.bentley.com/docs/list#with-subcomponents). */ Item: PolymorphicForwardRefComponent<"li", TransferListItemOwnProps>; /** * TransferList listbox label subcomponent */ ListboxLabel: PolymorphicForwardRefComponent<"div", TransferListListboxLabelOwnProps>; /** * TransferList toolbar subcomponent */ Toolbar: PolymorphicForwardRefComponent<"div", object>; }; export declare const TransferListContext: React.Context<{ /** * Id to set to label and set 'aria-labelledby' prop of the listbox */ labelId?: string; /** * Callback that's fired when labelId is changed */ setLabelId: (labelId: string) => void; } | undefined>; export {};