RSP-1114 V3 Menu (#63)
* Expose modifier keys from Press events
* Implement selection and focus management hooks for collection components
* Make typescript happy
* lint
* Tests for usePress modifier keys
* initial refactor of useMenuTrigger as per prior review comments
* Changing button so that domProps and buttonProps are merged
This allows things like user provided onMouseDown to actually trigger instead of getting overidden by buttonProps
* Updating menuTrigger tests to reflect refactor
* lint fixes
* Adding greater than 2 children support to menuTrigger
parity with v2 dropdown and for future v3 split button support
* Initial progress on v3 Menu
ommiting tree stuff, just setting up the basic building blocks for Menu
* Fix PageUp and PageDown
* more questions for design review, more stories, tentative components
* Preserve order of children in MenuTrigger
* playing around with submenus
* Scroll focused item into view when tabbing to the CollectionView
* Lint
* Adding useMenu hook
* Disable animated scrolling
Was causing it to be slow and get backed up in the queue when holding down arrow keys
* Only focus items if the entire collection also has focus
* Adding disabledKeys, headingHeight, and allowing Item prop definition
Item prop definition is for static item and section definition where the user puts or as a Item prop
* Attempt to focus first or last item depending on relatedTarget
* The linter hates me
* Cleanup and adding interfaces
* Adding Menu interface
* Addressing review comments
* Adding onSelect to Menu
* Fixing RTL css
* Supporting user defined jsx tag for CollectionView and fixing lint
* adding some tests for menu
* Adjusting menu to use selection/focus management hooks
* Fixed the MenuTrigger wrapper and useSelectableItem ref handling
* Fixing static submenus and adding focusStrategy (in progress)
* refactoring focusStrategy to use ref instead of state
* cleanup and lint fixes
* fixing stories and lint
* Fixing MenuTrigger test
* Updating useMenuTrigger test
* addressing review comments
* Fixing Menu aria-label/aria-labelledby
* fixing lint and adjusting to new DOMProps usage
* reverting change to useButton since we no longer mergeprops in button
* RSP-1438 [Accessibility] fix keyboard navigation in useSelectableCollection
FocusRing should continuePropagation so that ancestors can handle focus/blur events.
* Fixing some outdated refs and debugging some focus issues
* Fixing focus issue on Enter/Space keypress and adjusting default focus behavior
* Fixing final focus bug (hopefully)
* Fixing lint and patching tests
* Modifying useSelectableCollection so that up/down arrow nav loops properly
* adding a way to disable a (sub)menutrigger, disabling submenu triggers if they are disabled
* Addressing review comments
* Fixing lint
* Moving onSelect from useMenuTrigger to MenuItem
* fixing menu item key press and disabled menu item tab index
* Removing li tags in favor of div with role
* Fixing lint
* Removing submenu experiemental stuff for now
* Fixing focus so it changes on menu mouseover
* Removing onSelect in favor of onSelectionChange
* Fixing divider visibility, adding popover to menu stories, review comments
* retriggering build
* Fixing it so clicking on menuItem properly closes the menu
* Changing focusStrategy to be state
* Making Divider render before Header except for the first header
* Updating static stories
* Fixing lint
* Fixing Divider rendering for static menu cases
* Removing isDisabled/isSelected support in favor of future RSP-1483 work
* Fixing lint
* Adding controlled/uncontrolled/autoFocus=false menuTrigger stories
* Reverting preventScroll to true, investigate in RSP-1488
* Review comments
* Adding aria-level=3 to MenuHeading as a bandaid for now
Co-authored-by: Devon Govett <devongovett@gmail.com>
Co-authored-by: Michael Jordan <michael@majordan.net>