@fluentui/react-menu 9.7.3 → 9.7.5
Sign up to get free protection for your applications and to get access to all the features.
- package/.swcrc +30 -0
- package/CHANGELOG.json +139 -1
- package/CHANGELOG.md +38 -2
- package/lib/Menu.js.map +1 -1
- package/lib/MenuDivider.js.map +1 -1
- package/lib/MenuGroup.js.map +1 -1
- package/lib/MenuGroupHeader.js.map +1 -1
- package/lib/MenuItem.js.map +1 -1
- package/lib/MenuItemCheckbox.js.map +1 -1
- package/lib/MenuItemRadio.js.map +1 -1
- package/lib/MenuList.js.map +1 -1
- package/lib/MenuPopover.js.map +1 -1
- package/lib/MenuSplitGroup.js.map +1 -1
- package/lib/MenuTrigger.js.map +1 -1
- package/lib/components/Menu/Menu.js +1 -0
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.types.js +1 -1
- package/lib/components/Menu/Menu.types.js.map +1 -1
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/Menu/renderMenu.js.map +1 -1
- package/lib/components/Menu/useMenu.js +9 -8
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
- package/lib/components/MenuDivider/index.js.map +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js +1 -3
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDivider.js +1 -0
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
- package/lib/components/MenuGroup/index.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js +1 -3
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroup.js +1 -0
- package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
- package/lib/components/MenuGroupHeader/index.js.map +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -3
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +1 -0
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
- package/lib/components/MenuItem/index.js.map +1 -1
- package/lib/components/MenuItem/renderMenuItem.js +1 -13
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useCharacterSearch.js +3 -2
- package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.js +7 -7
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +15 -2
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
- package/lib/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +1 -11
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +4 -4
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
- package/lib/components/MenuItemRadio/index.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js +1 -11
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.js +4 -4
- package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/MenuList.types.js +1 -1
- package/lib/components/MenuList/MenuList.types.js.map +1 -1
- package/lib/components/MenuList/index.js.map +1 -1
- package/lib/components/MenuList/renderMenuList.js +1 -3
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.js +6 -5
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
- package/lib/components/MenuPopover/index.js.map +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js +2 -6
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js +4 -4
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib/components/MenuSplitGroup/index.js.map +1 -1
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +1 -3
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +2 -2
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.js +1 -0
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.types.js +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
- package/lib/components/MenuTrigger/index.js.map +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/contexts/menuContext.js +1 -0
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.js +2 -4
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.js +1 -0
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/contexts/menuTriggerContext.js +2 -4
- package/lib/contexts/menuTriggerContext.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/selectable/index.js.map +1 -1
- package/lib/selectable/types.js +1 -1
- package/lib/selectable/types.js.map +1 -1
- package/lib/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/useIsSubmenu.js.map +1 -1
- package/lib/utils/useOnMenuEnter.js +2 -2
- package/lib/utils/useOnMenuEnter.js.map +1 -1
- package/lib-commonjs/Menu.js +5 -4
- package/lib-commonjs/Menu.js.map +1 -1
- package/lib-commonjs/MenuDivider.js +5 -4
- package/lib-commonjs/MenuDivider.js.map +1 -1
- package/lib-commonjs/MenuGroup.js +5 -4
- package/lib-commonjs/MenuGroup.js.map +1 -1
- package/lib-commonjs/MenuGroupHeader.js +5 -4
- package/lib-commonjs/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/MenuItem.js +5 -4
- package/lib-commonjs/MenuItem.js.map +1 -1
- package/lib-commonjs/MenuItemCheckbox.js +5 -4
- package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/MenuItemRadio.js +5 -4
- package/lib-commonjs/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/MenuList.js +5 -4
- package/lib-commonjs/MenuList.js.map +1 -1
- package/lib-commonjs/MenuPopover.js +5 -4
- package/lib-commonjs/MenuPopover.js.map +1 -1
- package/lib-commonjs/MenuSplitGroup.js +5 -4
- package/lib-commonjs/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/MenuTrigger.js +5 -4
- package/lib-commonjs/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.js +16 -15
- package/lib-commonjs/components/Menu/Menu.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.types.js +5 -2
- package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js +9 -8
- package/lib-commonjs/components/Menu/index.js.map +1 -1
- package/lib-commonjs/components/Menu/renderMenu.js +14 -14
- package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenu.js +258 -256
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.js +29 -43
- package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js +19 -20
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.js +3 -2
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/index.js +9 -8
- package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +13 -19
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js +22 -21
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +47 -25
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.js +21 -22
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.types.js +3 -2
- package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/index.js +10 -9
- package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +16 -22
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js +23 -22
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +18 -15
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +19 -11
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +19 -20
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js +3 -2
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js +9 -8
- package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +13 -19
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +22 -23
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +47 -25
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.js +19 -20
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.types.js +3 -2
- package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
- package/lib-commonjs/components/MenuItem/index.js +9 -8
- package/lib-commonjs/components/MenuItem/index.js.map +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js +13 -28
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js +24 -22
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.js +97 -104
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +318 -137
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +19 -20
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js +3 -2
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js +9 -8
- package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +13 -24
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +44 -45
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +38 -30
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +19 -20
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js +3 -2
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.js +9 -8
- package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +13 -27
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +42 -45
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +38 -30
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.js +21 -22
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.types.js +5 -2
- package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.js +10 -9
- package/lib-commonjs/components/MenuList/index.js.map +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js +16 -21
- package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js +143 -137
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js +20 -25
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.js +33 -23
- package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.js +19 -20
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +3 -2
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/index.js +9 -8
- package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +19 -26
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js +102 -110
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +121 -50
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +19 -20
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +3 -2
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/index.js +9 -8
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +13 -18
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +58 -64
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +61 -32
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +15 -15
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js +5 -2
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js +8 -7
- package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +14 -16
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +163 -170
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/index.js +6 -5
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/contexts/menuContext.js +38 -27
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js +19 -12
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.js +25 -14
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.js +18 -12
- package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
- package/lib-commonjs/index.js +91 -399
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/selectable/index.js +6 -5
- package/lib-commonjs/selectable/index.js.map +1 -1
- package/lib-commonjs/selectable/types.js +5 -2
- package/lib-commonjs/selectable/types.js.map +1 -1
- package/lib-commonjs/selectable/useCheckmarkStyles.js +28 -26
- package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib-commonjs/utils/index.js +5 -4
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/useIsSubmenu.js +13 -19
- package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js +57 -68
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +15 -14
- package/lib-amd/Menu.js +0 -6
- package/lib-amd/Menu.js.map +0 -1
- package/lib-amd/MenuDivider.js +0 -6
- package/lib-amd/MenuDivider.js.map +0 -1
- package/lib-amd/MenuGroup.js +0 -6
- package/lib-amd/MenuGroup.js.map +0 -1
- package/lib-amd/MenuGroupHeader.js +0 -6
- package/lib-amd/MenuGroupHeader.js.map +0 -1
- package/lib-amd/MenuItem.js +0 -6
- package/lib-amd/MenuItem.js.map +0 -1
- package/lib-amd/MenuItemCheckbox.js +0 -6
- package/lib-amd/MenuItemCheckbox.js.map +0 -1
- package/lib-amd/MenuItemRadio.js +0 -6
- package/lib-amd/MenuItemRadio.js.map +0 -1
- package/lib-amd/MenuList.js +0 -6
- package/lib-amd/MenuList.js.map +0 -1
- package/lib-amd/MenuPopover.js +0 -6
- package/lib-amd/MenuPopover.js.map +0 -1
- package/lib-amd/MenuSplitGroup.js +0 -6
- package/lib-amd/MenuSplitGroup.js.map +0 -1
- package/lib-amd/MenuTrigger.js +0 -6
- package/lib-amd/MenuTrigger.js.map +0 -1
- package/lib-amd/components/Menu/Menu.js +0 -16
- package/lib-amd/components/Menu/Menu.js.map +0 -1
- package/lib-amd/components/Menu/Menu.types.js +0 -5
- package/lib-amd/components/Menu/Menu.types.js.map +0 -1
- package/lib-amd/components/Menu/index.js +0 -10
- package/lib-amd/components/Menu/index.js.map +0 -1
- package/lib-amd/components/Menu/renderMenu.js +0 -15
- package/lib-amd/components/Menu/renderMenu.js.map +0 -1
- package/lib-amd/components/Menu/useMenu.js +0 -224
- package/lib-amd/components/Menu/useMenu.js.map +0 -1
- package/lib-amd/components/Menu/useMenuContextValues.js +0 -29
- package/lib-amd/components/Menu/useMenuContextValues.js.map +0 -1
- package/lib-amd/components/MenuDivider/MenuDivider.js +0 -17
- package/lib-amd/components/MenuDivider/MenuDivider.js.map +0 -1
- package/lib-amd/components/MenuDivider/MenuDivider.types.js +0 -5
- package/lib-amd/components/MenuDivider/MenuDivider.types.js.map +0 -1
- package/lib-amd/components/MenuDivider/index.js +0 -10
- package/lib-amd/components/MenuDivider/index.js.map +0 -1
- package/lib-amd/components/MenuDivider/renderMenuDivider.js +0 -15
- package/lib-amd/components/MenuDivider/renderMenuDivider.js.map +0 -1
- package/lib-amd/components/MenuDivider/useMenuDivider.js +0 -18
- package/lib-amd/components/MenuDivider/useMenuDivider.js.map +0 -1
- package/lib-amd/components/MenuDivider/useMenuDividerStyles.js +0 -18
- package/lib-amd/components/MenuDivider/useMenuDividerStyles.js.map +0 -1
- package/lib-amd/components/MenuGroup/MenuGroup.js +0 -18
- package/lib-amd/components/MenuGroup/MenuGroup.js.map +0 -1
- package/lib-amd/components/MenuGroup/MenuGroup.types.js +0 -5
- package/lib-amd/components/MenuGroup/MenuGroup.types.js.map +0 -1
- package/lib-amd/components/MenuGroup/index.js +0 -11
- package/lib-amd/components/MenuGroup/index.js.map +0 -1
- package/lib-amd/components/MenuGroup/renderMenuGroup.js +0 -16
- package/lib-amd/components/MenuGroup/renderMenuGroup.js.map +0 -1
- package/lib-amd/components/MenuGroup/useMenuGroup.js +0 -20
- package/lib-amd/components/MenuGroup/useMenuGroup.js.map +0 -1
- package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js +0 -12
- package/lib-amd/components/MenuGroup/useMenuGroupContextValues.js.map +0 -1
- package/lib-amd/components/MenuGroup/useMenuGroupStyles.js +0 -14
- package/lib-amd/components/MenuGroup/useMenuGroupStyles.js.map +0 -1
- package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js +0 -17
- package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.js.map +0 -1
- package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js +0 -5
- package/lib-amd/components/MenuGroupHeader/MenuGroupHeader.types.js.map +0 -1
- package/lib-amd/components/MenuGroupHeader/index.js +0 -10
- package/lib-amd/components/MenuGroupHeader/index.js.map +0 -1
- package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js +0 -15
- package/lib-amd/components/MenuGroupHeader/renderMenuGroupHeader.js.map +0 -1
- package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js +0 -19
- package/lib-amd/components/MenuGroupHeader/useMenuGroupHeader.js.map +0 -1
- package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +0 -27
- package/lib-amd/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +0 -1
- package/lib-amd/components/MenuItem/MenuItem.js +0 -17
- package/lib-amd/components/MenuItem/MenuItem.js.map +0 -1
- package/lib-amd/components/MenuItem/MenuItem.types.js +0 -5
- package/lib-amd/components/MenuItem/MenuItem.types.js.map +0 -1
- package/lib-amd/components/MenuItem/index.js +0 -10
- package/lib-amd/components/MenuItem/index.js.map +0 -1
- package/lib-amd/components/MenuItem/renderMenuItem.js +0 -19
- package/lib-amd/components/MenuItem/renderMenuItem.js.map +0 -1
- package/lib-amd/components/MenuItem/useCharacterSearch.js +0 -22
- package/lib-amd/components/MenuItem/useCharacterSearch.js.map +0 -1
- package/lib-amd/components/MenuItem/useMenuItem.js +0 -75
- package/lib-amd/components/MenuItem/useMenuItem.js.map +0 -1
- package/lib-amd/components/MenuItem/useMenuItemStyles.js +0 -109
- package/lib-amd/components/MenuItem/useMenuItemStyles.js.map +0 -1
- package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js +0 -17
- package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.js.map +0 -1
- package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js +0 -5
- package/lib-amd/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +0 -1
- package/lib-amd/components/MenuItemCheckbox/index.js +0 -10
- package/lib-amd/components/MenuItemCheckbox/index.js.map +0 -1
- package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js +0 -16
- package/lib-amd/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +0 -1
- package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js +0 -26
- package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +0 -1
- package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -31
- package/lib-amd/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +0 -1
- package/lib-amd/components/MenuItemRadio/MenuItemRadio.js +0 -17
- package/lib-amd/components/MenuItemRadio/MenuItemRadio.js.map +0 -1
- package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js +0 -5
- package/lib-amd/components/MenuItemRadio/MenuItemRadio.types.js.map +0 -1
- package/lib-amd/components/MenuItemRadio/index.js +0 -10
- package/lib-amd/components/MenuItemRadio/index.js.map +0 -1
- package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js +0 -19
- package/lib-amd/components/MenuItemRadio/renderMenuItemRadio.js.map +0 -1
- package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js +0 -27
- package/lib-amd/components/MenuItemRadio/useMenuItemRadio.js.map +0 -1
- package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -31
- package/lib-amd/components/MenuItemRadio/useMenuItemRadioStyles.js.map +0 -1
- package/lib-amd/components/MenuList/MenuList.js +0 -18
- package/lib-amd/components/MenuList/MenuList.js.map +0 -1
- package/lib-amd/components/MenuList/MenuList.types.js +0 -5
- package/lib-amd/components/MenuList/MenuList.types.js.map +0 -1
- package/lib-amd/components/MenuList/index.js +0 -11
- package/lib-amd/components/MenuList/index.js.map +0 -1
- package/lib-amd/components/MenuList/renderMenuList.js +0 -15
- package/lib-amd/components/MenuList/renderMenuList.js.map +0 -1
- package/lib-amd/components/MenuList/useMenuList.js +0 -125
- package/lib-amd/components/MenuList/useMenuList.js.map +0 -1
- package/lib-amd/components/MenuList/useMenuListContextValues.js +0 -20
- package/lib-amd/components/MenuList/useMenuListContextValues.js.map +0 -1
- package/lib-amd/components/MenuList/useMenuListStyles.js +0 -21
- package/lib-amd/components/MenuList/useMenuListStyles.js.map +0 -1
- package/lib-amd/components/MenuPopover/MenuPopover.js +0 -17
- package/lib-amd/components/MenuPopover/MenuPopover.js.map +0 -1
- package/lib-amd/components/MenuPopover/MenuPopover.types.js +0 -5
- package/lib-amd/components/MenuPopover/MenuPopover.types.js.map +0 -1
- package/lib-amd/components/MenuPopover/index.js +0 -10
- package/lib-amd/components/MenuPopover/index.js.map +0 -1
- package/lib-amd/components/MenuPopover/renderMenuPopover.js +0 -18
- package/lib-amd/components/MenuPopover/renderMenuPopover.js.map +0 -1
- package/lib-amd/components/MenuPopover/useMenuPopover.js +0 -83
- package/lib-amd/components/MenuPopover/useMenuPopover.js.map +0 -1
- package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js +0 -21
- package/lib-amd/components/MenuPopover/useMenuPopoverStyles.js.map +0 -1
- package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js +0 -17
- package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.js.map +0 -1
- package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js +0 -5
- package/lib-amd/components/MenuSplitGroup/MenuSplitGroup.types.js.map +0 -1
- package/lib-amd/components/MenuSplitGroup/index.js +0 -10
- package/lib-amd/components/MenuSplitGroup/index.js.map +0 -1
- package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js +0 -14
- package/lib-amd/components/MenuSplitGroup/renderMenuSplitGroup.js.map +0 -1
- package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js +0 -47
- package/lib-amd/components/MenuSplitGroup/useMenuSplitGroup.js.map +0 -1
- package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js +0 -43
- package/lib-amd/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +0 -1
- package/lib-amd/components/MenuTrigger/MenuTrigger.js +0 -18
- package/lib-amd/components/MenuTrigger/MenuTrigger.js.map +0 -1
- package/lib-amd/components/MenuTrigger/MenuTrigger.types.js +0 -5
- package/lib-amd/components/MenuTrigger/MenuTrigger.types.js.map +0 -1
- package/lib-amd/components/MenuTrigger/index.js +0 -9
- package/lib-amd/components/MenuTrigger/index.js.map +0 -1
- package/lib-amd/components/MenuTrigger/renderMenuTrigger.js +0 -15
- package/lib-amd/components/MenuTrigger/renderMenuTrigger.js.map +0 -1
- package/lib-amd/components/MenuTrigger/useMenuTrigger.js +0 -112
- package/lib-amd/components/MenuTrigger/useMenuTrigger.js.map +0 -1
- package/lib-amd/components/index.js +0 -7
- package/lib-amd/components/index.js.map +0 -1
- package/lib-amd/contexts/menuContext.js +0 -32
- package/lib-amd/contexts/menuContext.js.map +0 -1
- package/lib-amd/contexts/menuGroupContext.js +0 -13
- package/lib-amd/contexts/menuGroupContext.js.map +0 -1
- package/lib-amd/contexts/menuListContext.js +0 -23
- package/lib-amd/contexts/menuListContext.js.map +0 -1
- package/lib-amd/contexts/menuTriggerContext.js +0 -14
- package/lib-amd/contexts/menuTriggerContext.js.map +0 -1
- package/lib-amd/index.js +0 -69
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/selectable/index.js +0 -7
- package/lib-amd/selectable/index.js.map +0 -1
- package/lib-amd/selectable/types.js +0 -5
- package/lib-amd/selectable/types.js.map +0 -1
- package/lib-amd/selectable/useCheckmarkStyles.js +0 -28
- package/lib-amd/selectable/useCheckmarkStyles.js.map +0 -1
- package/lib-amd/utils/index.js +0 -6
- package/lib-amd/utils/index.js.map +0 -1
- package/lib-amd/utils/useIsSubmenu.js +0 -20
- package/lib-amd/utils/useIsSubmenu.js.map +0 -1
- package/lib-amd/utils/useOnMenuEnter.js +0 -59
- package/lib-amd/utils/useOnMenuEnter.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/selectable/useCheckmarkStyles.js"],"sourcesContent":["import { mergeClasses, __styles } from '@griffel/react';\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n a9b677: \"fjw5fx7\",\n Bqenvij: \"fd461yt\",\n Bcdw1i0: \"fd7fpy0\"\n },\n rootChecked: {\n Bcdw1i0: \"f1022m68\"\n }\n}, {\n d: [\".fjw5fx7{width:16px;}\", \".fd461yt{height:16px;}\", \".fd7fpy0{visibility:hidden;}\", \".f1022m68{visibility:visible;}\"]\n});\n/**\n * Applies styles to a checkmark slot for selectable menu items\n *\n * @param state - should contain a `checkmark` slot\n */\nexport const useCheckmarkStyles_unstable = state => {\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);\n }\n};\n//# sourceMappingURL=useCheckmarkStyles.js.map"],"names":["useCheckmarkStyles_unstable","useStyles","__styles","root","a9b677","Bqenvij","Bcdw1i0","rootChecked","d","state","styles","checkmark","className","mergeClasses","checked"],"mappings":";;;;+BAkBaA;;aAAAA;;uBAlB0B;AACvC,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,MAAM;QACJC,QAAQ;QACRC,SAAS;QACTC,SAAS;IACX;IACAC,aAAa;QACXD,SAAS;IACX;AACF,GAAG;IACDE,GAAG;QAAC;QAAyB;QAA0B;QAAgC;KAAiC;AAC1H;AAMO,MAAMR,8BAA8BS,CAAAA,QAAS;IAClD,MAAMC,SAAST;IACf,IAAIQ,MAAME,SAAS,EAAE;QACnBF,MAAME,SAAS,CAACC,SAAS,GAAGC,IAAAA,mBAAY,EAACH,OAAOP,IAAI,EAAEM,MAAMK,OAAO,IAAIJ,OAAOH,WAAW,EAAEE,MAAME,SAAS,CAACC,SAAS;IACtH,CAAC;AACH,GACA,8CAA8C"}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
5
4
|
});
|
6
|
-
const
|
7
|
-
|
5
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
|
+
_exportStar(require("./useOnMenuEnter"), exports);
|
7
|
+
//# sourceMappingURL=index.js.map
|
8
|
+
|
8
9
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './useOnMenuEnter';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
|
@@ -1,24 +1,18 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useIsSubmenu", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>useIsSubmenu
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
|
10
|
-
/**
|
11
|
-
* A component can be a part of a submenu whether its menu context `isSubmenu` flag is true
|
12
|
-
* or whether it is a part of a `MenuList`
|
13
|
-
*
|
14
|
-
* A simple hook to check box contexts easily
|
15
|
-
*
|
16
|
-
* @returns whether the component is part of a submenu
|
17
|
-
*/
|
9
|
+
const _reactContextSelector = require("@fluentui/react-context-selector");
|
10
|
+
const _menuContext = require("../contexts/menuContext");
|
11
|
+
const _menuListContext = require("../contexts/menuListContext");
|
18
12
|
function useIsSubmenu() {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
|
13
|
+
const menuContextValue = (0, _menuContext.useMenuContext_unstable)((context)=>context.isSubmenu);
|
14
|
+
const hasMenuListContext = (0, _reactContextSelector.useHasParentContext)(_menuListContext.MenuListContext);
|
15
|
+
return menuContextValue || hasMenuListContext;
|
16
|
+
} //# sourceMappingURL=useIsSubmenu.js.map
|
17
|
+
|
24
18
|
//# sourceMappingURL=useIsSubmenu.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/useIsSubmenu.js"],"sourcesContent":["import { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\nimport { MenuListContext } from '../contexts/menuListContext';\n/**\n * A component can be a part of a submenu whether its menu context `isSubmenu` flag is true\n * or whether it is a part of a `MenuList`\n *\n * A simple hook to check box contexts easily\n *\n * @returns whether the component is part of a submenu\n */\nexport function useIsSubmenu() {\n const menuContextValue = useMenuContext_unstable(context => context.isSubmenu);\n const hasMenuListContext = useHasParentContext(MenuListContext);\n return menuContextValue || hasMenuListContext;\n}\n//# sourceMappingURL=useIsSubmenu.js.map"],"names":["useIsSubmenu","menuContextValue","useMenuContext_unstable","context","isSubmenu","hasMenuListContext","useHasParentContext","MenuListContext"],"mappings":";;;;+BAWgBA;;aAAAA;;sCAXoB;6BACI;iCACR;AASzB,SAASA,eAAe;IAC7B,MAAMC,mBAAmBC,IAAAA,oCAAuB,EAACC,CAAAA,UAAWA,QAAQC,SAAS;IAC7E,MAAMC,qBAAqBC,IAAAA,yCAAmB,EAACC,gCAAe;IAC9D,OAAON,oBAAoBI;AAC7B,EACA,wCAAwC"}
|
@@ -1,73 +1,62 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
5
4
|
});
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
const
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
return () => {
|
54
|
-
element.removeEventListener(exports.MENU_ENTER_EVENT, listener);
|
55
|
-
};
|
56
|
-
}, [listener, element, disabled]);
|
57
|
-
};
|
58
|
-
exports.useOnMenuMouseEnter = useOnMenuMouseEnter;
|
59
|
-
/**
|
60
|
-
* Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`
|
61
|
-
* @param el element for the event target
|
62
|
-
* @param nativeEvent the native mouse event this is mapped to
|
63
|
-
*/
|
64
|
-
const dispatchMenuEnterEvent = (el, nativeEvent) => {
|
65
|
-
el.dispatchEvent(new CustomEvent(exports.MENU_ENTER_EVENT, {
|
66
|
-
bubbles: true,
|
67
|
-
detail: {
|
68
|
-
nativeEvent
|
69
|
-
}
|
70
|
-
}));
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
MENU_ENTER_EVENT: ()=>MENU_ENTER_EVENT,
|
13
|
+
useOnMenuMouseEnter: ()=>useOnMenuMouseEnter,
|
14
|
+
dispatchMenuEnterEvent: ()=>dispatchMenuEnterEvent
|
15
|
+
});
|
16
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
17
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
18
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
19
|
+
const _reactPortal = require("@fluentui/react-portal");
|
20
|
+
const MENU_ENTER_EVENT = 'fuimenuenter';
|
21
|
+
const useOnMenuMouseEnter = (options)=>{
|
22
|
+
const { refs , callback , element , disabled } = options;
|
23
|
+
// Keep mouse event here because this is essentially a custom 'mouseenter' event
|
24
|
+
const listener = (0, _reactUtilities.useEventCallback)((ev)=>{
|
25
|
+
const popoverRef = refs[0];
|
26
|
+
const someMenuPopover = ev.target;
|
27
|
+
var _popoverRef_current;
|
28
|
+
// someMenu is a child -> will always be contained because of vParents
|
29
|
+
// someMenu is a parent -> will always not be contained because no vParent
|
30
|
+
// someMenu is the current popover -> it will contain itself
|
31
|
+
const isOutsidePopover = !(0, _reactPortal.elementContains)((_popoverRef_current = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);
|
32
|
+
if (isOutsidePopover && !disabled) {
|
33
|
+
callback(ev);
|
34
|
+
}
|
35
|
+
});
|
36
|
+
_react.useEffect(()=>{
|
37
|
+
// eslint-disable-next-line eqeqeq
|
38
|
+
if (element == null) {
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
if (!disabled) {
|
42
|
+
element.addEventListener(MENU_ENTER_EVENT, listener);
|
43
|
+
}
|
44
|
+
return ()=>{
|
45
|
+
element.removeEventListener(MENU_ENTER_EVENT, listener);
|
46
|
+
};
|
47
|
+
}, [
|
48
|
+
listener,
|
49
|
+
element,
|
50
|
+
disabled
|
51
|
+
]);
|
71
52
|
};
|
72
|
-
|
53
|
+
const dispatchMenuEnterEvent = (el, nativeEvent)=>{
|
54
|
+
el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {
|
55
|
+
bubbles: true,
|
56
|
+
detail: {
|
57
|
+
nativeEvent
|
58
|
+
}
|
59
|
+
}));
|
60
|
+
}; //# sourceMappingURL=useOnMenuEnter.js.map
|
61
|
+
|
73
62
|
//# sourceMappingURL=useOnMenuEnter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/utils/useOnMenuEnter.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { elementContains } from '@fluentui/react-portal';\n/**\n * Name of the custom event\n */\nexport const MENU_ENTER_EVENT = 'fuimenuenter';\n/**\n * This hook works similarly to @see {useOnClickOutside}\n *\n * Problem: Trying to behave the same as system menus:\n * When the mouse leaves a stack of nested menus the stack should not dismiss.\n * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.\n *\n * We don't use the native mouseenter event because it would trigger too many times in the document\n * Instead, dispatch custom DOM event from the menu so that it can bubble\n * Each nested menu can use the listener to check if the event is from a child or parent menu\n */\nexport const useOnMenuMouseEnter = options => {\n const {\n refs,\n callback,\n element,\n disabled\n } = options;\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback(ev => {\n const popoverRef = refs[0];\n const someMenuPopover = ev.target;\n var _popoverRef_current;\n // someMenu is a child -> will always be contained because of vParents\n // someMenu is a parent -> will always not be contained because no vParent\n // someMenu is the current popover -> it will contain itself\n const isOutsidePopover = !elementContains((_popoverRef_current = popoverRef.current) !== null && _popoverRef_current !== void 0 ? _popoverRef_current : null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n React.useEffect(() => {\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener);\n }\n return () => {\n element.removeEventListener(MENU_ENTER_EVENT, listener);\n };\n }, [listener, element, disabled]);\n};\n/**\n * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`\n * @param el element for the event target\n * @param nativeEvent the native mouse event this is mapped to\n */\nexport const dispatchMenuEnterEvent = (el, nativeEvent) => {\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, {\n bubbles: true,\n detail: {\n nativeEvent\n }\n }));\n};\n//# sourceMappingURL=useOnMenuEnter.js.map"],"names":["MENU_ENTER_EVENT","useOnMenuMouseEnter","dispatchMenuEnterEvent","options","refs","callback","element","disabled","listener","useEventCallback","ev","popoverRef","someMenuPopover","target","_popoverRef_current","isOutsidePopover","elementContains","current","React","useEffect","addEventListener","removeEventListener","el","nativeEvent","dispatchEvent","CustomEvent","bubbles","detail"],"mappings":";;;;;;;;;;;IAMaA,gBAAgB,MAAhBA;IAYAC,mBAAmB,MAAnBA;IAsCAC,sBAAsB,MAAtBA;;;6DAxDU;gCACU;6BACD;AAIzB,MAAMF,mBAAmB;AAYzB,MAAMC,sBAAsBE,CAAAA,UAAW;IAC5C,MAAM,EACJC,KAAI,EACJC,SAAQ,EACRC,QAAO,EACPC,SAAQ,EACT,GAAGJ;IACJ,gFAAgF;IAChF,MAAMK,WAAWC,IAAAA,gCAAgB,EAACC,CAAAA,KAAM;QACtC,MAAMC,aAAaP,IAAI,CAAC,EAAE;QAC1B,MAAMQ,kBAAkBF,GAAGG,MAAM;QACjC,IAAIC;QACJ,sEAAsE;QACtE,0EAA0E;QAC1E,4DAA4D;QAC5D,MAAMC,mBAAmB,CAACC,IAAAA,4BAAe,EAAC,AAACF,CAAAA,sBAAsBH,WAAWM,OAAO,AAAD,MAAO,IAAI,IAAIH,wBAAwB,KAAK,IAAIA,sBAAsB,IAAI,EAAEF;QAC9J,IAAIG,oBAAoB,CAACR,UAAU;YACjCF,SAASK;QACX,CAAC;IACH;IACAQ,OAAMC,SAAS,CAAC,IAAM;QACpB,kCAAkC;QAClC,IAAIb,WAAW,IAAI,EAAE;YACnB;QACF,CAAC;QACD,IAAI,CAACC,UAAU;YACbD,QAAQc,gBAAgB,CAACpB,kBAAkBQ;QAC7C,CAAC;QACD,OAAO,IAAM;YACXF,QAAQe,mBAAmB,CAACrB,kBAAkBQ;QAChD;IACF,GAAG;QAACA;QAAUF;QAASC;KAAS;AAClC;AAMO,MAAML,yBAAyB,CAACoB,IAAIC,cAAgB;IACzDD,GAAGE,aAAa,CAAC,IAAIC,YAAYzB,kBAAkB;QACjD0B,SAAS,IAAI;QACbC,QAAQ;YACNJ;QACF;IACF;AACF,GACA,0CAA0C"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-menu",
|
3
|
-
"version": "9.7.
|
3
|
+
"version": "9.7.5",
|
4
4
|
"description": "Fluent UI menu component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -24,29 +24,29 @@
|
|
24
24
|
"storybook": "start-storybook",
|
25
25
|
"test": "jest --passWithNoTests",
|
26
26
|
"type-check": "tsc -b tsconfig.json",
|
27
|
-
"generate-api": "
|
27
|
+
"generate-api": "just-scripts generate-api"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
31
31
|
"@fluentui/react-conformance": "*",
|
32
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.20",
|
33
33
|
"@fluentui/scripts-api-extractor": "*",
|
34
34
|
"@fluentui/scripts-cypress": "*",
|
35
35
|
"@fluentui/scripts-tasks": "*"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@fluentui/
|
39
|
-
"@fluentui/
|
40
|
-
"@fluentui/react-context-selector": "^9.1.
|
41
|
-
"@fluentui/react-icons": "^2.0.
|
42
|
-
"@fluentui/react-portal": "^9.2.
|
43
|
-
"@fluentui/react-positioning": "^9.5.
|
44
|
-
"@fluentui/react-shared-contexts": "^9.3.
|
45
|
-
"@fluentui/react-tabster": "^9.
|
46
|
-
"@fluentui/react-theme": "^9.1.
|
47
|
-
"@fluentui/react-utilities": "^9.7.
|
38
|
+
"@fluentui/keyboard-keys": "^9.0.2",
|
39
|
+
"@fluentui/react-aria": "^9.3.15",
|
40
|
+
"@fluentui/react-context-selector": "^9.1.15",
|
41
|
+
"@fluentui/react-icons": "^2.0.196",
|
42
|
+
"@fluentui/react-portal": "^9.2.2",
|
43
|
+
"@fluentui/react-positioning": "^9.5.6",
|
44
|
+
"@fluentui/react-shared-contexts": "^9.3.2",
|
45
|
+
"@fluentui/react-tabster": "^9.6.1",
|
46
|
+
"@fluentui/react-theme": "^9.1.7",
|
47
|
+
"@fluentui/react-utilities": "^9.7.2",
|
48
48
|
"@griffel/react": "^1.5.2",
|
49
|
-
"
|
49
|
+
"@swc/helpers": "^0.4.14"
|
50
50
|
},
|
51
51
|
"peerDependencies": {
|
52
52
|
"@types/react": ">=16.8.0 <19.0.0",
|
@@ -64,6 +64,7 @@
|
|
64
64
|
"exports": {
|
65
65
|
".": {
|
66
66
|
"types": "./dist/index.d.ts",
|
67
|
+
"node": "./lib-commonjs/index.js",
|
67
68
|
"import": "./lib/index.js",
|
68
69
|
"require": "./lib-commonjs/index.js"
|
69
70
|
},
|
package/lib-amd/Menu.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/Menu/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=Menu.js.map
|
package/lib-amd/Menu.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/Menu.ts"],"names":[],"mappings":";;;IAAA,uCAAwC","sourcesContent":["export * from './components/Menu/index';\n"]}
|
package/lib-amd/MenuDivider.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuDivider/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuDivider.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuDivider.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuDivider.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/MenuDivider/index';\n"]}
|
package/lib-amd/MenuGroup.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuGroup/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuGroup.js.map
|
package/lib-amd/MenuGroup.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuGroup.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuGroup.ts"],"names":[],"mappings":";;;IAAA,uCAA6C","sourcesContent":["export * from './components/MenuGroup/index';\n"]}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuGroupHeader/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuGroupHeader.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuGroupHeader.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuGroupHeader.ts"],"names":[],"mappings":";;;IAAA,uCAAmD","sourcesContent":["export * from './components/MenuGroupHeader/index';\n"]}
|
package/lib-amd/MenuItem.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuItem/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuItem.js.map
|
package/lib-amd/MenuItem.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuItem.ts"],"names":[],"mappings":";;;IAAA,uCAA4C","sourcesContent":["export * from './components/MenuItem/index';\n"]}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuItemCheckbox/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuItemCheckbox.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuItemCheckbox.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuItemCheckbox.ts"],"names":[],"mappings":";;;IAAA,uCAAoD","sourcesContent":["export * from './components/MenuItemCheckbox/index';\n"]}
|
package/lib-amd/MenuItemRadio.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuItemRadio/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuItemRadio.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuItemRadio.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuItemRadio.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/MenuItemRadio/index';\n"]}
|
package/lib-amd/MenuList.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuList/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuList.js.map
|
package/lib-amd/MenuList.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuList.ts"],"names":[],"mappings":";;;IAAA,uCAA4C","sourcesContent":["export * from './components/MenuList/index';\n"]}
|
package/lib-amd/MenuPopover.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuPopover/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuPopover.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuPopover.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuPopover.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/MenuPopover/index';\n"]}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuSplitGroup/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuSplitGroup.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuSplitGroup.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuSplitGroup.ts"],"names":[],"mappings":";;;IAAA,uCAAkD","sourcesContent":["export * from './components/MenuSplitGroup/index';\n"]}
|
package/lib-amd/MenuTrigger.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/MenuTrigger/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=MenuTrigger.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MenuTrigger.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/MenuTrigger.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/MenuTrigger/index';\n"]}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
define(["require", "exports", "./useMenu", "./useMenuContextValues", "./renderMenu"], function (require, exports, useMenu_1, useMenuContextValues_1, renderMenu_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.Menu = void 0;
|
5
|
-
/**
|
6
|
-
* Wrapper component that manages state for a popup MenuList and a MenuTrigger
|
7
|
-
*/
|
8
|
-
var Menu = function (props) {
|
9
|
-
var state = useMenu_1.useMenu_unstable(props);
|
10
|
-
var contextValues = useMenuContextValues_1.useMenuContextValues_unstable(state);
|
11
|
-
return renderMenu_1.renderMenu_unstable(state, contextValues);
|
12
|
-
};
|
13
|
-
exports.Menu = Menu;
|
14
|
-
exports.Menu.displayName = 'Menu';
|
15
|
-
});
|
16
|
-
//# sourceMappingURL=Menu.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/Menu.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACI,IAAM,IAAI,GAAwB,UAAA,KAAK;QAC5C,IAAM,KAAK,GAAG,0BAAgB,CAAC,KAAK,CAAC,CAAC;QACtC,IAAM,aAAa,GAAG,oDAA6B,CAAC,KAAK,CAAC,CAAC;QAE3D,OAAO,gCAAmB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACnD,CAAC,CAAC;IALW,QAAA,IAAI,QAKf;IAEF,YAAI,CAAC,WAAW,GAAG,MAAM,CAAC","sourcesContent":["import * as React from 'react';\nimport { useMenu_unstable } from './useMenu';\nimport { useMenuContextValues_unstable } from './useMenuContextValues';\nimport { renderMenu_unstable } from './renderMenu';\nimport type { MenuProps } from './Menu.types';\n\n/**\n * Wrapper component that manages state for a popup MenuList and a MenuTrigger\n */\nexport const Menu: React.FC<MenuProps> = props => {\n const state = useMenu_unstable(props);\n const contextValues = useMenuContextValues_unstable(state);\n\n return renderMenu_unstable(state, contextValues);\n};\n\nMenu.displayName = 'Menu';\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Menu.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { PositioningVirtualElement, SetVirtualMouseTarget } from '@fluentui/react-positioning';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { MenuContextValue } from '../../contexts/menuContext';\nimport type { MenuListProps } from '../MenuList/MenuList.types';\n\nexport type MenuSlots = {};\n\n/**\n * Extends and drills down Menulist props to simplify API\n */\nexport type MenuProps = ComponentProps<MenuSlots> &\n Pick<PortalProps, 'mountNode'> &\n Pick<\n MenuListProps,\n 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'\n > & {\n /**\n * Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.\n * Alternatively can only contain {@link MenuPopover} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Sets the delay for mouse open/close for the popover one mouse enter/leave\n */\n hoverDelay?: number;\n\n /**\n * Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order\n * This option is disregarded for submenus\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n\n /**\n * Whether the popup is open\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Whether the popup is open by default\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Opens the menu on right click (context menu), removes all other menu open interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Opens the menu on hover\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Do not dismiss the menu when a menu item is clicked\n *\n * @default false\n */\n persistOnItemClick?: boolean;\n\n /**\n * Configures the positioned menu\n */\n positioning?: PositioningShorthand;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n };\n\nexport type MenuState = ComponentState<MenuSlots> &\n Required<\n Pick<\n MenuProps,\n | 'hasCheckmarks'\n | 'hasIcons'\n | 'mountNode'\n | 'inline'\n | 'checkedValues'\n | 'onCheckedValueChange'\n | 'open'\n | 'openOnHover'\n | 'closeOnScroll'\n | 'hoverDelay'\n | 'openOnContext'\n | 'persistOnItemClick'\n >\n > & {\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget?: PositioningVirtualElement;\n\n /**\n * Whether this menu is a submenu\n */\n isSubmenu: boolean;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuPopover: React.ReactNode;\n\n /**\n * The ref for the popup\n */\n menuPopoverRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Internal react node that just simplifies handling children\n */\n menuTrigger: React.ReactNode;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: SetVirtualMouseTarget;\n\n /**\n * Callback to open/close the popup\n */\n setOpen: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n\n /**\n * Id for the MenuTrigger element for aria relationship\n */\n triggerId: string;\n\n /**\n * The ref for the MenuTrigger, used for popup positioning\n */\n triggerRef: React.MutableRefObject<HTMLElement>;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n onOpenChange?: (e: MenuOpenEvent, data: MenuOpenChangeData) => void;\n /**\n * Default values to be checked on mount\n @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n defaultCheckedValues?: Record<string, string[]>;\n };\n\nexport type MenuContextValues = {\n menu: MenuContextValue;\n};\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type MenuOpenEvent = MenuOpenChangeData['event'];\n/**\n * @deprecated use MenuOpenEvent instead\n */\nexport type MenuOpenEvents = MenuOpenEvent;\n\n/**\n * Data attached to open/close events\n */\nexport type MenuOpenChangeData = {\n /**\n * indicates whether the request for the open state was bubbled from a nested menu\n */\n bubble?: boolean;\n /**\n * Indicates whether the change of state was a keyboard interaction\n * @deprecated\n * This should not be used, since `Enter`, `Space` and click should be interpreted as the same thing as a click\n */\n keyboard?: boolean;\n open: boolean;\n} & (\n | {\n type: 'menuTriggerContextMenu';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseLeave';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerMouseMove';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuTriggerKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'menuItemClick';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverMouseEnter';\n event: React.MouseEvent<HTMLElement>;\n }\n | {\n type: 'menuPopoverKeyDown';\n event: React.KeyboardEvent<HTMLElement>;\n }\n | {\n type: 'clickOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'scrollOutside';\n event: MouseEvent | TouchEvent;\n }\n | {\n type: 'menuMouseEnter';\n event: MouseEvent | TouchEvent;\n }\n);\n"]}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./Menu", "./Menu.types", "./renderMenu", "./useMenu", "./useMenuContextValues"], function (require, exports, tslib_1, Menu_1, Menu_types_1, renderMenu_1, useMenu_1, useMenuContextValues_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(Menu_1, exports);
|
5
|
-
tslib_1.__exportStar(Menu_types_1, exports);
|
6
|
-
tslib_1.__exportStar(renderMenu_1, exports);
|
7
|
-
tslib_1.__exportStar(useMenu_1, exports);
|
8
|
-
tslib_1.__exportStar(useMenuContextValues_1, exports);
|
9
|
-
});
|
10
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/index.ts"],"names":[],"mappings":";;;IAAA,sCAAuB;IACvB,4CAA6B;IAC7B,4CAA6B;IAC7B,yCAA0B;IAC1B,sDAAuC","sourcesContent":["export * from './Menu';\nexport * from './Menu.types';\nexport * from './renderMenu';\nexport * from './useMenu';\nexport * from './useMenuContextValues';\n"]}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "../../contexts/menuContext"], function (require, exports, React, menuContext_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.renderMenu_unstable = void 0;
|
5
|
-
/**
|
6
|
-
* Render the final JSX of Menu
|
7
|
-
*/
|
8
|
-
var renderMenu_unstable = function (state, contextValues) {
|
9
|
-
return (React.createElement(menuContext_1.MenuProvider, { value: contextValues.menu },
|
10
|
-
state.menuTrigger,
|
11
|
-
state.open && state.menuPopover));
|
12
|
-
};
|
13
|
-
exports.renderMenu_unstable = renderMenu_unstable;
|
14
|
-
});
|
15
|
-
//# sourceMappingURL=renderMenu.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"renderMenu.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-menu/src/components/Menu/renderMenu.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,mBAAmB,GAAG,UAAC,KAAgB,EAAE,aAAgC;QACpF,OAAO,CACL,oBAAC,0BAAY,IAAC,KAAK,EAAE,aAAa,CAAC,IAAI;YACpC,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,WAAW,CACnB,CAChB,CAAC;IACJ,CAAC,CAAC;IAPW,QAAA,mBAAmB,uBAO9B","sourcesContent":["import * as React from 'react';\nimport { MenuProvider } from '../../contexts/menuContext';\nimport type { MenuContextValues, MenuState } from './Menu.types';\n\n/**\n * Render the final JSX of Menu\n */\nexport const renderMenu_unstable = (state: MenuState, contextValues: MenuContextValues) => {\n return (\n <MenuProvider value={contextValues.menu}>\n {state.menuTrigger}\n {state.open && state.menuPopover}\n </MenuProvider>\n );\n};\n"]}
|