fix(RAC): Tree DnD followup + docs (#8302)
* storybook: fix drop indicator style outside of iframe
* storybook: fix children not moving in drag
* storybook: allow dragging in second tree
* update getDropTargetFromPoint to handle ambiguous drop position: 'after last child' or 'after parent'
* fix serializeItem to handle empty children
* add `position: relative` to the drop indicator row to fix scrolling it into view
* add aria-expanded to TreeDropIndicator row
* fix drop indicator missing level style
* add docs
* fix types
* remove aria-expanded from insertion indicator
* docs types fixes
* If dropping "after" an expanded item with children, change target to be "before" its first actual child item.
* init TreeDropTargetDelegate
* lint
* add comment
* handle currentItem?.nextKey != null
* add TreeDropTargetDelegate to exports and DropHooks
* fixes and cleanup
* cleanup
* fix indention in docs examples
* fix duplicate key dropping
* fix directory example
* up X_SWITCH_THRESHOLD to 10
* add recursive rendering to docs examples
* fix dup keys in DroppableTree
* Add indentation to drop indicator
* Improve docs examples
* Fix insertion indicator indentation when checkboxes and drag buttons are not present
* shorten duplicate item data in examples
* docs types
* fix dropping before first expanded parent
* add isValidDropTarget checks
* handle reorder 'after' expanded parent should not be a target
* Allow dropping after dragged key, but not after one of its children
* Reorder examples
* feat: Ensure that getKeys filters out selected child keys if parent key is selected (#8337)
* Fix tree docs example by accounting for child keys that are included in a selected parent
* update getKeys to automatically filter out child keys if parent key is also selected
* fix infinite loop and add test
* add serializeItem to other examples so children get unique ids
* docs: increase indention between levels
* default to root drop target if there are no potential targets
* allowsDragging should be false if dragging disabled
* add unit tests
* Update packages/react-aria-components/docs/Tree.mdx
Co-authored-by: Devon Govett <devongovett@gmail.com>
* optimize getKeys to be linear
---------
Co-authored-by: Devon Govett <devongovett@gmail.com>
Co-authored-by: Daniel Lu <dl1644@gmail.com>