@fluentui-react-native/menu 0.3.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/CHANGELOG.json +76 -1
  2. package/CHANGELOG.md +31 -2
  3. package/lib/Menu/Menu.types.d.ts +1 -0
  4. package/lib/Menu/Menu.types.d.ts.map +1 -1
  5. package/lib/Menu/useMenu.d.ts.map +1 -1
  6. package/lib/Menu/useMenu.js +4 -0
  7. package/lib/Menu/useMenu.js.map +1 -1
  8. package/lib/Menu/useMenuContextValue.js +1 -1
  9. package/lib/Menu/useMenuContextValue.js.map +1 -1
  10. package/lib/MenuItem/MenuItem.d.ts +3 -0
  11. package/lib/MenuItem/MenuItem.d.ts.map +1 -0
  12. package/lib/MenuItem/MenuItem.js +25 -0
  13. package/lib/MenuItem/MenuItem.js.map +1 -0
  14. package/lib/MenuItem/MenuItem.styling.d.ts +5 -0
  15. package/lib/MenuItem/MenuItem.styling.d.ts.map +1 -0
  16. package/lib/MenuItem/MenuItem.styling.js +26 -0
  17. package/lib/MenuItem/MenuItem.styling.js.map +1 -0
  18. package/lib/MenuItem/MenuItem.types.d.ts +45 -0
  19. package/lib/MenuItem/MenuItem.types.d.ts.map +1 -0
  20. package/lib/MenuItem/MenuItem.types.js +2 -0
  21. package/lib/MenuItem/MenuItem.types.js.map +1 -0
  22. package/lib/MenuItem/MenuItemTokens.d.ts +5 -0
  23. package/lib/MenuItem/MenuItemTokens.d.ts.map +1 -0
  24. package/lib/MenuItem/MenuItemTokens.js +26 -0
  25. package/lib/MenuItem/MenuItemTokens.js.map +1 -0
  26. package/lib/MenuItem/MenuItemTokens.win32.d.ts +5 -0
  27. package/lib/MenuItem/MenuItemTokens.win32.d.ts.map +1 -0
  28. package/lib/MenuItem/MenuItemTokens.win32.js +27 -0
  29. package/lib/MenuItem/MenuItemTokens.win32.js.map +1 -0
  30. package/lib/MenuItem/useMenuItem.d.ts +3 -0
  31. package/lib/MenuItem/useMenuItem.d.ts.map +1 -0
  32. package/lib/MenuItem/useMenuItem.js +25 -0
  33. package/lib/MenuItem/useMenuItem.js.map +1 -0
  34. package/lib/MenuList/MenuList.d.ts +4 -0
  35. package/lib/MenuList/MenuList.d.ts.map +1 -0
  36. package/lib/MenuList/MenuList.js +15 -0
  37. package/lib/MenuList/MenuList.js.map +1 -0
  38. package/lib/MenuList/MenuList.styling.d.ts +4 -0
  39. package/lib/MenuList/MenuList.styling.d.ts.map +1 -0
  40. package/lib/MenuList/MenuList.styling.js +14 -0
  41. package/lib/MenuList/MenuList.styling.js.map +1 -0
  42. package/lib/MenuList/MenuList.types.d.ts +17 -0
  43. package/lib/MenuList/MenuList.types.d.ts.map +1 -0
  44. package/lib/MenuList/MenuList.types.js +2 -0
  45. package/lib/MenuList/MenuList.types.js.map +1 -0
  46. package/lib/MenuList/MenuListTokens.d.ts +5 -0
  47. package/lib/MenuList/MenuListTokens.d.ts.map +1 -0
  48. package/lib/MenuList/MenuListTokens.js +8 -0
  49. package/lib/MenuList/MenuListTokens.js.map +1 -0
  50. package/lib/MenuList/MenuListTokens.win32.d.ts +5 -0
  51. package/lib/MenuList/MenuListTokens.win32.d.ts.map +1 -0
  52. package/lib/MenuList/MenuListTokens.win32.js +8 -0
  53. package/lib/MenuList/MenuListTokens.win32.js.map +1 -0
  54. package/lib/MenuPopover/MenuPopover.d.ts.map +1 -1
  55. package/lib/MenuPopover/MenuPopover.js +3 -2
  56. package/lib/MenuPopover/MenuPopover.js.map +1 -1
  57. package/lib/context/menuContext.d.ts.map +1 -1
  58. package/lib/context/menuContext.js +1 -0
  59. package/lib/context/menuContext.js.map +1 -1
  60. package/lib/index.d.ts +2 -0
  61. package/lib/index.d.ts.map +1 -1
  62. package/lib/index.js +2 -0
  63. package/lib/index.js.map +1 -1
  64. package/lib-commonjs/Menu/Menu.types.d.ts +1 -0
  65. package/lib-commonjs/Menu/Menu.types.d.ts.map +1 -1
  66. package/lib-commonjs/Menu/useMenu.d.ts.map +1 -1
  67. package/lib-commonjs/Menu/useMenu.js +4 -0
  68. package/lib-commonjs/Menu/useMenu.js.map +1 -1
  69. package/lib-commonjs/Menu/useMenuContextValue.js +1 -1
  70. package/lib-commonjs/Menu/useMenuContextValue.js.map +1 -1
  71. package/lib-commonjs/MenuItem/MenuItem.d.ts +3 -0
  72. package/lib-commonjs/MenuItem/MenuItem.d.ts.map +1 -0
  73. package/lib-commonjs/MenuItem/MenuItem.js +28 -0
  74. package/lib-commonjs/MenuItem/MenuItem.js.map +1 -0
  75. package/lib-commonjs/MenuItem/MenuItem.styling.d.ts +5 -0
  76. package/lib-commonjs/MenuItem/MenuItem.styling.d.ts.map +1 -0
  77. package/lib-commonjs/MenuItem/MenuItem.styling.js +29 -0
  78. package/lib-commonjs/MenuItem/MenuItem.styling.js.map +1 -0
  79. package/lib-commonjs/MenuItem/MenuItem.types.d.ts +45 -0
  80. package/lib-commonjs/MenuItem/MenuItem.types.d.ts.map +1 -0
  81. package/lib-commonjs/MenuItem/MenuItem.types.js +5 -0
  82. package/lib-commonjs/MenuItem/MenuItem.types.js.map +1 -0
  83. package/lib-commonjs/MenuItem/MenuItemTokens.d.ts +5 -0
  84. package/lib-commonjs/MenuItem/MenuItemTokens.d.ts.map +1 -0
  85. package/lib-commonjs/MenuItem/MenuItemTokens.js +30 -0
  86. package/lib-commonjs/MenuItem/MenuItemTokens.js.map +1 -0
  87. package/lib-commonjs/MenuItem/MenuItemTokens.win32.d.ts +5 -0
  88. package/lib-commonjs/MenuItem/MenuItemTokens.win32.d.ts.map +1 -0
  89. package/lib-commonjs/MenuItem/MenuItemTokens.win32.js +31 -0
  90. package/lib-commonjs/MenuItem/MenuItemTokens.win32.js.map +1 -0
  91. package/lib-commonjs/MenuItem/useMenuItem.d.ts +3 -0
  92. package/lib-commonjs/MenuItem/useMenuItem.d.ts.map +1 -0
  93. package/lib-commonjs/MenuItem/useMenuItem.js +29 -0
  94. package/lib-commonjs/MenuItem/useMenuItem.js.map +1 -0
  95. package/lib-commonjs/MenuList/MenuList.d.ts +4 -0
  96. package/lib-commonjs/MenuList/MenuList.d.ts.map +1 -0
  97. package/lib-commonjs/MenuList/MenuList.js +18 -0
  98. package/lib-commonjs/MenuList/MenuList.js.map +1 -0
  99. package/lib-commonjs/MenuList/MenuList.styling.d.ts +4 -0
  100. package/lib-commonjs/MenuList/MenuList.styling.d.ts.map +1 -0
  101. package/lib-commonjs/MenuList/MenuList.styling.js +17 -0
  102. package/lib-commonjs/MenuList/MenuList.styling.js.map +1 -0
  103. package/lib-commonjs/MenuList/MenuList.types.d.ts +17 -0
  104. package/lib-commonjs/MenuList/MenuList.types.d.ts.map +1 -0
  105. package/lib-commonjs/MenuList/MenuList.types.js +5 -0
  106. package/lib-commonjs/MenuList/MenuList.types.js.map +1 -0
  107. package/lib-commonjs/MenuList/MenuListTokens.d.ts +5 -0
  108. package/lib-commonjs/MenuList/MenuListTokens.d.ts.map +1 -0
  109. package/lib-commonjs/MenuList/MenuListTokens.js +12 -0
  110. package/lib-commonjs/MenuList/MenuListTokens.js.map +1 -0
  111. package/lib-commonjs/MenuList/MenuListTokens.win32.d.ts +5 -0
  112. package/lib-commonjs/MenuList/MenuListTokens.win32.d.ts.map +1 -0
  113. package/lib-commonjs/MenuList/MenuListTokens.win32.js +12 -0
  114. package/lib-commonjs/MenuList/MenuListTokens.win32.js.map +1 -0
  115. package/lib-commonjs/MenuPopover/MenuPopover.d.ts.map +1 -1
  116. package/lib-commonjs/MenuPopover/MenuPopover.js +2 -1
  117. package/lib-commonjs/MenuPopover/MenuPopover.js.map +1 -1
  118. package/lib-commonjs/context/menuContext.d.ts.map +1 -1
  119. package/lib-commonjs/context/menuContext.js +1 -0
  120. package/lib-commonjs/context/menuContext.js.map +1 -1
  121. package/lib-commonjs/index.d.ts +2 -0
  122. package/lib-commonjs/index.d.ts.map +1 -1
  123. package/lib-commonjs/index.js +5 -1
  124. package/lib-commonjs/index.js.map +1 -1
  125. package/package.json +9 -4
  126. package/src/Menu/Menu.types.ts +1 -0
  127. package/src/Menu/useMenu.ts +4 -0
  128. package/src/Menu/useMenuContextValue.ts +1 -1
  129. package/src/MenuItem/MenuItem.styling.ts +45 -0
  130. package/src/MenuItem/MenuItem.tsx +37 -0
  131. package/src/MenuItem/MenuItem.types.ts +54 -0
  132. package/src/MenuItem/MenuItemTokens.ts +29 -0
  133. package/src/MenuItem/MenuItemTokens.win32.ts +30 -0
  134. package/src/MenuItem/useMenuItem.ts +40 -0
  135. package/src/MenuList/MenuList.styling.ts +20 -0
  136. package/src/MenuList/MenuList.tsx +23 -0
  137. package/src/MenuList/MenuList.types.ts +17 -0
  138. package/src/MenuList/MenuListTokens.ts +11 -0
  139. package/src/MenuList/MenuListTokens.win32.ts +11 -0
  140. package/src/MenuPopover/MenuPopover.tsx +7 -2
  141. package/src/context/menuContext.ts +1 -0
  142. package/src/index.ts +2 -0
package/CHANGELOG.json CHANGED
@@ -2,7 +2,82 @@
2
2
  "name": "@fluentui-react-native/menu",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 28 Apr 2022 19:07:57 GMT",
5
+ "date": "Tue, 10 May 2022 20:49:02 GMT",
6
+ "tag": "@fluentui-react-native/menu_v0.5.1",
7
+ "version": "0.5.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui-react-native/menu",
13
+ "comment": "Bump @fluentui-react-native/callout to v0.20.0",
14
+ "commit": "d21b7b13c7a7ea38b81c23b9eca7461fffb801e1"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 04 May 2022 21:06:04 GMT",
21
+ "tag": "@fluentui-react-native/menu_v0.5.0",
22
+ "version": "0.5.0",
23
+ "comments": {
24
+ "minor": [
25
+ {
26
+ "author": "ruaraki@microsoft.com",
27
+ "package": "@fluentui-react-native/menu",
28
+ "commit": "d503e2af4e84ba5c8c1c40ea3698fcbd1691dda6",
29
+ "comment": "MenuList styling"
30
+ },
31
+ {
32
+ "author": "beachball",
33
+ "package": "@fluentui-react-native/menu",
34
+ "comment": "Bump @fluentui-react-native/callout to v0.19.46",
35
+ "commit": "d503e2af4e84ba5c8c1c40ea3698fcbd1691dda6"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui-react-native/menu",
40
+ "comment": "Bump @fluentui-react-native/experimental-text to v0.7.26",
41
+ "commit": "d503e2af4e84ba5c8c1c40ea3698fcbd1691dda6"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui-react-native/menu",
46
+ "comment": "Bump @fluentui-react-native/framework to v0.7.26",
47
+ "commit": "d503e2af4e84ba5c8c1c40ea3698fcbd1691dda6"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui-react-native/menu",
52
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.15.6",
53
+ "commit": "d503e2af4e84ba5c8c1c40ea3698fcbd1691dda6"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui-react-native/menu",
58
+ "comment": "Bump @fluentui-react-native/tokens to v0.12.0",
59
+ "commit": "d503e2af4e84ba5c8c1c40ea3698fcbd1691dda6"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Mon, 02 May 2022 22:14:40 GMT",
66
+ "tag": "@fluentui-react-native/menu_v0.4.0",
67
+ "version": "0.4.0",
68
+ "comments": {
69
+ "minor": [
70
+ {
71
+ "author": "ruaraki@microsoft.com",
72
+ "package": "@fluentui-react-native/menu",
73
+ "commit": "bca261a9003512f213abaea80fe3f18a3368157a",
74
+ "comment": "Implement submenu proto"
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ {
80
+ "date": "Thu, 28 Apr 2022 19:09:51 GMT",
6
81
  "tag": "@fluentui-react-native/menu_v0.3.2",
7
82
  "version": "0.3.2",
8
83
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,41 @@
1
1
  # Change Log - @fluentui-react-native/menu
2
2
 
3
- This log was last generated on Thu, 28 Apr 2022 19:07:57 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 10 May 2022 20:49:02 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.5.1
8
+
9
+ Tue, 10 May 2022 20:49:02 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @fluentui-react-native/callout to v0.20.0
14
+
15
+ ## 0.5.0
16
+
17
+ Wed, 04 May 2022 21:06:04 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - MenuList styling (ruaraki@microsoft.com)
22
+ - Bump @fluentui-react-native/callout to v0.19.46
23
+ - Bump @fluentui-react-native/experimental-text to v0.7.26
24
+ - Bump @fluentui-react-native/framework to v0.7.26
25
+ - Bump @fluentui-react-native/interactive-hooks to v0.15.6
26
+ - Bump @fluentui-react-native/tokens to v0.12.0
27
+
28
+ ## 0.4.0
29
+
30
+ Mon, 02 May 2022 22:14:40 GMT
31
+
32
+ ### Minor changes
33
+
34
+ - Implement submenu proto (ruaraki@microsoft.com)
35
+
7
36
  ## 0.3.2
8
37
 
9
- Thu, 28 Apr 2022 19:07:57 GMT
38
+ Thu, 28 Apr 2022 19:09:51 GMT
10
39
 
11
40
  ### Patches
12
41
 
@@ -5,6 +5,7 @@ export interface MenuProps extends Omit<IViewProps, 'onPress'> {
5
5
  open?: boolean;
6
6
  }
7
7
  export interface MenuState extends MenuProps {
8
+ isSubmenu: boolean;
8
9
  setOpen: (isOpen: boolean) => void;
9
10
  triggerRef: React.RefObject<React.Component>;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../src/Menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;CAC9C"}
1
+ {"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../src/Menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;CAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMenu.d.ts","sourceRoot":"","sources":["../../src/Menu/useMenu.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,OAAO,UAAW,SAAS,KAAG,SAS1C,CAAC"}
1
+ {"version":3,"file":"useMenu.d.ts","sourceRoot":"","sources":["../../src/Menu/useMenu.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,OAAO,UAAW,SAAS,KAAG,SAY1C,CAAC"}
@@ -1,11 +1,15 @@
1
1
  import React from 'react';
2
+ import { useMenuContext } from '../context/menuContext';
2
3
  export var useMenu = function (props) {
3
4
  var _a = useMenuOpenState(props), open = _a[0], setOpen = _a[1];
4
5
  var triggerRef = React.useRef(null);
6
+ var context = useMenuContext();
7
+ var isSubmenu = context.triggerRef !== null;
5
8
  return {
6
9
  open: open,
7
10
  setOpen: setOpen,
8
11
  triggerRef: triggerRef,
12
+ isSubmenu: isSubmenu,
9
13
  };
10
14
  };
11
15
  var useMenuOpenState = function (props) {
@@ -1 +1 @@
1
- {"version":3,"file":"useMenu.js","sourceRoot":"","sources":["../../src/Menu/useMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,IAAM,OAAO,GAAG,UAAC,KAAgB;IAChC,IAAA,KAAkB,gBAAgB,CAAC,KAAK,CAAC,EAAxC,IAAI,QAAA,EAAE,OAAO,QAA2B,CAAC;IAChD,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAEtC,OAAO;QACL,IAAI,MAAA;QACJ,OAAO,SAAA;QACP,UAAU,YAAA;KACX,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,gBAAgB,GAAG,UAAC,KAAgB;IACxC,OAAO,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC"}
1
+ {"version":3,"file":"useMenu.js","sourceRoot":"","sources":["../../src/Menu/useMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,MAAM,CAAC,IAAM,OAAO,GAAG,UAAC,KAAgB;IAChC,IAAA,KAAkB,gBAAgB,CAAC,KAAK,CAAC,EAAxC,IAAI,QAAA,EAAE,OAAO,QAA2B,CAAC;IAChD,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtC,IAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,IAAM,SAAS,GAAG,OAAO,CAAC,UAAU,KAAK,IAAI,CAAC;IAE9C,OAAO;QACL,IAAI,MAAA;QACJ,OAAO,SAAA;QACP,UAAU,YAAA;QACV,SAAS,WAAA;KACV,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,gBAAgB,GAAG,UAAC,KAAgB;IACxC,OAAO,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export var useMenuContextValue = function (state) {
2
- return { open: state.open, setOpen: state.setOpen, triggerRef: state.triggerRef };
2
+ return { open: state.open, setOpen: state.setOpen, triggerRef: state.triggerRef, isSubmenu: state.isSubmenu };
3
3
  };
4
4
  //# sourceMappingURL=useMenuContextValue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMenuContextValue.js","sourceRoot":"","sources":["../../src/Menu/useMenuContextValue.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,KAAgB;IAClD,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;AACpF,CAAC,CAAC"}
1
+ {"version":3,"file":"useMenuContextValue.js","sourceRoot":"","sources":["../../src/Menu/useMenuContextValue.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,KAAgB;IAClD,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;AAChH,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { MenuItemProps } from './MenuItem.types';
2
+ export declare const MenuItem: import("@fluentui-react-native/framework").ComposableComponent<MenuItemProps, import("./MenuItem.types").MenuItemSlotProps, import("./MenuItem.types").MenuItemTokens, object>;
3
+ //# sourceMappingURL=MenuItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../src/MenuItem/MenuItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgB,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAI7E,eAAO,MAAM,QAAQ,gLA2BnB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { __assign } from "tslib";
2
+ /** @jsx withSlots */
3
+ import { View } from 'react-native';
4
+ import { SvgXml } from 'react-native-svg';
5
+ import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework';
6
+ import { Text } from '@fluentui-react-native/experimental-text';
7
+ import { menuItemName } from './MenuItem.types';
8
+ import { useMenuItem } from './useMenuItem';
9
+ import { stylingSettings } from './MenuItem.styling';
10
+ export var MenuItem = compose(__assign(__assign({ displayName: menuItemName }, stylingSettings), { slots: {
11
+ root: View,
12
+ content: Text,
13
+ submenuIndicator: SvgXml,
14
+ }, useRender: function (userProps, useSlots) {
15
+ var menuItem = useMenuItem(userProps);
16
+ var Slots = useSlots(userProps, function (layer) { return menuItem.state[layer]; });
17
+ return function (final) {
18
+ var mergedProps = mergeProps(menuItem.props, final);
19
+ var chevronXml = "\n <svg width=\"12\" height=\"16\" viewBox=\"0 0 11 6\">\n <path fill='currentColor' d='M0.646447 0.646447C0.841709 0.451184 1.15829 0.451184 1.35355 0.646447L5.5 4.79289L9.64645 0.646447C9.84171 0.451185 10.1583 0.451185 10.3536 0.646447C10.5488 0.841709 10.5488 1.15829 10.3536 1.35355L5.85355 5.85355C5.65829 6.04882 5.34171 6.04882 5.14645 5.85355L0.646447 1.35355C0.451184 1.15829 0.451184 0.841709 0.646447 0.646447Z' />\n </svg>";
20
+ return (withSlots(Slots.root, __assign({}, mergedProps),
21
+ mergedProps.content && withSlots(Slots.content, null, mergedProps.content),
22
+ mergedProps.hasSubmenu && withSlots(Slots.submenuIndicator, { xml: chevronXml })));
23
+ };
24
+ } }));
25
+ //# sourceMappingURL=MenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../src/MenuItem/MenuItem.tsx"],"names":[],"mappings":";AAAA,qBAAqB;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAY,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAChE,OAAO,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,IAAM,QAAQ,GAAG,OAAO,qBAC7B,WAAW,EAAE,YAAY,IACtB,eAAe,KAClB,KAAK,EAAE;QACL,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI;QACb,gBAAgB,EAAE,MAAM;KACzB,EACD,SAAS,EAAE,UAAC,SAAwB,EAAE,QAAgC;QACpE,IAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;QACxC,IAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,EAAE,UAAC,KAAK,IAAc,OAAA,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAArB,CAAqB,CAAC,CAAC;QAE7E,OAAO,UAAC,KAAoB;YAC1B,IAAM,WAAW,GAAG,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACtD,IAAM,UAAU,GAAG,scAGZ,CAAC;YAER,OAAO,CACL,UAAC,KAAK,CAAC,IAAI,eAAK,WAAW;gBACxB,WAAW,CAAC,OAAO,IAAI,UAAC,KAAK,CAAC,OAAO,QAAE,WAAW,CAAC,OAAO,CAAiB;gBAC3E,WAAW,CAAC,UAAU,IAAI,UAAC,KAAK,CAAC,gBAAgB,IAAC,GAAG,EAAE,UAAU,GAAI,CAC3D,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,IACD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { UseStylingOptions } from '@fluentui-react-native/framework';
2
+ import { MenuItemProps, MenuItemTokens, MenuItemSlotProps } from './MenuItem.types';
3
+ export declare const menuItemStates: (keyof MenuItemTokens)[];
4
+ export declare const stylingSettings: UseStylingOptions<MenuItemProps, MenuItemSlotProps, MenuItemTokens>;
5
+ //# sourceMappingURL=MenuItem.styling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.styling.d.ts","sourceRoot":"","sources":["../../src/MenuItem/MenuItem.styling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,iBAAiB,EAAc,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAgB,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAElG,eAAO,MAAM,cAAc,EAAE,CAAC,MAAM,cAAc,CAAC,EAAkD,CAAC;AAEtG,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,CAqC/F,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { __assign, __spreadArray } from "tslib";
2
+ import { buildProps } from '@fluentui-react-native/framework';
3
+ import { fontStyles, layoutStyles } from '@fluentui-react-native/tokens';
4
+ import { defaultMenuItemTokens } from './MenuItemTokens';
5
+ import { menuItemName } from './MenuItem.types';
6
+ export var menuItemStates = ['hovered', 'focused', 'pressed', 'disabled'];
7
+ export var stylingSettings = {
8
+ tokens: [defaultMenuItemTokens, menuItemName],
9
+ states: menuItemStates,
10
+ slotProps: {
11
+ root: buildProps(function (tokens, theme) { return ({
12
+ style: __assign({ alignItems: 'center', backgroundColor: tokens.backgroundColor, display: 'flex', flexDirection: 'row' }, layoutStyles.from(tokens, theme)),
13
+ }); }, __spreadArray(['backgroundColor'], layoutStyles.keys, true)),
14
+ content: buildProps(function (tokens, theme) {
15
+ return {
16
+ style: __assign({ flexGrow: 1, color: tokens.color }, fontStyles.from(tokens, theme)),
17
+ };
18
+ }, __spreadArray(['color'], fontStyles.keys, true)),
19
+ submenuIndicator: buildProps(function (tokens) {
20
+ return {
21
+ color: tokens.color,
22
+ };
23
+ }, ['color']),
24
+ },
25
+ };
26
+ //# sourceMappingURL=MenuItem.styling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.styling.js","sourceRoot":"","sources":["../../src/MenuItem/MenuItem.styling.ts"],"names":[],"mappings":";AAAA,OAAO,EAA4B,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAoD,MAAM,kBAAkB,CAAC;AAElG,MAAM,CAAC,IAAM,cAAc,GAA6B,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAEtG,MAAM,CAAC,IAAM,eAAe,GAAwE;IAClG,MAAM,EAAE,CAAC,qBAAqB,EAAE,YAAY,CAAC;IAC7C,MAAM,EAAE,cAAc;IACtB,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAsB,EAAE,KAAY,IAAK,OAAA,CAAC;YACzC,KAAK,aACH,UAAU,EAAE,QAAQ,EACpB,eAAe,EAAE,MAAM,CAAC,eAAe,EACvC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,KAAK,IACjB,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CACpC;SACF,CAAC,EARwC,CAQxC,iBACD,iBAAiB,GAAK,YAAY,CAAC,IAAI,QACzC;QACD,OAAO,EAAE,UAAU,CACjB,UAAC,MAAsB,EAAE,KAAY;YACnC,OAAO;gBACL,KAAK,aACH,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE,MAAM,CAAC,KAAK,IAChB,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAClC;aACF,CAAC;QACJ,CAAC,iBACA,OAAO,GAAK,UAAU,CAAC,IAAI,QAC7B;QACD,gBAAgB,EAAE,UAAU,CAC1B,UAAC,MAAsB;YACrB,OAAO;gBACL,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB,CAAC;QACJ,CAAC,EACD,CAAC,OAAO,CAAC,CACV;KACF;CACF,CAAC"}
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+ import { ViewProps } from 'react-native';
3
+ import { SvgProps, XmlProps } from 'react-native-svg';
4
+ import type { IViewProps } from '@fluentui-react-native/adapters';
5
+ import { TextProps } from '@fluentui-react-native/experimental-text';
6
+ import { IFocusable, InteractionEvent, IPressableHooks, IWithPressableOptions } from '@fluentui-react-native/interactive-hooks';
7
+ import { FontTokens, IBorderTokens, IColorTokens, LayoutTokens } from '@fluentui-react-native/tokens';
8
+ export declare const menuItemName = "MenuItem";
9
+ export interface MenuItemTokens extends LayoutTokens, FontTokens, IBorderTokens, IColorTokens {
10
+ disabled?: MenuItemTokens;
11
+ focused?: MenuItemTokens;
12
+ hovered?: MenuItemTokens;
13
+ pressed?: MenuItemTokens;
14
+ }
15
+ export interface MenuItemProps extends Omit<IWithPressableOptions<ViewProps>, 'onPress'> {
16
+ content: string;
17
+ /**
18
+ * Applies disabled styles to menu item but remains focusable
19
+ */
20
+ disabled?: boolean;
21
+ /**
22
+ * A RefObject to access the IButton interface. Use this to access the public methods and properties of the component.
23
+ */
24
+ componentRef?: React.RefObject<IFocusable>;
25
+ /**
26
+ * If the menu item is a trigger for a submenu
27
+ */
28
+ hasSubmenu?: boolean;
29
+ /**
30
+ * A callback to call on button click event
31
+ */
32
+ onClick?: (e: InteractionEvent) => void;
33
+ }
34
+ export declare type MenuItemState = IPressableHooks<MenuItemProps & React.ComponentPropsWithRef<any>>;
35
+ export interface MenuItemSlotProps {
36
+ root: React.PropsWithRef<IViewProps>;
37
+ content?: TextProps;
38
+ submenuIndicator?: SvgProps | XmlProps;
39
+ }
40
+ export interface MenuItemType {
41
+ props: MenuItemProps;
42
+ tokens: MenuItemTokens;
43
+ slotProps: MenuItemSlotProps;
44
+ }
45
+ //# sourceMappingURL=MenuItem.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.types.d.ts","sourceRoot":"","sources":["../../src/MenuItem/MenuItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAEtG,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,MAAM,WAAW,cAAe,SAAQ,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY;IAC3F,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtF,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAE3C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACzC;AAED,oBAAY,aAAa,GAAG,eAAe,CAAC,aAAa,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC;AAE9F,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,iBAAiB,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export var menuItemName = 'MenuItem';
2
+ //# sourceMappingURL=MenuItem.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.types.js","sourceRoot":"","sources":["../../src/MenuItem/MenuItem.types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,IAAM,YAAY,GAAG,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Theme } from '@fluentui-react-native/framework';
2
+ import { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import { MenuItemTokens } from './MenuItem.types';
4
+ export declare const defaultMenuItemTokens: TokenSettings<MenuItemTokens, Theme>;
5
+ //# sourceMappingURL=MenuItemTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItemTokens.d.ts","sourceRoot":"","sources":["../../src/MenuItem/MenuItemTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,cAAc,EAAE,KAAK,CAuBrE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
+ export var defaultMenuItemTokens = function (t) { return ({
3
+ backgroundColor: t.colors.neutralBackground1,
4
+ borderRadius: globalTokens.corner.radius.medium,
5
+ color: t.colors.neutralForeground2,
6
+ fontFamily: t.typography.families.primary,
7
+ fontSize: globalTokens.font.size[300],
8
+ fontWeight: globalTokens.font.weight.regular,
9
+ minHeight: 32,
10
+ minWidth: 160,
11
+ maxWidth: 300,
12
+ padding: globalTokens.spacing.sNudge,
13
+ hovered: {
14
+ backgroundColor: t.colors.neutralBackground1Hover,
15
+ color: t.colors.neutralForeground2Hover,
16
+ },
17
+ pressed: {
18
+ backgroundColor: t.colors.neutralBackground1Pressed,
19
+ color: t.colors.neutralForeground2Pressed,
20
+ },
21
+ disabled: {
22
+ backgroundColor: t.colors.neutralBackground1,
23
+ color: t.colors.neutralForegroundDisabled,
24
+ },
25
+ }); };
26
+ //# sourceMappingURL=MenuItemTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItemTokens.js","sourceRoot":"","sources":["../../src/MenuItem/MenuItemTokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,MAAM,CAAC,IAAM,qBAAqB,GAAyC,UAAC,CAAQ,IAAqB,OAAA,CAAC;IACxG,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;IAC5C,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;IAClC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO;IACzC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACrC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,OAA0B;IAC/D,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM;IACpC,OAAO,EAAE;QACP,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,uBAAuB;QACjD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,uBAAuB;KACxC;IACD,OAAO,EAAE;QACP,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,yBAAyB;QACnD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,yBAAyB;KAC1C;IACD,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;QAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,yBAAyB;KAC1C;CACF,CAAC,EAvBuG,CAuBvG,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Theme } from '@fluentui-react-native/framework';
2
+ import { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import { MenuItemTokens } from './MenuItem.types';
4
+ export declare const defaultMenuItemTokens: TokenSettings<MenuItemTokens, Theme>;
5
+ //# sourceMappingURL=MenuItemTokens.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItemTokens.win32.d.ts","sourceRoot":"","sources":["../../src/MenuItem/MenuItemTokens.win32.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,cAAc,EAAE,KAAK,CAwBrE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
+ export var defaultMenuItemTokens = function (t) { return ({
3
+ backgroundColor: t.colors.neutralBackground1,
4
+ borderRadius: globalTokens.corner.radius.none,
5
+ color: t.colors.neutralForeground1,
6
+ fontFamily: t.typography.families.primary,
7
+ fontSize: globalTokens.font.size[200],
8
+ fontWeight: globalTokens.font.weight.regular,
9
+ minHeight: 24,
10
+ minWidth: 160,
11
+ maxWidth: 300,
12
+ padding: globalTokens.spacing.xs,
13
+ paddingHorizontal: globalTokens.spacing.s,
14
+ hovered: {
15
+ backgroundColor: t.colors.neutralBackground1Hover,
16
+ color: t.colors.neutralForeground1Hover,
17
+ },
18
+ pressed: {
19
+ backgroundColor: t.colors.neutralBackground1Pressed,
20
+ color: t.colors.neutralForeground1Pressed,
21
+ },
22
+ disabled: {
23
+ backgroundColor: t.colors.neutralBackground1,
24
+ color: t.colors.neutralForegroundDisabled,
25
+ },
26
+ }); };
27
+ //# sourceMappingURL=MenuItemTokens.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItemTokens.win32.js","sourceRoot":"","sources":["../../src/MenuItem/MenuItemTokens.win32.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,MAAM,CAAC,IAAM,qBAAqB,GAAyC,UAAC,CAAQ,IAAqB,OAAA,CAAC;IACxG,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;IAC5C,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI;IAC7C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;IAClC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO;IACzC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACrC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,OAA0B;IAC/D,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE;IAChC,iBAAiB,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACzC,OAAO,EAAE;QACP,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,uBAAuB;QACjD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,uBAAuB;KACxC;IACD,OAAO,EAAE;QACP,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,yBAAyB;QACnD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,yBAAyB;KAC1C;IACD,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;QAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,yBAAyB;KAC1C;CACF,CAAC,EAxBuG,CAwBvG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { MenuItemProps, MenuItemState } from './MenuItem.types';
2
+ export declare const useMenuItem: (props: MenuItemProps) => MenuItemState;
3
+ //# sourceMappingURL=useMenuItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMenuItem.d.ts","sourceRoot":"","sources":["../../src/MenuItem/useMenuItem.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKhE,eAAO,MAAM,WAAW,UAAW,aAAa,KAAG,aAwBlD,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import * as React from 'react';
3
+ import { memoize } from '@fluentui-react-native/framework';
4
+ import { useAsPressable, useKeyProps } from '@fluentui-react-native/interactive-hooks';
5
+ import { useMenuContext } from '../context/menuContext';
6
+ export var useMenuItem = function (props) {
7
+ // attach the pressable state handlers
8
+ var defaultComponentRef = React.useRef(null);
9
+ var onClick = props.onClick, accessibilityState = props.accessibilityState, _a = props.componentRef, componentRef = _a === void 0 ? defaultComponentRef : _a, disabled = props.disabled, rest = __rest(props, ["onClick", "accessibilityState", "componentRef", "disabled"]);
10
+ var pressable = useAsPressable(__assign(__assign({}, rest), { disabled: disabled, onPress: onClick }));
11
+ var onKeyProps = useKeyProps(onClick, ' ', 'Enter');
12
+ var hasSubmenu = useMenuContext().isSubmenu;
13
+ return {
14
+ props: __assign(__assign(__assign({}, pressable.props), { accessible: true, accessibilityRole: 'button', onAccessibilityTap: props.onAccessibilityTap || props.onClick, accessibilityLabel: props.accessibilityLabel, accessibilityState: getAccessibilityState(disabled, accessibilityState), enableFocusRing: true, focusable: !disabled, hasSubmenu: hasSubmenu, ref: componentRef }), onKeyProps),
15
+ state: pressable.state,
16
+ };
17
+ };
18
+ var getAccessibilityState = memoize(getAccessibilityStateWorker);
19
+ function getAccessibilityStateWorker(disabled, accessibilityState) {
20
+ if (accessibilityState) {
21
+ return __assign({ disabled: disabled }, accessibilityState);
22
+ }
23
+ return { disabled: disabled };
24
+ }
25
+ //# sourceMappingURL=useMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMenuItem.js","sourceRoot":"","sources":["../../src/MenuItem/useMenuItem.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,KAAoB;IAC9C,sCAAsC;IACtC,IAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvC,IAAA,OAAO,GAAgF,KAAK,QAArF,EAAE,kBAAkB,GAA4D,KAAK,mBAAjE,EAAE,KAA0D,KAAK,aAA7B,EAAlC,YAAY,mBAAG,mBAAmB,KAAA,EAAE,QAAQ,GAAc,KAAK,SAAnB,EAAK,IAAI,UAAK,KAAK,EAA9F,6DAAsF,CAAF,CAAW;IACrG,IAAM,SAAS,GAAG,cAAc,uBAAM,IAAI,KAAE,QAAQ,UAAA,EAAE,OAAO,EAAE,OAAO,IAAG,CAAC;IAC1E,IAAM,UAAU,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACtD,IAAM,UAAU,GAAG,cAAc,EAAE,CAAC,SAAS,CAAC;IAE9C,OAAO;QACL,KAAK,iCACA,SAAS,CAAC,KAAK,KAClB,UAAU,EAAE,IAAI,EAChB,iBAAiB,EAAE,QAAQ,EAC3B,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,IAAI,KAAK,CAAC,OAAO,EAC7D,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAC5C,kBAAkB,EAAE,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,EACvE,eAAe,EAAE,IAAI,EACrB,SAAS,EAAE,CAAC,QAAQ,EACpB,UAAU,YAAA,EACV,GAAG,EAAE,YAAY,KACd,UAAU,CACd;QACD,KAAK,EAAE,SAAS,CAAC,KAAK;KACvB,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,qBAAqB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AACnE,SAAS,2BAA2B,CAAC,QAAiB,EAAE,kBAAuC;IAC7F,IAAI,kBAAkB,EAAE;QACtB,kBAAS,QAAQ,UAAA,IAAK,kBAAkB,EAAG;KAC5C;IACD,OAAO,EAAE,QAAQ,UAAA,EAAE,CAAC;AACtB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { MenuListProps } from './MenuList.types';
2
+ export declare const MenuList: import("@fluentui-react-native/framework").ComposableComponent<MenuListProps, import("./MenuList.types").MenuListSlotProps, import("./MenuList.types").MenuListTokens, object>;
3
+ export default MenuList;
4
+ //# sourceMappingURL=MenuList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAG7E,eAAO,MAAM,QAAQ,gLAanB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { __assign } from "tslib";
2
+ import { View } from 'react-native';
3
+ import { compose, withSlots } from '@fluentui-react-native/framework';
4
+ import { menuListName } from './MenuList.types';
5
+ import { stylingSettings } from './MenuList.styling';
6
+ export var MenuList = compose(__assign(__assign({ displayName: menuListName }, stylingSettings), { slots: {
7
+ root: View,
8
+ }, useRender: function (userProps, useSlots) {
9
+ var Slots = useSlots(userProps);
10
+ return function (_final, children) {
11
+ return withSlots(Slots.root, null, children);
12
+ };
13
+ } }));
14
+ export default MenuList;
15
+ //# sourceMappingURL=MenuList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAY,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,IAAM,QAAQ,GAAG,OAAO,qBAC7B,WAAW,EAAE,YAAY,IACtB,eAAe,KAClB,KAAK,EAAE;QACL,IAAI,EAAE,IAAI;KACX,EACD,SAAS,EAAE,UAAC,SAAwB,EAAE,QAAgC;QACpE,IAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;QAElC,OAAO,UAAC,MAAqB,EAAE,QAAyB;YACtD,OAAO,UAAC,KAAK,CAAC,IAAI,QAAE,QAAQ,CAAc,CAAC;QAC7C,CAAC,CAAC;IACJ,CAAC,IACD,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { UseStylingOptions } from '@fluentui-react-native/framework';
2
+ import { MenuListProps, MenuListTokens, MenuListSlotProps } from './MenuList.types';
3
+ export declare const stylingSettings: UseStylingOptions<MenuListProps, MenuListSlotProps, MenuListTokens>;
4
+ //# sourceMappingURL=MenuList.styling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuList.styling.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.styling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,iBAAiB,EAAc,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAgB,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAElG,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,CAc/F,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { __assign, __spreadArray } from "tslib";
2
+ import { buildProps } from '@fluentui-react-native/framework';
3
+ import { layoutStyles } from '@fluentui-react-native/tokens';
4
+ import { defaultMenuListTokens } from './MenuListTokens';
5
+ import { menuListName } from './MenuList.types';
6
+ export var stylingSettings = {
7
+ tokens: [defaultMenuListTokens, menuListName],
8
+ slotProps: {
9
+ root: buildProps(function (tokens, theme) { return ({
10
+ style: __assign({ backgroundColor: tokens.backgroundColor, display: 'flex' }, layoutStyles.from(tokens, theme)),
11
+ }); }, __spreadArray(['backgroundColor'], layoutStyles.keys, true)),
12
+ },
13
+ };
14
+ //# sourceMappingURL=MenuList.styling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuList.styling.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.styling.ts"],"names":[],"mappings":";AAAA,OAAO,EAA4B,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAoD,MAAM,kBAAkB,CAAC;AAElG,MAAM,CAAC,IAAM,eAAe,GAAwE;IAClG,MAAM,EAAE,CAAC,qBAAqB,EAAE,YAAY,CAAC;IAC7C,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAsB,EAAE,KAAY,IAAK,OAAA,CAAC;YACzC,KAAK,aACH,eAAe,EAAE,MAAM,CAAC,eAAe,EACvC,OAAO,EAAE,MAAM,IACZ,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CACpC;SACF,CAAC,EANwC,CAMxC,iBACD,iBAAiB,GAAK,YAAY,CAAC,IAAI,QACzC;KACF;CACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import type { IViewProps } from '@fluentui-react-native/adapters';
3
+ import { IBackgroundColorTokens, LayoutTokens } from '@fluentui-react-native/tokens';
4
+ export declare const menuListName = "MenuList";
5
+ export interface MenuListTokens extends LayoutTokens, IBackgroundColorTokens {
6
+ }
7
+ export interface MenuListProps extends Omit<IViewProps, 'onPress'> {
8
+ }
9
+ export interface MenuListSlotProps {
10
+ root: React.PropsWithRef<IViewProps>;
11
+ }
12
+ export interface MenuListType {
13
+ props: MenuListProps;
14
+ tokens: MenuListTokens;
15
+ slotProps: MenuListSlotProps;
16
+ }
17
+ //# sourceMappingURL=MenuList.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuList.types.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAErF,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,MAAM,WAAW,cAAe,SAAQ,YAAY,EAAE,sBAAsB;CAAG;AAE/E,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC;CAAG;AAErE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;CACtC;AACD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,iBAAiB,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export var menuListName = 'MenuList';
2
+ //# sourceMappingURL=MenuList.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuList.types.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,IAAM,YAAY,GAAG,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Theme } from '@fluentui-react-native/framework';
2
+ import { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import { MenuListTokens } from './MenuList.types';
4
+ export declare const defaultMenuListTokens: TokenSettings<MenuListTokens, Theme>;
5
+ //# sourceMappingURL=MenuListTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuListTokens.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuListTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,cAAc,EAAE,KAAK,CAKrE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
+ export var defaultMenuListTokens = function (t) { return ({
3
+ padding: globalTokens.spacing.xs,
4
+ minWidth: 128,
5
+ maxWidth: 300,
6
+ backgroundColor: t.colors.neutralBackground1,
7
+ }); };
8
+ //# sourceMappingURL=MenuListTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuListTokens.js","sourceRoot":"","sources":["../../src/MenuList/MenuListTokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,MAAM,CAAC,IAAM,qBAAqB,GAAyC,UAAC,CAAQ,IAAqB,OAAA,CAAC;IACxG,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE;IAChC,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;CAC7C,CAAC,EALuG,CAKvG,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Theme } from '@fluentui-react-native/framework';
2
+ import { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import { MenuListTokens } from './MenuList.types';
4
+ export declare const defaultMenuListTokens: TokenSettings<MenuListTokens, Theme>;
5
+ //# sourceMappingURL=MenuListTokens.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuListTokens.win32.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuListTokens.win32.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,cAAc,EAAE,KAAK,CAKrE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
+ export var defaultMenuListTokens = function (t) { return ({
3
+ paddingVertical: globalTokens.spacing.xs,
4
+ minWidth: 128,
5
+ maxWidth: 300,
6
+ backgroundColor: t.colors.neutralBackground1,
7
+ }); };
8
+ //# sourceMappingURL=MenuListTokens.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuListTokens.win32.js","sourceRoot":"","sources":["../../src/MenuList/MenuListTokens.win32.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,MAAM,CAAC,IAAM,qBAAqB,GAAyC,UAAC,CAAQ,IAAqB,OAAA,CAAC;IACxG,eAAe,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE;IACxC,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB;CAC7C,CAAC,EALuG,CAKvG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuPopover.d.ts","sourceRoot":"","sources":["../../src/MenuPopover/MenuPopover.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGxE,eAAO,MAAM,WAAW,iFAMtB,CAAC;AAGH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"MenuPopover.d.ts","sourceRoot":"","sources":["../../src/MenuPopover/MenuPopover.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGxE,eAAO,MAAM,WAAW,iFAWtB,CAAC;AAGH,eAAe,WAAW,CAAC"}