@fluentui/react-menu 9.7.4 → 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 +94 -1
- package/CHANGELOG.md +24 -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 +0,0 @@
|
|
1
|
-
{"version":3,"file":"menuGroupContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;IAEA,IAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAC1C,SAAS,CAC8B,CAAC;IAE1C,IAAM,4BAA4B,GAA0B;QAC1D,QAAQ,EAAE,EAAE;KACb,CAAC;IAaW,QAAA,wBAAwB,GAAG,gBAAgB,CAAC,QAAQ,CAAC;IAC3D,IAAM,4BAA4B,GAAG,sBAAM,OAAA,MAAA,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,mCAAI,4BAA4B,CAAA,EAAA,CAAC;IAAxG,QAAA,4BAA4B,gCAA4E","sourcesContent":["import * as React from 'react';\n\nconst MenuGroupContext = React.createContext<MenuGroupContextValue | undefined>(\n undefined,\n) as React.Context<MenuGroupContextValue>;\n\nconst menuGroupContextDefaultValue: MenuGroupContextValue = {\n headerId: '',\n};\n\n/**\n * Context used to guarantee correct aria-relationship between header\n * and group information\n */\nexport type MenuGroupContextValue = {\n /**\n * Element id applied to the `MenuGroupHeader` component\n */\n headerId: string;\n};\n\nexport const MenuGroupContextProvider = MenuGroupContext.Provider;\nexport const useMenuGroupContext_unstable = () => React.useContext(MenuGroupContext) ?? menuGroupContextDefaultValue;\n"]}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-context-selector"], function (require, exports, react_context_selector_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useMenuListContext_unstable = exports.MenuListProvider = exports.MenuListContext = void 0;
|
5
|
-
exports.MenuListContext = react_context_selector_1.createContext(undefined);
|
6
|
-
var menuListContextDefaultValue = {
|
7
|
-
checkedValues: {},
|
8
|
-
setFocusByFirstCharacter: function () { return null; },
|
9
|
-
toggleCheckbox: function () { return null; },
|
10
|
-
selectRadio: function () { return null; },
|
11
|
-
hasIcons: false,
|
12
|
-
hasCheckmarks: false,
|
13
|
-
};
|
14
|
-
exports.MenuListProvider = exports.MenuListContext.Provider;
|
15
|
-
var useMenuListContext_unstable = function (selector) {
|
16
|
-
return react_context_selector_1.useContextSelector(exports.MenuListContext, function (ctx) {
|
17
|
-
if (ctx === void 0) { ctx = menuListContextDefaultValue; }
|
18
|
-
return selector(ctx);
|
19
|
-
});
|
20
|
-
};
|
21
|
-
exports.useMenuListContext_unstable = useMenuListContext_unstable;
|
22
|
-
});
|
23
|
-
//# sourceMappingURL=menuListContext.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"menuListContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/contexts/menuListContext.tsx"],"names":[],"mappings":";;;;IAMa,QAAA,eAAe,GAAkC,sCAAa,CACzE,SAAS,CACuB,CAAC;IAEnC,IAAM,2BAA2B,GAAyB;QACxD,aAAa,EAAE,EAAE;QACjB,wBAAwB,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QACpC,cAAc,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QAC1B,WAAW,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QACvB,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB,CAAC;IAqBW,QAAA,gBAAgB,GAAG,uBAAe,CAAC,QAAQ,CAAC;IAElD,IAAM,2BAA2B,GAAG,UAAK,QAAkD;QAChG,OAAA,2CAAkB,CAAC,uBAAe,EAAE,UAAC,GAAiC;YAAjC,oBAAA,EAAA,iCAAiC;YAAK,OAAA,QAAQ,CAAC,GAAG,CAAC;QAAb,CAAa,CAAC;IAAzF,CAAyF,CAAC;IAD/E,QAAA,2BAA2B,+BACoD","sourcesContent":["import * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { SelectableHandler } from '../selectable/index';\nimport type { MenuCheckedValueChangeData, MenuCheckedValueChangeEvent, MenuListProps } from '../components/index';\n\nexport const MenuListContext: Context<MenuListContextValue> = createContext<MenuListContextValue | undefined>(\n undefined,\n) as Context<MenuListContextValue>;\n\nconst menuListContextDefaultValue: MenuListContextValue = {\n checkedValues: {},\n setFocusByFirstCharacter: () => null,\n toggleCheckbox: () => null,\n selectRadio: () => null,\n hasIcons: false,\n hasCheckmarks: false,\n};\n\n/**\n * Context shared between MenuList and its children components\n */\nexport type MenuListContextValue = Pick<MenuListProps, 'checkedValues' | 'hasIcons' | 'hasCheckmarks'> & {\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n toggleCheckbox?: SelectableHandler;\n selectRadio?: SelectableHandler;\n /**\n * Callback when checked items change for value with a name\n *\n * @param event - React's original SyntheticEvent\n * @param data - A data object with relevant information\n *\n * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;\n};\n\nexport const MenuListProvider = MenuListContext.Provider;\n\nexport const useMenuListContext_unstable = <T,>(selector: ContextSelector<MenuListContextValue, T>) =>\n useContextSelector(MenuListContext, (ctx = menuListContextDefaultValue) => selector(ctx));\n"]}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react"], function (require, exports, React) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useMenuTriggerContext_unstable = exports.MenuTriggerContextProvider = void 0;
|
5
|
-
/**
|
6
|
-
* Context used communicate with a child menu item that it is a trigger for a submenu
|
7
|
-
*/
|
8
|
-
var MenuTriggerContext = React.createContext(undefined);
|
9
|
-
var menuTriggerContextDefaultValue = false;
|
10
|
-
exports.MenuTriggerContextProvider = MenuTriggerContext.Provider;
|
11
|
-
var useMenuTriggerContext_unstable = function () { var _a; return (_a = React.useContext(MenuTriggerContext)) !== null && _a !== void 0 ? _a : menuTriggerContextDefaultValue; };
|
12
|
-
exports.useMenuTriggerContext_unstable = useMenuTriggerContext_unstable;
|
13
|
-
});
|
14
|
-
//# sourceMappingURL=menuTriggerContext.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"menuTriggerContext.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/contexts/menuTriggerContext.ts"],"names":[],"mappings":";;;;IAEA;;OAEG;IACH,IAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAsB,SAAS,CAA2B,CAAC;IAEzG,IAAM,8BAA8B,GAAG,KAAK,CAAC;IAEhC,QAAA,0BAA0B,GAAG,kBAAkB,CAAC,QAAQ,CAAC;IAC/D,IAAM,8BAA8B,GAAG,sBAC5C,OAAA,MAAA,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,mCAAI,8BAA8B,CAAA,EAAA,CAAC;IAD5D,QAAA,8BAA8B,kCAC8B","sourcesContent":["import * as React from 'react';\n\n/**\n * Context used communicate with a child menu item that it is a trigger for a submenu\n */\nconst MenuTriggerContext = React.createContext<boolean | undefined>(undefined) as React.Context<boolean>;\n\nconst menuTriggerContextDefaultValue = false;\n\nexport const MenuTriggerContextProvider = MenuTriggerContext.Provider;\nexport const useMenuTriggerContext_unstable = () =>\n React.useContext(MenuTriggerContext) ?? menuTriggerContextDefaultValue;\n"]}
|
package/lib-amd/index.js
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
define(["require", "exports", "./contexts/menuContext", "./contexts/menuTriggerContext", "./contexts/menuGroupContext", "./contexts/menuListContext", "./Menu", "./MenuDivider", "./MenuGroup", "./MenuGroupHeader", "./MenuItem", "./MenuItemCheckbox", "./MenuItemRadio", "./MenuList", "./MenuPopover", "./MenuSplitGroup", "./MenuTrigger", "./selectable/index"], function (require, exports, menuContext_1, menuTriggerContext_1, menuGroupContext_1, menuListContext_1, Menu_1, MenuDivider_1, MenuGroup_1, MenuGroupHeader_1, MenuItem_1, MenuItemCheckbox_1, MenuItemRadio_1, MenuList_1, MenuPopover_1, MenuSplitGroup_1, MenuTrigger_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCheckmarkStyles_unstable = exports.useMenuTrigger_unstable = exports.renderMenuTrigger_unstable = exports.MenuTrigger = exports.useMenuSplitGroup_unstable = exports.useMenuSplitGroupStyles_unstable = exports.renderMenuSplitGroup_unstable = exports.menuSplitGroupClassNames = exports.MenuSplitGroup = exports.useMenuPopover_unstable = exports.useMenuPopoverStyles_unstable = exports.renderMenuPopover_unstable = exports.menuPopoverClassNames = exports.MenuPopover = exports.useMenuList_unstable = exports.useMenuListStyles_unstable = exports.useMenuListContextValues_unstable = exports.renderMenuList_unstable = exports.menuListClassNames = exports.MenuList = exports.useMenuItemRadio_unstable = exports.useMenuItemRadioStyles_unstable = exports.renderMenuItemRadio_unstable = exports.menuItemRadioClassNames = exports.MenuItemRadio = exports.useMenuItemCheckbox_unstable = exports.useMenuItemCheckboxStyles_unstable = exports.renderMenuItemCheckbox_unstable = exports.menuItemCheckboxClassNames = exports.MenuItemCheckbox = exports.useMenuItem_unstable = exports.useMenuItemStyles_unstable = exports.renderMenuItem_unstable = exports.menuItemClassNames = exports.MenuItem = exports.useMenuGroupHeader_unstable = exports.useMenuGroupHeaderStyles_unstable = exports.renderMenuGroupHeader_unstable = exports.menuGroupHeaderClassNames = exports.MenuGroupHeader = exports.useMenuGroup_unstable = exports.useMenuGroupStyles_unstable = exports.useMenuGroupContextValues_unstable = exports.renderMenuGroup_unstable = exports.menuGroupClassNames = exports.MenuGroup = exports.useMenuDivider_unstable = exports.useMenuDividerStyles_unstable = exports.renderMenuDivider_unstable = exports.menuDividerClassNames = exports.MenuDivider = exports.useMenu_unstable = exports.useMenuContextValues_unstable = exports.renderMenu_unstable = exports.Menu = exports.useMenuListContext_unstable = exports.MenuListProvider = exports.useMenuGroupContext_unstable = exports.MenuGroupContextProvider = exports.useMenuTriggerContext_unstable = exports.MenuTriggerContextProvider = exports.useMenuContext_unstable = exports.MenuProvider = void 0;
|
5
|
-
Object.defineProperty(exports, "MenuProvider", { enumerable: true, get: function () { return menuContext_1.MenuProvider; } });
|
6
|
-
Object.defineProperty(exports, "useMenuContext_unstable", { enumerable: true, get: function () { return menuContext_1.useMenuContext_unstable; } });
|
7
|
-
Object.defineProperty(exports, "MenuTriggerContextProvider", { enumerable: true, get: function () { return menuTriggerContext_1.MenuTriggerContextProvider; } });
|
8
|
-
Object.defineProperty(exports, "useMenuTriggerContext_unstable", { enumerable: true, get: function () { return menuTriggerContext_1.useMenuTriggerContext_unstable; } });
|
9
|
-
Object.defineProperty(exports, "MenuGroupContextProvider", { enumerable: true, get: function () { return menuGroupContext_1.MenuGroupContextProvider; } });
|
10
|
-
Object.defineProperty(exports, "useMenuGroupContext_unstable", { enumerable: true, get: function () { return menuGroupContext_1.useMenuGroupContext_unstable; } });
|
11
|
-
Object.defineProperty(exports, "MenuListProvider", { enumerable: true, get: function () { return menuListContext_1.MenuListProvider; } });
|
12
|
-
Object.defineProperty(exports, "useMenuListContext_unstable", { enumerable: true, get: function () { return menuListContext_1.useMenuListContext_unstable; } });
|
13
|
-
Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return Menu_1.Menu; } });
|
14
|
-
Object.defineProperty(exports, "renderMenu_unstable", { enumerable: true, get: function () { return Menu_1.renderMenu_unstable; } });
|
15
|
-
Object.defineProperty(exports, "useMenuContextValues_unstable", { enumerable: true, get: function () { return Menu_1.useMenuContextValues_unstable; } });
|
16
|
-
Object.defineProperty(exports, "useMenu_unstable", { enumerable: true, get: function () { return Menu_1.useMenu_unstable; } });
|
17
|
-
Object.defineProperty(exports, "MenuDivider", { enumerable: true, get: function () { return MenuDivider_1.MenuDivider; } });
|
18
|
-
Object.defineProperty(exports, "menuDividerClassNames", { enumerable: true, get: function () { return MenuDivider_1.menuDividerClassNames; } });
|
19
|
-
Object.defineProperty(exports, "renderMenuDivider_unstable", { enumerable: true, get: function () { return MenuDivider_1.renderMenuDivider_unstable; } });
|
20
|
-
Object.defineProperty(exports, "useMenuDividerStyles_unstable", { enumerable: true, get: function () { return MenuDivider_1.useMenuDividerStyles_unstable; } });
|
21
|
-
Object.defineProperty(exports, "useMenuDivider_unstable", { enumerable: true, get: function () { return MenuDivider_1.useMenuDivider_unstable; } });
|
22
|
-
Object.defineProperty(exports, "MenuGroup", { enumerable: true, get: function () { return MenuGroup_1.MenuGroup; } });
|
23
|
-
Object.defineProperty(exports, "menuGroupClassNames", { enumerable: true, get: function () { return MenuGroup_1.menuGroupClassNames; } });
|
24
|
-
Object.defineProperty(exports, "renderMenuGroup_unstable", { enumerable: true, get: function () { return MenuGroup_1.renderMenuGroup_unstable; } });
|
25
|
-
Object.defineProperty(exports, "useMenuGroupContextValues_unstable", { enumerable: true, get: function () { return MenuGroup_1.useMenuGroupContextValues_unstable; } });
|
26
|
-
Object.defineProperty(exports, "useMenuGroupStyles_unstable", { enumerable: true, get: function () { return MenuGroup_1.useMenuGroupStyles_unstable; } });
|
27
|
-
Object.defineProperty(exports, "useMenuGroup_unstable", { enumerable: true, get: function () { return MenuGroup_1.useMenuGroup_unstable; } });
|
28
|
-
Object.defineProperty(exports, "MenuGroupHeader", { enumerable: true, get: function () { return MenuGroupHeader_1.MenuGroupHeader; } });
|
29
|
-
Object.defineProperty(exports, "menuGroupHeaderClassNames", { enumerable: true, get: function () { return MenuGroupHeader_1.menuGroupHeaderClassNames; } });
|
30
|
-
Object.defineProperty(exports, "renderMenuGroupHeader_unstable", { enumerable: true, get: function () { return MenuGroupHeader_1.renderMenuGroupHeader_unstable; } });
|
31
|
-
Object.defineProperty(exports, "useMenuGroupHeaderStyles_unstable", { enumerable: true, get: function () { return MenuGroupHeader_1.useMenuGroupHeaderStyles_unstable; } });
|
32
|
-
Object.defineProperty(exports, "useMenuGroupHeader_unstable", { enumerable: true, get: function () { return MenuGroupHeader_1.useMenuGroupHeader_unstable; } });
|
33
|
-
Object.defineProperty(exports, "MenuItem", { enumerable: true, get: function () { return MenuItem_1.MenuItem; } });
|
34
|
-
Object.defineProperty(exports, "menuItemClassNames", { enumerable: true, get: function () { return MenuItem_1.menuItemClassNames; } });
|
35
|
-
Object.defineProperty(exports, "renderMenuItem_unstable", { enumerable: true, get: function () { return MenuItem_1.renderMenuItem_unstable; } });
|
36
|
-
Object.defineProperty(exports, "useMenuItemStyles_unstable", { enumerable: true, get: function () { return MenuItem_1.useMenuItemStyles_unstable; } });
|
37
|
-
Object.defineProperty(exports, "useMenuItem_unstable", { enumerable: true, get: function () { return MenuItem_1.useMenuItem_unstable; } });
|
38
|
-
Object.defineProperty(exports, "MenuItemCheckbox", { enumerable: true, get: function () { return MenuItemCheckbox_1.MenuItemCheckbox; } });
|
39
|
-
Object.defineProperty(exports, "menuItemCheckboxClassNames", { enumerable: true, get: function () { return MenuItemCheckbox_1.menuItemCheckboxClassNames; } });
|
40
|
-
Object.defineProperty(exports, "renderMenuItemCheckbox_unstable", { enumerable: true, get: function () { return MenuItemCheckbox_1.renderMenuItemCheckbox_unstable; } });
|
41
|
-
Object.defineProperty(exports, "useMenuItemCheckboxStyles_unstable", { enumerable: true, get: function () { return MenuItemCheckbox_1.useMenuItemCheckboxStyles_unstable; } });
|
42
|
-
Object.defineProperty(exports, "useMenuItemCheckbox_unstable", { enumerable: true, get: function () { return MenuItemCheckbox_1.useMenuItemCheckbox_unstable; } });
|
43
|
-
Object.defineProperty(exports, "MenuItemRadio", { enumerable: true, get: function () { return MenuItemRadio_1.MenuItemRadio; } });
|
44
|
-
Object.defineProperty(exports, "menuItemRadioClassNames", { enumerable: true, get: function () { return MenuItemRadio_1.menuItemRadioClassNames; } });
|
45
|
-
Object.defineProperty(exports, "renderMenuItemRadio_unstable", { enumerable: true, get: function () { return MenuItemRadio_1.renderMenuItemRadio_unstable; } });
|
46
|
-
Object.defineProperty(exports, "useMenuItemRadioStyles_unstable", { enumerable: true, get: function () { return MenuItemRadio_1.useMenuItemRadioStyles_unstable; } });
|
47
|
-
Object.defineProperty(exports, "useMenuItemRadio_unstable", { enumerable: true, get: function () { return MenuItemRadio_1.useMenuItemRadio_unstable; } });
|
48
|
-
Object.defineProperty(exports, "MenuList", { enumerable: true, get: function () { return MenuList_1.MenuList; } });
|
49
|
-
Object.defineProperty(exports, "menuListClassNames", { enumerable: true, get: function () { return MenuList_1.menuListClassNames; } });
|
50
|
-
Object.defineProperty(exports, "renderMenuList_unstable", { enumerable: true, get: function () { return MenuList_1.renderMenuList_unstable; } });
|
51
|
-
Object.defineProperty(exports, "useMenuListContextValues_unstable", { enumerable: true, get: function () { return MenuList_1.useMenuListContextValues_unstable; } });
|
52
|
-
Object.defineProperty(exports, "useMenuListStyles_unstable", { enumerable: true, get: function () { return MenuList_1.useMenuListStyles_unstable; } });
|
53
|
-
Object.defineProperty(exports, "useMenuList_unstable", { enumerable: true, get: function () { return MenuList_1.useMenuList_unstable; } });
|
54
|
-
Object.defineProperty(exports, "MenuPopover", { enumerable: true, get: function () { return MenuPopover_1.MenuPopover; } });
|
55
|
-
Object.defineProperty(exports, "menuPopoverClassNames", { enumerable: true, get: function () { return MenuPopover_1.menuPopoverClassNames; } });
|
56
|
-
Object.defineProperty(exports, "renderMenuPopover_unstable", { enumerable: true, get: function () { return MenuPopover_1.renderMenuPopover_unstable; } });
|
57
|
-
Object.defineProperty(exports, "useMenuPopoverStyles_unstable", { enumerable: true, get: function () { return MenuPopover_1.useMenuPopoverStyles_unstable; } });
|
58
|
-
Object.defineProperty(exports, "useMenuPopover_unstable", { enumerable: true, get: function () { return MenuPopover_1.useMenuPopover_unstable; } });
|
59
|
-
Object.defineProperty(exports, "MenuSplitGroup", { enumerable: true, get: function () { return MenuSplitGroup_1.MenuSplitGroup; } });
|
60
|
-
Object.defineProperty(exports, "menuSplitGroupClassNames", { enumerable: true, get: function () { return MenuSplitGroup_1.menuSplitGroupClassNames; } });
|
61
|
-
Object.defineProperty(exports, "renderMenuSplitGroup_unstable", { enumerable: true, get: function () { return MenuSplitGroup_1.renderMenuSplitGroup_unstable; } });
|
62
|
-
Object.defineProperty(exports, "useMenuSplitGroupStyles_unstable", { enumerable: true, get: function () { return MenuSplitGroup_1.useMenuSplitGroupStyles_unstable; } });
|
63
|
-
Object.defineProperty(exports, "useMenuSplitGroup_unstable", { enumerable: true, get: function () { return MenuSplitGroup_1.useMenuSplitGroup_unstable; } });
|
64
|
-
Object.defineProperty(exports, "MenuTrigger", { enumerable: true, get: function () { return MenuTrigger_1.MenuTrigger; } });
|
65
|
-
Object.defineProperty(exports, "renderMenuTrigger_unstable", { enumerable: true, get: function () { return MenuTrigger_1.renderMenuTrigger_unstable; } });
|
66
|
-
Object.defineProperty(exports, "useMenuTrigger_unstable", { enumerable: true, get: function () { return MenuTrigger_1.useMenuTrigger_unstable; } });
|
67
|
-
Object.defineProperty(exports, "useCheckmarkStyles_unstable", { enumerable: true, get: function () { return index_1.useCheckmarkStyles_unstable; } });
|
68
|
-
});
|
69
|
-
//# sourceMappingURL=index.js.map
|
package/lib-amd/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-menu/src/index.ts"],"names":[],"mappings":";;;;IAAS,2GAAA,YAAY,OAAA;IAAE,sHAAA,uBAAuB,OAAA;IAErC,gIAAA,0BAA0B,OAAA;IAAE,oIAAA,8BAA8B,OAAA;IAC1D,4HAAA,wBAAwB,OAAA;IAAE,gIAAA,4BAA4B,OAAA;IAEtD,mHAAA,gBAAgB,OAAA;IAAE,8HAAA,2BAA2B,OAAA;IAG7C,4FAAA,IAAI,OAAA;IAAE,2GAAA,mBAAmB,OAAA;IAAE,qHAAA,6BAA6B,OAAA;IAAE,wGAAA,gBAAgB,OAAA;IAajF,0GAAA,WAAW,OAAA;IACX,oHAAA,qBAAqB,OAAA;IACrB,yHAAA,0BAA0B,OAAA;IAC1B,4HAAA,6BAA6B,OAAA;IAC7B,sHAAA,uBAAuB,OAAA;IAIvB,sGAAA,SAAS,OAAA;IACT,gHAAA,mBAAmB,OAAA;IACnB,qHAAA,wBAAwB,OAAA;IACxB,+HAAA,kCAAkC,OAAA;IAClC,wHAAA,2BAA2B,OAAA;IAC3B,kHAAA,qBAAqB,OAAA;IAIrB,kHAAA,eAAe,OAAA;IACf,4HAAA,yBAAyB,OAAA;IACzB,iIAAA,8BAA8B,OAAA;IAC9B,oIAAA,iCAAiC,OAAA;IACjC,8HAAA,2BAA2B,OAAA;IAI3B,oGAAA,QAAQ,OAAA;IACR,8GAAA,kBAAkB,OAAA;IAClB,mHAAA,uBAAuB,OAAA;IACvB,sHAAA,0BAA0B,OAAA;IAC1B,gHAAA,oBAAoB,OAAA;IAIpB,oHAAA,gBAAgB,OAAA;IAChB,8HAAA,0BAA0B,OAAA;IAC1B,mIAAA,+BAA+B,OAAA;IAC/B,sIAAA,kCAAkC,OAAA;IAClC,gIAAA,4BAA4B,OAAA;IAI5B,8GAAA,aAAa,OAAA;IACb,wHAAA,uBAAuB,OAAA;IACvB,6HAAA,4BAA4B,OAAA;IAC5B,gIAAA,+BAA+B,OAAA;IAC/B,0HAAA,yBAAyB,OAAA;IAIzB,oGAAA,QAAQ,OAAA;IACR,8GAAA,kBAAkB,OAAA;IAClB,mHAAA,uBAAuB,OAAA;IACvB,6HAAA,iCAAiC,OAAA;IACjC,sHAAA,0BAA0B,OAAA;IAC1B,gHAAA,oBAAoB,OAAA;IAcpB,0GAAA,WAAW,OAAA;IACX,oHAAA,qBAAqB,OAAA;IACrB,yHAAA,0BAA0B,OAAA;IAC1B,4HAAA,6BAA6B,OAAA;IAC7B,sHAAA,uBAAuB,OAAA;IAIvB,gHAAA,cAAc,OAAA;IACd,0HAAA,wBAAwB,OAAA;IACxB,+HAAA,6BAA6B,OAAA;IAC7B,kIAAA,gCAAgC,OAAA;IAChC,4HAAA,0BAA0B,OAAA;IAGnB,0GAAA,WAAW,OAAA;IAAE,yHAAA,0BAA0B,OAAA;IAAE,sHAAA,uBAAuB,OAAA;IAGhE,oHAAA,2BAA2B,OAAA","sourcesContent":["export { MenuProvider, useMenuContext_unstable } from './contexts/menuContext';\nexport type { MenuContextValue } from './contexts/menuContext';\nexport { MenuTriggerContextProvider, useMenuTriggerContext_unstable } from './contexts/menuTriggerContext';\nexport { MenuGroupContextProvider, useMenuGroupContext_unstable } from './contexts/menuGroupContext';\nexport type { MenuGroupContextValue } from './contexts/menuGroupContext';\nexport { MenuListProvider, useMenuListContext_unstable } from './contexts/menuListContext';\nexport type { MenuListContextValue } from './contexts/menuListContext';\n\nexport { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenu_unstable } from './Menu';\nexport type {\n MenuContextValues,\n MenuOpenChangeData,\n MenuOpenEvent,\n // MenuOpenEvents is deprecated but removing it would be a breaking change\n // eslint-disable-next-line deprecation/deprecation\n MenuOpenEvents,\n MenuProps,\n MenuSlots,\n MenuState,\n} from './Menu';\nexport {\n MenuDivider,\n menuDividerClassNames,\n renderMenuDivider_unstable,\n useMenuDividerStyles_unstable,\n useMenuDivider_unstable,\n} from './MenuDivider';\nexport type { MenuDividerProps, MenuDividerSlots, MenuDividerState } from './MenuDivider';\nexport {\n MenuGroup,\n menuGroupClassNames,\n renderMenuGroup_unstable,\n useMenuGroupContextValues_unstable,\n useMenuGroupStyles_unstable,\n useMenuGroup_unstable,\n} from './MenuGroup';\nexport type { MenuGroupContextValues, MenuGroupProps, MenuGroupSlots, MenuGroupState } from './MenuGroup';\nexport {\n MenuGroupHeader,\n menuGroupHeaderClassNames,\n renderMenuGroupHeader_unstable,\n useMenuGroupHeaderStyles_unstable,\n useMenuGroupHeader_unstable,\n} from './MenuGroupHeader';\nexport type { MenuGroupHeaderProps, MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader';\nexport {\n MenuItem,\n menuItemClassNames,\n renderMenuItem_unstable,\n useMenuItemStyles_unstable,\n useMenuItem_unstable,\n} from './MenuItem';\nexport type { MenuItemProps, MenuItemSlots, MenuItemState } from './MenuItem';\nexport {\n MenuItemCheckbox,\n menuItemCheckboxClassNames,\n renderMenuItemCheckbox_unstable,\n useMenuItemCheckboxStyles_unstable,\n useMenuItemCheckbox_unstable,\n} from './MenuItemCheckbox';\nexport type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox';\nexport {\n MenuItemRadio,\n menuItemRadioClassNames,\n renderMenuItemRadio_unstable,\n useMenuItemRadioStyles_unstable,\n useMenuItemRadio_unstable,\n} from './MenuItemRadio';\nexport type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio';\nexport {\n MenuList,\n menuListClassNames,\n renderMenuList_unstable,\n useMenuListContextValues_unstable,\n useMenuListStyles_unstable,\n useMenuList_unstable,\n} from './MenuList';\nexport type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n // UninitializedMenuListState is deprecated but removing it would be a breaking change\n // eslint-disable-next-line deprecation/deprecation\n UninitializedMenuListState,\n} from './MenuList';\nexport {\n MenuPopover,\n menuPopoverClassNames,\n renderMenuPopover_unstable,\n useMenuPopoverStyles_unstable,\n useMenuPopover_unstable,\n} from './MenuPopover';\nexport type { MenuPopoverProps, MenuPopoverSlots, MenuPopoverState } from './MenuPopover';\nexport {\n MenuSplitGroup,\n menuSplitGroupClassNames,\n renderMenuSplitGroup_unstable,\n useMenuSplitGroupStyles_unstable,\n useMenuSplitGroup_unstable,\n} from './MenuSplitGroup';\nexport type { MenuSplitGroupProps, MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup';\nexport { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './MenuTrigger';\nexport type { MenuTriggerChildProps, MenuTriggerProps, MenuTriggerState } from './MenuTrigger';\n\nexport { useCheckmarkStyles_unstable } from './selectable/index';\nexport type { MenuItemSelectableProps, MenuItemSelectableState, SelectableHandler } from './selectable/index';\n"]}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./useCheckmarkStyles", "./types"], function (require, exports, tslib_1, useCheckmarkStyles_1, types_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(useCheckmarkStyles_1, exports);
|
5
|
-
tslib_1.__exportStar(types_1, exports);
|
6
|
-
});
|
7
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/selectable/index.ts"],"names":[],"mappings":";;;IAAA,oDAAqC;IACrC,uCAAwB","sourcesContent":["export * from './useCheckmarkStyles';\nexport * from './types';\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/selectable/types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nexport type SelectableHandler = (\n e: React.MouseEvent | React.KeyboardEvent,\n name: string,\n value: string,\n checked: boolean,\n) => void;\n\n/**\n * Props for selecatble menu items\n */\nexport type MenuItemSelectableProps = {\n /**\n * Follows input convention\n * https://www.w3schools.com/jsref/prop_checkbox_name.asp\n */\n name: string;\n\n /**\n * Follows input convention\n * https://www.w3schools.com/jsref/prop_checkbox_value.asp\n */\n value: string;\n};\n\n/**\n * State for selectable menu items\n */\nexport type MenuItemSelectableState = MenuItemSelectableProps & {\n /**\n * Selectable is checked\n */\n checked: boolean;\n};\n"]}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@griffel/react"], function (require, exports, react_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCheckmarkStyles_unstable = void 0;
|
5
|
-
var useStyles = react_1.makeStyles({
|
6
|
-
root: {
|
7
|
-
width: '16px',
|
8
|
-
height: '16px',
|
9
|
-
visibility: 'hidden',
|
10
|
-
},
|
11
|
-
rootChecked: {
|
12
|
-
visibility: 'visible',
|
13
|
-
},
|
14
|
-
});
|
15
|
-
/**
|
16
|
-
* Applies styles to a checkmark slot for selectable menu items
|
17
|
-
*
|
18
|
-
* @param state - should contain a `checkmark` slot
|
19
|
-
*/
|
20
|
-
var useCheckmarkStyles_unstable = function (state) {
|
21
|
-
var styles = useStyles();
|
22
|
-
if (state.checkmark) {
|
23
|
-
state.checkmark.className = react_1.mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);
|
24
|
-
}
|
25
|
-
};
|
26
|
-
exports.useCheckmarkStyles_unstable = useCheckmarkStyles_unstable;
|
27
|
-
});
|
28
|
-
//# sourceMappingURL=useCheckmarkStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCheckmarkStyles.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;IAIA,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,QAAQ;SACrB;QACD,WAAW,EAAE;YACX,UAAU,EAAE,SAAS;SACtB;KACF,CAAC,CAAC;IAEH;;;;OAIG;IACI,IAAM,2BAA2B,GAAG,UAAC,KAAiE;QAC3G,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,KAAK,CAAC,SAAS,CAAC,SAAS,GAAG,oBAAY,CACtC,MAAM,CAAC,IAAI,EACX,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,WAAW,EACnC,KAAK,CAAC,SAAS,CAAC,SAAS,CAC1B,CAAC;SACH;IACH,CAAC,CAAC;IATW,QAAA,2BAA2B,+BAStC","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { MenuItemSelectableState } from './types';\nimport type { MenuItemState } from '../components/MenuItem/MenuItem.types';\n\nconst useStyles = makeStyles({\n root: {\n width: '16px',\n height: '16px',\n visibility: 'hidden',\n },\n rootChecked: {\n visibility: 'visible',\n },\n});\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: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => {\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(\n styles.root,\n state.checked && styles.rootChecked,\n state.checkmark.className,\n );\n }\n};\n"]}
|
package/lib-amd/utils/index.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./useOnMenuEnter"], function (require, exports, tslib_1, useOnMenuEnter_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(useOnMenuEnter_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/utils/index.ts"],"names":[],"mappings":";;;IAAA,gDAAiC","sourcesContent":["export * from './useOnMenuEnter';\n"]}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-context-selector", "../contexts/menuContext", "../contexts/menuListContext"], function (require, exports, react_context_selector_1, menuContext_1, menuListContext_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useIsSubmenu = void 0;
|
5
|
-
/**
|
6
|
-
* A component can be a part of a submenu whether its menu context `isSubmenu` flag is true
|
7
|
-
* or whether it is a part of a `MenuList`
|
8
|
-
*
|
9
|
-
* A simple hook to check box contexts easily
|
10
|
-
*
|
11
|
-
* @returns whether the component is part of a submenu
|
12
|
-
*/
|
13
|
-
function useIsSubmenu() {
|
14
|
-
var menuContextValue = menuContext_1.useMenuContext_unstable(function (context) { return context.isSubmenu; });
|
15
|
-
var hasMenuListContext = react_context_selector_1.useHasParentContext(menuListContext_1.MenuListContext);
|
16
|
-
return menuContextValue || hasMenuListContext;
|
17
|
-
}
|
18
|
-
exports.useIsSubmenu = useIsSubmenu;
|
19
|
-
});
|
20
|
-
//# sourceMappingURL=useIsSubmenu.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useIsSubmenu.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;OAOG;IACH,SAAgB,YAAY;QAC1B,IAAM,gBAAgB,GAAG,qCAAuB,CAAC,UAAA,OAAO,IAAI,OAAA,OAAO,CAAC,SAAS,EAAjB,CAAiB,CAAC,CAAC;QAC/E,IAAM,kBAAkB,GAAG,4CAAmB,CAAC,iCAAe,CAAC,CAAC;QAEhE,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;IAChD,CAAC;IALD,oCAKC","sourcesContent":["import { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\nimport { MenuListContext } from '../contexts/menuListContext';\n\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\n return menuContextValue || hasMenuListContext;\n}\n"]}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "@fluentui/react-utilities", "@fluentui/react-portal"], function (require, exports, React, react_utilities_1, react_portal_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.dispatchMenuEnterEvent = exports.useOnMenuMouseEnter = exports.MENU_ENTER_EVENT = void 0;
|
5
|
-
/**
|
6
|
-
* Name of the custom event
|
7
|
-
*/
|
8
|
-
exports.MENU_ENTER_EVENT = 'fuimenuenter';
|
9
|
-
/**
|
10
|
-
* This hook works similarly to @see {useOnClickOutside}
|
11
|
-
*
|
12
|
-
* Problem: Trying to behave the same as system menus:
|
13
|
-
* When the mouse leaves a stack of nested menus the stack should not dismiss.
|
14
|
-
* However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.
|
15
|
-
*
|
16
|
-
* We don't use the native mouseenter event because it would trigger too many times in the document
|
17
|
-
* Instead, dispatch custom DOM event from the menu so that it can bubble
|
18
|
-
* Each nested menu can use the listener to check if the event is from a child or parent menu
|
19
|
-
*/
|
20
|
-
var useOnMenuMouseEnter = function (options) {
|
21
|
-
var refs = options.refs, callback = options.callback, element = options.element, disabled = options.disabled;
|
22
|
-
// Keep mouse event here because this is essentially a custom 'mouseenter' event
|
23
|
-
var listener = react_utilities_1.useEventCallback(function (ev) {
|
24
|
-
var _a;
|
25
|
-
var popoverRef = refs[0];
|
26
|
-
var someMenuPopover = ev.target;
|
27
|
-
// someMenu is a child -> will always be contained because of vParents
|
28
|
-
// someMenu is a parent -> will always not be contained because no vParent
|
29
|
-
// someMenu is the current popover -> it will contain itself
|
30
|
-
var isOutsidePopover = !react_portal_1.elementContains((_a = popoverRef.current) !== null && _a !== void 0 ? _a : null, someMenuPopover);
|
31
|
-
if (isOutsidePopover && !disabled) {
|
32
|
-
callback(ev);
|
33
|
-
}
|
34
|
-
});
|
35
|
-
React.useEffect(function () {
|
36
|
-
// eslint-disable-next-line eqeqeq
|
37
|
-
if (element == null) {
|
38
|
-
return;
|
39
|
-
}
|
40
|
-
if (!disabled) {
|
41
|
-
element.addEventListener(exports.MENU_ENTER_EVENT, listener);
|
42
|
-
}
|
43
|
-
return function () {
|
44
|
-
element.removeEventListener(exports.MENU_ENTER_EVENT, listener);
|
45
|
-
};
|
46
|
-
}, [listener, element, disabled]);
|
47
|
-
};
|
48
|
-
exports.useOnMenuMouseEnter = useOnMenuMouseEnter;
|
49
|
-
/**
|
50
|
-
* Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`
|
51
|
-
* @param el element for the event target
|
52
|
-
* @param nativeEvent the native mouse event this is mapped to
|
53
|
-
*/
|
54
|
-
var dispatchMenuEnterEvent = function (el, nativeEvent) {
|
55
|
-
el.dispatchEvent(new CustomEvent(exports.MENU_ENTER_EVENT, { bubbles: true, detail: { nativeEvent: nativeEvent } }));
|
56
|
-
};
|
57
|
-
exports.dispatchMenuEnterEvent = dispatchMenuEnterEvent;
|
58
|
-
});
|
59
|
-
//# sourceMappingURL=useOnMenuEnter.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useOnMenuEnter.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-menu/src/utils/useOnMenuEnter.ts"],"names":[],"mappings":";;;;IAKA;;OAEG;IACU,QAAA,gBAAgB,GAAG,cAAc,CAAC;IAE/C;;;;;;;;;;OAUG;IACI,IAAM,mBAAmB,GAAG,UAAC,OAAyC;QACnE,IAAA,IAAI,GAAkC,OAAO,KAAzC,EAAE,QAAQ,GAAwB,OAAO,SAA/B,EAAE,OAAO,GAAe,OAAO,QAAtB,EAAE,QAAQ,GAAK,OAAO,SAAZ,CAAa;QAEtD,gFAAgF;QAChF,IAAM,QAAQ,GAAG,kCAAgB,CAAC,UAAC,EAAc;;YAC/C,IAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAC3B,IAAM,eAAe,GAAG,EAAE,CAAC,MAAqB,CAAC;YAEjD,sEAAsE;YACtE,0EAA0E;YAC1E,4DAA4D;YAC5D,IAAM,gBAAgB,GAAG,CAAC,8BAAe,CAAC,MAAA,UAAU,CAAC,OAAO,mCAAI,IAAI,EAAE,eAAe,CAAC,CAAC;YACvF,IAAI,gBAAgB,IAAI,CAAC,QAAQ,EAAE;gBACjC,QAAQ,CAAC,EAAE,CAAC,CAAC;aACd;QACH,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,SAAS,CAAC;YACd,kCAAkC;YAClC,IAAI,OAAO,IAAI,IAAI,EAAE;gBACnB,OAAO;aACR;YAUD,IAAI,CAAC,QAAQ,EAAE;gBACb,OAAO,CAAC,gBAAgB,CAAC,wBAAgB,EAAE,QAA4B,CAAC,CAAC;aAC1E;YAED,OAAO;gBACL,OAAO,CAAC,mBAAmB,CAAC,wBAAgB,EAAE,QAA4B,CAAC,CAAC;YAC9E,CAAC,CAAC;QACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC;IAvCW,QAAA,mBAAmB,uBAuC9B;IAEF;;;;OAIG;IACI,IAAM,sBAAsB,GAAG,UAAC,EAAe,EAAE,WAAuB;QAC7E,EAAE,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,wBAAgB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,aAAA,EAAE,EAAE,CAAC,CAAC,CAAC;IAClG,CAAC,CAAC;IAFW,QAAA,sBAAsB,0BAEjC","sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { elementContains } from '@fluentui/react-portal';\nimport type { UseOnClickOrScrollOutsideOptions } from '@fluentui/react-utilities';\n\n/**\n * Name of the custom event\n */\nexport const MENU_ENTER_EVENT = 'fuimenuenter';\n\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: UseOnClickOrScrollOutsideOptions) => {\n const { refs, callback, element, disabled } = options;\n\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback((ev: MouseEvent) => {\n const popoverRef = refs[0];\n const someMenuPopover = ev.target as HTMLElement;\n\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 ?? null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n\n React.useEffect(() => {\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n\n /**\n * Because `addEventListener` type override falls back to 2nd definition (evt name is unknown string literal)\n * evt is being typed as a base class of MouseEvent -> `Event`.\n * This type is used to override `listener` calls to make TS happy\n */\n\n type ListenerOverride = (evt: Event) => void;\n\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n }\n\n return () => {\n element.removeEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n };\n }, [listener, element, disabled]);\n};\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: HTMLElement, nativeEvent: MouseEvent) => {\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, { bubbles: true, detail: { nativeEvent } }));\n};\n"]}
|