@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
|
@@ -12,4 +12,4 @@ export declare type MenuListContextValue = Pick<MenuListProps, 'checkedValues' |
|
|
|
12
12
|
selectRadio?: SelectableHandler;
|
|
13
13
|
};
|
|
14
14
|
export declare const MenuListProvider: React.Provider<MenuListContextValue> & React.FC<React.ProviderProps<MenuListContextValue>>;
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const useMenuListContext_unstable: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
|
|
@@ -3,32 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useMenuListContext_unstable = exports.MenuListProvider = exports.MenuListContext = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
|
|
9
9
|
|
|
10
10
|
exports.MenuListContext = /*#__PURE__*/react_context_selector_1.createContext({
|
|
11
11
|
checkedValues: {},
|
|
12
|
-
onCheckedValueChange:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return null;
|
|
17
|
-
},
|
|
18
|
-
toggleCheckbox: function () {
|
|
19
|
-
return null;
|
|
20
|
-
},
|
|
21
|
-
selectRadio: function () {
|
|
22
|
-
return null;
|
|
23
|
-
},
|
|
12
|
+
onCheckedValueChange: () => null,
|
|
13
|
+
setFocusByFirstCharacter: () => null,
|
|
14
|
+
toggleCheckbox: () => null,
|
|
15
|
+
selectRadio: () => null,
|
|
24
16
|
hasIcons: false,
|
|
25
17
|
hasCheckmarks: false
|
|
26
18
|
});
|
|
27
19
|
exports.MenuListProvider = exports.MenuListContext.Provider;
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
return react_context_selector_1.useContextSelector(exports.MenuListContext, selector);
|
|
31
|
-
};
|
|
21
|
+
const useMenuListContext_unstable = selector => react_context_selector_1.useContextSelector(exports.MenuListContext, selector);
|
|
32
22
|
|
|
33
|
-
exports.
|
|
23
|
+
exports.useMenuListContext_unstable = useMenuListContext_unstable;
|
|
34
24
|
//# sourceMappingURL=menuListContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/contexts/menuListContext.tsx"],"names":[],"mappings":";;;;;;;AACA,
|
|
1
|
+
{"version":3,"sources":["../../src/contexts/menuListContext.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,eAAA,gBAAiD,wBAAA,CAAA,aAAA,CAAoC;AAChG,EAAA,aAAa,EAAE,EADiF;AAEhG,EAAA,oBAAoB,EAAE,MAAM,IAFoE;AAGhG,EAAA,wBAAwB,EAAE,MAAM,IAHgE;AAIhG,EAAA,cAAc,EAAE,MAAM,IAJ0E;AAKhG,EAAA,WAAW,EAAE,MAAM,IAL6E;AAMhG,EAAA,QAAQ,EAAE,KANsF;AAOhG,EAAA,aAAa,EAAE;AAPiF,CAApC,CAAjD;AAsBA,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,eAAA,CAAgB,QAAnC;;AAEN,MAAM,2BAA2B,GAAQ,QAAL,IACzC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,eAAnB,EAAoC,QAApC,CADK;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourceRoot":""}
|
|
@@ -3,20 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useMenuTriggerContext_unstable = exports.MenuTriggerContextProvider = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const React = /*#__PURE__*/require("react");
|
|
9
9
|
/**
|
|
10
10
|
* Context used communicate with child that it is a trigger for a menu
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const MenuTriggerContext = /*#__PURE__*/React.createContext(false);
|
|
15
15
|
exports.MenuTriggerContextProvider = MenuTriggerContext.Provider;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
return React.useContext(MenuTriggerContext);
|
|
19
|
-
};
|
|
17
|
+
const useMenuTriggerContext_unstable = () => React.useContext(MenuTriggerContext);
|
|
20
18
|
|
|
21
|
-
exports.
|
|
19
|
+
exports.useMenuTriggerContext_unstable = useMenuTriggerContext_unstable;
|
|
22
20
|
//# sourceMappingURL=menuTriggerContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAEA;;AAEG;;;AACH,MAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,CAA6B,KAA7B,CAA3B;AAEa,OAAA,CAAA,0BAAA,GAA6B,kBAAkB,CAAC,QAAhD;;AACN,MAAM,8BAA8B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,kBAAjB,CAA7C;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourceRoot":""}
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export * from './MenuItem';
|
|
2
|
-
export * from './MenuList';
|
|
3
|
-
export * from './MenuItemCheckbox';
|
|
4
|
-
export * from './MenuItemRadio';
|
|
5
|
-
export * from './MenuDivider';
|
|
6
|
-
export * from './MenuGroupHeader';
|
|
7
|
-
export * from './MenuGroup';
|
|
8
|
-
export * from './selectable/index';
|
|
9
|
-
export * from './MenuTrigger';
|
|
10
|
-
export * from './Menu';
|
|
11
1
|
export * from './contexts/menuContext';
|
|
12
2
|
export * from './contexts/menuTriggerContext';
|
|
13
3
|
export * from './contexts/menuGroupContext';
|
|
14
4
|
export * from './contexts/menuListContext';
|
|
5
|
+
export * from './Menu';
|
|
6
|
+
export * from './MenuDivider';
|
|
7
|
+
export * from './MenuGroup';
|
|
8
|
+
export * from './MenuGroupHeader';
|
|
9
|
+
export * from './MenuItem';
|
|
10
|
+
export * from './MenuItemCheckbox';
|
|
11
|
+
export * from './MenuItemRadio';
|
|
12
|
+
export * from './MenuList';
|
|
15
13
|
export * from './MenuPopover';
|
|
14
|
+
export * from './MenuSplitGroup';
|
|
15
|
+
export * from './MenuTrigger';
|
|
16
|
+
export * from './selectable/index';
|
package/lib-commonjs/index.js
CHANGED
|
@@ -4,35 +4,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
8
|
|
|
9
|
-
tslib_1.__exportStar(require("./
|
|
9
|
+
tslib_1.__exportStar(require("./contexts/menuContext"), exports);
|
|
10
10
|
|
|
11
|
-
tslib_1.__exportStar(require("./
|
|
11
|
+
tslib_1.__exportStar(require("./contexts/menuTriggerContext"), exports);
|
|
12
12
|
|
|
13
|
-
tslib_1.__exportStar(require("./
|
|
13
|
+
tslib_1.__exportStar(require("./contexts/menuGroupContext"), exports);
|
|
14
14
|
|
|
15
|
-
tslib_1.__exportStar(require("./
|
|
15
|
+
tslib_1.__exportStar(require("./contexts/menuListContext"), exports);
|
|
16
16
|
|
|
17
|
-
tslib_1.__exportStar(require("./
|
|
17
|
+
tslib_1.__exportStar(require("./Menu"), exports);
|
|
18
18
|
|
|
19
|
-
tslib_1.__exportStar(require("./
|
|
19
|
+
tslib_1.__exportStar(require("./MenuDivider"), exports);
|
|
20
20
|
|
|
21
21
|
tslib_1.__exportStar(require("./MenuGroup"), exports);
|
|
22
22
|
|
|
23
|
-
tslib_1.__exportStar(require("./
|
|
23
|
+
tslib_1.__exportStar(require("./MenuGroupHeader"), exports);
|
|
24
24
|
|
|
25
|
-
tslib_1.__exportStar(require("./
|
|
25
|
+
tslib_1.__exportStar(require("./MenuItem"), exports);
|
|
26
26
|
|
|
27
|
-
tslib_1.__exportStar(require("./
|
|
27
|
+
tslib_1.__exportStar(require("./MenuItemCheckbox"), exports);
|
|
28
28
|
|
|
29
|
-
tslib_1.__exportStar(require("./
|
|
29
|
+
tslib_1.__exportStar(require("./MenuItemRadio"), exports);
|
|
30
30
|
|
|
31
|
-
tslib_1.__exportStar(require("./
|
|
31
|
+
tslib_1.__exportStar(require("./MenuList"), exports);
|
|
32
32
|
|
|
33
|
-
tslib_1.__exportStar(require("./
|
|
33
|
+
tslib_1.__exportStar(require("./MenuPopover"), exports);
|
|
34
34
|
|
|
35
|
-
tslib_1.__exportStar(require("./
|
|
35
|
+
tslib_1.__exportStar(require("./MenuSplitGroup"), exports);
|
|
36
36
|
|
|
37
|
-
tslib_1.__exportStar(require("./
|
|
37
|
+
tslib_1.__exportStar(require("./MenuTrigger"), exports);
|
|
38
|
+
|
|
39
|
+
tslib_1.__exportStar(require("./selectable/index"), exports);
|
|
38
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA;;AAEA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AAEA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { MenuItemSelectableState } from './types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MenuItemState } from '../components/MenuItem/MenuItem.types';
|
|
3
3
|
/**
|
|
4
4
|
* Applies styles to a checkmark slot for selectable menu items
|
|
5
5
|
*
|
|
6
6
|
* @param state - should contain a `checkmark` slot
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const useCheckmarkStyles_unstable: (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => void;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useCheckmarkStyles_unstable = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
11
11
|
"root": {
|
|
12
12
|
"a9b677": "fjw5fx7",
|
|
13
13
|
"Bqenvij": "fd461yt",
|
|
@@ -26,13 +26,13 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const useCheckmarkStyles_unstable = state => {
|
|
30
|
+
const styles = useStyles();
|
|
31
31
|
|
|
32
32
|
if (state.checkmark) {
|
|
33
|
-
state.checkmark.className =
|
|
33
|
+
state.checkmark.className = react_1.mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
exports.
|
|
37
|
+
exports.useCheckmarkStyles_unstable = useCheckmarkStyles_unstable;
|
|
38
38
|
//# sourceMappingURL=useCheckmarkStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIA,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;;;AAIG;;;AACI,MAAM,2BAA2B,GAAI,KAAD,IAAsE;AAC/G,QAAM,MAAM,GAAG,SAAS,EAAxB;;AACA,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,OAAA,CAAA,YAAA,CAC1B,MAAM,CAAC,IADmB,EAE1B,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,WAFE,EAG1B,KAAK,CAAC,SAAN,CAAgB,SAHU,CAA5B;AAKD;AACF,CATM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourceRoot":""}
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useIsSubmenu = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const menuContext_1 = /*#__PURE__*/require("../contexts/menuContext");
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
|
|
13
13
|
/**
|
|
14
14
|
* A component can be a part of a submenu whether its menu context `isSubmenu` flag is true
|
|
15
15
|
* or whether it is a part of a `MenuList`
|
|
@@ -21,10 +21,8 @@ var menuListContext_1 = /*#__PURE__*/require("../contexts/menuListContext");
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
function useIsSubmenu() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
var hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
|
|
24
|
+
const menuContextValue = menuContext_1.useMenuContext_unstable(context => context.isSubmenu);
|
|
25
|
+
const hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
|
|
28
26
|
return menuContextValue || hasMenuListContext;
|
|
29
27
|
}
|
|
30
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;AAOG;;;AACH,SAAgB,YAAhB,GAA4B;AAC1B,QAAM,gBAAgB,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO,CAAC,SAA3C,CAAzB;AACA,QAAM,kBAAkB,GAAG,wBAAA,CAAA,mBAAA,CAAoB,iBAAA,CAAA,eAApB,CAA3B;AAEA,SAAO,gBAAgB,IAAI,kBAA3B;AACD;;AALD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.dispatchMenuEnterEvent = exports.useOnMenuMouseEnter = exports.MENU_ENTER_EVENT = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const React = /*#__PURE__*/require("react");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
|
|
13
13
|
/**
|
|
14
14
|
* Name of the custom event
|
|
15
15
|
*/
|
|
@@ -28,27 +28,29 @@ exports.MENU_ENTER_EVENT = 'fuimenuenter';
|
|
|
28
28
|
* Each nested menu can use the listener to check if the event is from a child or parent menu
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const useOnMenuMouseEnter = options => {
|
|
32
|
+
const {
|
|
33
|
+
refs,
|
|
34
|
+
callback,
|
|
35
|
+
element,
|
|
36
|
+
disabled
|
|
37
|
+
} = options; // Keep mouse event here because this is essentially a custom 'mouseenter' event
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
const listener = react_utilities_1.useEventCallback(ev => {
|
|
38
40
|
var _a;
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
const popoverRef = refs[0];
|
|
43
|
+
const someMenuPopover = ev.target; // someMenu is a child -> will always be contained because of vParents
|
|
42
44
|
// someMenu is a parent -> will always not be contained because no vParent
|
|
43
45
|
// someMenu is the current popover -> it will contain itself
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
const isOutsidePopover = !react_portal_1.elementContains((_a = popoverRef.current) !== null && _a !== void 0 ? _a : null, someMenuPopover);
|
|
46
48
|
|
|
47
49
|
if (isOutsidePopover && !disabled) {
|
|
48
50
|
callback(ev);
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
|
-
React.useEffect(
|
|
53
|
+
React.useEffect(() => {
|
|
52
54
|
// eslint-disable-next-line eqeqeq
|
|
53
55
|
if (element == null) {
|
|
54
56
|
return;
|
|
@@ -58,7 +60,7 @@ var useOnMenuMouseEnter = function (options) {
|
|
|
58
60
|
element.addEventListener(exports.MENU_ENTER_EVENT, listener);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
return
|
|
63
|
+
return () => {
|
|
62
64
|
element.removeEventListener(exports.MENU_ENTER_EVENT, listener);
|
|
63
65
|
};
|
|
64
66
|
}, [listener, element, disabled]);
|
|
@@ -71,11 +73,11 @@ exports.useOnMenuMouseEnter = useOnMenuMouseEnter;
|
|
|
71
73
|
* @param nativeEvent the native mouse event this is mapped to
|
|
72
74
|
*/
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
const dispatchMenuEnterEvent = (el, nativeEvent) => {
|
|
75
77
|
el.dispatchEvent(new CustomEvent(exports.MENU_ENTER_EVENT, {
|
|
76
78
|
bubbles: true,
|
|
77
79
|
detail: {
|
|
78
|
-
nativeEvent
|
|
80
|
+
nativeEvent
|
|
79
81
|
}
|
|
80
82
|
}));
|
|
81
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/useOnMenuEnter.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/utils/useOnMenuEnter.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,gBAAA,GAAmB,cAAnB;AAEb;;;;;;;;;;AAUG;;AACI,MAAM,mBAAmB,GAAI,OAAD,IAA8C;AAC/E,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,OAAlB;AAA2B,IAAA;AAA3B,MAAwC,OAA9C,CAD+E,CAG/E;;AACA,QAAM,QAAQ,GAAG,iBAAA,CAAA,gBAAA,CAAkB,EAAD,IAAmB;;;AACnD,UAAM,UAAU,GAAG,IAAI,CAAC,CAAD,CAAvB;AACA,UAAM,eAAe,GAAG,EAAE,CAAC,MAA3B,CAFmD,CAInD;AACA;AACA;;AACA,UAAM,gBAAgB,GAAG,CAAC,cAAA,CAAA,eAAA,CAAgB,CAAA,EAAA,GAAA,UAAU,CAAC,OAAX,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,EAAlB,GAAsB,IAAtC,EAA4C,eAA5C,CAA1B;;AACA,QAAI,gBAAgB,IAAI,CAAC,QAAzB,EAAmC;AACjC,MAAA,QAAQ,CAAC,EAAD,CAAR;AACD;AACF,GAXgB,CAAjB;AAaA,EAAA,KAAK,CAAC,SAAN,CAAgB,MAAK;AACnB;AACA,QAAI,OAAO,IAAI,IAAf,EAAqB;AACnB;AACD;;AAUD,QAAI,CAAC,QAAL,EAAe;AACb,MAAA,OAAO,CAAC,gBAAR,CAAyB,OAAA,CAAA,gBAAzB,EAA2C,QAA3C;AACD;;AAED,WAAO,MAAK;AACV,MAAA,OAAO,CAAC,mBAAR,CAA4B,OAAA,CAAA,gBAA5B,EAA8C,QAA9C;AACD,KAFD;AAGD,GArBD,EAqBG,CAAC,QAAD,EAAW,OAAX,EAAoB,QAApB,CArBH;AAsBD,CAvCM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB;AAyCb;;;;AAIG;;AACI,MAAM,sBAAsB,GAAG,CAAC,EAAD,EAAkB,WAAlB,KAA6C;AACjF,EAAA,EAAE,CAAC,aAAH,CAAiB,IAAI,WAAJ,CAAgB,OAAA,CAAA,gBAAhB,EAAkC;AAAE,IAAA,OAAO,EAAE,IAAX;AAAiB,IAAA,MAAM,EAAE;AAAE,MAAA;AAAF;AAAzB,GAAlC,CAAjB;AACD,CAFM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-menu",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-nightly3082edf34720220208.1",
|
|
4
4
|
"description": "Fluent UI menu component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
|
16
|
-
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-menu/src && yarn docs",
|
|
16
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-menu/src && yarn docs",
|
|
17
17
|
"build": "just-scripts build",
|
|
18
18
|
"bundle-size": "bundle-size measure",
|
|
19
19
|
"clean": "just-scripts clean",
|
|
@@ -22,15 +22,14 @@
|
|
|
22
22
|
"just": "just-scripts",
|
|
23
23
|
"lint": "just-scripts lint",
|
|
24
24
|
"start": "yarn storybook",
|
|
25
|
-
"storybook": "
|
|
26
|
-
"test": "jest"
|
|
25
|
+
"storybook": "node ../../scripts/storybook/runner",
|
|
26
|
+
"test": "jest --passWithNoTests",
|
|
27
|
+
"type-check": "tsc -b tsconfig.json"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"@fluentui/babel-make-styles": "0.0.0-nightly0e0cf06c3420211029.1",
|
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
|
31
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-nightly0e0cf06c3420211029.1",
|
|
32
31
|
"@fluentui/react-conformance": "*",
|
|
33
|
-
"@fluentui/react-conformance-
|
|
32
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly3082edf34720220208.1",
|
|
34
33
|
"@fluentui/scripts": "^1.0.0",
|
|
35
34
|
"@types/enzyme": "3.10.3",
|
|
36
35
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
|
@@ -44,15 +43,15 @@
|
|
|
44
43
|
"react-test-renderer": "^16.3.0"
|
|
45
44
|
},
|
|
46
45
|
"dependencies": {
|
|
47
|
-
"@fluentui/keyboard-keys": "0.0.0-
|
|
48
|
-
"@fluentui/react-context-selector": "0.0.0-
|
|
49
|
-
"@fluentui/react-icons": "^
|
|
50
|
-
"@
|
|
51
|
-
"@fluentui/react-portal": "0.0.0-
|
|
52
|
-
"@fluentui/react-positioning": "0.0.0-
|
|
53
|
-
"@fluentui/react-
|
|
54
|
-
"@fluentui/react-tabster": "0.0.0-
|
|
55
|
-
"@fluentui/react-utilities": "0.0.0-
|
|
46
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly3082edf34720220208.1",
|
|
47
|
+
"@fluentui/react-context-selector": "0.0.0-nightly3082edf34720220208.1",
|
|
48
|
+
"@fluentui/react-icons": "^2.0.159-beta.10",
|
|
49
|
+
"@griffel/react": "1.0.0",
|
|
50
|
+
"@fluentui/react-portal": "0.0.0-nightly3082edf34720220208.1",
|
|
51
|
+
"@fluentui/react-positioning": "0.0.0-nightly3082edf34720220208.1",
|
|
52
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly3082edf34720220208.1",
|
|
53
|
+
"@fluentui/react-tabster": "0.0.0-nightly3082edf34720220208.1",
|
|
54
|
+
"@fluentui/react-utilities": "0.0.0-nightly3082edf34720220208.1",
|
|
56
55
|
"tslib": "^2.1.0"
|
|
57
56
|
},
|
|
58
57
|
"peerDependencies": {
|
|
@@ -62,7 +61,6 @@
|
|
|
62
61
|
"react-dom": ">=16.8.0 <18.0.0"
|
|
63
62
|
},
|
|
64
63
|
"beachball": {
|
|
65
|
-
"tag": "beta",
|
|
66
64
|
"disallowedChangeTypes": [
|
|
67
65
|
"major",
|
|
68
66
|
"minor",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
|
|
2
|
-
import makeStylesTests from '@fluentui/react-conformance-make-styles';
|
|
3
|
-
export function isConformant(testInfo) {
|
|
4
|
-
var defaultOptions = {
|
|
5
|
-
asPropHandlesRef: true,
|
|
6
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
|
7
|
-
skipAsPropTests: true,
|
|
8
|
-
extraTests: makeStylesTests
|
|
9
|
-
};
|
|
10
|
-
baseIsConformant(defaultOptions, testInfo);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=isConformant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,eAAe,EAAE,IAH0C;AAI3D,IAAA,UAAU,EAAE;AAJ+C,GAA7D;AAOA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { MenuContextValue } from '../contexts/menuContext';
|
|
2
|
-
/**
|
|
3
|
-
* A test utility to mock the useMenuContext hook that relies on context selector
|
|
4
|
-
* Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
|
|
5
|
-
* @param options Menu context values to set for testing
|
|
6
|
-
*/
|
|
7
|
-
export declare const mockUseMenuContext: (options?: Partial<MenuContextValue>) => void;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { useMenuContext } from '../contexts/menuContext';
|
|
3
|
-
/**
|
|
4
|
-
* A test utility to mock the useMenuContext hook that relies on context selector
|
|
5
|
-
* Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
|
|
6
|
-
* @param options Menu context values to set for testing
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export var mockUseMenuContext = function (options) {
|
|
10
|
-
if (options === void 0) {
|
|
11
|
-
options = {};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
var mockContext = __assign({
|
|
15
|
-
open: false,
|
|
16
|
-
setOpen: function () {
|
|
17
|
-
return null;
|
|
18
|
-
},
|
|
19
|
-
triggerRef: {
|
|
20
|
-
current: null
|
|
21
|
-
},
|
|
22
|
-
menuPopoverRef: {
|
|
23
|
-
current: null
|
|
24
|
-
},
|
|
25
|
-
openOnContext: false,
|
|
26
|
-
openOnHover: false,
|
|
27
|
-
isSubmenu: false,
|
|
28
|
-
triggerId: 'id'
|
|
29
|
-
}, options); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
useMenuContext.mockImplementation(function (selector) {
|
|
33
|
-
return selector(mockContext);
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=mockUseMenuContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/common/mockUseMenuContext.ts"],"names":[],"mappings":";AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA;;;;AAIG;;AACH,OAAO,IAAM,kBAAkB,GAAG,UAAC,OAAD,EAAwC;AAAvC,MAAA,OAAA,KAAA,KAAA,CAAA,EAAA;AAAA,IAAA,OAAA,GAAA,EAAA;AAAuC;;AACxE,MAAM,WAAW,GAAA,QAAA,CAAA;AACf,IAAA,IAAI,EAAE,KADS;AAEf,IAAA,OAAO,EAAE,YAAA;AAAM,aAAA,IAAA;AAAI,KAFJ;AAGf,IAAA,UAAU,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAHE;AAIf,IAAA,cAAc,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAJF;AAKf,IAAA,aAAa,EAAE,KALA;AAMf,IAAA,WAAW,EAAE,KANE;AAOf,IAAA,SAAS,EAAE,KAPI;AAQf,IAAA,SAAS,EAAE;AARI,GAAA,EASZ,OATY,CAAjB,CADwE,CAYxE;;;AACC,EAAA,cAA4B,CAAC,kBAA7B,CAAgD,UAAC,QAAD,EAA6C;AAC5F,WAAO,QAAQ,CAAC,WAAD,CAAf;AACD,GAFA;AAGF,CAhBM","sourceRoot":""}
|