@fluentui/react-menu 0.0.0-nightlya54302c0b220211124.1 → 0.0.0-nightlya9c3d10d9520220113.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 (165) hide show
  1. package/CHANGELOG.json +218 -19
  2. package/CHANGELOG.md +48 -12
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +49 -9
  5. package/lib/MenuSplitGroup.d.ts +1 -0
  6. package/lib/MenuSplitGroup.js +2 -0
  7. package/lib/MenuSplitGroup.js.map +1 -0
  8. package/lib/components/Menu/useMenu.js +29 -21
  9. package/lib/components/Menu/useMenu.js.map +1 -1
  10. package/lib/components/MenuDivider/renderMenuDivider.js +2 -1
  11. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  12. package/lib/components/MenuDivider/useMenuDivider.js +3 -0
  13. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  14. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  15. package/lib/components/MenuDivider/useMenuDividerStyles.js +2 -1
  16. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  17. package/lib/components/MenuGroup/renderMenuGroup.js +2 -1
  18. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  19. package/lib/components/MenuGroup/useMenuGroup.js +3 -0
  20. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  21. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
  22. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  23. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +3 -0
  24. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  25. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  26. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +1 -0
  27. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  28. package/lib/components/MenuItem/MenuItem.js +0 -2
  29. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  30. package/lib/components/MenuItem/MenuItem.types.d.ts +1 -1
  31. package/lib/components/MenuItem/renderMenuItem.js +8 -3
  32. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  33. package/lib/components/MenuItem/useMenuItem.d.ts +1 -5
  34. package/lib/components/MenuItem/useMenuItem.js +3 -8
  35. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  36. package/lib/components/MenuItem/useMenuItemStyles.js +26 -23
  37. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  38. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +7 -3
  39. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  40. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +7 -3
  41. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  42. package/lib/components/MenuList/renderMenuList.js +2 -1
  43. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  44. package/lib/components/MenuList/useMenuList.js +3 -0
  45. package/lib/components/MenuList/useMenuList.js.map +1 -1
  46. package/lib/components/MenuList/useMenuListStyles.js +4 -3
  47. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  48. package/lib/components/MenuPopover/renderMenuPopover.js +4 -2
  49. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  50. package/lib/components/MenuPopover/useMenuPopover.js +3 -0
  51. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  52. package/lib/components/MenuPopover/useMenuPopoverStyles.js +7 -3
  53. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  54. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  55. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  56. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  57. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  58. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  59. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  60. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  61. package/lib/components/MenuSplitGroup/index.js +6 -0
  62. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  63. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  64. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  65. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  66. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  67. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  68. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  69. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  70. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  71. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  72. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +2 -1
  73. package/lib/components/MenuTrigger/useTriggerElement.js +6 -5
  74. package/lib/components/MenuTrigger/useTriggerElement.js.map +1 -1
  75. package/lib/index.d.ts +11 -10
  76. package/lib/index.js +11 -10
  77. package/lib/index.js.map +1 -1
  78. package/lib/utils/useOnMenuEnter.js.map +1 -1
  79. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  80. package/lib-commonjs/MenuSplitGroup.js +10 -0
  81. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  82. package/lib-commonjs/components/Menu/useMenu.js +33 -26
  83. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  84. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +2 -1
  85. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  86. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +3 -0
  87. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  88. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  89. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +2 -0
  90. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  91. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +2 -1
  92. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  93. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +3 -0
  94. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  95. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
  96. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  97. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +3 -0
  98. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  99. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  100. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +2 -0
  101. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  102. package/lib-commonjs/components/MenuItem/MenuItem.js +0 -3
  103. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  104. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +1 -1
  105. package/lib-commonjs/components/MenuItem/renderMenuItem.js +8 -4
  106. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  107. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +1 -5
  108. package/lib-commonjs/components/MenuItem/useMenuItem.js +5 -10
  109. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  110. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +27 -22
  111. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  112. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +7 -4
  113. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  114. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +7 -4
  115. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  116. package/lib-commonjs/components/MenuList/renderMenuList.js +2 -1
  117. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  118. package/lib-commonjs/components/MenuList/useMenuList.js +3 -0
  119. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  120. package/lib-commonjs/components/MenuList/useMenuListStyles.js +3 -2
  121. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  122. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +4 -2
  123. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  124. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +3 -0
  125. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  126. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +7 -2
  127. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  128. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  129. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  130. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  131. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  132. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  133. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  134. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  135. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  136. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  137. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  138. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  139. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  140. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  141. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  142. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  143. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  144. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  145. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  146. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +2 -1
  147. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +6 -5
  148. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +1 -1
  149. package/lib-commonjs/index.d.ts +11 -10
  150. package/lib-commonjs/index.js +16 -14
  151. package/lib-commonjs/index.js.map +1 -1
  152. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  153. package/package.json +16 -15
  154. package/lib/common/isConformant.d.ts +0 -4
  155. package/lib/common/isConformant.js +0 -12
  156. package/lib/common/isConformant.js.map +0 -1
  157. package/lib/common/mockUseMenuContext.d.ts +0 -7
  158. package/lib/common/mockUseMenuContext.js +0 -29
  159. package/lib/common/mockUseMenuContext.js.map +0 -1
  160. package/lib-commonjs/common/isConformant.d.ts +0 -4
  161. package/lib-commonjs/common/isConformant.js +0 -23
  162. package/lib-commonjs/common/isConformant.js.map +0 -1
  163. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  164. package/lib-commonjs/common/mockUseMenuContext.js +0 -39
  165. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
@@ -6,33 +6,35 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
- tslib_1.__exportStar(require("./MenuItem"), exports);
9
+ tslib_1.__exportStar(require("./contexts/menuContext"), exports);
10
10
 
11
- tslib_1.__exportStar(require("./MenuList"), exports);
11
+ tslib_1.__exportStar(require("./contexts/menuTriggerContext"), exports);
12
12
 
13
- tslib_1.__exportStar(require("./MenuItemCheckbox"), exports);
13
+ tslib_1.__exportStar(require("./contexts/menuGroupContext"), exports);
14
14
 
15
- tslib_1.__exportStar(require("./MenuItemRadio"), exports);
15
+ tslib_1.__exportStar(require("./contexts/menuListContext"), exports);
16
16
 
17
- tslib_1.__exportStar(require("./MenuDivider"), exports);
17
+ tslib_1.__exportStar(require("./Menu"), exports);
18
18
 
19
- tslib_1.__exportStar(require("./MenuGroupHeader"), exports);
19
+ tslib_1.__exportStar(require("./MenuDivider"), exports);
20
20
 
21
21
  tslib_1.__exportStar(require("./MenuGroup"), exports);
22
22
 
23
- tslib_1.__exportStar(require("./selectable/index"), exports);
23
+ tslib_1.__exportStar(require("./MenuGroupHeader"), exports);
24
24
 
25
- tslib_1.__exportStar(require("./MenuTrigger"), exports);
25
+ tslib_1.__exportStar(require("./MenuItem"), exports);
26
26
 
27
- tslib_1.__exportStar(require("./Menu"), exports);
27
+ tslib_1.__exportStar(require("./MenuItemCheckbox"), exports);
28
28
 
29
- tslib_1.__exportStar(require("./contexts/menuContext"), exports);
29
+ tslib_1.__exportStar(require("./MenuItemRadio"), exports);
30
30
 
31
- tslib_1.__exportStar(require("./contexts/menuTriggerContext"), exports);
31
+ tslib_1.__exportStar(require("./MenuList"), exports);
32
32
 
33
- tslib_1.__exportStar(require("./contexts/menuGroupContext"), exports);
33
+ tslib_1.__exportStar(require("./MenuPopover"), exports);
34
34
 
35
- tslib_1.__exportStar(require("./contexts/menuListContext"), exports);
35
+ tslib_1.__exportStar(require("./MenuSplitGroup"), exports);
36
36
 
37
- tslib_1.__exportStar(require("./MenuPopover"), exports);
37
+ tslib_1.__exportStar(require("./MenuTrigger"), exports);
38
+
39
+ tslib_1.__exportStar(require("./selectable/index"), exports);
38
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBA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N,CAAgB,MAAK;AACnB;AACA,QAAI,OAAO,IAAI,IAAf,EAAqB;AACnB;AACD;;AAUD,QAAI,CAAC,QAAL,EAAe;AACb,MAAA,OAAO,CAAC,gBAAR,CAAyB,OAAA,CAAA,gBAAzB,EAA2C,QAA3C;AACD;;AAED,WAAO,MAAK;AACV,MAAA,OAAO,CAAC,mBAAR,CAA4B,OAAA,CAAA,gBAA5B,EAA8C,QAA9C;AACD,KAFD;AAGD,GArBD,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;AACjF,EAAA,EAAE,CAAC,aAAH,CAAiB,IAAI,WAAJ,CAAgB,OAAA,CAAA,gBAAhB,EAAkC;AAAE,IAAA,OAAO,EAAE,IAAX;AAAiB,IAAA,MAAM,EAAE;AAAE,MAAA;AAAF;AAAzB,GAAlC,CAAjB;AACD,CAFM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-menu",
3
- "version": "0.0.0-nightlya54302c0b220211124.1",
3
+ "version": "0.0.0-nightlya9c3d10d9520220113.1",
4
4
  "description": "Fluent UI menu component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -13,7 +13,7 @@
13
13
  "license": "MIT",
14
14
  "scripts": {
15
15
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
16
- "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-menu/src && yarn docs",
16
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-menu/src && yarn docs",
17
17
  "build": "just-scripts build",
18
18
  "bundle-size": "bundle-size measure",
19
19
  "clean": "just-scripts clean",
@@ -23,14 +23,15 @@
23
23
  "lint": "just-scripts lint",
24
24
  "start": "yarn storybook",
25
25
  "storybook": "start-storybook",
26
- "test": "jest"
26
+ "test": "jest",
27
+ "type-check": "tsc -b tsconfig.json"
27
28
  },
28
29
  "devDependencies": {
29
- "@fluentui/babel-make-styles": "0.0.0-nightlya54302c0b220211124.1",
30
+ "@fluentui/babel-make-styles": "0.0.0-nightlya9c3d10d9520220113.1",
30
31
  "@fluentui/eslint-plugin": "*",
31
- "@fluentui/jest-serializer-make-styles": "0.0.0-nightlya54302c0b220211124.1",
32
+ "@fluentui/jest-serializer-make-styles": "0.0.0-nightlya9c3d10d9520220113.1",
32
33
  "@fluentui/react-conformance": "*",
33
- "@fluentui/react-conformance-make-styles": "0.0.0-nightlya54302c0b220211124.1",
34
+ "@fluentui/react-conformance-make-styles": "0.0.0-nightlya9c3d10d9520220113.1",
34
35
  "@fluentui/scripts": "^1.0.0",
35
36
  "@types/enzyme": "3.10.3",
36
37
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -44,15 +45,15 @@
44
45
  "react-test-renderer": "^16.3.0"
45
46
  },
46
47
  "dependencies": {
47
- "@fluentui/keyboard-keys": "0.0.0-nightlya54302c0b220211124.0",
48
- "@fluentui/react-context-selector": "0.0.0-nightlya54302c0b220211124.0",
49
- "@fluentui/react-icons": "^2.0.152-beta.3",
50
- "@fluentui/react-make-styles": "0.0.0-nightlya54302c0b220211124.1",
51
- "@fluentui/react-portal": "0.0.0-nightlya54302c0b220211124.1",
52
- "@fluentui/react-positioning": "0.0.0-nightlya54302c0b220211124.1",
53
- "@fluentui/react-shared-contexts": "0.0.0-nightlya54302c0b220211124.1",
54
- "@fluentui/react-tabster": "0.0.0-nightlya54302c0b220211124.1",
55
- "@fluentui/react-utilities": "0.0.0-nightlya54302c0b220211124.0",
48
+ "@fluentui/keyboard-keys": "0.0.0-nightlya9c3d10d9520220113.1",
49
+ "@fluentui/react-context-selector": "0.0.0-nightlya9c3d10d9520220113.1",
50
+ "@fluentui/react-icons": "^2.0.154-beta.5",
51
+ "@fluentui/react-make-styles": "0.0.0-nightlya9c3d10d9520220113.1",
52
+ "@fluentui/react-portal": "0.0.0-nightlya9c3d10d9520220113.1",
53
+ "@fluentui/react-positioning": "0.0.0-nightlya9c3d10d9520220113.1",
54
+ "@fluentui/react-shared-contexts": "0.0.0-nightlya9c3d10d9520220113.1",
55
+ "@fluentui/react-tabster": "0.0.0-nightlya9c3d10d9520220113.1",
56
+ "@fluentui/react-utilities": "0.0.0-nightlya9c3d10d9520220113.1",
56
57
  "tslib": "^2.1.0"
57
58
  },
58
59
  "peerDependencies": {
@@ -1,4 +0,0 @@
1
- import type { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,12 +0,0 @@
1
- import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
2
- import makeStylesTests from '@fluentui/react-conformance-make-styles';
3
- export function isConformant(testInfo) {
4
- const defaultOptions = {
5
- asPropHandlesRef: true,
6
- componentPath: module.parent.filename.replace('.test', ''),
7
- skipAsPropTests: true,
8
- extraTests: makeStylesTests
9
- };
10
- baseIsConformant(defaultOptions, testInfo);
11
- }
12
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,QAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,eAAe,EAAE,IAH0C;AAI3D,IAAA,UAAU,EAAE;AAJ+C,GAA7D;AAOA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
@@ -1,7 +0,0 @@
1
- import type { MenuContextValue } from '../contexts/menuContext';
2
- /**
3
- * A test utility to mock the useMenuContext hook that relies on context selector
4
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
5
- * @param options Menu context values to set for testing
6
- */
7
- export declare const mockUseMenuContext: (options?: Partial<MenuContextValue>) => void;
@@ -1,29 +0,0 @@
1
- import { useMenuContext } from '../contexts/menuContext';
2
- /**
3
- * A test utility to mock the useMenuContext hook that relies on context selector
4
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
5
- * @param options Menu context values to set for testing
6
- */
7
-
8
- export const mockUseMenuContext = (options = {}) => {
9
- const mockContext = {
10
- open: false,
11
- setOpen: () => null,
12
- triggerRef: {
13
- current: null
14
- },
15
- menuPopoverRef: {
16
- current: null
17
- },
18
- openOnContext: false,
19
- openOnHover: false,
20
- isSubmenu: false,
21
- triggerId: 'id',
22
- ...options
23
- }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
-
25
- useMenuContext.mockImplementation(selector => {
26
- return selector(mockContext);
27
- });
28
- };
29
- //# sourceMappingURL=mockUseMenuContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/mockUseMenuContext.ts"],"names":[],"mappings":"AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA;;;;AAIG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAAC,OAAA,GAAqC,EAAtC,KAA4C;AAC5E,QAAM,WAAW,GAAqB;AACpC,IAAA,IAAI,EAAE,KAD8B;AAEpC,IAAA,OAAO,EAAE,MAAM,IAFqB;AAGpC,IAAA,UAAU,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAHuB;AAIpC,IAAA,cAAc,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAJmB;AAKpC,IAAA,aAAa,EAAE,KALqB;AAMpC,IAAA,WAAW,EAAE,KANuB;AAOpC,IAAA,SAAS,EAAE,KAPyB;AAQpC,IAAA,SAAS,EAAE,IARyB;AASpC,OAAG;AATiC,GAAtC,CAD4E,CAY5E;;AACC,EAAA,cAA4B,CAAC,kBAA7B,CAAiD,QAAD,IAAiD;AAChG,WAAO,QAAQ,CAAC,WAAD,CAAf;AACD,GAFA;AAGF,CAhBM","sourceRoot":""}
@@ -1,4 +0,0 @@
1
- import type { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isConformant = void 0;
7
-
8
- const react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
9
-
10
- const react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
11
-
12
- function isConformant(testInfo) {
13
- const defaultOptions = {
14
- asPropHandlesRef: true,
15
- componentPath: module.parent.filename.replace('.test', ''),
16
- skipAsPropTests: true,
17
- extraTests: react_conformance_make_styles_1.default
18
- };
19
- react_conformance_1.isConformant(defaultOptions, testInfo);
20
- }
21
-
22
- exports.isConformant = isConformant;
23
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,MAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,QAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,eAAe,EAAE,IAH0C;AAI3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAJ+C,GAA7D;AAOA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAXD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
@@ -1,7 +0,0 @@
1
- import type { MenuContextValue } from '../contexts/menuContext';
2
- /**
3
- * A test utility to mock the useMenuContext hook that relies on context selector
4
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
5
- * @param options Menu context values to set for testing
6
- */
7
- export declare const mockUseMenuContext: (options?: Partial<MenuContextValue>) => void;
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.mockUseMenuContext = void 0;
7
-
8
- const menuContext_1 = /*#__PURE__*/require("../contexts/menuContext");
9
- /**
10
- * A test utility to mock the useMenuContext hook that relies on context selector
11
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
12
- * @param options Menu context values to set for testing
13
- */
14
-
15
-
16
- const mockUseMenuContext = (options = {}) => {
17
- const mockContext = {
18
- open: false,
19
- setOpen: () => null,
20
- triggerRef: {
21
- current: null
22
- },
23
- menuPopoverRef: {
24
- current: null
25
- },
26
- openOnContext: false,
27
- openOnHover: false,
28
- isSubmenu: false,
29
- triggerId: 'id',
30
- ...options
31
- }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
-
33
- menuContext_1.useMenuContext.mockImplementation(selector => {
34
- return selector(mockContext);
35
- });
36
- };
37
-
38
- exports.mockUseMenuContext = mockUseMenuContext;
39
- //# sourceMappingURL=mockUseMenuContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/mockUseMenuContext.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,kBAAkB,GAAG,CAAC,OAAA,GAAqC,EAAtC,KAA4C;AAC5E,QAAM,WAAW,GAAqB;AACpC,IAAA,IAAI,EAAE,KAD8B;AAEpC,IAAA,OAAO,EAAE,MAAM,IAFqB;AAGpC,IAAA,UAAU,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAHuB;AAIpC,IAAA,cAAc,EAAG;AAAE,MAAA,OAAO,EAAE;AAAX,KAJmB;AAKpC,IAAA,aAAa,EAAE,KALqB;AAMpC,IAAA,WAAW,EAAE,KANuB;AAOpC,IAAA,SAAS,EAAE,KAPyB;AAQpC,IAAA,SAAS,EAAE,IARyB;AASpC,OAAG;AATiC,GAAtC,CAD4E,CAY5E;;AACC,EAAA,aAAA,CAAA,cAAA,CAA6B,kBAA7B,CAAiD,QAAD,IAAiD;AAChG,WAAO,QAAQ,CAAC,WAAD,CAAf;AACD,GAFA;AAGF,CAhBM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}