@fluentui-react-native/menu 1.4.28 → 1.4.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/CHANGELOG.json +64 -1
  2. package/CHANGELOG.md +18 -2
  3. package/lib/Menu/Menu.d.ts +4 -0
  4. package/lib/Menu/Menu.d.ts.map +1 -0
  5. package/lib/Menu/Menu.js +35 -0
  6. package/lib/Menu/Menu.js.map +1 -0
  7. package/lib/Menu/Menu.types.d.ts +40 -0
  8. package/lib/Menu/Menu.types.d.ts.map +1 -0
  9. package/lib/Menu/Menu.types.js +2 -0
  10. package/lib/Menu/Menu.types.js.map +1 -0
  11. package/lib/Menu/index.d.ts +6 -0
  12. package/lib/Menu/index.d.ts.map +1 -0
  13. package/lib/Menu/index.js +5 -0
  14. package/lib/Menu/index.js.map +1 -0
  15. package/lib/Menu/useMenu.d.ts +3 -0
  16. package/lib/Menu/useMenu.d.ts.map +1 -0
  17. package/lib/Menu/useMenu.js +76 -0
  18. package/lib/Menu/useMenu.js.map +1 -0
  19. package/lib/Menu/useMenuContextValue.d.ts +4 -0
  20. package/lib/Menu/useMenuContextValue.d.ts.map +1 -0
  21. package/lib/Menu/useMenuContextValue.js +8 -0
  22. package/lib/Menu/useMenuContextValue.js.map +1 -0
  23. package/lib/MenuDivider/MenuDivider.d.ts +2 -0
  24. package/lib/MenuDivider/MenuDivider.d.ts.map +1 -0
  25. package/lib/MenuDivider/MenuDivider.js +15 -0
  26. package/lib/MenuDivider/MenuDivider.js.map +1 -0
  27. package/lib/MenuDivider/MenuDivider.styling.d.ts +4 -0
  28. package/lib/MenuDivider/MenuDivider.styling.d.ts.map +1 -0
  29. package/lib/MenuDivider/MenuDivider.styling.js +19 -0
  30. package/lib/MenuDivider/MenuDivider.styling.js.map +1 -0
  31. package/lib/MenuDivider/MenuDivider.types.d.ts +21 -0
  32. package/lib/MenuDivider/MenuDivider.types.d.ts.map +1 -0
  33. package/lib/MenuDivider/MenuDivider.types.js +2 -0
  34. package/lib/MenuDivider/MenuDivider.types.js.map +1 -0
  35. package/lib/MenuDivider/MenuDividerTokens.d.ts +5 -0
  36. package/lib/MenuDivider/MenuDividerTokens.d.ts.map +1 -0
  37. package/lib/MenuDivider/MenuDividerTokens.js +7 -0
  38. package/lib/MenuDivider/MenuDividerTokens.js.map +1 -0
  39. package/lib/MenuDivider/MenuDividerTokens.macos.d.ts +5 -0
  40. package/lib/MenuDivider/MenuDividerTokens.macos.d.ts.map +1 -0
  41. package/lib/MenuDivider/MenuDividerTokens.macos.js +7 -0
  42. package/lib/MenuDivider/MenuDividerTokens.macos.js.map +1 -0
  43. package/lib/MenuDivider/MenuDividerTokens.win32.d.ts +5 -0
  44. package/lib/MenuDivider/MenuDividerTokens.win32.d.ts.map +1 -0
  45. package/lib/MenuDivider/MenuDividerTokens.win32.js +7 -0
  46. package/lib/MenuDivider/MenuDividerTokens.win32.js.map +1 -0
  47. package/lib/MenuDivider/index.d.ts +4 -0
  48. package/lib/MenuDivider/index.d.ts.map +1 -0
  49. package/lib/MenuDivider/index.js +3 -0
  50. package/lib/MenuDivider/index.js.map +1 -0
  51. package/lib/MenuItem/MenuItem.d.ts +7 -0
  52. package/lib/MenuItem/MenuItem.d.ts.map +1 -0
  53. package/lib/MenuItem/MenuItem.js +58 -0
  54. package/lib/MenuItem/MenuItem.js.map +1 -0
  55. package/lib/MenuItem/MenuItem.styling.d.ts +5 -0
  56. package/lib/MenuItem/MenuItem.styling.d.ts.map +1 -0
  57. package/lib/MenuItem/MenuItem.styling.js +50 -0
  58. package/lib/MenuItem/MenuItem.styling.js.map +1 -0
  59. package/lib/MenuItem/MenuItem.types.d.ts +86 -0
  60. package/lib/MenuItem/MenuItem.types.d.ts.map +1 -0
  61. package/lib/MenuItem/MenuItem.types.js +2 -0
  62. package/lib/MenuItem/MenuItem.types.js.map +1 -0
  63. package/lib/MenuItem/MenuItemTokens.d.ts +5 -0
  64. package/lib/MenuItem/MenuItemTokens.d.ts.map +1 -0
  65. package/lib/MenuItem/MenuItemTokens.js +39 -0
  66. package/lib/MenuItem/MenuItemTokens.js.map +1 -0
  67. package/lib/MenuItem/MenuItemTokens.macos.d.ts +5 -0
  68. package/lib/MenuItem/MenuItemTokens.macos.d.ts.map +1 -0
  69. package/lib/MenuItem/MenuItemTokens.macos.js +34 -0
  70. package/lib/MenuItem/MenuItemTokens.macos.js.map +1 -0
  71. package/lib/MenuItem/MenuItemTokens.win32.d.ts +5 -0
  72. package/lib/MenuItem/MenuItemTokens.win32.d.ts.map +1 -0
  73. package/lib/MenuItem/MenuItemTokens.win32.js +40 -0
  74. package/lib/MenuItem/MenuItemTokens.win32.js.map +1 -0
  75. package/lib/MenuItem/index.d.ts +5 -0
  76. package/lib/MenuItem/index.d.ts.map +1 -0
  77. package/lib/MenuItem/index.js +4 -0
  78. package/lib/MenuItem/index.js.map +1 -0
  79. package/lib/MenuItem/useMenuItem.d.ts +7 -0
  80. package/lib/MenuItem/useMenuItem.d.ts.map +1 -0
  81. package/lib/MenuItem/useMenuItem.js +74 -0
  82. package/lib/MenuItem/useMenuItem.js.map +1 -0
  83. package/lib/MenuItemCheckbox/MenuItemCheckbox.d.ts +7 -0
  84. package/lib/MenuItemCheckbox/MenuItemCheckbox.d.ts.map +1 -0
  85. package/lib/MenuItemCheckbox/MenuItemCheckbox.js +37 -0
  86. package/lib/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -0
  87. package/lib/MenuItemCheckbox/MenuItemCheckbox.styling.d.ts +5 -0
  88. package/lib/MenuItemCheckbox/MenuItemCheckbox.styling.d.ts.map +1 -0
  89. package/lib/MenuItemCheckbox/MenuItemCheckbox.styling.js +40 -0
  90. package/lib/MenuItemCheckbox/MenuItemCheckbox.styling.js.map +1 -0
  91. package/lib/MenuItemCheckbox/MenuItemCheckbox.types.d.ts +60 -0
  92. package/lib/MenuItemCheckbox/MenuItemCheckbox.types.d.ts.map +1 -0
  93. package/lib/MenuItemCheckbox/MenuItemCheckbox.types.js +2 -0
  94. package/lib/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -0
  95. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.d.ts +5 -0
  96. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.d.ts.map +1 -0
  97. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.js +51 -0
  98. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.js.map +1 -0
  99. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.macos.d.ts +5 -0
  100. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.macos.d.ts.map +1 -0
  101. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.macos.js +49 -0
  102. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.macos.js.map +1 -0
  103. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.win32.d.ts +5 -0
  104. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.win32.d.ts.map +1 -0
  105. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.win32.js +52 -0
  106. package/lib/MenuItemCheckbox/MenuItemCheckboxTokens.win32.js.map +1 -0
  107. package/lib/MenuItemCheckbox/index.d.ts +5 -0
  108. package/lib/MenuItemCheckbox/index.d.ts.map +1 -0
  109. package/lib/MenuItemCheckbox/index.js +4 -0
  110. package/lib/MenuItemCheckbox/index.js.map +1 -0
  111. package/lib/MenuItemCheckbox/useMenuItemCheckbox.d.ts +13 -0
  112. package/lib/MenuItemCheckbox/useMenuItemCheckbox.d.ts.map +1 -0
  113. package/lib/MenuItemCheckbox/useMenuItemCheckbox.js +85 -0
  114. package/lib/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -0
  115. package/lib/MenuItemRadio/MenuItemRadio.d.ts +4 -0
  116. package/lib/MenuItemRadio/MenuItemRadio.d.ts.map +1 -0
  117. package/lib/MenuItemRadio/MenuItemRadio.js +12 -0
  118. package/lib/MenuItemRadio/MenuItemRadio.js.map +1 -0
  119. package/lib/MenuItemRadio/index.d.ts +3 -0
  120. package/lib/MenuItemRadio/index.d.ts.map +1 -0
  121. package/lib/MenuItemRadio/index.js +3 -0
  122. package/lib/MenuItemRadio/index.js.map +1 -0
  123. package/lib/MenuItemRadio/useMenuItemRadio.d.ts +3 -0
  124. package/lib/MenuItemRadio/useMenuItemRadio.d.ts.map +1 -0
  125. package/lib/MenuItemRadio/useMenuItemRadio.js +30 -0
  126. package/lib/MenuItemRadio/useMenuItemRadio.js.map +1 -0
  127. package/lib/MenuList/MenuList.d.ts +4 -0
  128. package/lib/MenuList/MenuList.d.ts.map +1 -0
  129. package/lib/MenuList/MenuList.js +68 -0
  130. package/lib/MenuList/MenuList.js.map +1 -0
  131. package/lib/MenuList/MenuList.styling.d.ts +5 -0
  132. package/lib/MenuList/MenuList.styling.d.ts.map +1 -0
  133. package/lib/MenuList/MenuList.styling.js +17 -0
  134. package/lib/MenuList/MenuList.styling.js.map +1 -0
  135. package/lib/MenuList/MenuList.types.d.ts +74 -0
  136. package/lib/MenuList/MenuList.types.d.ts.map +1 -0
  137. package/lib/MenuList/MenuList.types.js +2 -0
  138. package/lib/MenuList/MenuList.types.js.map +1 -0
  139. package/lib/MenuList/MenuListTokens.d.ts +5 -0
  140. package/lib/MenuList/MenuListTokens.d.ts.map +1 -0
  141. package/lib/MenuList/MenuListTokens.js +9 -0
  142. package/lib/MenuList/MenuListTokens.js.map +1 -0
  143. package/lib/MenuList/MenuListTokens.macos.d.ts +5 -0
  144. package/lib/MenuList/MenuListTokens.macos.d.ts.map +1 -0
  145. package/lib/MenuList/MenuListTokens.macos.js +7 -0
  146. package/lib/MenuList/MenuListTokens.macos.js.map +1 -0
  147. package/lib/MenuList/MenuListTokens.win32.d.ts +5 -0
  148. package/lib/MenuList/MenuListTokens.win32.d.ts.map +1 -0
  149. package/lib/MenuList/MenuListTokens.win32.js +12 -0
  150. package/lib/MenuList/MenuListTokens.win32.js.map +1 -0
  151. package/lib/MenuList/index.d.ts +6 -0
  152. package/lib/MenuList/index.d.ts.map +1 -0
  153. package/lib/MenuList/index.js +5 -0
  154. package/lib/MenuList/index.js.map +1 -0
  155. package/lib/MenuList/useMenuList.d.ts +3 -0
  156. package/lib/MenuList/useMenuList.d.ts.map +1 -0
  157. package/lib/MenuList/useMenuList.js +109 -0
  158. package/lib/MenuList/useMenuList.js.map +1 -0
  159. package/lib/MenuList/useMenuListContextValue.d.ts +4 -0
  160. package/lib/MenuList/useMenuListContextValue.d.ts.map +1 -0
  161. package/lib/MenuList/useMenuListContextValue.js +5 -0
  162. package/lib/MenuList/useMenuListContextValue.js.map +1 -0
  163. package/lib/MenuPopover/MenuPopover.d.ts +4 -0
  164. package/lib/MenuPopover/MenuPopover.d.ts.map +1 -0
  165. package/lib/MenuPopover/MenuPopover.js +44 -0
  166. package/lib/MenuPopover/MenuPopover.js.map +1 -0
  167. package/lib/MenuPopover/MenuPopover.types.d.ts +10 -0
  168. package/lib/MenuPopover/MenuPopover.types.d.ts.map +1 -0
  169. package/lib/MenuPopover/MenuPopover.types.js +2 -0
  170. package/lib/MenuPopover/MenuPopover.types.js.map +1 -0
  171. package/lib/MenuPopover/MenuPopoverTokens.d.ts +3 -0
  172. package/lib/MenuPopover/MenuPopoverTokens.d.ts.map +1 -0
  173. package/lib/MenuPopover/MenuPopoverTokens.js +4 -0
  174. package/lib/MenuPopover/MenuPopoverTokens.js.map +1 -0
  175. package/lib/MenuPopover/index.d.ts +5 -0
  176. package/lib/MenuPopover/index.d.ts.map +1 -0
  177. package/lib/MenuPopover/index.js +4 -0
  178. package/lib/MenuPopover/index.js.map +1 -0
  179. package/lib/MenuPopover/useMenuPopover.d.ts +3 -0
  180. package/lib/MenuPopover/useMenuPopover.d.ts.map +1 -0
  181. package/lib/MenuPopover/useMenuPopover.js +92 -0
  182. package/lib/MenuPopover/useMenuPopover.js.map +1 -0
  183. package/lib/MenuTrigger/MenuTrigger.d.ts +5 -0
  184. package/lib/MenuTrigger/MenuTrigger.d.ts.map +1 -0
  185. package/lib/MenuTrigger/MenuTrigger.js +20 -0
  186. package/lib/MenuTrigger/MenuTrigger.js.map +1 -0
  187. package/lib/MenuTrigger/MenuTrigger.types.d.ts +28 -0
  188. package/lib/MenuTrigger/MenuTrigger.types.d.ts.map +1 -0
  189. package/lib/MenuTrigger/MenuTrigger.types.js +2 -0
  190. package/lib/MenuTrigger/MenuTrigger.types.js.map +1 -0
  191. package/lib/MenuTrigger/index.d.ts +5 -0
  192. package/lib/MenuTrigger/index.d.ts.map +1 -0
  193. package/lib/MenuTrigger/index.js +4 -0
  194. package/lib/MenuTrigger/index.js.map +1 -0
  195. package/lib/MenuTrigger/useMenuTrigger.d.ts +3 -0
  196. package/lib/MenuTrigger/useMenuTrigger.d.ts.map +1 -0
  197. package/lib/MenuTrigger/useMenuTrigger.js +79 -0
  198. package/lib/MenuTrigger/useMenuTrigger.js.map +1 -0
  199. package/lib/MenuTrigger/useMergeRefs.d.ts +20 -0
  200. package/lib/MenuTrigger/useMergeRefs.d.ts.map +1 -0
  201. package/lib/MenuTrigger/useMergeRefs.js +36 -0
  202. package/lib/MenuTrigger/useMergeRefs.js.map +1 -0
  203. package/lib/__tests__/Menu.test.d.ts +2 -0
  204. package/lib/__tests__/Menu.test.d.ts.map +1 -0
  205. package/lib/__tests__/Menu.test.js +145 -0
  206. package/lib/__tests__/Menu.test.js.map +1 -0
  207. package/lib/consts.d.ts +2 -0
  208. package/lib/consts.d.ts.map +1 -0
  209. package/lib/consts.js +6 -0
  210. package/lib/consts.js.map +1 -0
  211. package/lib/context/index.d.ts +4 -0
  212. package/lib/context/index.d.ts.map +1 -0
  213. package/lib/context/index.js +4 -0
  214. package/lib/context/index.js.map +1 -0
  215. package/lib/context/menuContext.d.ts +16 -0
  216. package/lib/context/menuContext.d.ts.map +1 -0
  217. package/lib/context/menuContext.js +20 -0
  218. package/lib/context/menuContext.js.map +1 -0
  219. package/lib/context/menuListContext.d.ts +14 -0
  220. package/lib/context/menuListContext.d.ts.map +1 -0
  221. package/lib/context/menuListContext.js +15 -0
  222. package/lib/context/menuListContext.js.map +1 -0
  223. package/lib/context/menuTriggerContext.d.ts +9 -0
  224. package/lib/context/menuTriggerContext.d.ts.map +1 -0
  225. package/lib/context/menuTriggerContext.js +9 -0
  226. package/lib/context/menuTriggerContext.js.map +1 -0
  227. package/lib/index.d.ts +10 -0
  228. package/lib/index.d.ts.map +1 -0
  229. package/lib/index.js +10 -0
  230. package/lib/index.js.map +1 -0
  231. package/package.json +9 -9
package/CHANGELOG.json CHANGED
@@ -2,7 +2,70 @@
2
2
  "name": "@fluentui-react-native/menu",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 18 Mar 2023 17:18:20 GMT",
5
+ "date": "Tue, 21 Mar 2023 21:51:14 GMT",
6
+ "tag": "@fluentui-react-native/menu_v1.4.29",
7
+ "version": "1.4.29",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "krsiler@microsoft.com",
12
+ "package": "@fluentui-react-native/menu",
13
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6",
14
+ "comment": "Trigger manual bump (no changes)"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/menu",
19
+ "comment": "Bump @fluentui-react-native/callout to v0.23.10",
20
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui-react-native/menu",
25
+ "comment": "Bump @fluentui-react-native/focus-zone to v0.11.39",
26
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui-react-native/menu",
31
+ "comment": "Bump @fluentui-react-native/framework to v0.9.8",
32
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui-react-native/menu",
37
+ "comment": "Bump @fluentui-react-native/icon to v0.17.23",
38
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui-react-native/menu",
43
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.27",
44
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui-react-native/menu",
49
+ "comment": "Bump @fluentui-react-native/text to v0.19.29",
50
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui-react-native/menu",
55
+ "comment": "Bump @fluentui-react-native/tokens to v0.20.14",
56
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui-react-native/menu",
61
+ "comment": "Bump @fluentui-react-native/button to v0.32.47",
62
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
63
+ }
64
+ ]
65
+ }
66
+ },
67
+ {
68
+ "date": "Sat, 18 Mar 2023 17:22:31 GMT",
6
69
  "tag": "@fluentui-react-native/menu_v1.4.28",
7
70
  "version": "1.4.28",
8
71
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @fluentui-react-native/menu
2
2
 
3
- This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 21 Mar 2023 21:51:14 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.4.29
8
+
9
+ Tue, 21 Mar 2023 21:51:14 GMT
10
+
11
+ ### Patches
12
+
13
+ - Trigger manual bump (no changes) (krsiler@microsoft.com)
14
+ - Bump @fluentui-react-native/callout to v0.23.10
15
+ - Bump @fluentui-react-native/focus-zone to v0.11.39
16
+ - Bump @fluentui-react-native/framework to v0.9.8
17
+ - Bump @fluentui-react-native/icon to v0.17.23
18
+ - Bump @fluentui-react-native/interactive-hooks to v0.22.27
19
+ - Bump @fluentui-react-native/text to v0.19.29
20
+ - Bump @fluentui-react-native/tokens to v0.20.14
21
+ - Bump @fluentui-react-native/button to v0.32.47
22
+
7
23
  ## 1.4.28
8
24
 
9
- Sat, 18 Mar 2023 17:18:20 GMT
25
+ Sat, 18 Mar 2023 17:22:31 GMT
10
26
 
11
27
  ### Patches
12
28
 
@@ -0,0 +1,4 @@
1
+ import type { MenuProps } from './Menu.types';
2
+ export declare const Menu: import("@fluentui-react-native/framework").ComposableFunction<MenuProps>;
3
+ export default Menu;
4
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/Menu/Menu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAM9C,eAAO,MAAM,IAAI,0EA2Cf,CAAC;AAGH,eAAe,IAAI,CAAC"}
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { stagedComponent } from '@fluentui-react-native/framework';
3
+ import { menuName } from './Menu.types';
4
+ import { useMenu } from './useMenu';
5
+ import { useMenuContextValue } from './useMenuContextValue';
6
+ import { MenuProvider } from '../context/menuContext';
7
+ export var Menu = stagedComponent(function (props) {
8
+ var state = useMenu(props);
9
+ var contextValue = useMenuContextValue(state);
10
+ return function (_rest, children) {
11
+ var _a, _b;
12
+ var childrenArray = React.Children.toArray(children);
13
+ var accessibilityPositionInSet = state.accessibilityPositionInSet, accessibilitySetSize = state.accessibilitySetSize;
14
+ if (__DEV__) {
15
+ if (childrenArray.length !== 2) {
16
+ // eslint-disable-next-line no-console
17
+ console.warn('Menu must contain two children');
18
+ }
19
+ }
20
+ var menuTrigger = childrenArray[0];
21
+ var menuPopover = childrenArray[1];
22
+ var menuTriggerChild = menuTrigger.props.children;
23
+ var menuTriggerChildWithSet = React.cloneElement(menuTriggerChild, {
24
+ accessibilityPositionInSet: (_a = menuTriggerChild.props.accessibilityPositionInSet) !== null && _a !== void 0 ? _a : accessibilityPositionInSet,
25
+ accessibilitySetSize: (_b = menuTriggerChild.props.accessibilitySetSize) !== null && _b !== void 0 ? _b : accessibilitySetSize, //win32
26
+ });
27
+ var menuTriggerWithSet = React.cloneElement(menuTrigger, {}, menuTriggerChildWithSet);
28
+ return (React.createElement(MenuProvider, { value: contextValue },
29
+ menuTriggerWithSet,
30
+ state.open && state.shouldFocusOnContainer !== undefined && menuPopover));
31
+ };
32
+ });
33
+ Menu.displayName = menuName;
34
+ export default Menu;
35
+ //# sourceMappingURL=Menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../src/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGnE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,CAAC,IAAM,IAAI,GAAG,eAAe,CAAC,UAAC,KAAgB;IACnD,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAM,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAEhD,OAAO,UAAC,KAAgB,EAAE,QAAyB;;QACjD,IAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAyB,CAAC;QACvE,IAAA,0BAA0B,GAA2B,KAAK,2BAAhC,EAAE,oBAAoB,GAAK,KAAK,qBAAV,CAAW;QAEnE,IAAI,OAAO,EAAE;YACX,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC9B,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;aAChD;SACF;QAED,IAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,IAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QAErC,IAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC;QAEpD,IAAM,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAChD,gBAA0F,EAC1F;YACE,0BAA0B,EAAE,MAAA,gBAAgB,CAAC,KAAK,CAAC,0BAA0B,mCAAI,0BAA0B;YAC3G,oBAAoB,EAAE,MAAA,gBAAgB,CAAC,KAAK,CAAC,oBAAoB,mCAAI,oBAAoB,EAAE,OAAO;SAC5F,CACT,CAAC;QAEF,IAAM,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAC3C,WAAqF,EACrF,EAAS,EACT,uBAAuB,CACxB,CAAC;QAEF,OAAO,CACL,oBAAC,YAAY,IAAC,KAAK,EAAE,YAAY;YAC9B,kBAAkB;YAGlB,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,sBAAsB,KAAK,SAAS,IAAI,WAAW,CAC3D,CAChB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE5B,eAAe,IAAI,CAAC"}
@@ -0,0 +1,40 @@
1
+ /// <reference types="node" />
2
+ import type React from 'react';
3
+ import type { View } from 'react-native';
4
+ import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks';
5
+ import type { MenuListProps } from '../MenuList/MenuList.types';
6
+ export declare const menuName = "Menu";
7
+ export interface MenuProps extends MenuListProps {
8
+ /**
9
+ * Whether the popup is open on mount
10
+ */
11
+ defaultOpen?: boolean;
12
+ /**
13
+ * How much delay to have between hover in and showing the menu, in ms.
14
+ */
15
+ hoverDelay?: number;
16
+ /**
17
+ * Whether the popup is open
18
+ */
19
+ open?: boolean;
20
+ /**
21
+ * Call back when the component requests to change value
22
+ */
23
+ onOpenChange?: (e: InteractionEvent, isOpen: boolean) => void;
24
+ openOnHover?: boolean;
25
+ /**
26
+ * Do not dismiss the menu when a menu item is clicked
27
+ */
28
+ persistOnItemClick?: boolean;
29
+ }
30
+ export interface MenuState extends MenuProps {
31
+ isControlled: boolean;
32
+ isSubmenu: boolean;
33
+ parentPopoverHoverOutTimer?: NodeJS.Timeout;
34
+ setOpen: (e: InteractionEvent, isOpen: boolean, bubble?: boolean) => void;
35
+ shouldFocusOnContainer: boolean;
36
+ triggerRef: React.RefObject<View>;
37
+ hasMaxHeight?: boolean;
38
+ hasMaxWidth?: boolean;
39
+ }
40
+ //# sourceMappingURL=Menu.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../src/Menu/Menu.types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAK9D,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,0BAA0B,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1E,sBAAsB,EAAE,OAAO,CAAC;IAChC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export var menuName = 'Menu';
2
+ //# sourceMappingURL=Menu.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.types.js","sourceRoot":"","sources":["../../src/Menu/Menu.types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,QAAQ,GAAG,MAAM,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { Menu } from './Menu';
2
+ export { menuName } from './Menu.types';
3
+ export type { MenuProps, MenuState } from './Menu.types';
4
+ export { useMenu } from './useMenu';
5
+ export { useMenuContextValue } from './useMenuContextValue';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { Menu } from './Menu';
2
+ export { menuName } from './Menu.types';
3
+ export { useMenu } from './useMenu';
4
+ export { useMenuContextValue } from './useMenuContextValue';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { MenuProps, MenuState } from './Menu.types';
2
+ export declare const useMenu: (props: MenuProps) => MenuState;
3
+ //# sourceMappingURL=useMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMenu.d.ts","sourceRoot":"","sources":["../../src/Menu/useMenu.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzD,eAAO,MAAM,OAAO,UAAW,SAAS,KAAG,SAiC1C,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { __assign } from "tslib";
2
+ import React from 'react';
3
+ import { Platform } from 'react-native';
4
+ import { isMouseEvent } from '@fluentui-react-native/interactive-hooks';
5
+ import { useMenuContext } from '../context/menuContext';
6
+ // Due to how events get fired we get double notifications
7
+ // for the same event causing us to immediately reopen
8
+ // a menu when we close it. Adding in a delay to prevent
9
+ // this behavior.
10
+ var delayOpen = 150;
11
+ var lastCloseTimestamp = -1;
12
+ export var useMenu = function (props) {
13
+ var triggerRef = React.useRef();
14
+ var context = useMenuContext();
15
+ var isSubmenu = context.triggerRef !== null;
16
+ var isOpenControlled = typeof props.open !== 'undefined';
17
+ var _a = useMenuOpenState(isOpenControlled, props, context.setOpen), open = _a[0], shouldFocusOnContainer = _a[1], setOpen = _a[2];
18
+ var _b = useMenuCheckedState(props), checked = _b[0], onCheckedChange = _b[1];
19
+ // Default behavior for submenu is to open on hover
20
+ // the ...props line below will override this behavior for a submenu
21
+ // or apply openOnHover if passed into a root Menu.
22
+ var openOnHover = isSubmenu;
23
+ // We need to be able to cancel the timer that gets set on
24
+ // hover out of the parent popover if the parent popover
25
+ // is also set to open/close on hover out. Otherwise
26
+ // the parent menu will close when the timeout passes.
27
+ var parentPopoverHoverOutTimer = isSubmenu ? context.popoverHoverOutTimer : undefined;
28
+ return __assign(__assign({ openOnHover: openOnHover }, props), { open: open, setOpen: setOpen, shouldFocusOnContainer: shouldFocusOnContainer, checked: checked, onCheckedChange: onCheckedChange, triggerRef: triggerRef, isSubmenu: isSubmenu, isControlled: isOpenControlled, parentPopoverHoverOutTimer: parentPopoverHoverOutTimer });
29
+ };
30
+ var useMenuOpenState = function (isControlled, props, parentSetOpen) {
31
+ var defaultOpen = props.defaultOpen, onOpenChange = props.onOpenChange, open = props.open;
32
+ var initialState = typeof defaultOpen !== 'undefined' ? defaultOpen : !!open;
33
+ var _a = React.useState(initialState), openInternal = _a[0], setOpenInternal = _a[1];
34
+ var _b = React.useState(undefined), shouldFocusOnContainer = _b[0], setShouldFocusOnContainer = _b[1];
35
+ var state = isControlled ? open : openInternal;
36
+ var setOpen = React.useCallback(function (e, isOpen, bubble) {
37
+ var openPrev = state;
38
+ if (!isControlled && (!isOpen || lastCloseTimestamp + delayOpen <= Date.now())) {
39
+ setOpenInternal(isOpen);
40
+ }
41
+ if (isOpen) {
42
+ if (Platform.OS === 'win32' && isMouseEvent(e)) {
43
+ setShouldFocusOnContainer(true);
44
+ }
45
+ else {
46
+ setShouldFocusOnContainer(false);
47
+ }
48
+ }
49
+ if (!isOpen) {
50
+ setShouldFocusOnContainer(undefined);
51
+ lastCloseTimestamp = Date.now();
52
+ }
53
+ if (onOpenChange && openPrev !== isOpen) {
54
+ onOpenChange(e, isOpen);
55
+ }
56
+ if (bubble && parentSetOpen) {
57
+ parentSetOpen(e, isOpen, bubble);
58
+ }
59
+ }, [isControlled, state, onOpenChange, setOpenInternal, parentSetOpen]);
60
+ return [state, shouldFocusOnContainer, setOpen];
61
+ };
62
+ var useMenuCheckedState = function (props) {
63
+ var _a;
64
+ var checked = props.checked, defaultChecked = props.defaultChecked, onCheckedChangeOriginal = props.onCheckedChange;
65
+ var _b = React.useState((_a = defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : checked) !== null && _a !== void 0 ? _a : []), checkedInternal = _b[0], setCheckedInternal = _b[1];
66
+ var isControlled = typeof checked !== 'undefined';
67
+ var state = isControlled ? checked : checkedInternal;
68
+ var onCheckedChange = React.useCallback(function (e, checked) {
69
+ if (!isControlled) {
70
+ setCheckedInternal(checked);
71
+ }
72
+ onCheckedChangeOriginal === null || onCheckedChangeOriginal === void 0 ? void 0 : onCheckedChangeOriginal(e, checked);
73
+ }, [isControlled, setCheckedInternal, onCheckedChangeOriginal]);
74
+ return [state, onCheckedChange];
75
+ };
76
+ //# sourceMappingURL=useMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMenu.js","sourceRoot":"","sources":["../../src/Menu/useMenu.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import type { MenuState } from './Menu.types';
2
+ import type { MenuContextValue } from '../context/menuContext';
3
+ export declare const useMenuContextValue: (state: MenuState) => MenuContextValue;
4
+ //# sourceMappingURL=useMenuContextValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMenuContextValue.d.ts","sourceRoot":"","sources":["../../src/Menu/useMenuContextValue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,eAAO,MAAM,mBAAmB,UAAW,SAAS,KAAG,gBAItD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { __assign } from "tslib";
2
+ import React from 'react';
3
+ export var useMenuContextValue = function (state) {
4
+ var _a = React.useState(), triggerHoverOutTimer = _a[0], setTriggerHoverOutTimer = _a[1];
5
+ var _b = React.useState(), popoverHoverOutTimer = _b[0], setPopoverHoverOutTimer = _b[1];
6
+ return __assign(__assign({}, state), { popoverHoverOutTimer: popoverHoverOutTimer, triggerHoverOutTimer: triggerHoverOutTimer, setPopoverHoverOutTimer: setPopoverHoverOutTimer, setTriggerHoverOutTimer: setTriggerHoverOutTimer });
7
+ };
8
+ //# sourceMappingURL=useMenuContextValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMenuContextValue.js","sourceRoot":"","sources":["../../src/Menu/useMenuContextValue.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,KAAgB;IAC5C,IAAA,KAAkD,KAAK,CAAC,QAAQ,EAA8B,EAA7F,oBAAoB,QAAA,EAAE,uBAAuB,QAAgD,CAAC;IAC/F,IAAA,KAAkD,KAAK,CAAC,QAAQ,EAAkB,EAAjF,oBAAoB,QAAA,EAAE,uBAAuB,QAAoC,CAAC;IACzF,6BAAY,KAAK,KAAE,oBAAoB,sBAAA,EAAE,oBAAoB,sBAAA,EAAE,uBAAuB,yBAAA,EAAE,uBAAuB,yBAAA,IAAG;AACpH,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const MenuDivider: import("@fluentui-react-native/framework").ComposableComponent<import("@fluentui-react-native/adapters").IViewProps, import("./MenuDivider.types").MenuDividerSlotProps, import("./MenuDivider.types").MenuDividerTokens, object>;
2
+ //# sourceMappingURL=MenuDivider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDivider.d.ts","sourceRoot":"","sources":["../../src/MenuDivider/MenuDivider.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,mOAatB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { __assign } from "tslib";
2
+ /** @jsx withSlots */
3
+ import { View } from 'react-native';
4
+ import { compose, withSlots } from '@fluentui-react-native/framework';
5
+ import { stylingSettings } from './MenuDivider.styling';
6
+ import { menuDividerName } from './MenuDivider.types';
7
+ export var MenuDivider = compose(__assign(__assign({ displayName: menuDividerName }, stylingSettings), { slots: {
8
+ root: View,
9
+ }, useRender: function (userProps, useSlots) {
10
+ var Slots = useSlots(userProps);
11
+ return function (final) {
12
+ return withSlots(Slots.root, __assign({}, final));
13
+ };
14
+ } }));
15
+ //# sourceMappingURL=MenuDivider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDivider.js","sourceRoot":"","sources":["../../src/MenuDivider/MenuDivider.tsx"],"names":[],"mappings":";AAAA,qBAAqB;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,CAAC,IAAM,WAAW,GAAG,OAAO,qBAChC,WAAW,EAAE,eAAe,IACzB,eAAe,KAClB,KAAK,EAAE;QACL,IAAI,EAAE,IAAI;KACX,EACD,SAAS,EAAE,UAAC,SAA2B,EAAE,QAAmC;QAC1E,IAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;QAElC,OAAO,UAAC,KAAuB;YAC7B,OAAO,UAAC,KAAK,CAAC,IAAI,eAAK,KAAK,EAAI,CAAC;QACnC,CAAC,CAAC;IACJ,CAAC,IACD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { UseStylingOptions } from '@fluentui-react-native/framework';
2
+ import type { MenuDividerProps, MenuDividerTokens, MenuDividerSlotProps } from './MenuDivider.types';
3
+ export declare const stylingSettings: UseStylingOptions<MenuDividerProps, MenuDividerSlotProps, MenuDividerTokens>;
4
+ //# sourceMappingURL=MenuDivider.styling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDivider.styling.d.ts","sourceRoot":"","sources":["../../src/MenuDivider/MenuDivider.styling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIrG,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,CAiBxG,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { buildProps } from '@fluentui-react-native/framework';
2
+ import { menuDividerName } from './MenuDivider.types';
3
+ import { defaultMenuDividerTokens } from './MenuDividerTokens';
4
+ export var stylingSettings = {
5
+ tokens: [defaultMenuDividerTokens, menuDividerName],
6
+ slotProps: {
7
+ root: buildProps(function (tokens) { return ({
8
+ style: {
9
+ height: tokens.height,
10
+ width: tokens.width,
11
+ backgroundColor: tokens.backgroundColor,
12
+ margin: tokens.margin,
13
+ marginVertical: tokens.marginVertical,
14
+ display: 'flex',
15
+ },
16
+ }); }, ['backgroundColor', 'height', 'margin', 'marginVertical', 'width']),
17
+ },
18
+ };
19
+ //# sourceMappingURL=MenuDivider.styling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDivider.styling.js","sourceRoot":"","sources":["../../src/MenuDivider/MenuDivider.styling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,CAAC,IAAM,eAAe,GAAiF;IAC3G,MAAM,EAAE,CAAC,wBAAwB,EAAE,eAAe,CAAC;IACnD,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAyB,IAAK,OAAA,CAAC;YAC9B,KAAK,EAAE;gBACL,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,eAAe,EAAE,MAAM,CAAC,eAAe;gBACvC,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,cAAc,EAAE,MAAM,CAAC,cAAc;gBACrC,OAAO,EAAE,MAAM;aAChB;SACF,CAAC,EAT6B,CAS7B,EACF,CAAC,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,CACnE;KACF;CACF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type * as React from 'react';
2
+ import type { ViewStyle } from 'react-native';
3
+ import type { IViewProps } from '@fluentui-react-native/adapters';
4
+ import type { IBackgroundColorTokens } from '@fluentui-react-native/tokens';
5
+ export declare const menuDividerName = "MenuDivider";
6
+ export type MenuDividerTokens = IBackgroundColorTokens & {
7
+ height?: number;
8
+ margin?: number;
9
+ marginVertical?: number;
10
+ width?: ViewStyle['width'];
11
+ };
12
+ export type MenuDividerProps = IViewProps;
13
+ export interface MenuDividerSlotProps {
14
+ root: React.PropsWithRef<IViewProps>;
15
+ }
16
+ export interface MenuDividerType {
17
+ props: MenuDividerProps;
18
+ tokens: MenuDividerTokens;
19
+ slotProps: MenuDividerSlotProps;
20
+ }
21
+ //# sourceMappingURL=MenuDivider.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDivider.types.d.ts","sourceRoot":"","sources":["../../src/MenuDivider/MenuDivider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,oBAAoB,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ export var menuDividerName = 'MenuDivider';
2
+ //# sourceMappingURL=MenuDivider.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDivider.types.js","sourceRoot":"","sources":["../../src/MenuDivider/MenuDivider.types.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,eAAe,GAAG,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Theme } from '@fluentui-react-native/framework';
2
+ import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import type { MenuDividerTokens } from './MenuDivider.types';
4
+ export declare const defaultMenuDividerTokens: TokenSettings<MenuDividerTokens, Theme>;
5
+ //# sourceMappingURL=MenuDividerTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDividerTokens.d.ts","sourceRoot":"","sources":["../../src/MenuDivider/MenuDividerTokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,iBAAiB,EAAE,KAAK,CAI3E,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
+ export var defaultMenuDividerTokens = function (t) { return ({
3
+ backgroundColor: t.colors.neutralStroke2,
4
+ height: globalTokens.stroke.width10,
5
+ marginVertical: globalTokens.size40,
6
+ }); };
7
+ //# sourceMappingURL=MenuDividerTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDividerTokens.js","sourceRoot":"","sources":["../../src/MenuDivider/MenuDividerTokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,IAAM,wBAAwB,GAA4C,UAAC,CAAQ,IAAwB,OAAA,CAAC;IACjH,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IACxC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;IACnC,cAAc,EAAE,YAAY,CAAC,MAAM;CACpC,CAAC,EAJgH,CAIhH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Theme } from '@fluentui-react-native/framework';
2
+ import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import type { MenuDividerTokens } from './MenuDivider.types';
4
+ export declare const defaultMenuDividerTokens: TokenSettings<MenuDividerTokens, Theme>;
5
+ //# sourceMappingURL=MenuDividerTokens.macos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDividerTokens.macos.d.ts","sourceRoot":"","sources":["../../src/MenuDivider/MenuDividerTokens.macos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,iBAAiB,EAAE,KAAK,CAI3E,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
+ export var defaultMenuDividerTokens = function (t) { return ({
3
+ backgroundColor: t.colors.neutralStroke2,
4
+ height: globalTokens.stroke.width10,
5
+ margin: globalTokens.size40,
6
+ }); };
7
+ //# sourceMappingURL=MenuDividerTokens.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDividerTokens.macos.js","sourceRoot":"","sources":["../../src/MenuDivider/MenuDividerTokens.macos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,IAAM,wBAAwB,GAA4C,UAAC,CAAQ,IAAwB,OAAA,CAAC;IACjH,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IACxC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;IACnC,MAAM,EAAE,YAAY,CAAC,MAAM;CAC5B,CAAC,EAJgH,CAIhH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Theme } from '@fluentui-react-native/framework';
2
+ import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import type { MenuDividerTokens } from './MenuDivider.types';
4
+ export declare const defaultMenuDividerTokens: TokenSettings<MenuDividerTokens, Theme>;
5
+ //# sourceMappingURL=MenuDividerTokens.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDividerTokens.win32.d.ts","sourceRoot":"","sources":["../../src/MenuDivider/MenuDividerTokens.win32.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,iBAAiB,EAAE,KAAK,CAI3E,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
+ export var defaultMenuDividerTokens = function (t) { return ({
3
+ backgroundColor: t.colors.neutralStroke1,
4
+ height: globalTokens.stroke.width10,
5
+ margin: globalTokens.size20,
6
+ }); };
7
+ //# sourceMappingURL=MenuDividerTokens.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuDividerTokens.win32.js","sourceRoot":"","sources":["../../src/MenuDivider/MenuDividerTokens.win32.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,IAAM,wBAAwB,GAA4C,UAAC,CAAQ,IAAwB,OAAA,CAAC;IACjH,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IACxC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;IACnC,MAAM,EAAE,YAAY,CAAC,MAAM;CAC5B,CAAC,EAJgH,CAIhH,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { MenuDivider } from './MenuDivider';
2
+ export { menuDividerName } from './MenuDivider.types';
3
+ export type { MenuDividerProps, MenuDividerTokens, MenuDividerSlotProps, MenuDividerType } from './MenuDivider.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MenuDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { MenuDivider } from './MenuDivider';
2
+ export { menuDividerName } from './MenuDivider.types';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/MenuDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** @jsx withSlots */
2
+ import React from 'react';
3
+ import type { MenuItemProps } from './MenuItem.types';
4
+ export declare const MenuItem: import("@fluentui-react-native/framework").ComposableComponent<MenuItemProps, import("./MenuItem.types").MenuItemSlotProps, import("./MenuItem.types").MenuItemTokens, object>;
5
+ export declare const getAccessibilityLabel: (accessibilityLabel: string, child: React.ReactNode) => string;
6
+ export declare const getTooltip: (tooltip: string, hasTooltips: boolean, child: React.ReactNode) => string;
7
+ //# sourceMappingURL=MenuItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../src/MenuItem/MenuItem.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAIpE,eAAO,MAAM,QAAQ,gLAmDnB,CAAC;AAaH,eAAO,MAAM,qBAAqB,uBAXuB,MAAM,SAAS,MAAM,SAAS,WAWd,CAAC;AAa1E,eAAO,MAAM,UAAU,YAXY,MAAM,eAAe,OAAO,SAAS,MAAM,SAAS,WAWpC,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import { I18nManager, Image, Pressable, View } from 'react-native';
3
+ import { compose, memoize, mergeProps, withSlots } from '@fluentui-react-native/framework';
4
+ import { IconV1 as Icon } from '@fluentui-react-native/icon';
5
+ import { TextV1 as Text } from '@fluentui-react-native/text';
6
+ import { SvgXml } from 'react-native-svg';
7
+ import { stylingSettings } from './MenuItem.styling';
8
+ import { menuItemName } from './MenuItem.types';
9
+ import { useMenuItem } from './useMenuItem';
10
+ export var MenuItem = compose(__assign(__assign({ displayName: menuItemName }, stylingSettings), { slots: {
11
+ root: Pressable,
12
+ checkmark: View,
13
+ content: Text,
14
+ iconPlaceholder: View,
15
+ imgIcon: Image,
16
+ fontOrSvgIcon: Icon,
17
+ submenuIndicator: SvgXml,
18
+ }, useRender: function (userProps, useSlots) {
19
+ var menuItem = useMenuItem(userProps);
20
+ var Slots = useSlots(userProps, function (layer) { return menuItem.state[layer] || userProps[layer]; });
21
+ return function (final, children) {
22
+ var _a = mergeProps(menuItem.props, final), accessibilityLabel = _a.accessibilityLabel, icon = _a.icon, tooltip = _a.tooltip, mergedProps = __rest(_a, ["accessibilityLabel", "icon", "tooltip"]);
23
+ var chevronXml = I18nManager.isRTL
24
+ ? "\n <svg>\n <path fill='currentColor' d=\"M10.2603 3.20041C10.5639 3.48226 10.5814 3.95681 10.2996 4.26034L6.77348 8L10.2996 11.7397C10.5814 12.0432 10.5639 12.5177 10.2603 12.7996C9.9568 13.0815 9.48226 13.0639 9.2004 12.7603L5.2004 8.51034C4.9332 8.22258 4.9332 7.77743 5.2004 7.48966L9.20041 3.23966C9.48226 2.93613 9.95681 2.91856 10.2603 3.20041Z\"/>\n </svg>"
25
+ : "\n <svg>\n <path fill='currentColor' d=\"M5.73966 3.20041C5.43613 3.48226 5.41856 3.95681 5.70041 4.26034L9.22652 8L5.70041 11.7397C5.41856 12.0432 5.43613 12.5177 5.73967 12.7996C6.0432 13.0815 6.51775 13.0639 6.7996 12.7603L10.7996 8.51034C11.0668 8.22258 11.0668 7.77743 10.7996 7.48966L6.7996 3.23966C6.51775 2.93613 6.0432 2.91856 5.73966 3.20041Z\"/>\n </svg>";
26
+ // We only automatically support the one child string.
27
+ var label = getAccessibilityLabel(accessibilityLabel, children[0]);
28
+ var tooltipResult = getTooltip(tooltip, menuItem.state.hasTooltips, children[0]);
29
+ return (withSlots(Slots.root, __assign({}, mergedProps, { accessibilityLabel: label }),
30
+ menuItem.state.hasCheckmarks && withSlots(Slots.checkmark, { accessible: false }),
31
+ (icon || menuItem.state.hasIcons) && (withSlots(Slots.iconPlaceholder, { accessible: false },
32
+ icon && icon.source && withSlots(Slots.imgIcon, __assign({ accessible: false }, icon)),
33
+ icon && (icon.svgSource || icon.fontSource) && withSlots(Slots.fontOrSvgIcon, __assign({ accessible: false }, icon)))),
34
+ children && (withSlots(Slots.content, { accessible: false, tooltip: tooltipResult }, children)),
35
+ menuItem.state.hasSubmenu && withSlots(Slots.submenuIndicator, { accessible: false, xml: chevronXml })));
36
+ };
37
+ } }));
38
+ var getAccessibilityLabelWorker = function (accessibilityLabel, child) {
39
+ if (accessibilityLabel !== undefined) {
40
+ return accessibilityLabel;
41
+ }
42
+ if (typeof child === 'string') {
43
+ return child;
44
+ }
45
+ return undefined;
46
+ };
47
+ export var getAccessibilityLabel = memoize(getAccessibilityLabelWorker);
48
+ var getTooltipWorker = function (tooltip, hasTooltips, child) {
49
+ if (tooltip !== undefined) {
50
+ return tooltip;
51
+ }
52
+ if (hasTooltips && typeof child === 'string') {
53
+ return child;
54
+ }
55
+ return undefined;
56
+ };
57
+ export var getTooltip = memoize(getTooltipWorker);
58
+ //# sourceMappingURL=MenuItem.js.map