@fluentui/react-menu 9.0.0-nightly.d730088d7f.0 → 9.0.0-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +981 -32
- package/CHANGELOG.md +354 -138
- package/Spec.md +21 -16
- package/dist/{react-menu.d.ts → index.d.ts} +295 -166
- package/{lib → dist}/tsdoc-metadata.json +0 -0
- 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 +2 -0
- package/lib/MenuSplitGroup.js.map +1 -0
- package/lib/MenuTrigger.js.map +1 -1
- package/lib/components/Menu/Menu.js +7 -7
- package/lib/components/Menu/Menu.js.map +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 +1 -1
- package/lib/components/Menu/renderMenu.js.map +1 -1
- package/lib/components/Menu/useMenu.js +120 -129
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/Menu/useMenuContextValues.js +35 -33
- package/lib/components/Menu/useMenuContextValues.js.map +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.js.map +1 -1
- package/lib/components/MenuDivider/index.js.map +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js +7 -7
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDivider.js +9 -7
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js +14 -5
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +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.js.map +1 -1
- package/lib/components/MenuGroup/index.js +1 -0
- package/lib/components/MenuGroup/index.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js +7 -7
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroup.js +10 -7
- package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js +8 -8
- package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.js +14 -0
- package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js +8 -8
- 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 +7 -7
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +13 -8
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +14 -5
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +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.js.map +1 -1
- package/lib/components/MenuItem/index.js.map +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.js +37 -44
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +61 -17
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +8 -8
- 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 +1 -0
- package/lib/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +11 -8
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +14 -15
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +36 -5
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.js +8 -8
- 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 +1 -0
- package/lib/components/MenuItemRadio/index.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js +11 -8
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.js +14 -14
- package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +36 -5
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +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.js.map +1 -1
- package/lib/components/MenuList/index.js.map +1 -1
- package/lib/components/MenuList/renderMenuList.js +7 -7
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.js +71 -88
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js +19 -17
- package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib/components/MenuList/useMenuListStyles.js +16 -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.js.map +1 -1
- package/lib/components/MenuPopover/index.js.map +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js +9 -7
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js +35 -41
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js +20 -8
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -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.js +6 -0
- package/lib/components/MenuSplitGroup/index.js.map +1 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +42 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib/components/MenuTrigger/MenuTrigger.js +6 -5
- package/lib/components/MenuTrigger/MenuTrigger.js.map +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 +2 -2
- package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js +167 -5
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/contexts/menuContext.js +5 -11
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.js +3 -5
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.js +7 -17
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/contexts/menuTriggerContext.js +4 -6
- package/lib/contexts/menuTriggerContext.js.map +1 -1
- package/lib/index.js +25 -15
- package/lib/index.js.map +1 -1
- package/lib/selectable/index.js.map +1 -1
- package/lib/selectable/types.js.map +1 -1
- package/lib/selectable/useCheckmarkStyles.js +4 -4
- package/lib/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib/utils/index.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/Menu.js.map +1 -1
- package/lib-commonjs/MenuDivider.js +1 -1
- package/lib-commonjs/MenuDivider.js.map +1 -1
- package/lib-commonjs/MenuGroup.js +1 -1
- package/lib-commonjs/MenuGroup.js.map +1 -1
- package/lib-commonjs/MenuGroupHeader.js +1 -1
- package/lib-commonjs/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/MenuItem.js +1 -1
- package/lib-commonjs/MenuItem.js.map +1 -1
- package/lib-commonjs/MenuItemCheckbox.js +1 -1
- package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/MenuItemRadio.js +1 -1
- package/lib-commonjs/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/MenuList.js +1 -1
- package/lib-commonjs/MenuList.js.map +1 -1
- package/lib-commonjs/MenuPopover.js +1 -1
- package/lib-commonjs/MenuPopover.js.map +1 -1
- 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/MenuTrigger.js.map +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/Menu.types.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js +1 -1
- package/lib-commonjs/components/Menu/index.js.map +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.js +131 -142
- package/lib-commonjs/components/Menu/useMenu.js.map +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.js +9 -9
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/index.js +1 -1
- package/lib-commonjs/components/MenuDivider/index.js.map +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.js +12 -11
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +18 -7
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +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.js.map +1 -1
- 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.js +12 -13
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +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.js +11 -11
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +25 -0
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js.map +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.js +16 -12
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +18 -7
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +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.js.map +1 -1
- package/lib-commonjs/components/MenuItem/index.js +1 -1
- package/lib-commonjs/components/MenuItem/index.js.map +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.js +45 -53
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +68 -20
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +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/MenuItemCheckbox.types.js.map +1 -1
- 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.js +15 -14
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +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.js +40 -7
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +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/MenuItemRadio.types.js.map +1 -1
- 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.js +15 -14
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +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.js +40 -7
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +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.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.js +1 -1
- package/lib-commonjs/components/MenuList/index.js.map +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.js +78 -96
- package/lib-commonjs/components/MenuList/useMenuList.js.map +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.js +19 -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.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/index.js +1 -1
- package/lib-commonjs/components/MenuPopover/index.js.map +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.js +43 -50
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +24 -10
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- 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.js +6 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -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.js +26 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -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.js +54 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +6 -6
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +175 -7
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/index.js +1 -1
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/contexts/menuContext.js +6 -12
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js +5 -7
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.js +8 -18
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.js +6 -8
- package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
- package/lib-commonjs/index.js +487 -16
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/selectable/index.js +1 -1
- package/lib-commonjs/selectable/index.js.map +1 -1
- package/lib-commonjs/selectable/types.js.map +1 -1
- 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/index.js.map +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 +25 -29
- package/lib/Menu.d.ts +0 -1
- package/lib/MenuDivider.d.ts +0 -1
- package/lib/MenuGroup.d.ts +0 -1
- package/lib/MenuGroupHeader.d.ts +0 -1
- package/lib/MenuItem.d.ts +0 -1
- package/lib/MenuItemCheckbox.d.ts +0 -1
- package/lib/MenuItemRadio.d.ts +0 -1
- package/lib/MenuList.d.ts +0 -1
- package/lib/MenuPopover.d.ts +0 -1
- package/lib/MenuTrigger.d.ts +0 -1
- 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/Menu/Menu.d.ts +0 -6
- package/lib/components/Menu/Menu.types.d.ts +0 -112
- package/lib/components/Menu/index.d.ts +0 -5
- package/lib/components/Menu/renderMenu.d.ts +0 -5
- package/lib/components/Menu/useMenu.d.ts +0 -10
- package/lib/components/Menu/useMenuContextValues.d.ts +0 -2
- package/lib/components/MenuDivider/MenuDivider.d.ts +0 -6
- package/lib/components/MenuDivider/MenuDivider.types.d.ts +0 -6
- package/lib/components/MenuDivider/index.d.ts +0 -5
- package/lib/components/MenuDivider/renderMenuDivider.d.ts +0 -6
- package/lib/components/MenuDivider/useMenuDivider.d.ts +0 -6
- package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +0 -2
- package/lib/components/MenuGroup/MenuGroup.d.ts +0 -6
- package/lib/components/MenuGroup/MenuGroup.types.d.ts +0 -15
- package/lib/components/MenuGroup/index.d.ts +0 -5
- package/lib/components/MenuGroup/renderMenuGroup.d.ts +0 -6
- package/lib/components/MenuGroup/useMenuGroup.d.ts +0 -6
- package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
- package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
- package/lib/components/MenuGroupHeader/index.d.ts +0 -5
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -2
- package/lib/components/MenuItem/MenuItem.d.ts +0 -6
- package/lib/components/MenuItem/MenuItem.types.d.ts +0 -43
- package/lib/components/MenuItem/index.d.ts +0 -5
- package/lib/components/MenuItem/renderMenuItem.d.ts +0 -5
- package/lib/components/MenuItem/useCharacterSearch.d.ts +0 -3
- package/lib/components/MenuItem/useMenuItem.d.ts +0 -10
- package/lib/components/MenuItem/useMenuItemStyles.d.ts +0 -3
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
- package/lib/components/MenuItemCheckbox/index.d.ts +0 -4
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -2
- package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
- package/lib/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
- package/lib/components/MenuItemRadio/index.d.ts +0 -4
- package/lib/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
- package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -2
- package/lib/components/MenuList/MenuList.d.ts +0 -6
- package/lib/components/MenuList/MenuList.types.d.ts +0 -53
- package/lib/components/MenuList/index.d.ts +0 -6
- package/lib/components/MenuList/renderMenuList.d.ts +0 -5
- package/lib/components/MenuList/useMenuList.d.ts +0 -6
- package/lib/components/MenuList/useMenuListContextValues.d.ts +0 -2
- package/lib/components/MenuList/useMenuListStyles.d.ts +0 -5
- package/lib/components/MenuPopover/MenuPopover.d.ts +0 -6
- package/lib/components/MenuPopover/MenuPopover.types.d.ts +0 -18
- package/lib/components/MenuPopover/index.d.ts +0 -5
- package/lib/components/MenuPopover/renderMenuPopover.d.ts +0 -5
- package/lib/components/MenuPopover/useMenuPopover.d.ts +0 -12
- package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -5
- package/lib/components/MenuTrigger/MenuTrigger.d.ts +0 -7
- package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +0 -16
- package/lib/components/MenuTrigger/index.d.ts +0 -4
- package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
- package/lib/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
- 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/components/index.d.ts +0 -2
- package/lib/contexts/menuContext.d.ts +0 -16
- package/lib/contexts/menuGroupContext.d.ts +0 -13
- package/lib/contexts/menuListContext.d.ts +0 -15
- package/lib/contexts/menuTriggerContext.d.ts +0 -3
- package/lib/index.d.ts +0 -15
- package/lib/selectable/index.d.ts +0 -2
- package/lib/selectable/types.d.ts +0 -34
- package/lib/selectable/useCheckmarkStyles.d.ts +0 -8
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/useIsSubmenu.d.ts +0 -9
- package/lib/utils/useOnMenuEnter.d.ts +0 -23
- package/lib-commonjs/Menu.d.ts +0 -1
- package/lib-commonjs/MenuDivider.d.ts +0 -1
- package/lib-commonjs/MenuGroup.d.ts +0 -1
- package/lib-commonjs/MenuGroupHeader.d.ts +0 -1
- package/lib-commonjs/MenuItem.d.ts +0 -1
- package/lib-commonjs/MenuItemCheckbox.d.ts +0 -1
- package/lib-commonjs/MenuItemRadio.d.ts +0 -1
- package/lib-commonjs/MenuList.d.ts +0 -1
- package/lib-commonjs/MenuPopover.d.ts +0 -1
- package/lib-commonjs/MenuTrigger.d.ts +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/Menu/Menu.d.ts +0 -6
- package/lib-commonjs/components/Menu/Menu.types.d.ts +0 -112
- package/lib-commonjs/components/Menu/index.d.ts +0 -5
- package/lib-commonjs/components/Menu/renderMenu.d.ts +0 -5
- package/lib-commonjs/components/Menu/useMenu.d.ts +0 -10
- package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +0 -2
- package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/index.d.ts +0 -5
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +0 -6
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +0 -2
- package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +0 -6
- package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +0 -15
- package/lib-commonjs/components/MenuGroup/index.d.ts +0 -5
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.d.ts +0 -6
- package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +0 -6
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +0 -2
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/index.d.ts +0 -5
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +0 -6
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +0 -2
- package/lib-commonjs/components/MenuItem/MenuItem.d.ts +0 -6
- package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +0 -43
- package/lib-commonjs/components/MenuItem/index.d.ts +0 -5
- package/lib-commonjs/components/MenuItem/renderMenuItem.d.ts +0 -5
- package/lib-commonjs/components/MenuItem/useCharacterSearch.d.ts +0 -3
- package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +0 -10
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +0 -3
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +0 -6
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +0 -4
- package/lib-commonjs/components/MenuItemCheckbox/index.d.ts +0 -4
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.d.ts +0 -3
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +0 -4
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +0 -2
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +0 -6
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.d.ts +0 -4
- package/lib-commonjs/components/MenuItemRadio/index.d.ts +0 -4
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.d.ts +0 -6
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +0 -6
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +0 -2
- package/lib-commonjs/components/MenuList/MenuList.d.ts +0 -6
- package/lib-commonjs/components/MenuList/MenuList.types.d.ts +0 -53
- package/lib-commonjs/components/MenuList/index.d.ts +0 -6
- package/lib-commonjs/components/MenuList/renderMenuList.d.ts +0 -5
- package/lib-commonjs/components/MenuList/useMenuList.d.ts +0 -6
- package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +0 -2
- package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +0 -5
- package/lib-commonjs/components/MenuPopover/MenuPopover.d.ts +0 -6
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +0 -18
- package/lib-commonjs/components/MenuPopover/index.d.ts +0 -5
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.d.ts +0 -5
- package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +0 -12
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +0 -5
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +0 -7
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +0 -16
- package/lib-commonjs/components/MenuTrigger/index.d.ts +0 -4
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.d.ts +0 -7
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +0 -8
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -195
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
- package/lib-commonjs/components/index.d.ts +0 -2
- package/lib-commonjs/contexts/menuContext.d.ts +0 -16
- package/lib-commonjs/contexts/menuGroupContext.d.ts +0 -13
- package/lib-commonjs/contexts/menuListContext.d.ts +0 -15
- package/lib-commonjs/contexts/menuTriggerContext.d.ts +0 -3
- package/lib-commonjs/index.d.ts +0 -15
- package/lib-commonjs/selectable/index.d.ts +0 -2
- package/lib-commonjs/selectable/types.d.ts +0 -34
- package/lib-commonjs/selectable/useCheckmarkStyles.d.ts +0 -8
- package/lib-commonjs/utils/index.d.ts +0 -1
- package/lib-commonjs/utils/useIsSubmenu.d.ts +0 -9
- package/lib-commonjs/utils/useOnMenuEnter.d.ts +0 -23
@@ -1,11 +1,13 @@
|
|
1
|
-
import { ComponentProps } from '@fluentui/react-utilities';
|
2
|
-
import { ComponentState } from '@fluentui/react-utilities';
|
1
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
2
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
3
3
|
import type { Context } from '@fluentui/react-context-selector';
|
4
4
|
import type { ContextSelector } from '@fluentui/react-context-selector';
|
5
|
+
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
|
5
6
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
6
|
-
import {
|
7
|
-
import { PositioningShorthand } from '@fluentui/react-positioning';
|
7
|
+
import type { PositioningShorthand } from '@fluentui/react-positioning';
|
8
8
|
import * as React_2 from 'react';
|
9
|
+
import type { Slot } from '@fluentui/react-utilities';
|
10
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
9
11
|
import { usePopperMouseTarget } from '@fluentui/react-positioning';
|
10
12
|
|
11
13
|
/**
|
@@ -13,40 +15,15 @@ import { usePopperMouseTarget } from '@fluentui/react-positioning';
|
|
13
15
|
*/
|
14
16
|
export declare const Menu: React_2.FC<MenuProps>;
|
15
17
|
|
16
|
-
declare type
|
17
|
-
/**
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Call back when the component requests to change value
|
23
|
-
* The `open` value is used as a hint when directly controlling the component
|
24
|
-
*/
|
25
|
-
onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
26
|
-
/**
|
27
|
-
* Whether the popup is open by default
|
28
|
-
*/
|
29
|
-
defaultOpen?: boolean;
|
30
|
-
openOnHover: boolean;
|
31
|
-
/**
|
32
|
-
* Opens the menu on right click (context menu), removes all other menu open interactions
|
33
|
-
*/
|
34
|
-
openOnContext?: boolean;
|
35
|
-
/**
|
36
|
-
* Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order
|
37
|
-
* This option is disregarded for submenus
|
38
|
-
*/
|
39
|
-
inline?: boolean;
|
40
|
-
/**
|
41
|
-
* Do not dismiss the menu when a menu item is clicked
|
42
|
-
*/
|
43
|
-
persistOnItemClick?: boolean;
|
44
|
-
/**
|
45
|
-
* Sets the delay for mouse open/close for the popover one mouse enter/leave
|
46
|
-
*/
|
47
|
-
hoverDelay?: number;
|
18
|
+
export declare type MenuCheckedValueChangeData = {
|
19
|
+
/** The items for this value that are checked */
|
20
|
+
checkedItems: string[];
|
21
|
+
/** The name of the value */
|
22
|
+
name: string;
|
48
23
|
};
|
49
24
|
|
25
|
+
export declare type MenuCheckedValueChangeEvent = React_2.MouseEvent | React_2.KeyboardEvent;
|
26
|
+
|
50
27
|
export declare const MenuContext: Context<MenuContextValue>;
|
51
28
|
|
52
29
|
/**
|
@@ -64,23 +41,37 @@ export declare type MenuContextValues = {
|
|
64
41
|
};
|
65
42
|
|
66
43
|
/**
|
67
|
-
* Define a styled MenuDivider, using the `
|
44
|
+
* Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.
|
68
45
|
*/
|
69
46
|
export declare const MenuDivider: ForwardRefComponent<MenuDividerProps>;
|
70
47
|
|
48
|
+
/**
|
49
|
+
* @deprecated Use `menuDividerClassNames.root` instead.
|
50
|
+
*/
|
51
|
+
export declare const menuDividerClassName = "fui-MenuDivider";
|
52
|
+
|
53
|
+
export declare const menuDividerClassNames: SlotClassNames<MenuDividerSlots>;
|
54
|
+
|
71
55
|
export declare type MenuDividerProps = ComponentProps<MenuDividerSlots>;
|
72
56
|
|
73
57
|
export declare type MenuDividerSlots = {
|
74
|
-
root:
|
58
|
+
root: Slot<'div'>;
|
75
59
|
};
|
76
60
|
|
77
61
|
export declare type MenuDividerState = ComponentState<MenuDividerSlots>;
|
78
62
|
|
79
63
|
/**
|
80
|
-
* Define a styled MenuGroup, using the `
|
64
|
+
* Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.
|
81
65
|
*/
|
82
66
|
export declare const MenuGroup: ForwardRefComponent<MenuGroupProps>;
|
83
67
|
|
68
|
+
/**
|
69
|
+
* @deprecated Use `menuGroupClassNames.root` instead.
|
70
|
+
*/
|
71
|
+
export declare const menuGroupClassName = "fui-MenuGroup";
|
72
|
+
|
73
|
+
export declare const menuGroupClassNames: SlotClassNames<MenuGroupSlots>;
|
74
|
+
|
84
75
|
export declare const MenuGroupContextProvider: React_2.Provider<MenuGroupContextValue>;
|
85
76
|
|
86
77
|
/**
|
@@ -99,14 +90,21 @@ export declare type MenuGroupContextValues = {
|
|
99
90
|
};
|
100
91
|
|
101
92
|
/**
|
102
|
-
* Define a styled MenuGroupHeader, using the `
|
93
|
+
* Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
|
103
94
|
*/
|
104
95
|
export declare const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps>;
|
105
96
|
|
97
|
+
/**
|
98
|
+
* @deprecated Use `menuGroupHeaderClassNames.root` instead.
|
99
|
+
*/
|
100
|
+
export declare const menuGroupHeaderClassName = "fui-MenuGroupHeader";
|
101
|
+
|
102
|
+
export declare const menuGroupHeaderClassNames: SlotClassNames<MenuGroupHeaderSlots>;
|
103
|
+
|
106
104
|
export declare type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;
|
107
105
|
|
108
106
|
export declare type MenuGroupHeaderSlots = {
|
109
|
-
root:
|
107
|
+
root: Slot<'div'>;
|
110
108
|
};
|
111
109
|
|
112
110
|
export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
|
@@ -114,7 +112,7 @@ export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
|
|
114
112
|
export declare type MenuGroupProps = ComponentProps<MenuGroupSlots>;
|
115
113
|
|
116
114
|
export declare type MenuGroupSlots = {
|
117
|
-
root:
|
115
|
+
root: Slot<'div'>;
|
118
116
|
};
|
119
117
|
|
120
118
|
export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
|
@@ -125,41 +123,66 @@ export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
|
|
125
123
|
};
|
126
124
|
|
127
125
|
/**
|
128
|
-
* Define a styled MenuItem, using the `
|
126
|
+
* Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
|
129
127
|
*/
|
130
128
|
export declare const MenuItem: ForwardRefComponent<MenuItemProps>;
|
131
129
|
|
132
130
|
/**
|
133
|
-
* Define a styled MenuItemCheckbox, using the `
|
131
|
+
* Define a styled MenuItemCheckbox, using the `useMenuItemCheckbox_unstable` hook.
|
134
132
|
*/
|
135
133
|
export declare const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps>;
|
136
134
|
|
135
|
+
/**
|
136
|
+
* @deprecated Use `menuItemCheckboxClassNames.root` instead.
|
137
|
+
*/
|
138
|
+
export declare const menuItemCheckboxClassName = "fui-MenuItemCheckbox";
|
139
|
+
|
140
|
+
export declare const menuItemCheckboxClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>>;
|
141
|
+
|
137
142
|
export declare type MenuItemCheckboxProps = MenuItemProps & MenuItemSelectableProps;
|
138
143
|
|
139
144
|
export declare type MenuItemCheckboxState = MenuItemState & MenuItemSelectableState;
|
140
145
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
+
/**
|
147
|
+
* @deprecated Use `menuItemClassNames.root` instead.
|
148
|
+
*/
|
149
|
+
export declare const menuItemClassName = "fui-MenuItem";
|
150
|
+
|
151
|
+
export declare const menuItemClassNames: SlotClassNames<MenuItemSlots>;
|
152
|
+
|
153
|
+
export declare type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & {
|
146
154
|
/**
|
147
155
|
* Applies disabled styles to menu item but remains focusable
|
156
|
+
*
|
157
|
+
* @default false
|
148
158
|
*/
|
149
159
|
disabled?: boolean;
|
160
|
+
/**
|
161
|
+
* If the menu item is a trigger for a submenu
|
162
|
+
*
|
163
|
+
* @default false
|
164
|
+
*/
|
165
|
+
hasSubmenu?: boolean;
|
150
166
|
/**
|
151
167
|
* Clicking on the menu item will not dismiss an open menu
|
168
|
+
*
|
169
|
+
* @default false
|
152
170
|
*/
|
153
171
|
persistOnClick?: boolean;
|
154
172
|
};
|
155
173
|
|
156
|
-
export declare type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & MenuItemCommons;
|
157
|
-
|
158
174
|
/**
|
159
|
-
* Define a styled MenuItemRadio, using the `
|
175
|
+
* Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
|
160
176
|
*/
|
161
177
|
export declare const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps>;
|
162
178
|
|
179
|
+
/**
|
180
|
+
* @deprecated Use `menuItemRadioClassNames.root` instead.
|
181
|
+
*/
|
182
|
+
export declare const menuItemRadioClassName = "fui-MenuItemRadio";
|
183
|
+
|
184
|
+
export declare const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>>;
|
185
|
+
|
163
186
|
export declare type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;
|
164
187
|
|
165
188
|
export declare type MenuItemRadioState = MenuItemState & MenuItemSelectableState;
|
@@ -199,73 +222,44 @@ export declare type MenuItemSelectableState = MenuItemSelectableProps & {
|
|
199
222
|
};
|
200
223
|
|
201
224
|
export declare type MenuItemSlots = {
|
202
|
-
root:
|
225
|
+
root: Slot<'div'>;
|
203
226
|
/**
|
204
227
|
* Icon slot rendered before children content
|
205
228
|
*/
|
206
|
-
icon?:
|
229
|
+
icon?: Slot<'span'>;
|
207
230
|
/**
|
208
231
|
* A helper slot for alignment when a menu item is used with selectable menuitems
|
209
232
|
* Avoid using this slot as a replacement for MenuItemCheckbox and MenuItemRadio components
|
210
233
|
*/
|
211
|
-
checkmark?:
|
234
|
+
checkmark?: Slot<'span'>;
|
212
235
|
/**
|
213
236
|
* Icon slot that shows the indicator for a submenu
|
214
237
|
*/
|
215
|
-
submenuIndicator?:
|
238
|
+
submenuIndicator?: Slot<'span'>;
|
216
239
|
/**
|
217
240
|
* Component children are placed in this slot
|
218
241
|
* Avoid using the `children` property in this slot in favour of Component children whenever possible
|
219
242
|
*/
|
220
|
-
content
|
243
|
+
content?: Slot<'span'>;
|
221
244
|
/**
|
222
245
|
* Secondary content rendered opposite the primary content (e.g Shortcut text)
|
223
246
|
*/
|
224
|
-
secondaryContent?:
|
247
|
+
secondaryContent?: Slot<'span'>;
|
225
248
|
};
|
226
249
|
|
250
|
+
export declare type MenuItemState = ComponentState<MenuItemSlots> & Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>;
|
251
|
+
|
227
252
|
/**
|
228
|
-
*
|
253
|
+
* Define a styled MenuList, using the `useMenuList_unstable` hook.
|
229
254
|
*/
|
230
|
-
export declare const
|
231
|
-
|
232
|
-
export declare type MenuItemState = ComponentState<MenuItemSlots> & MenuItemCommons;
|
255
|
+
export declare const MenuList: ForwardRefComponent<MenuListProps>;
|
233
256
|
|
234
257
|
/**
|
235
|
-
*
|
258
|
+
* @deprecated Use `menuListClassNames.root` instead.
|
236
259
|
*/
|
237
|
-
export declare const MenuList
|
260
|
+
export declare const menuListClassName = "fui-MenuList";
|
238
261
|
|
239
|
-
export declare
|
240
|
-
/**
|
241
|
-
* Callback when checked items change for value with a name
|
242
|
-
*
|
243
|
-
* @param event - React's original SyntheticEvent
|
244
|
-
* @param data - A data object with relevant information
|
245
|
-
*/
|
246
|
-
onCheckedValueChange?: (e: React_2.MouseEvent | React_2.KeyboardEvent, data: {
|
247
|
-
/** The name of the value */
|
248
|
-
name: string;
|
249
|
-
/** The items for this value that are checked */
|
250
|
-
checkedItems: string[];
|
251
|
-
}) => void;
|
252
|
-
/**
|
253
|
-
* Map of all checked values
|
254
|
-
*/
|
255
|
-
checkedValues: Record<string, string[]>;
|
256
|
-
/**
|
257
|
-
* Default values to be checked on mount
|
258
|
-
*/
|
259
|
-
defaultCheckedValues?: Record<string, string[]>;
|
260
|
-
/**
|
261
|
-
* States that menu items can contain icons and reserve slots for item alignment
|
262
|
-
*/
|
263
|
-
hasIcons?: boolean;
|
264
|
-
/**
|
265
|
-
* States that menu items can contain selectable items and reserve slots for item alignment
|
266
|
-
*/
|
267
|
-
hasCheckmarks?: boolean;
|
268
|
-
};
|
262
|
+
export declare const menuListClassNames: SlotClassNames<MenuListSlots>;
|
269
263
|
|
270
264
|
export declare const MenuListContext: Context<MenuListContextValue>;
|
271
265
|
|
@@ -282,57 +276,89 @@ export declare type MenuListContextValues = {
|
|
282
276
|
menuList: MenuListContextValue;
|
283
277
|
};
|
284
278
|
|
285
|
-
export declare type MenuListProps = ComponentProps<MenuListSlots> &
|
279
|
+
export declare type MenuListProps = ComponentProps<MenuListSlots> & {
|
280
|
+
/**
|
281
|
+
* Map of all checked values
|
282
|
+
*/
|
283
|
+
checkedValues?: Record<string, string[]>;
|
284
|
+
/**
|
285
|
+
* Default values to be checked on mount
|
286
|
+
*/
|
287
|
+
defaultCheckedValues?: Record<string, string[]>;
|
288
|
+
/**
|
289
|
+
* States that menu items can contain selectable items and reserve slots for item alignment
|
290
|
+
*/
|
291
|
+
hasCheckmarks?: boolean;
|
292
|
+
/**
|
293
|
+
* States that menu items can contain icons and reserve slots for item alignment
|
294
|
+
*/
|
295
|
+
hasIcons?: boolean;
|
296
|
+
/**
|
297
|
+
* Callback when checked items change for value with a name
|
298
|
+
*
|
299
|
+
* @param event - React's original SyntheticEvent
|
300
|
+
* @param data - A data object with relevant information
|
301
|
+
*/
|
302
|
+
onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;
|
303
|
+
};
|
286
304
|
|
287
305
|
export declare const MenuListProvider: React_2.Provider<MenuListContextValue> & React_2.FC<React_2.ProviderProps<MenuListContextValue>>;
|
288
306
|
|
289
307
|
export declare type MenuListSlots = {
|
290
|
-
root:
|
308
|
+
root: Slot<'div'>;
|
291
309
|
};
|
292
310
|
|
293
|
-
export declare type MenuListState = ComponentState<MenuListSlots> &
|
311
|
+
export declare type MenuListState = ComponentState<MenuListSlots> & Pick<MenuListProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & Required<Pick<MenuListProps, 'checkedValues' | 'hasCheckmarks' | 'hasIcons'>> & {
|
312
|
+
/**
|
313
|
+
* Selects a radio item, will de-select the currently selected ratio item
|
314
|
+
*/
|
315
|
+
selectRadio: SelectableHandler;
|
294
316
|
/**
|
295
317
|
* Callback to set focus on the next menu item by first character
|
296
318
|
*/
|
297
319
|
setFocusByFirstCharacter: NonNullable<MenuListContextValue['setFocusByFirstCharacter']>;
|
298
320
|
toggleCheckbox: SelectableHandler;
|
299
|
-
/**
|
300
|
-
* Selects a radio item, will de-select the currently selected ratio item
|
301
|
-
*/
|
302
|
-
selectRadio: SelectableHandler;
|
303
321
|
};
|
304
322
|
|
305
323
|
/**
|
306
324
|
* Data attached to open/close events
|
307
325
|
*/
|
308
|
-
export declare type MenuOpenChangeData =
|
309
|
-
/**
|
310
|
-
* Indicates whether the change of state was a keyboard interaction
|
311
|
-
*/
|
312
|
-
keyboard?: boolean;
|
326
|
+
export declare type MenuOpenChangeData = {
|
313
327
|
/**
|
314
328
|
* indicates whether the request for the open state was bubbled from a nested menu
|
315
329
|
*/
|
316
330
|
bubble?: boolean;
|
331
|
+
/**
|
332
|
+
* Indicates whether the change of state was a keyboard interaction
|
333
|
+
*/
|
334
|
+
keyboard?: boolean;
|
335
|
+
open: boolean;
|
317
336
|
};
|
318
337
|
|
319
338
|
/**
|
320
339
|
* The supported events that will trigger open/close of the menu
|
321
340
|
*/
|
322
|
-
export declare type MenuOpenEvents = MouseEvent | TouchEvent | React_2.
|
341
|
+
export declare type MenuOpenEvents = MouseEvent | TouchEvent | React_2.FocusEvent<HTMLElement> | React_2.KeyboardEvent<HTMLElement> | React_2.MouseEvent<HTMLElement>;
|
323
342
|
|
324
343
|
/**
|
325
344
|
* Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus
|
326
345
|
*/
|
327
346
|
export declare const MenuPopover: ForwardRefComponent<MenuPopoverProps>;
|
328
347
|
|
348
|
+
/**
|
349
|
+
* @deprecated Use `menuPopoverClassNames.root` instead.
|
350
|
+
*/
|
351
|
+
export declare const menuPopoverClassName = "fui-MenuPopover";
|
352
|
+
|
353
|
+
export declare const menuPopoverClassNames: SlotClassNames<MenuPopoverSlots>;
|
354
|
+
|
329
355
|
/**
|
330
356
|
* MenuPopover Props
|
331
357
|
*/
|
332
358
|
export declare type MenuPopoverProps = ComponentProps<MenuPopoverSlots>;
|
333
359
|
|
334
360
|
export declare type MenuPopoverSlots = {
|
335
|
-
root:
|
361
|
+
root: Slot<'div'>;
|
336
362
|
};
|
337
363
|
|
338
364
|
/**
|
@@ -349,12 +375,58 @@ export declare type MenuPopoverState = ComponentState<MenuPopoverSlots> & {
|
|
349
375
|
/**
|
350
376
|
* Extends and drills down Menulist props to simplify API
|
351
377
|
*/
|
352
|
-
export declare type MenuProps =
|
378
|
+
export declare type MenuProps = ComponentProps<MenuSlots> & Pick<MenuListProps, 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'> & {
|
353
379
|
/**
|
354
380
|
* Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.
|
355
381
|
* Alternatively can only contain {@link MenuPopover} if using a custom `target`.
|
356
382
|
*/
|
357
383
|
children: [JSX.Element, JSX.Element] | JSX.Element;
|
384
|
+
/**
|
385
|
+
* Whether the popup is open by default
|
386
|
+
*
|
387
|
+
* @default false
|
388
|
+
*/
|
389
|
+
defaultOpen?: boolean;
|
390
|
+
/**
|
391
|
+
* Sets the delay for mouse open/close for the popover one mouse enter/leave
|
392
|
+
*/
|
393
|
+
hoverDelay?: number;
|
394
|
+
/**
|
395
|
+
* Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order
|
396
|
+
* This option is disregarded for submenus
|
397
|
+
*
|
398
|
+
* @default false
|
399
|
+
*/
|
400
|
+
inline?: boolean;
|
401
|
+
/**
|
402
|
+
* Call back when the component requests to change value
|
403
|
+
* The `open` value is used as a hint when directly controlling the component
|
404
|
+
*/
|
405
|
+
onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
406
|
+
/**
|
407
|
+
* Whether the popup is open
|
408
|
+
*
|
409
|
+
* @default false
|
410
|
+
*/
|
411
|
+
open?: boolean;
|
412
|
+
/**
|
413
|
+
* Opens the menu on right click (context menu), removes all other menu open interactions
|
414
|
+
*
|
415
|
+
* @default false
|
416
|
+
*/
|
417
|
+
openOnContext?: boolean;
|
418
|
+
/**
|
419
|
+
* Opens the menu on hover
|
420
|
+
*
|
421
|
+
* @default false
|
422
|
+
*/
|
423
|
+
openOnHover?: boolean;
|
424
|
+
/**
|
425
|
+
* Do not dismiss the menu when a menu item is clicked
|
426
|
+
*
|
427
|
+
* @default false
|
428
|
+
*/
|
429
|
+
persistOnItemClick?: boolean;
|
358
430
|
/**
|
359
431
|
* Configures the positioned menu
|
360
432
|
*/
|
@@ -365,56 +437,83 @@ export declare const MenuProvider: React_2.Provider<MenuContextValue> & React_2.
|
|
365
437
|
|
366
438
|
export declare type MenuSlots = {};
|
367
439
|
|
368
|
-
|
440
|
+
/**
|
441
|
+
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
442
|
+
*/
|
443
|
+
export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
|
444
|
+
|
445
|
+
/**
|
446
|
+
* @deprecated Use `menuSplitGroupClassNames.root` instead.
|
447
|
+
*/
|
448
|
+
export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
|
449
|
+
|
450
|
+
export declare const menuSplitGroupClassNames: SlotClassNames<MenuSplitGroupSlots>;
|
451
|
+
|
452
|
+
/**
|
453
|
+
* MenuSplitGroup Props
|
454
|
+
*/
|
455
|
+
export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots>;
|
456
|
+
|
457
|
+
export declare type MenuSplitGroupSlots = {
|
458
|
+
root: Slot<'div'>;
|
459
|
+
};
|
460
|
+
|
461
|
+
/**
|
462
|
+
* State used in rendering MenuSplitGroup
|
463
|
+
*/
|
464
|
+
export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots>;
|
465
|
+
|
466
|
+
export declare type MenuState = ComponentState<MenuSlots> & Pick<MenuProps, 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'inline' | 'onOpenChange' | 'openOnContext' | 'persistOnItemClick'> & Required<Pick<MenuProps, 'checkedValues' | 'onCheckedValueChange' | 'open' | 'openOnHover'>> & {
|
369
467
|
/**
|
370
|
-
*
|
468
|
+
* Anchors the popper to the mouse click for context events
|
371
469
|
*/
|
372
|
-
|
470
|
+
contextTarget: ReturnType<typeof usePopperMouseTarget>[0];
|
373
471
|
/**
|
374
|
-
*
|
472
|
+
* Whether this menu is a submenu
|
375
473
|
*/
|
376
|
-
|
474
|
+
isSubmenu: boolean;
|
377
475
|
/**
|
378
476
|
* Internal react node that just simplifies handling children
|
379
477
|
*/
|
380
|
-
|
478
|
+
menuPopover: React_2.ReactNode;
|
381
479
|
/**
|
382
480
|
* The ref for the popup
|
383
481
|
*/
|
384
482
|
menuPopoverRef: React_2.MutableRefObject<HTMLElement>;
|
385
483
|
/**
|
386
|
-
*
|
484
|
+
* Internal react node that just simplifies handling children
|
387
485
|
*/
|
388
|
-
|
486
|
+
menuTrigger: React_2.ReactNode;
|
389
487
|
/**
|
390
|
-
*
|
488
|
+
* A callback to set the target of the popper to the mouse click for context events
|
391
489
|
*/
|
392
|
-
|
490
|
+
setContextTarget: ReturnType<typeof usePopperMouseTarget>[1];
|
393
491
|
/**
|
394
|
-
*
|
492
|
+
* Callback to open/close the popup
|
395
493
|
*/
|
396
|
-
|
494
|
+
setOpen: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
397
495
|
/**
|
398
|
-
*
|
496
|
+
* Id for the MenuTrigger element for aria relationship
|
399
497
|
*/
|
400
|
-
|
498
|
+
triggerId: string;
|
401
499
|
/**
|
402
|
-
*
|
500
|
+
* The ref for the MenuTrigger, used for popup positioning
|
403
501
|
*/
|
404
|
-
|
502
|
+
triggerRef: React_2.MutableRefObject<HTMLElement>;
|
405
503
|
};
|
406
504
|
|
407
505
|
/**
|
408
506
|
* Wraps a trigger element as an only child
|
409
507
|
* and adds the necessary event handling to open a popup menu
|
410
508
|
*/
|
411
|
-
export declare const MenuTrigger: React_2.FC<MenuTriggerProps
|
509
|
+
export declare const MenuTrigger: React_2.FC<MenuTriggerProps> & FluentTriggerComponent;
|
412
510
|
|
413
511
|
/**
|
414
512
|
* Props that are passed to the child of the MenuTrigger when cloned to ensure correct behaviour for the Menu
|
415
513
|
*/
|
416
|
-
export declare type MenuTriggerChildProps = Required<Pick<React_2.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | '
|
514
|
+
export declare type MenuTriggerChildProps = Required<Pick<React_2.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'id'>> & {
|
417
515
|
ref?: React_2.Ref<never>;
|
516
|
+
'aria-expanded': boolean | undefined;
|
418
517
|
};
|
419
518
|
|
420
519
|
export declare const MenuTriggerContextProvider: React_2.Provider<boolean>;
|
@@ -425,158 +524,188 @@ export declare type MenuTriggerProps = {
|
|
425
524
|
*/
|
426
525
|
children: (React_2.ReactElement & {
|
427
526
|
ref?: React_2.Ref<unknown>;
|
428
|
-
}) | ((props: MenuTriggerChildProps) => React_2.
|
527
|
+
}) | ((props: MenuTriggerChildProps) => React_2.ReactElement | null);
|
429
528
|
};
|
430
529
|
|
431
|
-
export declare type MenuTriggerState =
|
530
|
+
export declare type MenuTriggerState = {
|
531
|
+
children: React_2.ReactElement | null;
|
532
|
+
isSubmenu: boolean;
|
533
|
+
};
|
432
534
|
|
433
535
|
/**
|
434
536
|
* Render the final JSX of Menu
|
435
537
|
*/
|
436
|
-
export declare const
|
538
|
+
export declare const renderMenu_unstable: (state: MenuState, contextValues: MenuContextValues) => JSX.Element;
|
437
539
|
|
438
540
|
/**
|
439
541
|
* Redefine the render function to add slots. Reuse the menudivider structure but add
|
440
542
|
* slots to children.
|
441
543
|
*/
|
442
|
-
export declare const
|
544
|
+
export declare const renderMenuDivider_unstable: (state: MenuDividerState) => JSX.Element;
|
443
545
|
|
444
546
|
/**
|
445
547
|
* Redefine the render function to add slots. Reuse the menugroup structure but add
|
446
548
|
* slots to children.
|
447
549
|
*/
|
448
|
-
export declare const
|
550
|
+
export declare const renderMenuGroup_unstable: (state: MenuGroupState, contextValues: MenuGroupContextValues) => JSX.Element;
|
449
551
|
|
450
552
|
/**
|
451
553
|
* Redefine the render function to add slots. Reuse the menugroupheader structure but add
|
452
554
|
* slots to children.
|
453
555
|
*/
|
454
|
-
export declare const
|
556
|
+
export declare const renderMenuGroupHeader_unstable: (state: MenuGroupHeaderState) => JSX.Element;
|
455
557
|
|
456
558
|
/**
|
457
559
|
* Function that renders the final JSX of the component
|
458
560
|
*/
|
459
|
-
export declare const
|
561
|
+
export declare const renderMenuItem_unstable: (state: MenuItemState) => JSX.Element;
|
460
562
|
|
461
563
|
/** Function that renders the final JSX of the component */
|
462
|
-
export declare const
|
564
|
+
export declare const renderMenuItemCheckbox_unstable: (state: MenuItemCheckboxState) => JSX.Element;
|
463
565
|
|
464
566
|
/**
|
465
567
|
* Redefine the render function to add slots. Reuse the menuitemradio structure but add
|
466
568
|
* slots to children.
|
467
569
|
*/
|
468
|
-
export declare const
|
570
|
+
export declare const renderMenuItemRadio_unstable: (state: MenuItemRadioState) => JSX.Element;
|
469
571
|
|
470
572
|
/**
|
471
573
|
* Function that renders the final JSX of the component
|
472
574
|
*/
|
473
|
-
export declare const
|
575
|
+
export declare const renderMenuList_unstable: (state: MenuListState, contextValues: MenuListContextValues) => JSX.Element;
|
474
576
|
|
475
577
|
/**
|
476
578
|
* Render the final JSX of MenuPopover
|
477
579
|
*/
|
478
|
-
export declare const
|
580
|
+
export declare const renderMenuPopover_unstable: (state: MenuPopoverState) => JSX.Element;
|
581
|
+
|
582
|
+
/**
|
583
|
+
* Render the final JSX of MenuSplitGroup
|
584
|
+
*/
|
585
|
+
export declare const renderMenuSplitGroup_unstable: (state: MenuSplitGroupState) => JSX.Element;
|
479
586
|
|
480
587
|
/**
|
481
588
|
* Render the final JSX of MenuTrigger
|
482
589
|
*
|
483
590
|
* Only renders children
|
484
591
|
*/
|
485
|
-
export declare const
|
592
|
+
export declare const renderMenuTrigger_unstable: (state: MenuTriggerState) => JSX.Element;
|
486
593
|
|
487
594
|
export declare type SelectableHandler = (e: React_2.MouseEvent | React_2.KeyboardEvent, name: string, value: string, checked: boolean) => void;
|
488
595
|
|
489
|
-
export declare type UninitializedMenuListState = Omit<MenuListState, '
|
596
|
+
export declare type UninitializedMenuListState = Omit<MenuListState, 'checkedValues' | 'selectRadio' | 'setFocusByFirstCharacter' | 'toggleCheckbox'> & Partial<Pick<MenuListState, 'checkedValues'>>;
|
490
597
|
|
491
598
|
/**
|
492
599
|
* Applies styles to a checkmark slot for selectable menu items
|
493
600
|
*
|
494
601
|
* @param state - should contain a `checkmark` slot
|
495
602
|
*/
|
496
|
-
export declare const
|
603
|
+
export declare const useCheckmarkStyles_unstable: (state: MenuItemSelectableState & Pick<MenuItemState, 'checkmark'>) => void;
|
497
604
|
|
498
605
|
/**
|
499
606
|
* Create the state required to render Menu.
|
500
607
|
*
|
501
608
|
* The returned state can be modified with hooks such as useMenuStyles,
|
502
|
-
* before being passed to
|
609
|
+
* before being passed to renderMenu_unstable.
|
503
610
|
*
|
504
611
|
* @param props - props from this instance of Menu
|
505
612
|
*/
|
506
|
-
export declare const
|
613
|
+
export declare const useMenu_unstable: (props: MenuProps) => MenuState;
|
507
614
|
|
508
|
-
export declare const
|
615
|
+
export declare const useMenuContext_unstable: <T>(selector: ContextSelector<MenuContextValue, T>) => T;
|
509
616
|
|
510
|
-
export declare function
|
617
|
+
export declare function useMenuContextValues_unstable(state: MenuState): MenuContextValues;
|
511
618
|
|
512
619
|
/**
|
513
620
|
* Given user props, returns state and render function for a MenuDivider.
|
514
621
|
*/
|
515
|
-
export declare const
|
622
|
+
export declare const useMenuDivider_unstable: (props: MenuDividerProps, ref: React_2.Ref<HTMLElement>) => MenuDividerState;
|
516
623
|
|
517
|
-
export declare const
|
624
|
+
export declare const useMenuDividerStyles_unstable: (state: MenuDividerState) => MenuDividerState;
|
518
625
|
|
519
626
|
/**
|
520
627
|
* Given user props, returns state and render function for a MenuGroup.
|
521
628
|
*/
|
522
|
-
export declare function
|
629
|
+
export declare function useMenuGroup_unstable(props: MenuGroupProps, ref: React_2.Ref<HTMLElement>): MenuGroupState;
|
523
630
|
|
524
|
-
export declare const
|
631
|
+
export declare const useMenuGroupContext_unstable: () => MenuGroupContextValue;
|
525
632
|
|
526
|
-
export declare function
|
633
|
+
export declare function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues;
|
527
634
|
|
528
635
|
/**
|
529
636
|
* Given user props, returns state and render function for a MenuGroupHeader.
|
530
637
|
*/
|
531
|
-
export declare function
|
638
|
+
export declare function useMenuGroupHeader_unstable(props: MenuGroupHeaderProps, ref: React_2.Ref<HTMLElement>): MenuGroupHeaderState;
|
639
|
+
|
640
|
+
export declare const useMenuGroupHeaderStyles_unstable: (state: MenuGroupHeaderState) => MenuGroupHeaderState;
|
532
641
|
|
533
|
-
export declare const
|
642
|
+
export declare const useMenuGroupStyles_unstable: (state: MenuGroupState) => MenuGroupState;
|
534
643
|
|
535
644
|
/**
|
536
645
|
* Returns the props and state required to render the component
|
537
646
|
*/
|
538
|
-
export declare const
|
647
|
+
export declare const useMenuItem_unstable: (props: MenuItemProps, ref: React_2.Ref<HTMLElement>) => MenuItemState;
|
539
648
|
|
540
649
|
/** Returns the props and state required to render the component */
|
541
|
-
export declare const
|
650
|
+
export declare const useMenuItemCheckbox_unstable: (props: MenuItemCheckboxProps, ref: React_2.Ref<HTMLElement>) => MenuItemCheckboxState;
|
651
|
+
|
652
|
+
export declare const useMenuItemCheckboxStyles_unstable: (state: MenuItemCheckboxState) => void;
|
542
653
|
|
543
654
|
/**
|
544
655
|
* Given user props, returns state and render function for a MenuItemRadio.
|
545
656
|
*/
|
546
|
-
export declare const
|
657
|
+
export declare const useMenuItemRadio_unstable: (props: MenuItemRadioProps, ref: React_2.Ref<HTMLElement>) => MenuItemRadioState;
|
658
|
+
|
659
|
+
export declare const useMenuItemRadioStyles_unstable: (state: MenuItemRadioState) => void;
|
547
660
|
|
548
661
|
/** Applies style classnames to slots */
|
549
|
-
export declare const
|
662
|
+
export declare const useMenuItemStyles_unstable: (state: MenuItemState) => void;
|
550
663
|
|
551
664
|
/**
|
552
665
|
* Returns the props and state required to render the component
|
553
666
|
*/
|
554
|
-
export declare const
|
667
|
+
export declare const useMenuList_unstable: (props: MenuListProps, ref: React_2.Ref<HTMLElement>) => MenuListState;
|
555
668
|
|
556
|
-
export declare const
|
669
|
+
export declare const useMenuListContext_unstable: <T>(selector: ContextSelector<MenuListContextValue, T>) => T;
|
557
670
|
|
558
|
-
export declare function
|
671
|
+
export declare function useMenuListContextValues_unstable(state: MenuListState): MenuListContextValues;
|
559
672
|
|
560
673
|
/**
|
561
674
|
* Apply styling to the Menu slots based on the state
|
562
675
|
*/
|
563
|
-
export declare const
|
676
|
+
export declare const useMenuListStyles_unstable: (state: MenuListState) => MenuListState;
|
564
677
|
|
565
678
|
/**
|
566
679
|
* Create the state required to render MenuPopover.
|
567
680
|
*
|
568
|
-
* The returned state can be modified with hooks such as
|
569
|
-
* before being passed to
|
681
|
+
* The returned state can be modified with hooks such as useMenuPopoverStyles_unstable,
|
682
|
+
* before being passed to renderMenuPopover_unstable.
|
570
683
|
*
|
571
684
|
* @param props - props from this instance of MenuPopover
|
572
685
|
* @param ref - reference to root HTMLElement of MenuPopover
|
573
686
|
*/
|
574
|
-
export declare const
|
687
|
+
export declare const useMenuPopover_unstable: (props: MenuPopoverProps, ref: React_2.Ref<HTMLElement>) => MenuPopoverState;
|
575
688
|
|
576
689
|
/**
|
577
690
|
* Apply styling to the Menu slots based on the state
|
578
691
|
*/
|
579
|
-
export declare const
|
692
|
+
export declare const useMenuPopoverStyles_unstable: (state: MenuPopoverState) => MenuPopoverState;
|
693
|
+
|
694
|
+
/**
|
695
|
+
* Create the state required to render MenuSplitGroup.
|
696
|
+
*
|
697
|
+
* The returned state can be modified with hooks such as useMenuSplitGroupStyles_unstable,
|
698
|
+
* before being passed to renderMenuSplitGroup_unstable.
|
699
|
+
*
|
700
|
+
* @param props - props from this instance of MenuSplitGroup
|
701
|
+
* @param ref - reference to root HTMLElement of MenuSplitGroup
|
702
|
+
*/
|
703
|
+
export declare const useMenuSplitGroup_unstable: (props: MenuSplitGroupProps, ref: React_2.Ref<HTMLElement>) => MenuSplitGroupState;
|
704
|
+
|
705
|
+
/**
|
706
|
+
* Apply styling to the MenuSplitGroup slots based on the state
|
707
|
+
*/
|
708
|
+
export declare const useMenuSplitGroupStyles_unstable: (state: MenuSplitGroupState) => MenuSplitGroupState;
|
580
709
|
|
581
710
|
/**
|
582
711
|
* Create the state required to render MenuTrigger.
|
@@ -584,8 +713,8 @@ export declare const useMenuPopoverStyles: (state: MenuPopoverState) => MenuPopo
|
|
584
713
|
*
|
585
714
|
* @param props - props from this instance of MenuTrigger
|
586
715
|
*/
|
587
|
-
export declare const
|
716
|
+
export declare const useMenuTrigger_unstable: (props: MenuTriggerProps) => MenuTriggerState;
|
588
717
|
|
589
|
-
export declare const
|
718
|
+
export declare const useMenuTriggerContext_unstable: () => boolean;
|
590
719
|
|
591
720
|
export { }
|