import React from "react"; import DragAndDropItem, { DragAndDropItemProps } from "../item/DragAndDropItem"; interface DragAndDropProps extends React.HTMLAttributes { children: React.ReactElement[]; setItems: React.Dispatch>; } interface DataDragAndDropRootComponent extends React.ForwardRefExoticComponent> { /** * @see 🏷️ {@link DragAndDropItemProps} * * @example * ```jsx * * * ... * * * ``` */ Item: typeof DragAndDropItem; } /** * TODO * [x] setItems on root * [x] state : active element * [x] pointer over listener / state, onPointerEnter, onPointerLeave * [x] Overlay - Use floating component * [x] Keyboard navigation * [ ] UU - announce on drag start, item moved, drag end * [x] Make overlay same width as the OG item, currently jumps to content width * [ ] Look into adding a cancel listener event * [ ] Make onClick work on drag handler button, currently blocked by pointer down/up listeners * [ ] Talk to design about what should happen on ESC key press, currently just cancels dragging, should it also reset position? * [ ] Make arrow icons into buttons that react to keyboard events, currently just decorative */ declare const DragAndDrop: DataDragAndDropRootComponent; export { DragAndDrop, DragAndDropItem }; export default DragAndDrop; export type { DragAndDropItemProps, DragAndDropProps };