import React from 'react'; import { type ListBoxProps as ListBoxPropsAria, type Selection } from 'react-aria-components'; import './SortableListBox.scss'; type onSelectionChangeFirstParam = { anchorKey: string; currentKey: string; } & Selection; export type SortableListBoxItem = ListBoxItem; export interface SortableListBoxProps extends Omit, 'onSelectionChange'> { listItems?: SortableListBoxItem[]; id?: string; selectedItem?: object; onSelectionChange?: (item: onSelectionChangeFirstParam, key?: string) => void; sortBy?: { attribute: string; ascending: boolean; }; animate?: boolean; style?: React.CSSProperties; listItemStyle?: React.CSSProperties; enableAutoScroll?: boolean; ariaLabel?: string; } /** * @param props * @param props.listItems - {id: string | number, data: object, content: ReactNode | string, selected?: boolean}[] list of items to display * @param props.selectedItem - item that is currently selected * @param props.id - id of the list box * @param props.onSelectionChange - function to call when an item is selected, first param is the item, which is Selection with anchorKey and currentKey, second param is the key * @param props.sortBy - { attribute: string, ascending: boolean } sort by attribute and direction * @param props.animate - {boolean} animate the list box * @param props.style - {React.CSSProperties} style of the list box * @param props.enableAutoScroll - {boolean} enable auto scroll to selected item * @param props.listItemStyle - {React.CSSProperties} style of the list item */ export declare const SortableListBox: (props: SortableListBoxProps) => import("react/jsx-runtime").JSX.Element; export default SortableListBox; //# sourceMappingURL=SortableListBox.d.ts.map