@fluentui/react-menu 0.0.0-nightly0e0cf06c3420211029.1 → 0.0.0-nightly3082edf34720220208.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +360 -26
- package/CHANGELOG.md +81 -20
- package/Spec.md +21 -16
- package/dist/react-menu.d.ts +139 -70
- package/lib/MenuSplitGroup.d.ts +1 -0
- package/lib/MenuSplitGroup.js +2 -0
- package/lib/MenuSplitGroup.js.map +1 -0
- package/lib/components/Menu/Menu.js +7 -7
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/renderMenu.d.ts +1 -1
- package/lib/components/Menu/renderMenu.js +1 -1
- package/lib/components/Menu/renderMenu.js.map +1 -1
- package/lib/components/Menu/useMenu.d.ts +2 -2
- package/lib/components/Menu/useMenu.js +119 -128
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
- package/lib/components/Menu/useMenuContextValues.js +35 -33
- package/lib/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
- package/lib/components/MenuDivider/MenuDivider.js +8 -8
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
- package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js +7 -7
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
- package/lib/components/MenuDivider/useMenuDivider.js +9 -7
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js +7 -5
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
- package/lib/components/MenuGroup/MenuGroup.js +10 -8
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
- package/lib/components/MenuGroup/index.d.ts +1 -0
- package/lib/components/MenuGroup/index.js +1 -0
- package/lib/components/MenuGroup/index.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js +7 -7
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
- package/lib/components/MenuGroup/useMenuGroup.js +10 -7
- package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js +8 -8
- package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
- package/lib/components/MenuGroup/useMenuGroupStyles.js +7 -0
- package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
- package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js +8 -8
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +7 -7
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +13 -8
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +7 -5
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.d.ts +1 -1
- package/lib/components/MenuItem/MenuItem.js +8 -10
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
- package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
- package/lib/components/MenuItem/renderMenuItem.js +12 -8
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useCharacterSearch.js +7 -7
- package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
- package/lib/components/MenuItem/useMenuItem.js +35 -45
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.d.ts +2 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +31 -27
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +8 -8
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/index.d.ts +1 -0
- package/lib/components/MenuItemCheckbox/index.js +1 -0
- package/lib/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +11 -8
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +14 -15
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +8 -5
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.js +8 -8
- package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/index.d.ts +1 -0
- package/lib/components/MenuItemRadio/index.js +1 -0
- package/lib/components/MenuItemRadio/index.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js +11 -8
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.js +14 -14
- package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +8 -5
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib/components/MenuList/MenuList.d.ts +1 -1
- package/lib/components/MenuList/MenuList.js +10 -10
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/MenuList.types.d.ts +12 -10
- package/lib/components/MenuList/renderMenuList.d.ts +1 -1
- package/lib/components/MenuList/renderMenuList.js +7 -7
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.d.ts +1 -1
- package/lib/components/MenuList/useMenuList.js +70 -87
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js +19 -17
- package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib/components/MenuList/useMenuListStyles.d.ts +2 -1
- package/lib/components/MenuList/useMenuListStyles.js +9 -7
- package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.js +7 -7
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
- package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js +9 -7
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
- package/lib/components/MenuPopover/useMenuPopover.js +35 -41
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js +13 -8
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
- package/lib/components/MenuSplitGroup/index.d.ts +5 -0
- package/lib/components/MenuSplitGroup/index.js +6 -0
- package/lib/components/MenuSplitGroup/index.js.map +1 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
- package/lib/components/MenuTrigger/MenuTrigger.js +6 -5
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
- package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
- package/lib/components/MenuTrigger/useMenuTrigger.js +166 -5
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/contexts/menuContext.d.ts +1 -1
- package/lib/contexts/menuContext.js +5 -11
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.d.ts +1 -1
- package/lib/contexts/menuGroupContext.js +3 -5
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.d.ts +1 -1
- package/lib/contexts/menuListContext.js +7 -17
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/contexts/menuTriggerContext.d.ts +1 -1
- package/lib/contexts/menuTriggerContext.js +3 -5
- package/lib/contexts/menuTriggerContext.js.map +1 -1
- package/lib/index.d.ts +11 -10
- package/lib/index.js +11 -10
- package/lib/index.js.map +1 -1
- package/lib/selectable/useCheckmarkStyles.d.ts +2 -2
- package/lib/selectable/useCheckmarkStyles.js +4 -4
- package/lib/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib/utils/useIsSubmenu.js +3 -5
- package/lib/utils/useIsSubmenu.js.map +1 -1
- package/lib/utils/useOnMenuEnter.js +16 -14
- package/lib/utils/useOnMenuEnter.js.map +1 -1
- package/lib-commonjs/Menu.js +1 -1
- package/lib-commonjs/MenuDivider.js +1 -1
- package/lib-commonjs/MenuGroup.js +1 -1
- package/lib-commonjs/MenuGroupHeader.js +1 -1
- package/lib-commonjs/MenuItem.js +1 -1
- package/lib-commonjs/MenuItemCheckbox.js +1 -1
- package/lib-commonjs/MenuItemRadio.js +1 -1
- package/lib-commonjs/MenuList.js +1 -1
- package/lib-commonjs/MenuPopover.js +1 -1
- package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
- package/lib-commonjs/MenuSplitGroup.js +10 -0
- package/lib-commonjs/MenuSplitGroup.js.map +1 -0
- package/lib-commonjs/MenuTrigger.js +1 -1
- package/lib-commonjs/components/Menu/Menu.js +7 -7
- package/lib-commonjs/components/Menu/Menu.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js +1 -1
- package/lib-commonjs/components/Menu/renderMenu.d.ts +1 -1
- package/lib-commonjs/components/Menu/renderMenu.js +5 -5
- package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
- package/lib-commonjs/components/Menu/useMenu.js +130 -141
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.js +37 -35
- package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js +9 -9
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
- package/lib-commonjs/components/MenuDivider/index.js +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +11 -12
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js +12 -11
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +11 -7
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.js +12 -9
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
- package/lib-commonjs/components/MenuGroup/index.d.ts +1 -0
- package/lib-commonjs/components/MenuGroup/index.js +3 -1
- package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +12 -13
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js +13 -11
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +11 -11
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +3 -0
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +18 -0
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +9 -9
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
- package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +11 -12
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +16 -12
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +11 -7
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.js +9 -12
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
- package/lib-commonjs/components/MenuItem/index.js +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js +16 -14
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js +7 -7
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
- package/lib-commonjs/components/MenuItem/useMenuItem.js +42 -53
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +40 -33
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +9 -9
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +1 -0
- package/lib-commonjs/components/MenuItemCheckbox/index.js +3 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +15 -14
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +19 -21
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +12 -7
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +9 -9
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.d.ts +1 -0
- package/lib-commonjs/components/MenuItemRadio/index.js +3 -1
- package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +15 -14
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +19 -20
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +12 -7
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
- package/lib-commonjs/components/MenuList/MenuList.js +11 -11
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.types.d.ts +12 -10
- package/lib-commonjs/components/MenuList/index.js +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js +12 -13
- package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js +77 -95
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js +21 -19
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.js +12 -9
- package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.js +8 -8
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
- package/lib-commonjs/components/MenuPopover/index.js +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +14 -13
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js +43 -50
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +17 -10
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
- package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +6 -5
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +6 -3
- package/lib-commonjs/components/MenuTrigger/index.js +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +5 -5
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +174 -7
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/index.js +1 -1
- package/lib-commonjs/contexts/menuContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuContext.js +6 -12
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js +5 -7
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuListContext.js +8 -18
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.js +5 -7
- package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
- package/lib-commonjs/index.d.ts +11 -10
- package/lib-commonjs/index.js +17 -15
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/selectable/index.js +1 -1
- package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +2 -2
- package/lib-commonjs/selectable/useCheckmarkStyles.js +7 -7
- package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib-commonjs/utils/index.js +1 -1
- package/lib-commonjs/utils/useIsSubmenu.js +5 -7
- package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js +18 -16
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +15 -17
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -12
- package/lib/common/isConformant.js.map +0 -1
- package/lib/common/mockUseMenuContext.d.ts +0 -7
- package/lib/common/mockUseMenuContext.js +0 -36
- package/lib/common/mockUseMenuContext.js.map +0 -1
- package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
- package/lib/components/MenuTrigger/useTriggerElement.js +0 -179
- package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -23
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
- package/lib-commonjs/common/mockUseMenuContext.js +0 -47
- package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -195
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
package/Spec.md
CHANGED
|
@@ -619,7 +619,7 @@ const menu = (
|
|
|
619
619
|
|
|
620
620
|
```html
|
|
621
621
|
<!-- expected DOM output -->
|
|
622
|
-
<button aria-haspopup="
|
|
622
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
|
623
623
|
<div role="menu" aria-labelledby="trigger">
|
|
624
624
|
<div role="menuitem" tabindex="0">Option 1</div>
|
|
625
625
|
<div role="menuitem" tabindex="-1">Option 2</div>
|
|
@@ -644,7 +644,7 @@ const menu = (
|
|
|
644
644
|
|
|
645
645
|
```html
|
|
646
646
|
<!-- expected DOM output -->
|
|
647
|
-
<button aria-haspopup="
|
|
647
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
|
648
648
|
<div role="menu" aria-labelledby="trigger">
|
|
649
649
|
<div role="menuitem" tabindex="0">
|
|
650
650
|
<span role="presentation"><svg>FileIcon</svg></span>
|
|
@@ -682,7 +682,7 @@ const menu = (
|
|
|
682
682
|
|
|
683
683
|
```html
|
|
684
684
|
<!-- expected DOM output -->
|
|
685
|
-
<button aria-haspopup="
|
|
685
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
|
686
686
|
<div role="menu" aria-labelledby="trigger">
|
|
687
687
|
<div role="menuitem" tabindex="0">Option 1</div>
|
|
688
688
|
<div role="separator" aria-hidden="true"></div>
|
|
@@ -719,7 +719,7 @@ const menu = (
|
|
|
719
719
|
|
|
720
720
|
```html
|
|
721
721
|
<!-- expected DOM output -->
|
|
722
|
-
<button aria-haspopup="
|
|
722
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
|
723
723
|
<div role="menu" aria-labelledby="trigger">
|
|
724
724
|
<div role="menuitem" tabindex="0">Option 1</div>
|
|
725
725
|
<div role="separator" aria-hidden="true"></div>
|
|
@@ -758,10 +758,10 @@ const menu = (
|
|
|
758
758
|
|
|
759
759
|
```html
|
|
760
760
|
<!-- expected DOM output -->
|
|
761
|
-
<button aria-haspopup="
|
|
761
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
|
762
762
|
<div role="menu" aria-labelledby="trigger">
|
|
763
763
|
<div role="menuitem" tabindex="0">Option 1</div>
|
|
764
|
-
<div role="menuitem" tabindex="-1" aria-haspopup="
|
|
764
|
+
<div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trigger">Open submenu</div>
|
|
765
765
|
</div>
|
|
766
766
|
|
|
767
767
|
<!-- expected DOM output for submenu -->
|
|
@@ -843,7 +843,7 @@ const menuSelectableSections = (
|
|
|
843
843
|
```
|
|
844
844
|
|
|
845
845
|
```html
|
|
846
|
-
<button aria-haspopup="
|
|
846
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
|
847
847
|
|
|
848
848
|
<!-- expected DOM output for basic checkbox -->
|
|
849
849
|
<div role="menu" aria-labelledby="trigger">
|
|
@@ -882,9 +882,12 @@ const menuSplitbutton= (
|
|
|
882
882
|
<MenuList>
|
|
883
883
|
<MenuItem>Option 1</MenuItem>
|
|
884
884
|
<Menu>
|
|
885
|
-
<
|
|
886
|
-
<
|
|
887
|
-
|
|
885
|
+
<MenuSplitGroup>
|
|
886
|
+
<MenuItem>Main action</MenuItem>
|
|
887
|
+
<MenuTrigger>
|
|
888
|
+
<MenuItem />
|
|
889
|
+
</MenuTrigger>
|
|
890
|
+
</MenuSplitGroup>
|
|
888
891
|
<MenuItem>Option 1</MenuItem>
|
|
889
892
|
<MenuItem>Option 2</MenuItem>
|
|
890
893
|
<MenuItem>Option 3</MenuItem>
|
|
@@ -897,7 +900,7 @@ const menuSplitbutton= (
|
|
|
897
900
|
```html
|
|
898
901
|
<div role="menu" aria-labelledby="trigger">
|
|
899
902
|
<div role="menuitem" tabindex="0">Option 1</div>
|
|
900
|
-
<div role="menuitem" tabindex="-1" aria-haspopup="
|
|
903
|
+
<div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trigger">Open submenu</div>
|
|
901
904
|
</div>
|
|
902
905
|
|
|
903
906
|
<!-- expected DOM output -->
|
|
@@ -905,7 +908,7 @@ const menuSplitbutton= (
|
|
|
905
908
|
<div role="menuitem" tabindex="0">Option 1</div>
|
|
906
909
|
<div role="group">
|
|
907
910
|
<div role="menuitem" tabindex="-1">content slot</div>
|
|
908
|
-
<div role="menuitem" tabindex="-1" aria-haspopup="
|
|
911
|
+
<div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trgger">
|
|
909
912
|
<svg>indicator icon</svg>
|
|
910
913
|
</div>
|
|
911
914
|
</div>
|
|
@@ -958,11 +961,13 @@ Below is a set of diagrams that tries to illustrates all the interactions menus
|
|
|
958
961
|
|
|
959
962
|
All of the above Mouse events seen previously should apply to the part of the split button that is intended to open a submenu.
|
|
960
963
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-

|
|
964
|
+
> TODO convert these diagrams to excalidraw or smth that is text format
|
|
965
|
+
> TODO add extra descriptions to diagrams
|
|
964
966
|
|
|
965
|
-
|
|
967
|
+
<img src="./etc/images/menu-interactions/Slide19.PNG" width="700" />
|
|
968
|
+
<img src="./etc/images/menu-interactions/Slide20.PNG" width="700" />
|
|
969
|
+
<img src="./etc/images/menu-interactions/Slide21.PNG" width="700" />
|
|
970
|
+
<img src="./etc/images/menu-interactions/Slide22.PNG" width="700" />
|
|
966
971
|
|
|
967
972
|
### MenuItem selection
|
|
968
973
|
|
package/dist/react-menu.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ import { ComponentProps } from '@fluentui/react-utilities';
|
|
|
2
2
|
import { ComponentState } from '@fluentui/react-utilities';
|
|
3
3
|
import type { Context } from '@fluentui/react-context-selector';
|
|
4
4
|
import type { ContextSelector } from '@fluentui/react-context-selector';
|
|
5
|
+
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
|
|
5
6
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
6
|
-
import { IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
|
7
7
|
import { PositioningShorthand } from '@fluentui/react-positioning';
|
|
8
8
|
import * as React_2 from 'react';
|
|
9
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
9
10
|
import { usePopperMouseTarget } from '@fluentui/react-positioning';
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -13,6 +14,15 @@ import { usePopperMouseTarget } from '@fluentui/react-positioning';
|
|
|
13
14
|
*/
|
|
14
15
|
export declare const Menu: React_2.FC<MenuProps>;
|
|
15
16
|
|
|
17
|
+
export declare type MenuCheckedValueChangeData = {
|
|
18
|
+
/** The name of the value */
|
|
19
|
+
name: string;
|
|
20
|
+
/** The items for this value that are checked */
|
|
21
|
+
checkedItems: string[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export declare type MenuCheckedValueChangeEvent = React_2.MouseEvent | React_2.KeyboardEvent;
|
|
25
|
+
|
|
16
26
|
declare type MenuCommons = MenuListCommons & {
|
|
17
27
|
/**
|
|
18
28
|
* Whether the popup is open
|
|
@@ -64,23 +74,27 @@ export declare type MenuContextValues = {
|
|
|
64
74
|
};
|
|
65
75
|
|
|
66
76
|
/**
|
|
67
|
-
* Define a styled MenuDivider, using the `
|
|
77
|
+
* Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.
|
|
68
78
|
*/
|
|
69
79
|
export declare const MenuDivider: ForwardRefComponent<MenuDividerProps>;
|
|
70
80
|
|
|
81
|
+
export declare const menuDividerClassName = "fui-MenuDivider";
|
|
82
|
+
|
|
71
83
|
export declare type MenuDividerProps = ComponentProps<MenuDividerSlots>;
|
|
72
84
|
|
|
73
85
|
export declare type MenuDividerSlots = {
|
|
74
|
-
root:
|
|
86
|
+
root: Slot<'div'>;
|
|
75
87
|
};
|
|
76
88
|
|
|
77
89
|
export declare type MenuDividerState = ComponentState<MenuDividerSlots>;
|
|
78
90
|
|
|
79
91
|
/**
|
|
80
|
-
* Define a styled MenuGroup, using the `
|
|
92
|
+
* Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.
|
|
81
93
|
*/
|
|
82
94
|
export declare const MenuGroup: ForwardRefComponent<MenuGroupProps>;
|
|
83
95
|
|
|
96
|
+
export declare const menuGroupClassName = "fui-MenuGroup";
|
|
97
|
+
|
|
84
98
|
export declare const MenuGroupContextProvider: React_2.Provider<MenuGroupContextValue>;
|
|
85
99
|
|
|
86
100
|
/**
|
|
@@ -99,14 +113,16 @@ export declare type MenuGroupContextValues = {
|
|
|
99
113
|
};
|
|
100
114
|
|
|
101
115
|
/**
|
|
102
|
-
* Define a styled MenuGroupHeader, using the `
|
|
116
|
+
* Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
|
|
103
117
|
*/
|
|
104
118
|
export declare const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps>;
|
|
105
119
|
|
|
120
|
+
export declare const menuGroupHeaderClassName = "fui-MenuGroupHeader";
|
|
121
|
+
|
|
106
122
|
export declare type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;
|
|
107
123
|
|
|
108
124
|
export declare type MenuGroupHeaderSlots = {
|
|
109
|
-
root:
|
|
125
|
+
root: Slot<'div'>;
|
|
110
126
|
};
|
|
111
127
|
|
|
112
128
|
export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
|
|
@@ -114,7 +130,7 @@ export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
|
|
|
114
130
|
export declare type MenuGroupProps = ComponentProps<MenuGroupSlots>;
|
|
115
131
|
|
|
116
132
|
export declare type MenuGroupSlots = {
|
|
117
|
-
root:
|
|
133
|
+
root: Slot<'div'>;
|
|
118
134
|
};
|
|
119
135
|
|
|
120
136
|
export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
|
|
@@ -125,19 +141,23 @@ export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
|
|
|
125
141
|
};
|
|
126
142
|
|
|
127
143
|
/**
|
|
128
|
-
* Define a styled MenuItem, using the `
|
|
144
|
+
* Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
|
|
129
145
|
*/
|
|
130
146
|
export declare const MenuItem: ForwardRefComponent<MenuItemProps>;
|
|
131
147
|
|
|
132
148
|
/**
|
|
133
|
-
* Define a styled MenuItemCheckbox, using the `
|
|
149
|
+
* Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
|
|
134
150
|
*/
|
|
135
151
|
export declare const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps>;
|
|
136
152
|
|
|
153
|
+
export declare const menuItemCheckboxClassName = "fui-MenuItemCheckbox";
|
|
154
|
+
|
|
137
155
|
export declare type MenuItemCheckboxProps = MenuItemProps & MenuItemSelectableProps;
|
|
138
156
|
|
|
139
157
|
export declare type MenuItemCheckboxState = MenuItemState & MenuItemSelectableState;
|
|
140
158
|
|
|
159
|
+
export declare const menuItemClassName = "fui-MenuItem";
|
|
160
|
+
|
|
141
161
|
declare type MenuItemCommons = {
|
|
142
162
|
/**
|
|
143
163
|
* If the menu item is a trigger for a submenu
|
|
@@ -156,10 +176,12 @@ declare type MenuItemCommons = {
|
|
|
156
176
|
export declare type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & MenuItemCommons;
|
|
157
177
|
|
|
158
178
|
/**
|
|
159
|
-
* Define a styled MenuItemRadio, using the `
|
|
179
|
+
* Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
|
|
160
180
|
*/
|
|
161
181
|
export declare const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps>;
|
|
162
182
|
|
|
183
|
+
export declare const menuItemRadioClassName = "fui-MenuItemRadio";
|
|
184
|
+
|
|
163
185
|
export declare type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;
|
|
164
186
|
|
|
165
187
|
export declare type MenuItemRadioState = MenuItemState & MenuItemSelectableState;
|
|
@@ -199,43 +221,40 @@ export declare type MenuItemSelectableState = MenuItemSelectableProps & {
|
|
|
199
221
|
};
|
|
200
222
|
|
|
201
223
|
export declare type MenuItemSlots = {
|
|
202
|
-
root:
|
|
224
|
+
root: Slot<'div'>;
|
|
203
225
|
/**
|
|
204
226
|
* Icon slot rendered before children content
|
|
205
227
|
*/
|
|
206
|
-
icon?:
|
|
228
|
+
icon?: Slot<'span'>;
|
|
207
229
|
/**
|
|
208
230
|
* A helper slot for alignment when a menu item is used with selectable menuitems
|
|
209
231
|
* Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components
|
|
210
232
|
*/
|
|
211
|
-
checkmark?:
|
|
233
|
+
checkmark?: Slot<'span'>;
|
|
212
234
|
/**
|
|
213
235
|
* Icon slot that shows the indicator for a submenu
|
|
214
236
|
*/
|
|
215
|
-
submenuIndicator?:
|
|
237
|
+
submenuIndicator?: Slot<'span'>;
|
|
216
238
|
/**
|
|
217
239
|
* Component children are placed in this slot
|
|
218
240
|
* Avoid using the `children` property in this slot in favour of Component children whenever possible
|
|
219
241
|
*/
|
|
220
|
-
content
|
|
242
|
+
content?: Slot<'span'>;
|
|
221
243
|
/**
|
|
222
244
|
* Secondary content rendered opposite the primary content (e.g Shortcut text)
|
|
223
245
|
*/
|
|
224
|
-
secondaryContent?:
|
|
246
|
+
secondaryContent?: Slot<'span'>;
|
|
225
247
|
};
|
|
226
248
|
|
|
227
|
-
/**
|
|
228
|
-
* Consts listing which props are shorthand props.
|
|
229
|
-
*/
|
|
230
|
-
export declare const menuItemSlots: Array<keyof MenuItemSlots>;
|
|
231
|
-
|
|
232
249
|
export declare type MenuItemState = ComponentState<MenuItemSlots> & MenuItemCommons;
|
|
233
250
|
|
|
234
251
|
/**
|
|
235
|
-
* Define a styled MenuList, using the `
|
|
252
|
+
* Define a styled MenuList, using the `useMenuList_unstable` hook.
|
|
236
253
|
*/
|
|
237
254
|
export declare const MenuList: ForwardRefComponent<MenuListProps>;
|
|
238
255
|
|
|
256
|
+
export declare const menuListClassName = "fui-MenuList";
|
|
257
|
+
|
|
239
258
|
export declare type MenuListCommons = {
|
|
240
259
|
/**
|
|
241
260
|
* Callback when checked items change for value with a name
|
|
@@ -243,12 +262,7 @@ export declare type MenuListCommons = {
|
|
|
243
262
|
* @param event - React's original SyntheticEvent
|
|
244
263
|
* @param data - A data object with relevant information
|
|
245
264
|
*/
|
|
246
|
-
onCheckedValueChange?: (e:
|
|
247
|
-
/** The name of the value */
|
|
248
|
-
name: string;
|
|
249
|
-
/** The items for this value that are checked */
|
|
250
|
-
checkedItems: string[];
|
|
251
|
-
}) => void;
|
|
265
|
+
onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;
|
|
252
266
|
/**
|
|
253
267
|
* Map of all checked values
|
|
254
268
|
*/
|
|
@@ -287,7 +301,7 @@ export declare type MenuListProps = ComponentProps<MenuListSlots> & Partial<Menu
|
|
|
287
301
|
export declare const MenuListProvider: React_2.Provider<MenuListContextValue> & React_2.FC<React_2.ProviderProps<MenuListContextValue>>;
|
|
288
302
|
|
|
289
303
|
export declare type MenuListSlots = {
|
|
290
|
-
root:
|
|
304
|
+
root: Slot<'div'>;
|
|
291
305
|
};
|
|
292
306
|
|
|
293
307
|
export declare type MenuListState = ComponentState<MenuListSlots> & MenuListCommons & {
|
|
@@ -327,13 +341,15 @@ export declare type MenuOpenEvents = MouseEvent | TouchEvent | React_2.MouseEven
|
|
|
327
341
|
*/
|
|
328
342
|
export declare const MenuPopover: ForwardRefComponent<MenuPopoverProps>;
|
|
329
343
|
|
|
344
|
+
export declare const menuPopoverClassName = "fui-MenuPopover";
|
|
345
|
+
|
|
330
346
|
/**
|
|
331
347
|
* MenuPopover Props
|
|
332
348
|
*/
|
|
333
349
|
export declare type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;
|
|
334
350
|
|
|
335
351
|
export declare type MenuPopoverSlots = {
|
|
336
|
-
root:
|
|
352
|
+
root: Slot<'div'>;
|
|
337
353
|
};
|
|
338
354
|
|
|
339
355
|
/**
|
|
@@ -366,6 +382,29 @@ export declare const MenuProvider: React_2.Provider<MenuContextValue> & React_2.
|
|
|
366
382
|
|
|
367
383
|
export declare type MenuSlots = {};
|
|
368
384
|
|
|
385
|
+
/**
|
|
386
|
+
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
|
387
|
+
*/
|
|
388
|
+
export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
|
|
389
|
+
|
|
390
|
+
export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
|
|
391
|
+
|
|
392
|
+
export declare type MenuSplitGroupCommons = {};
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* MenuSplitGroup Props
|
|
396
|
+
*/
|
|
397
|
+
export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots> & MenuSplitGroupCommons;
|
|
398
|
+
|
|
399
|
+
export declare type MenuSplitGroupSlots = {
|
|
400
|
+
root: Slot<'div'>;
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* State used in rendering MenuSplitGroup
|
|
405
|
+
*/
|
|
406
|
+
export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots> & MenuSplitGroupCommons;
|
|
407
|
+
|
|
369
408
|
export declare type MenuState = MenuCommons & ComponentState<MenuSlots> & {
|
|
370
409
|
/**
|
|
371
410
|
* Callback to open/close the popup
|
|
@@ -409,13 +448,14 @@ export declare type MenuState = MenuCommons & ComponentState<MenuSlots> & {
|
|
|
409
448
|
* Wraps a trigger element as an only child
|
|
410
449
|
* and adds the necessary event handling to open a popup menu
|
|
411
450
|
*/
|
|
412
|
-
export declare const MenuTrigger: React_2.FC<MenuTriggerProps
|
|
451
|
+
export declare const MenuTrigger: React_2.FC<MenuTriggerProps> & FluentTriggerComponent;
|
|
413
452
|
|
|
414
453
|
/**
|
|
415
454
|
* Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
|
|
416
455
|
*/
|
|
417
|
-
export declare type MenuTriggerChildProps = Required<Pick<React_2.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | '
|
|
456
|
+
export declare type MenuTriggerChildProps = Required<Pick<React_2.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'id'>> & {
|
|
418
457
|
ref?: React_2.Ref<never>;
|
|
458
|
+
'aria-expanded': boolean | undefined;
|
|
419
459
|
};
|
|
420
460
|
|
|
421
461
|
export declare const MenuTriggerContextProvider: React_2.Provider<boolean>;
|
|
@@ -426,64 +466,71 @@ export declare type MenuTriggerProps = {
|
|
|
426
466
|
*/
|
|
427
467
|
children: (React_2.ReactElement & {
|
|
428
468
|
ref?: React_2.Ref<unknown>;
|
|
429
|
-
}) | ((props: MenuTriggerChildProps) => React_2.
|
|
469
|
+
}) | ((props: MenuTriggerChildProps) => React_2.ReactElement | null);
|
|
430
470
|
};
|
|
431
471
|
|
|
432
|
-
export declare type MenuTriggerState =
|
|
472
|
+
export declare type MenuTriggerState = {
|
|
473
|
+
children: React_2.ReactElement | null;
|
|
474
|
+
};
|
|
433
475
|
|
|
434
476
|
/**
|
|
435
477
|
* Render the final JSX of Menu
|
|
436
478
|
*/
|
|
437
|
-
export declare const
|
|
479
|
+
export declare const renderMenu_unstable: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
|
|
438
480
|
|
|
439
481
|
/**
|
|
440
482
|
* Redefine the render function to add slots. Reuse the menudivider structure but add
|
|
441
483
|
* slots to children.
|
|
442
484
|
*/
|
|
443
|
-
export declare const
|
|
485
|
+
export declare const renderMenuDivider_unstable: (state: MenuDividerState) => JSX.Element;
|
|
444
486
|
|
|
445
487
|
/**
|
|
446
488
|
* Redefine the render function to add slots. Reuse the menugroup structure but add
|
|
447
489
|
* slots to children.
|
|
448
490
|
*/
|
|
449
|
-
export declare const
|
|
491
|
+
export declare const renderMenuGroup_unstable: (state: MenuGroupState, contextValues: MenuGroupContextValues) => JSX.Element;
|
|
450
492
|
|
|
451
493
|
/**
|
|
452
494
|
* Redefine the render function to add slots. Reuse the menugroupheader structure but add
|
|
453
495
|
* slots to children.
|
|
454
496
|
*/
|
|
455
|
-
export declare const
|
|
497
|
+
export declare const renderMenuGroupHeader_unstable: (state: MenuGroupHeaderState) => JSX.Element;
|
|
456
498
|
|
|
457
499
|
/**
|
|
458
500
|
* Function that renders the final JSX of the component
|
|
459
501
|
*/
|
|
460
|
-
export declare const
|
|
502
|
+
export declare const renderMenuItem_unstable: (state: MenuItemState) => JSX.Element;
|
|
461
503
|
|
|
462
504
|
/** Function that renders the final JSX of the component */
|
|
463
|
-
export declare const
|
|
505
|
+
export declare const renderMenuItemCheckbox_unstable: (state: MenuItemCheckboxState) => JSX.Element;
|
|
464
506
|
|
|
465
507
|
/**
|
|
466
508
|
* Redefine the render function to add slots. Reuse the menuitemradio structure but add
|
|
467
509
|
* slots to children.
|
|
468
510
|
*/
|
|
469
|
-
export declare const
|
|
511
|
+
export declare const renderMenuItemRadio_unstable: (state: MenuItemRadioState) => JSX.Element;
|
|
470
512
|
|
|
471
513
|
/**
|
|
472
514
|
* Function that renders the final JSX of the component
|
|
473
515
|
*/
|
|
474
|
-
export declare const
|
|
516
|
+
export declare const renderMenuList_unstable: (state: MenuListState, contextValues: MenuListContextValues) => JSX.Element;
|
|
475
517
|
|
|
476
518
|
/**
|
|
477
519
|
* Render the final JSX of MenuPopover
|
|
478
520
|
*/
|
|
479
|
-
export declare const
|
|
521
|
+
export declare const renderMenuPopover_unstable: (state: MenuPopoverState) => JSX.Element;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Render the final JSX of MenuSplitGroup
|
|
525
|
+
*/
|
|
526
|
+
export declare const renderMenuSplitGroup_unstable: (state: MenuSplitGroupState) => JSX.Element;
|
|
480
527
|
|
|
481
528
|
/**
|
|
482
529
|
* Render the final JSX of MenuTrigger
|
|
483
530
|
*
|
|
484
531
|
* Only renders children
|
|
485
532
|
*/
|
|
486
|
-
export declare const
|
|
533
|
+
export declare const renderMenuTrigger_unstable: (state: MenuTriggerState) => JSX.Element;
|
|
487
534
|
|
|
488
535
|
export declare type SelectableHandler = (e: React_2.MouseEvent | React_2.KeyboardEvent, name: string, value: string, checked: boolean) => void;
|
|
489
536
|
|
|
@@ -494,90 +541,112 @@ export declare type UninitializedMenuListState = Omit<MenuListState, 'setFocusBy
|
|
|
494
541
|
*
|
|
495
542
|
* @param state - should contain a `checkmark` slot
|
|
496
543
|
*/
|
|
497
|
-
export declare const
|
|
544
|
+
export declare const useCheckmarkStyles_unstable: (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => void;
|
|
498
545
|
|
|
499
546
|
/**
|
|
500
547
|
* Create the state required to render Menu.
|
|
501
548
|
*
|
|
502
549
|
* The returned state can be modified with hooks such as useMenuStyles,
|
|
503
|
-
* before being passed to
|
|
550
|
+
* before being passed to renderMenu_unstable.
|
|
504
551
|
*
|
|
505
552
|
* @param props - props from this instance of Menu
|
|
506
553
|
*/
|
|
507
|
-
export declare const
|
|
554
|
+
export declare const useMenu_unstable: (props: MenuProps) => MenuState;
|
|
508
555
|
|
|
509
|
-
export declare const
|
|
556
|
+
export declare const useMenuContext_unstable: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
|
|
510
557
|
|
|
511
|
-
export declare function
|
|
558
|
+
export declare function useMenuContextValues_unstable(state: MenuState): MenuContextValues;
|
|
512
559
|
|
|
513
560
|
/**
|
|
514
561
|
* Given user props, returns state and render function for a MenuDivider.
|
|
515
562
|
*/
|
|
516
|
-
export declare const
|
|
563
|
+
export declare const useMenuDivider_unstable: (props: MenuDividerProps, ref: React_2.Ref<HTMLElement>) => MenuDividerState;
|
|
517
564
|
|
|
518
|
-
export declare const
|
|
565
|
+
export declare const useMenuDividerStyles_unstable: (state: MenuDividerState) => MenuDividerState;
|
|
519
566
|
|
|
520
567
|
/**
|
|
521
568
|
* Given user props, returns state and render function for a MenuGroup.
|
|
522
569
|
*/
|
|
523
|
-
export declare function
|
|
570
|
+
export declare function useMenuGroup_unstable(props: MenuGroupProps, ref: React_2.Ref<HTMLElement>): MenuGroupState;
|
|
524
571
|
|
|
525
|
-
export declare const
|
|
572
|
+
export declare const useMenuGroupContext_unstable: () => MenuGroupContextValue;
|
|
526
573
|
|
|
527
|
-
export declare function
|
|
574
|
+
export declare function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues;
|
|
528
575
|
|
|
529
576
|
/**
|
|
530
577
|
* Given user props, returns state and render function for a MenuGroupHeader.
|
|
531
578
|
*/
|
|
532
|
-
export declare function
|
|
579
|
+
export declare function useMenuGroupHeader_unstable(props: MenuGroupHeaderProps, ref: React_2.Ref<HTMLElement>): MenuGroupHeaderState;
|
|
533
580
|
|
|
534
|
-
export declare const
|
|
581
|
+
export declare const useMenuGroupHeaderStyles_unstable: (state: MenuGroupHeaderState) => MenuGroupHeaderState;
|
|
582
|
+
|
|
583
|
+
export declare const useMenuGroupStyles_unstable: (state: MenuGroupState) => MenuGroupState;
|
|
535
584
|
|
|
536
585
|
/**
|
|
537
586
|
* Returns the props and state required to render the component
|
|
538
587
|
*/
|
|
539
|
-
export declare const
|
|
588
|
+
export declare const useMenuItem_unstable: (props: MenuItemProps, ref: React_2.Ref<HTMLElement>) => MenuItemState;
|
|
540
589
|
|
|
541
590
|
/** Returns the props and state required to render the component */
|
|
542
|
-
export declare const
|
|
591
|
+
export declare const useMenuItemCheckbox_unstable: (props: MenuItemCheckboxProps, ref: React_2.Ref<HTMLElement>) => MenuItemCheckboxState;
|
|
592
|
+
|
|
593
|
+
export declare const useMenuItemCheckboxStyles_unstable: (state: MenuItemCheckboxState) => void;
|
|
543
594
|
|
|
544
595
|
/**
|
|
545
596
|
* Given user props, returns state and render function for a MenuItemRadio.
|
|
546
597
|
*/
|
|
547
|
-
export declare const
|
|
598
|
+
export declare const useMenuItemRadio_unstable: (props: MenuItemRadioProps, ref: React_2.Ref<HTMLElement>) => MenuItemRadioState;
|
|
599
|
+
|
|
600
|
+
export declare const useMenuItemRadioStyles_unstable: (state: MenuItemRadioState) => void;
|
|
548
601
|
|
|
549
602
|
/** Applies style classnames to slots */
|
|
550
|
-
export declare const
|
|
603
|
+
export declare const useMenuItemStyles_unstable: (state: MenuItemState) => void;
|
|
551
604
|
|
|
552
605
|
/**
|
|
553
606
|
* Returns the props and state required to render the component
|
|
554
607
|
*/
|
|
555
|
-
export declare const
|
|
608
|
+
export declare const useMenuList_unstable: (props: MenuListProps, ref: React_2.Ref<HTMLElement>) => MenuListState;
|
|
556
609
|
|
|
557
|
-
export declare const
|
|
610
|
+
export declare const useMenuListContext_unstable: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
|
|
558
611
|
|
|
559
|
-
export declare function
|
|
612
|
+
export declare function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues;
|
|
560
613
|
|
|
561
614
|
/**
|
|
562
615
|
* Apply styling to the Menu slots based on the state
|
|
563
616
|
*/
|
|
564
|
-
export declare const
|
|
617
|
+
export declare const useMenuListStyles_unstable: (state: MenuListState) => MenuListState;
|
|
565
618
|
|
|
566
619
|
/**
|
|
567
620
|
* Create the state required to render MenuPopover.
|
|
568
621
|
*
|
|
569
|
-
* The returned state can be modified with hooks such as
|
|
570
|
-
* before being passed to
|
|
622
|
+
* The returned state can be modified with hooks such as useMenuPopoverStyles_unstable,
|
|
623
|
+
* before being passed to renderMenuPopover_unstable.
|
|
571
624
|
*
|
|
572
625
|
* @param props - props from this instance of MenuPopover
|
|
573
626
|
* @param ref - reference to root HTMLElement of MenuPopover
|
|
574
627
|
*/
|
|
575
|
-
export declare const
|
|
628
|
+
export declare const useMenuPopover_unstable: (props: MenuPopoverProps, ref: React_2.Ref<HTMLElement>) => MenuPopoverState;
|
|
576
629
|
|
|
577
630
|
/**
|
|
578
631
|
* Apply styling to the Menu slots based on the state
|
|
579
632
|
*/
|
|
580
|
-
export declare const
|
|
633
|
+
export declare const useMenuPopoverStyles_unstable: (state: MenuPopoverState) => MenuPopoverState;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Create the state required to render MenuSplitGroup.
|
|
637
|
+
*
|
|
638
|
+
* The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
|
|
639
|
+
* before being passed to renderMenuSplitGroup_unstable.
|
|
640
|
+
*
|
|
641
|
+
* @param props - props from this instance of MenuSplitGroup
|
|
642
|
+
* @param ref - reference to root HTMLElement of MenuSplitGroup
|
|
643
|
+
*/
|
|
644
|
+
export declare const useMenuSplitGroup_unstable: (props: MenuSplitGroupProps, ref: React_2.Ref<HTMLElement>) => MenuSplitGroupState;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Apply styling to the MenuSplitGroup slots based on the state
|
|
648
|
+
*/
|
|
649
|
+
export declare const useMenuSplitGroupStyles_unstable: (state: MenuSplitGroupState) => MenuSplitGroupState;
|
|
581
650
|
|
|
582
651
|
/**
|
|
583
652
|
* Create the state required to render MenuTrigger.
|
|
@@ -585,8 +654,8 @@ export declare const useMenuPopoverStyles: (state: MenuPopoverState) => MenuPopo
|
|
|
585
654
|
*
|
|
586
655
|
* @param props - props from this instance of MenuTrigger
|
|
587
656
|
*/
|
|
588
|
-
export declare const
|
|
657
|
+
export declare const useMenuTrigger_unstable: (props: MenuTriggerProps) => MenuTriggerState;
|
|
589
658
|
|
|
590
|
-
export declare const
|
|
659
|
+
export declare const useMenuTriggerContext_unstable: () => boolean;
|
|
591
660
|
|
|
592
661
|
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/MenuSplitGroup/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuSplitGroup.js","sourceRoot":"","sources":["../src/MenuSplitGroup.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useMenu_unstable } from './useMenu';
|
|
2
|
+
import { useMenuContextValues_unstable } from './useMenuContextValues';
|
|
3
|
+
import { renderMenu_unstable } from './renderMenu';
|
|
4
4
|
/**
|
|
5
5
|
* Wrapper component that manages state for a popup MenuList and a MenuTrigger
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return
|
|
8
|
+
export const Menu = props => {
|
|
9
|
+
const state = useMenu_unstable(props);
|
|
10
|
+
const contextValues = useMenuContextValues_unstable(state);
|
|
11
|
+
return renderMenu_unstable(state, contextValues);
|
|
12
12
|
};
|
|
13
13
|
Menu.displayName = 'Menu';
|
|
14
14
|
//# sourceMappingURL=Menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AACA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,mBAAT,QAAoC,cAApC;AAGA;;AAEG;;AACH,OAAO,MAAM,IAAI,GAAwB,KAAK,IAAG;AAC/C,QAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,CAA9B;AACA,QAAM,aAAa,GAAG,6BAA6B,CAAC,KAAD,CAAnD;AAEA,SAAO,mBAAmB,CAAC,KAAD,EAAQ,aAAR,CAA1B;AACD,CALM;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourceRoot":""}
|
|
@@ -2,4 +2,4 @@ import type { MenuContextValues, MenuState } from './Menu.types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Render the final JSX of Menu
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const renderMenu_unstable: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { MenuProvider } from '../../contexts/menuContext';
|
|
|
4
4
|
* Render the final JSX of Menu
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const renderMenu_unstable = (state, contextValues) => {
|
|
8
8
|
return /*#__PURE__*/React.createElement(MenuProvider, {
|
|
9
9
|
value: contextValues.menu
|
|
10
10
|
}, state.menuTrigger, state.open && state.menuPopover);
|