@fluentui/react-menu 9.0.0-rc.9 → 9.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. package/CHANGELOG.json +517 -1
  2. package/CHANGELOG.md +139 -2
  3. package/dist/index.d.ts +125 -155
  4. package/lib/components/Menu/Menu.js.map +1 -1
  5. package/lib/components/Menu/Menu.types.js.map +1 -1
  6. package/lib/components/Menu/renderMenu.js.map +1 -1
  7. package/lib/components/Menu/useMenu.js +21 -7
  8. package/lib/components/Menu/useMenu.js.map +1 -1
  9. package/lib/components/Menu/useMenuContextValues.js +20 -20
  10. package/lib/components/Menu/useMenuContextValues.js.map +1 -1
  11. package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
  12. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  13. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  14. package/lib/components/MenuDivider/useMenuDividerStyles.js +4 -8
  15. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  16. package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
  17. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  18. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  19. package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  20. package/lib/components/MenuGroup/useMenuGroupStyles.js +0 -5
  21. package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  22. package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  23. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  24. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  25. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +0 -5
  26. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  27. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  28. package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
  29. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  30. package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
  31. package/lib/components/MenuItem/useMenuItem.js +4 -2
  32. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  33. package/lib/components/MenuItem/useMenuItemStyles.js +33 -35
  34. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  35. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  36. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  37. package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  38. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -5
  39. package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  40. package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  41. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  42. package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  43. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -5
  44. package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  45. package/lib/components/MenuList/MenuList.js.map +1 -1
  46. package/lib/components/MenuList/MenuList.types.js.map +1 -1
  47. package/lib/components/MenuList/index.js +1 -0
  48. package/lib/components/MenuList/index.js.map +1 -1
  49. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  50. package/lib/components/MenuList/useMenuList.js +2 -2
  51. package/lib/components/MenuList/useMenuList.js.map +1 -1
  52. package/lib/components/MenuList/useMenuListContextValues.js +8 -8
  53. package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
  54. package/lib/components/MenuList/useMenuListStyles.js +0 -5
  55. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  56. package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
  57. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  58. package/lib/components/MenuPopover/useMenuPopover.js +1 -1
  59. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  60. package/lib/components/MenuPopover/useMenuPopoverStyles.js +0 -5
  61. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  62. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  63. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
  64. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  65. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +1 -1
  66. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  67. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +5 -10
  68. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  69. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  70. package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  71. package/lib/components/MenuTrigger/useMenuTrigger.js +1 -1
  72. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  73. package/lib/contexts/menuContext.js.map +1 -1
  74. package/lib/contexts/menuGroupContext.js.map +1 -1
  75. package/lib/contexts/menuListContext.js.map +1 -1
  76. package/lib/index.js +11 -20
  77. package/lib/index.js.map +1 -1
  78. package/lib/selectable/useCheckmarkStyles.js.map +1 -1
  79. package/lib/utils/useIsSubmenu.js.map +1 -1
  80. package/lib/utils/useOnMenuEnter.js.map +1 -1
  81. package/lib-commonjs/components/Menu/Menu.js.map +1 -1
  82. package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
  83. package/lib-commonjs/components/Menu/useMenu.js +19 -5
  84. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  85. package/lib-commonjs/components/Menu/useMenuContextValues.js +20 -20
  86. package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
  87. package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
  88. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  89. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  90. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +5 -9
  91. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  92. package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
  93. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  94. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  95. package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
  96. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +1 -6
  97. package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
  98. package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
  99. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  100. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  101. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +1 -6
  102. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  103. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  104. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  105. package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
  106. package/lib-commonjs/components/MenuItem/useMenuItem.js +5 -3
  107. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  108. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +35 -36
  109. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  110. package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
  111. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  112. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
  113. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +1 -6
  114. package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
  115. package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
  116. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  117. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
  118. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +1 -6
  119. package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
  120. package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
  121. package/lib-commonjs/components/MenuList/index.js +2 -0
  122. package/lib-commonjs/components/MenuList/index.js.map +1 -1
  123. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  124. package/lib-commonjs/components/MenuList/useMenuList.js +2 -2
  125. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  126. package/lib-commonjs/components/MenuList/useMenuListContextValues.js +8 -8
  127. package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
  128. package/lib-commonjs/components/MenuList/useMenuListStyles.js +1 -6
  129. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  130. package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
  131. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  132. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +1 -1
  133. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  134. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +1 -6
  135. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  136. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
  137. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
  138. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +1 -1
  139. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
  140. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +6 -11
  141. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
  142. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  143. package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
  144. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +1 -1
  145. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  146. package/lib-commonjs/contexts/menuContext.js.map +1 -1
  147. package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
  148. package/lib-commonjs/contexts/menuListContext.js.map +1 -1
  149. package/lib-commonjs/index.js +2 -77
  150. package/lib-commonjs/index.js.map +1 -1
  151. package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
  152. package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
  153. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  154. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"sources":["components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;;AAGG;;;AACI,MAAM,WAAW,GAAwD,KAAK,IAAG;AACtF,QAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAd;AAEA,SAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX;AAMb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B;AACA,OAAA,CAAA,WAAA,CAAY,wBAAZ,GAAuC,IAAvC","sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> & FluentTriggerComponent = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\nMenuTrigger.isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/MenuTrigger/MenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;;AAGG;;;AACI,MAAM,WAAW,GAAwD,KAAK,IAAG;EACtF,MAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAd;EAEA,OAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX;AAMb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B;AACA,OAAA,CAAA,WAAA,CAAY,wBAAZ,GAAuC,IAAvC","sourcesContent":["import * as React from 'react';\nimport { useMenuTrigger_unstable } from './useMenuTrigger';\nimport { renderMenuTrigger_unstable } from './renderMenuTrigger';\nimport type { MenuTriggerProps } from './MenuTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * Wraps a trigger element as an only child\n * and adds the necessary event handling to open a popup menu\n */\nexport const MenuTrigger: React.FC<MenuTriggerProps> & FluentTriggerComponent = props => {\n const state = useMenuTrigger_unstable(props);\n\n return renderMenuTrigger_unstable(state);\n};\n\nMenuTrigger.displayName = 'MenuTrigger';\nMenuTrigger.isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/MenuTrigger/renderMenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,SAAO,KAAA,CAAA,aAAA,CAAC,oBAAA,CAAA,0BAAD,EAA2B;AAAC,IAAA,KAAK,EAAE,KAAK,CAAC;AAAd,GAA3B,EAAqD,KAAK,CAAC,QAA3D,CAAP;AACD,CAFM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { MenuTriggerContextProvider } from '../../contexts/menuTriggerContext';\nimport type { MenuTriggerState } from './MenuTrigger.types';\n\n/**\n * Render the final JSX of MenuTrigger\n *\n * Only renders children\n */\nexport const renderMenuTrigger_unstable = (state: MenuTriggerState) => {\n return <MenuTriggerContextProvider value={state.isSubmenu}>{state.children}</MenuTriggerContextProvider>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/MenuTrigger/renderMenuTrigger.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,OAAO,KAAA,CAAA,aAAA,CAAC,oBAAA,CAAA,0BAAD,EAA2B;IAAC,KAAK,EAAE,KAAK,CAAC;EAAd,CAA3B,EAAqD,KAAK,CAAC,QAA3D,CAAP;AACD,CAFM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { MenuTriggerContextProvider } from '../../contexts/menuTriggerContext';\nimport type { MenuTriggerState } from './MenuTrigger.types';\n\n/**\n * Render the final JSX of MenuTrigger\n *\n * Only renders children\n */\nexport const renderMenuTrigger_unstable = (state: MenuTriggerState) => {\n return <MenuTriggerContextProvider value={state.isSubmenu}>{state.children}</MenuTriggerContextProvider>;\n};\n"],"sourceRoot":"../src/"}
@@ -53,7 +53,7 @@ const useMenuTrigger_unstable = props => {
53
53
  const hasMouseMoved = React.useRef(false);
54
54
  const {
55
55
  dir
56
- } = react_shared_contexts_1.useFluent();
56
+ } = react_shared_contexts_1.useFluent_unstable();
57
57
  const OpenArrowKey = dir === 'ltr' ? keyboard_keys_1.ArrowRight : keyboard_keys_1.ArrowLeft;
58
58
  const child = React.isValidElement(children) ? react_utilities_1.getTriggerChild(children) : undefined;
59
59
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAMA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;;;AAKG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAA8C;;;AACnF,QAAM;AAAE,IAAA;AAAF,MAAe,KAArB;AAEA,QAAM,UAAU,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO,CAAC,UAA3C,CAAnB;AACA,QAAM,cAAc,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO,CAAC,cAA3C,CAAvB;AACA,QAAM,OAAO,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO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aAAF,YAA2B,WAA3B,IAA0C,UAAU,CAAC,CAAC,CAAC,aAAH,CAA3D;AACD,CARD","sourcesContent":["import * as React from 'react';\nimport { MenuTriggerChildProps, MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowRight, ArrowLeft, Escape, ArrowDown } from '@fluentui/keyboard-keys';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n useMergedEventCallbacks,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { shouldPreventDefaultOnKeyDown } from '@fluentui/react-utilities';\n\n/**\n * Create the state required to render MenuTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup menu\n *\n * @param props - props from this instance of MenuTrigger\n */\nexport const useMenuTrigger_unstable = (props: MenuTriggerProps): MenuTriggerState => {\n const { children } = props;\n\n const triggerRef = useMenuContext_unstable(context => context.triggerRef);\n const menuPopoverRef = useMenuContext_unstable(context => context.menuPopoverRef);\n const setOpen = useMenuContext_unstable(context => context.setOpen);\n const open = useMenuContext_unstable(context => context.open);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const openOnHover = useMenuContext_unstable(context => context.openOnHover);\n const openOnContext = useMenuContext_unstable(context => context.openOnContext);\n\n const isSubmenu = useIsSubmenu();\n\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, menuPopoverRef]);\n\n const openedWithKeyboardRef = React.useRef(false);\n const hasMouseMoved = React.useRef(false);\n\n const { dir } = useFluent();\n const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;\n\n const child = React.isValidElement(children) ? getTriggerChild(children) : undefined;\n\n const onContextMenu = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (openOnContext) {\n e.preventDefault();\n setOpen(e, { open: true, keyboard: false });\n }\n };\n\n const onClick = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (!openOnContext) {\n setOpen(e, { open: !open, keyboard: openedWithKeyboardRef.current });\n openedWithKeyboardRef.current = false;\n }\n };\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (shouldPreventDefaultOnKeyDown(e)) {\n e.preventDefault();\n openedWithKeyboardRef.current = true;\n (e.target as HTMLElement)?.click();\n }\n\n const key = e.key;\n\n if (!openOnContext && ((isSubmenu && key === OpenArrowKey) || (!isSubmenu && key === ArrowDown))) {\n setOpen(e, { open: true, keyboard: true });\n }\n\n if (key === Escape && !isSubmenu) {\n setOpen(e, { open: false, keyboard: true });\n }\n\n // if menu is already open, can't rely on effects to focus\n if (open && key === OpenArrowKey && isSubmenu) {\n focusFirst();\n }\n };\n\n const onMouseEnter = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover && hasMouseMoved.current) {\n setOpen(e, { open: true, keyboard: false });\n }\n };\n\n // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience\n // First time open the mouse using mousemove and then continue with mouseenter\n // Only use once to determine that the user is using the mouse since it is an expensive event to handle\n const onMouseMove = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover && !hasMouseMoved.current) {\n setOpen(e, { open: true, keyboard: false });\n hasMouseMoved.current = true;\n }\n };\n\n const onMouseLeave = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover) {\n setOpen(e, { open: false, keyboard: false });\n }\n };\n\n return {\n isSubmenu,\n children: applyTriggerPropsToChildren<MenuTriggerChildProps>(children, {\n 'aria-haspopup': 'menu',\n 'aria-expanded': !open && !isSubmenu ? undefined : open,\n id: triggerId,\n ...child?.props,\n ref: useMergedRefs(triggerRef, child?.ref),\n onClick: useMergedEventCallbacks(child?.props?.onClick, onClick),\n onMouseEnter: useMergedEventCallbacks(child?.props?.onMouseEnter, onMouseEnter),\n onMouseLeave: useMergedEventCallbacks(child?.props?.onMouseLeave, onMouseLeave),\n onKeyDown: useMergedEventCallbacks(child?.props?.onKeyDown, onKeyDown),\n onContextMenu: useMergedEventCallbacks(child?.props?.onContextMenu, onContextMenu),\n onMouseMove: useMergedEventCallbacks(child?.props?.onMouseMove, onMouseMove),\n }),\n };\n};\n\nconst isTargetDisabled = (e: React.SyntheticEvent | Event) => {\n const isDisabled = (el: HTMLElement) =>\n el.hasAttribute('disabled') || (el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true');\n if (e.target instanceof HTMLElement && isDisabled(e.target)) {\n return true;\n }\n\n return e.currentTarget instanceof HTMLElement && isDisabled(e.currentTarget);\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/MenuTrigger/useMenuTrigger.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAMA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;;;AAKG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAA8C;;;EACnF,MAAM;IAAE;EAAF,IAAe,KAArB;EAEA,MAAM,UAAU,GAA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B,IAA0C,UAAU,CAAC,CAAC,CAAC,aAAH,CAA3D;AACD,CARD","sourcesContent":["import * as React from 'react';\nimport { MenuTriggerChildProps, MenuTriggerProps, MenuTriggerState } from './MenuTrigger.types';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowRight, ArrowLeft, Escape, ArrowDown } from '@fluentui/keyboard-keys';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n useMergedEventCallbacks,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { shouldPreventDefaultOnKeyDown } from '@fluentui/react-utilities';\n\n/**\n * Create the state required to render MenuTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup menu\n *\n * @param props - props from this instance of MenuTrigger\n */\nexport const useMenuTrigger_unstable = (props: MenuTriggerProps): MenuTriggerState => {\n const { children } = props;\n\n const triggerRef = useMenuContext_unstable(context => context.triggerRef);\n const menuPopoverRef = useMenuContext_unstable(context => context.menuPopoverRef);\n const setOpen = useMenuContext_unstable(context => context.setOpen);\n const open = useMenuContext_unstable(context => context.open);\n const triggerId = useMenuContext_unstable(context => context.triggerId);\n const openOnHover = useMenuContext_unstable(context => context.openOnHover);\n const openOnContext = useMenuContext_unstable(context => context.openOnContext);\n\n const isSubmenu = useIsSubmenu();\n\n const { findFirstFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, menuPopoverRef]);\n\n const openedWithKeyboardRef = React.useRef(false);\n const hasMouseMoved = React.useRef(false);\n\n const { dir } = useFluent();\n const OpenArrowKey = dir === 'ltr' ? ArrowRight : ArrowLeft;\n\n const child = React.isValidElement(children) ? getTriggerChild<Partial<MenuTriggerChildProps>>(children) : undefined;\n\n const onContextMenu = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (openOnContext) {\n e.preventDefault();\n setOpen(e, { open: true, keyboard: false });\n }\n };\n\n const onClick = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (!openOnContext) {\n setOpen(e, { open: !open, keyboard: openedWithKeyboardRef.current });\n openedWithKeyboardRef.current = false;\n }\n };\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n\n if (shouldPreventDefaultOnKeyDown(e)) {\n e.preventDefault();\n openedWithKeyboardRef.current = true;\n (e.target as HTMLElement)?.click();\n }\n\n const key = e.key;\n\n if (!openOnContext && ((isSubmenu && key === OpenArrowKey) || (!isSubmenu && key === ArrowDown))) {\n setOpen(e, { open: true, keyboard: true });\n }\n\n if (key === Escape && !isSubmenu) {\n setOpen(e, { open: false, keyboard: true });\n }\n\n // if menu is already open, can't rely on effects to focus\n if (open && key === OpenArrowKey && isSubmenu) {\n focusFirst();\n }\n };\n\n const onMouseEnter = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover && hasMouseMoved.current) {\n setOpen(e, { open: true, keyboard: false });\n }\n };\n\n // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience\n // First time open the mouse using mousemove and then continue with mouseenter\n // Only use once to determine that the user is using the mouse since it is an expensive event to handle\n const onMouseMove = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover && !hasMouseMoved.current) {\n setOpen(e, { open: true, keyboard: false });\n hasMouseMoved.current = true;\n }\n };\n\n const onMouseLeave = (e: React.MouseEvent<HTMLElement>) => {\n if (isTargetDisabled(e)) {\n return;\n }\n if (openOnHover) {\n setOpen(e, { open: false, keyboard: false });\n }\n };\n\n return {\n isSubmenu,\n children: applyTriggerPropsToChildren<MenuTriggerChildProps>(children, {\n 'aria-haspopup': 'menu',\n 'aria-expanded': !open && !isSubmenu ? undefined : open,\n id: triggerId,\n ...child?.props,\n ref: useMergedRefs(triggerRef, child?.ref),\n onClick: useMergedEventCallbacks(child?.props?.onClick, onClick),\n onMouseEnter: useMergedEventCallbacks(child?.props?.onMouseEnter, onMouseEnter),\n onMouseLeave: useMergedEventCallbacks(child?.props?.onMouseLeave, onMouseLeave),\n onKeyDown: useMergedEventCallbacks(child?.props?.onKeyDown, onKeyDown),\n onContextMenu: useMergedEventCallbacks(child?.props?.onContextMenu, onContextMenu),\n onMouseMove: useMergedEventCallbacks(child?.props?.onMouseMove, onMouseMove),\n }),\n };\n};\n\nconst isTargetDisabled = (e: React.SyntheticEvent | Event) => {\n const isDisabled = (el: HTMLElement) =>\n el.hasAttribute('disabled') || (el.hasAttribute('aria-disabled') && el.getAttribute('aria-disabled') === 'true');\n if (e.target instanceof HTMLElement && isDisabled(e.target)) {\n return true;\n }\n\n return e.currentTarget instanceof HTMLElement && isDisabled(e.currentTarget);\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["contexts/menuContext.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,WAAA,gBAAyC,wBAAA,CAAA,aAAA,CAAgC;AACpF,EAAA,IAAI,EAAE,KAD8E;AAEpF,EAAA,OAAO,EAAE,MAAM,KAFqE;AAGpF,EAAA,aAAa,EAAE,EAHqE;AAIpF,EAAA,oBAAoB,EAAE,MAAM,IAJwD;AAKpF,EAAA,oBAAoB,EAAE,EAL8D;AAMpF,EAAA,SAAS,EAAE,KANyE;AAOpF,EAAA,UAAU,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GAPuE;AAQpF,EAAA,cAAc,EAAG;AAAE,IAAA,OAAO,EAAE;AAAX,GARmE;AASpF,EAAA,SAAS,EAAE,EATyE;AAUpF,EAAA,aAAa,EAAE,KAVqE;AAWpF,EAAA,WAAW,EAAE,KAXuE;AAYpF,EAAA,QAAQ,EAAE,KAZ0E;AAapF,EAAA,aAAa,EAAE;AAbqE,CAAhC,CAAzC;AAwCA,OAAA,CAAA,YAAA,GAAe,OAAA,CAAA,WAAA,CAAY,QAA3B;;AAEN,MAAM,uBAAuB,GAAO,QAAJ,IACrC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,WAAnB,EAAgC,QAAhC,CADK;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","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 { MenuListProps } from '../components/index';\nimport type { MenuState } from '../components/Menu/index';\n\nexport const MenuContext: Context<MenuContextValue> = createContext<MenuContextValue>({\n open: false,\n setOpen: () => false,\n checkedValues: {},\n onCheckedValueChange: () => null,\n defaultCheckedValues: {},\n isSubmenu: false,\n triggerRef: ({ current: null } as unknown) as React.MutableRefObject<HTMLElement>,\n menuPopoverRef: ({ current: null } as unknown) as React.MutableRefObject<HTMLElement>,\n triggerId: '',\n openOnContext: false,\n openOnHover: false,\n hasIcons: false,\n hasCheckmarks: false,\n});\n\n/**\n * Context shared between Menu and its children components\n *\n * Extends and drills down MenuList props to simplify API\n */\nexport type MenuContextValue = MenuListProps &\n Pick<\n MenuState,\n | 'openOnHover'\n | 'openOnContext'\n | 'triggerRef'\n | 'menuPopoverRef'\n | 'setOpen'\n | 'isSubmenu'\n | 'triggerId'\n | 'hasIcons'\n | 'hasCheckmarks'\n | 'persistOnItemClick'\n | 'inline'\n > & {\n open: boolean;\n triggerId: string;\n };\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext_unstable = <T>(selector: ContextSelector<MenuContextValue, T>) =>\n useContextSelector(MenuContext, selector);\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["contexts/menuContext.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,WAAA,gBAAyC,wBAAA,CAAA,aAAA,CAAgC;EACpF,IAAI,EAAE,KAD8E;EAEpF,OAAO,EAAE,MAAM,KAFqE;EAGpF,aAAa,EAAE,EAHqE;EAIpF,oBAAoB,EAAE,MAAM,IAJwD;EAKpF,oBAAoB,EAAE,EAL8D;EAMpF,SAAS,EAAE,KANyE;EAOpF,UAAU,EAAG;IAAE,OAAO,EAAE;EAAX,CAPuE;EAQpF,cAAc,EAAG;IAAE,OAAO,EAAE;EAAX,CARmE;EASpF,SAAS,EAAE,EATyE;EAUpF,aAAa,EAAE,KAVqE;EAWpF,WAAW,EAAE,KAXuE;EAYpF,QAAQ,EAAE,KAZ0E;EAapF,aAAa,EAAE;AAbqE,CAAhC,CAAzC;AAwCA,OAAA,CAAA,YAAA,GAAe,OAAA,CAAA,WAAA,CAAY,QAA3B;;AAEN,MAAM,uBAAuB,GAAO,QAAJ,IACrC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,WAAnB,EAAgC,QAAhC,CADK;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","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 { MenuListProps } from '../components/index';\nimport type { MenuState } from '../components/Menu/index';\n\nexport const MenuContext: Context<MenuContextValue> = createContext<MenuContextValue>({\n open: false,\n setOpen: () => false,\n checkedValues: {},\n onCheckedValueChange: () => null,\n defaultCheckedValues: {},\n isSubmenu: false,\n triggerRef: ({ current: null } as unknown) as React.MutableRefObject<HTMLElement>,\n menuPopoverRef: ({ current: null } as unknown) as React.MutableRefObject<HTMLElement>,\n triggerId: '',\n openOnContext: false,\n openOnHover: false,\n hasIcons: false,\n hasCheckmarks: false,\n});\n\n/**\n * Context shared between Menu and its children components\n *\n * Extends and drills down MenuList props to simplify API\n */\nexport type MenuContextValue = MenuListProps &\n Pick<\n MenuState,\n | 'openOnHover'\n | 'openOnContext'\n | 'triggerRef'\n | 'menuPopoverRef'\n | 'setOpen'\n | 'isSubmenu'\n | 'triggerId'\n | 'hasIcons'\n | 'hasCheckmarks'\n | 'persistOnItemClick'\n | 'inline'\n > & {\n open: boolean;\n triggerId: string;\n };\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext_unstable = <T>(selector: ContextSelector<MenuContextValue, T>) =>\n useContextSelector(MenuContext, selector);\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;AAAE,EAAA,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaa,OAAA,CAAA,wBAAA,GAA2B,gBAAgB,CAAC,QAA5C;;AACN,MAAM,4BAA4B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,gBAAjB,CAA3C;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import * as React from 'react';\n\nconst MenuGroupContext = React.createContext<MenuGroupContextValue>({ headerId: '' });\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);\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["contexts/menuGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAM,gBAAgB,gBAAG,KAAK,CAAC,aAAN,CAA2C;EAAE,QAAQ,EAAE;AAAZ,CAA3C,CAAzB;AAaa,OAAA,CAAA,wBAAA,GAA2B,gBAAgB,CAAC,QAA5C;;AACN,MAAM,4BAA4B,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,gBAAjB,CAA3C;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import * as React from 'react';\n\nconst MenuGroupContext = React.createContext<MenuGroupContextValue>({ headerId: '' });\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);\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["contexts/menuListContext.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,eAAA,gBAAiD,wBAAA,CAAA,aAAA,CAAoC;AAChG,EAAA,aAAa,EAAE,EADiF;AAEhG,EAAA,oBAAoB,EAAE,MAAM,IAFoE;AAGhG,EAAA,wBAAwB,EAAE,MAAM,IAHgE;AAIhG,EAAA,cAAc,EAAE,MAAM,IAJ0E;AAKhG,EAAA,WAAW,EAAE,MAAM,IAL6E;AAMhG,EAAA,QAAQ,EAAE,KANsF;AAOhG,EAAA,aAAa,EAAE;AAPiF,CAApC,CAAjD;AAsBA,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,eAAA,CAAgB,QAAnC;;AAEN,MAAM,2BAA2B,GAAQ,QAAL,IACzC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,eAAnB,EAAoC,QAApC,CADK;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","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 { MenuListProps } from '../components/index';\n\nexport const MenuListContext: Context<MenuListContextValue> = createContext<MenuListContextValue>({\n checkedValues: {},\n onCheckedValueChange: () => null,\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<\n MenuListProps,\n 'checkedValues' | 'onCheckedValueChange' | 'hasIcons' | 'hasCheckmarks'\n> & {\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n toggleCheckbox?: SelectableHandler;\n selectRadio?: SelectableHandler;\n};\n\nexport const MenuListProvider = MenuListContext.Provider;\n\nexport const useMenuListContext_unstable = <T,>(selector: ContextSelector<MenuListContextValue, T>) =>\n useContextSelector(MenuListContext, selector);\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["contexts/menuListContext.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAKa,OAAA,CAAA,eAAA,gBAAiD,wBAAA,CAAA,aAAA,CAAoC;EAChG,aAAa,EAAE,EADiF;EAEhG,oBAAoB,EAAE,MAAM,IAFoE;EAGhG,wBAAwB,EAAE,MAAM,IAHgE;EAIhG,cAAc,EAAE,MAAM,IAJ0E;EAKhG,WAAW,EAAE,MAAM,IAL6E;EAMhG,QAAQ,EAAE,KANsF;EAOhG,aAAa,EAAE;AAPiF,CAApC,CAAjD;AAsBA,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,eAAA,CAAgB,QAAnC;;AAEN,MAAM,2BAA2B,GAAQ,QAAL,IACzC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,eAAnB,EAAoC,QAApC,CADK;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","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 { MenuListProps } from '../components/index';\n\nexport const MenuListContext: Context<MenuListContextValue> = createContext<MenuListContextValue>({\n checkedValues: {},\n onCheckedValueChange: () => null,\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<\n MenuListProps,\n 'checkedValues' | 'onCheckedValueChange' | 'hasIcons' | 'hasCheckmarks'\n> & {\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n toggleCheckbox?: SelectableHandler;\n selectRadio?: SelectableHandler;\n};\n\nexport const MenuListProvider = MenuListContext.Provider;\n\nexport const useMenuListContext_unstable = <T,>(selector: ContextSelector<MenuListContextValue, T>) =>\n useContextSelector(MenuListContext, selector);\n"],"sourceRoot":"../src/"}
@@ -3,17 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuItemRadioStyles_unstable = exports.renderMenuItemRadio_unstable = exports.menuItemRadioClassNames = exports.menuItemRadioClassName = exports.MenuItemRadio = exports.useMenuItemCheckbox_unstable = exports.useMenuItemCheckboxStyles_unstable = exports.renderMenuItemCheckbox_unstable = exports.menuItemCheckboxClassNames = exports.menuItemCheckboxClassName = exports.MenuItemCheckbox = exports.useMenuItem_unstable = exports.useMenuItemStyles_unstable = exports.renderMenuItem_unstable = exports.menuItemClassNames = exports.menuItemClassName = exports.MenuItem = exports.useMenuGroupHeader_unstable = exports.useMenuGroupHeaderStyles_unstable = exports.renderMenuGroupHeader_unstable = exports.menuGroupHeaderClassNames = exports.menuGroupHeaderClassName = exports.MenuGroupHeader = exports.useMenuGroup_unstable = exports.useMenuGroupStyles_unstable = exports.useMenuGroupContextValues_unstable = exports.renderMenuGroup_unstable = exports.menuGroupClassNames = exports.menuGroupClassName = exports.MenuGroup = exports.useMenuDivider_unstable = exports.useMenuDividerStyles_unstable = exports.renderMenuDivider_unstable = exports.menuDividerClassNames = exports.menuDividerClassName = exports.MenuDivider = exports.useMenu_unstable = exports.useMenuContextValues_unstable = exports.renderMenu_unstable = exports.Menu = exports.useMenuListContext_unstable = exports.MenuListProvider = exports.MenuListContext = exports.useMenuGroupContext_unstable = exports.MenuGroupContextProvider = exports.useMenuTriggerContext_unstable = exports.MenuTriggerContextProvider = exports.useMenuContext_unstable = exports.MenuProvider = exports.MenuContext = void 0;
7
- exports.useCheckmarkStyles_unstable = exports.useMenuTrigger_unstable = exports.renderMenuTrigger_unstable = exports.MenuTrigger = exports.useMenuSplitGroup_unstable = exports.useMenuSplitGroupStyles_unstable = exports.renderMenuSplitGroup_unstable = exports.menuSplitGroupClassNames = exports.menuSplitGroupClassName = exports.MenuSplitGroup = exports.useMenuPopover_unstable = exports.useMenuPopoverStyles_unstable = exports.renderMenuPopover_unstable = exports.menuPopoverClassNames = exports.menuPopoverClassName = exports.MenuPopover = exports.useMenuList_unstable = exports.useMenuListStyles_unstable = exports.useMenuListContextValues_unstable = exports.renderMenuList_unstable = exports.menuListClassNames = exports.menuListClassName = exports.MenuList = exports.useMenuItemRadio_unstable = void 0;
6
+ 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;
7
+ 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 = void 0;
8
8
 
9
9
  var menuContext_1 = /*#__PURE__*/require("./contexts/menuContext");
10
10
 
11
- Object.defineProperty(exports, "MenuContext", {
12
- enumerable: true,
13
- get: function () {
14
- return menuContext_1.MenuContext;
15
- }
16
- });
17
11
  Object.defineProperty(exports, "MenuProvider", {
18
12
  enumerable: true,
19
13
  get: function () {
@@ -59,12 +53,6 @@ Object.defineProperty(exports, "useMenuGroupContext_unstable", {
59
53
 
60
54
  var menuListContext_1 = /*#__PURE__*/require("./contexts/menuListContext");
61
55
 
62
- Object.defineProperty(exports, "MenuListContext", {
63
- enumerable: true,
64
- get: function () {
65
- return menuListContext_1.MenuListContext;
66
- }
67
- });
68
56
  Object.defineProperty(exports, "MenuListProvider", {
69
57
  enumerable: true,
70
58
  get: function () {
@@ -112,13 +100,6 @@ Object.defineProperty(exports, "MenuDivider", {
112
100
  get: function () {
113
101
  return MenuDivider_1.MenuDivider;
114
102
  }
115
- }); // eslint-disable-next-line deprecation/deprecation
116
-
117
- Object.defineProperty(exports, "menuDividerClassName", {
118
- enumerable: true,
119
- get: function () {
120
- return MenuDivider_1.menuDividerClassName;
121
- }
122
103
  });
123
104
  Object.defineProperty(exports, "menuDividerClassNames", {
124
105
  enumerable: true,
@@ -152,13 +133,6 @@ Object.defineProperty(exports, "MenuGroup", {
152
133
  get: function () {
153
134
  return MenuGroup_1.MenuGroup;
154
135
  }
155
- }); // eslint-disable-next-line deprecation/deprecation
156
-
157
- Object.defineProperty(exports, "menuGroupClassName", {
158
- enumerable: true,
159
- get: function () {
160
- return MenuGroup_1.menuGroupClassName;
161
- }
162
136
  });
163
137
  Object.defineProperty(exports, "menuGroupClassNames", {
164
138
  enumerable: true,
@@ -198,13 +172,6 @@ Object.defineProperty(exports, "MenuGroupHeader", {
198
172
  get: function () {
199
173
  return MenuGroupHeader_1.MenuGroupHeader;
200
174
  }
201
- }); // eslint-disable-next-line deprecation/deprecation
202
-
203
- Object.defineProperty(exports, "menuGroupHeaderClassName", {
204
- enumerable: true,
205
- get: function () {
206
- return MenuGroupHeader_1.menuGroupHeaderClassName;
207
- }
208
175
  });
209
176
  Object.defineProperty(exports, "menuGroupHeaderClassNames", {
210
177
  enumerable: true,
@@ -238,13 +205,6 @@ Object.defineProperty(exports, "MenuItem", {
238
205
  get: function () {
239
206
  return MenuItem_1.MenuItem;
240
207
  }
241
- }); // eslint-disable-next-line deprecation/deprecation
242
-
243
- Object.defineProperty(exports, "menuItemClassName", {
244
- enumerable: true,
245
- get: function () {
246
- return MenuItem_1.menuItemClassName;
247
- }
248
208
  });
249
209
  Object.defineProperty(exports, "menuItemClassNames", {
250
210
  enumerable: true,
@@ -278,13 +238,6 @@ Object.defineProperty(exports, "MenuItemCheckbox", {
278
238
  get: function () {
279
239
  return MenuItemCheckbox_1.MenuItemCheckbox;
280
240
  }
281
- }); // eslint-disable-next-line deprecation/deprecation
282
-
283
- Object.defineProperty(exports, "menuItemCheckboxClassName", {
284
- enumerable: true,
285
- get: function () {
286
- return MenuItemCheckbox_1.menuItemCheckboxClassName;
287
- }
288
241
  });
289
242
  Object.defineProperty(exports, "menuItemCheckboxClassNames", {
290
243
  enumerable: true,
@@ -318,13 +271,6 @@ Object.defineProperty(exports, "MenuItemRadio", {
318
271
  get: function () {
319
272
  return MenuItemRadio_1.MenuItemRadio;
320
273
  }
321
- }); // eslint-disable-next-line deprecation/deprecation
322
-
323
- Object.defineProperty(exports, "menuItemRadioClassName", {
324
- enumerable: true,
325
- get: function () {
326
- return MenuItemRadio_1.menuItemRadioClassName;
327
- }
328
274
  });
329
275
  Object.defineProperty(exports, "menuItemRadioClassNames", {
330
276
  enumerable: true,
@@ -358,13 +304,6 @@ Object.defineProperty(exports, "MenuList", {
358
304
  get: function () {
359
305
  return MenuList_1.MenuList;
360
306
  }
361
- }); // eslint-disable-next-line deprecation/deprecation
362
-
363
- Object.defineProperty(exports, "menuListClassName", {
364
- enumerable: true,
365
- get: function () {
366
- return MenuList_1.menuListClassName;
367
- }
368
307
  });
369
308
  Object.defineProperty(exports, "menuListClassNames", {
370
309
  enumerable: true,
@@ -404,13 +343,6 @@ Object.defineProperty(exports, "MenuPopover", {
404
343
  get: function () {
405
344
  return MenuPopover_1.MenuPopover;
406
345
  }
407
- }); // eslint-disable-next-line deprecation/deprecation
408
-
409
- Object.defineProperty(exports, "menuPopoverClassName", {
410
- enumerable: true,
411
- get: function () {
412
- return MenuPopover_1.menuPopoverClassName;
413
- }
414
346
  });
415
347
  Object.defineProperty(exports, "menuPopoverClassNames", {
416
348
  enumerable: true,
@@ -444,13 +376,6 @@ Object.defineProperty(exports, "MenuSplitGroup", {
444
376
  get: function () {
445
377
  return MenuSplitGroup_1.MenuSplitGroup;
446
378
  }
447
- }); // eslint-disable-next-line deprecation/deprecation
448
-
449
- Object.defineProperty(exports, "menuSplitGroupClassName", {
450
- enumerable: true,
451
- get: function () {
452
- return MenuSplitGroup_1.menuSplitGroupClassName;
453
- }
454
379
  });
455
380
  Object.defineProperty(exports, "menuSplitGroupClassNames", {
456
381
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,IAAA,aAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,WAAA;AAAW;AAAX,CAAA;AAAa,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,cAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,YAAA;AAAY;AAAZ,CAAA;AAAc,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,uBAAA;AAAuB;AAAvB,CAAA;;AAEpC,IAAA,oBAAA,gBAAA,OAAA,CAAA,+BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,oBAAA,CAAA,0BAAA;AAA0B;AAA1B,CAAA;AAA4B,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gCAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,oBAAA,CAAA,8BAAA;AAA8B;AAA9B,CAAA;;AACrC,IAAA,kBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,0BAAA,EAAA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AAA,EAAA,kCAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,gBAAA,CAAA,gCAAA;AAAgC;AAAhC,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,gBAAA,CAAA,0BAAA;AAA0B;AAA1B,CAAA;;AAGF,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,WAAA;AAAW;AAAX,CAAA;AAAa,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,0BAAA;AAA0B;AAA1B,CAAA;AAA4B,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,uBAAA;AAAuB;AAAvB,CAAA;;AAGlD,IAAA,OAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,6BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,OAAA,CAAA,2BAAA;AAA2B;AAA3B,CAAA","sourcesContent":["export { MenuContext, 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 { MenuListContext, 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 { MenuContextValues, MenuOpenChangeData, MenuOpenEvents, MenuProps, MenuSlots, MenuState } from './Menu';\nexport {\n MenuDivider,\n // eslint-disable-next-line deprecation/deprecation\n menuDividerClassName,\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 // eslint-disable-next-line deprecation/deprecation\n menuGroupClassName,\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 // eslint-disable-next-line deprecation/deprecation\n menuGroupHeaderClassName,\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 // eslint-disable-next-line deprecation/deprecation\n menuItemClassName,\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 // eslint-disable-next-line deprecation/deprecation\n menuItemCheckboxClassName,\n menuItemCheckboxClassNames,\n renderMenuItemCheckbox_unstable,\n useMenuItemCheckboxStyles_unstable,\n useMenuItemCheckbox_unstable,\n} from './MenuItemCheckbox';\nexport type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox';\nexport {\n MenuItemRadio,\n // eslint-disable-next-line deprecation/deprecation\n menuItemRadioClassName,\n menuItemRadioClassNames,\n renderMenuItemRadio_unstable,\n useMenuItemRadioStyles_unstable,\n useMenuItemRadio_unstable,\n} from './MenuItemRadio';\nexport type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio';\nexport {\n MenuList,\n // eslint-disable-next-line deprecation/deprecation\n menuListClassName,\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,\n} from './MenuList';\nexport {\n MenuPopover,\n // eslint-disable-next-line deprecation/deprecation\n menuPopoverClassName,\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 // eslint-disable-next-line deprecation/deprecation\n menuSplitGroupClassName,\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"],"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AA,CAAA,0BAAA;EAA0B;AAA1B,CAAA;;AAGF,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,aAAA,CAAA,WAAA;EAAW;AAAX,CAAA;AAAa,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,aAAA,CAAA,0BAAA;EAA0B;AAA1B,CAAA;AAA4B,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,aAAA,CAAA,uBAAA;EAAuB;AAAvB,CAAA;;AAGlD,IAAA,OAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,6BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,2BAAA;EAA2B;AAA3B,CAAA","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 { MenuContextValues, MenuOpenChangeData, MenuOpenEvents, MenuProps, MenuSlots, MenuState } 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,\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"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIA,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;;;AAIG;;;AACI,MAAM,2BAA2B,GAAI,KAAD,IAAsE;AAC/G,QAAM,MAAM,GAAG,SAAS,EAAxB;;AACA,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,OAAA,CAAA,YAAA,CAC1B,MAAM,CAAC,IADmB,EAE1B,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,WAFE,EAG1B,KAAK,CAAC,SAAN,CAAgB,SAHU,CAA5B;AAKD;AACF,CATM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["selectable/useCheckmarkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIA,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAWA;;;;AAIG;;;AACI,MAAM,2BAA2B,GAAI,KAAD,IAAsE;EAC/G,MAAM,MAAM,GAAG,SAAS,EAAxB;;EACA,IAAI,KAAK,CAAC,SAAV,EAAqB;IACnB,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,OAAA,CAAA,YAAA,CAC1B,MAAM,CAAC,IADmB,EAE1B,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,WAFE,EAG1B,KAAK,CAAC,SAAN,CAAgB,SAHU,CAA5B;EAKD;AACF,CATM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","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"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;AAOG;;;AACH,SAAgB,YAAhB,GAA4B;AAC1B,QAAM,gBAAgB,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO,CAAC,SAA3C,CAAzB;AACA,QAAM,kBAAkB,GAAG,wBAAA,CAAA,mBAAA,CAAoB,iBAAA,CAAA,eAApB,CAA3B;AAEA,SAAO,gBAAgB,IAAI,kBAA3B;AACD;;AALD,OAAA,CAAA,YAAA,GAAA,YAAA","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["utils/useIsSubmenu.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;AAOG;;;AACH,SAAgB,YAAhB,GAA4B;EAC1B,MAAM,gBAAgB,GAAG,aAAA,CAAA,uBAAA,CAAwB,OAAO,IAAI,OAAO,CAAC,SAA3C,CAAzB;EACA,MAAM,kBAAkB,GAAG,wBAAA,CAAA,mBAAA,CAAoB,iBAAA,CAAA,eAApB,CAA3B;EAEA,OAAO,gBAAgB,IAAI,kBAA3B;AACD;;AALD,OAAA,CAAA,YAAA,GAAA,YAAA","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"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/useOnMenuEnter.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,gBAAA,GAAmB,cAAnB;AAEb;;;;;;;;;;AAUG;;AACI,MAAM,mBAAmB,GAAI,OAAD,IAA8C;AAC/E,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,OAAlB;AAA2B,IAAA;AAA3B,MAAwC,OAA9C,CAD+E,CAG/E;;AACA,QAAM,QAAQ,GAAG,iBAAA,CAAA,gBA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{ 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 CustomE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B,EAA8C,QAA9C;IACD,CAFD;EAGD,CArBD,EAqBG,CAAC,QAAD,EAAW,OAAX,EAAoB,QAApB,CArBH;AAsBD,CAvCM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB;AAyCb;;;;AAIG;;AACI,MAAM,sBAAsB,GAAG,CAAC,EAAD,EAAkB,WAAlB,KAA6C;EACjF,EAAE,CAAC,aAAH,CAAiB,IAAI,WAAJ,CAAgB,OAAA,CAAA,gBAAhB,EAAkC;IAAE,OAAO,EAAE,IAAX;IAAiB,MAAM,EAAE;MAAE;IAAF;EAAzB,CAAlC,CAAjB;AACD,CAFM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","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"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-menu",
3
- "version": "9.0.0-rc.9",
3
+ "version": "9.0.2",
4
4
  "description": "Fluent UI menu component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -18,7 +18,8 @@
18
18
  "bundle-size": "bundle-size measure",
19
19
  "clean": "just-scripts clean",
20
20
  "code-style": "just-scripts code-style",
21
- "e2e": "e2e",
21
+ "e2e": "yarn cypress run --component",
22
+ "e2e:local": "yarn cypress open --component",
22
23
  "just": "just-scripts",
23
24
  "lint": "just-scripts lint",
24
25
  "start": "yarn storybook",
@@ -29,33 +30,32 @@
29
30
  "devDependencies": {
30
31
  "@fluentui/eslint-plugin": "*",
31
32
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.5",
33
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.11",
33
34
  "@fluentui/scripts": "^1.0.0"
34
35
  },
35
36
  "dependencies": {
36
- "@fluentui/keyboard-keys": "9.0.0-rc.6",
37
- "@fluentui/react-context-selector": "9.0.0-rc.8",
38
- "@fluentui/react-icons": "^2.0.166-rc.3",
39
- "@griffel/react": "1.0.3",
40
- "@fluentui/react-portal": "9.0.0-rc.9",
41
- "@fluentui/react-positioning": "9.0.0-rc.8",
42
- "@fluentui/react-shared-contexts": "9.0.0-rc.7",
43
- "@fluentui/react-tabster": "9.0.0-rc.9",
44
- "@fluentui/react-theme": "9.0.0-rc.7",
45
- "@fluentui/react-utilities": "9.0.0-rc.8",
37
+ "@fluentui/keyboard-keys": "^9.0.0",
38
+ "@fluentui/react-context-selector": "^9.0.1",
39
+ "@fluentui/react-icons": "^2.0.175",
40
+ "@fluentui/react-portal": "^9.0.2",
41
+ "@fluentui/react-positioning": "^9.1.0",
42
+ "@fluentui/react-shared-contexts": "^9.0.0",
43
+ "@fluentui/react-tabster": "^9.0.2",
44
+ "@fluentui/react-theme": "^9.0.0",
45
+ "@fluentui/react-utilities": "^9.0.1-0",
46
+ "@griffel/react": "^1.2.0",
46
47
  "tslib": "^2.1.0"
47
48
  },
48
49
  "peerDependencies": {
49
50
  "@types/react": ">=16.8.0 <18.0.0",
50
51
  "@types/react-dom": ">=16.8.0 <18.0.0",
51
52
  "react": ">=16.8.0 <18.0.0",
52
- "react-dom": ">=16.8.0 <18.0.0"
53
+ "react-dom": ">=16.8.0 <18.0.0",
54
+ "scheduler": "^0.19.0 || ^0.20.0"
53
55
  },
54
56
  "beachball": {
55
57
  "disallowedChangeTypes": [
56
- "major",
57
- "minor",
58
- "patch"
58
+ "major"
59
59
  ]
60
60
  },
61
61
  "exports": {