@fluentui/react-menu 0.0.0-nightlybc5ff01fb020211104.1 → 0.0.0-nightlycc44f3625c20211220.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/CHANGELOG.json +238 -30
  2. package/CHANGELOG.md +60 -16
  3. package/dist/react-menu.d.ts +14 -9
  4. package/lib/components/Menu/useMenu.js +9 -6
  5. package/lib/components/Menu/useMenu.js.map +1 -1
  6. package/lib/components/MenuDivider/renderMenuDivider.js +2 -1
  7. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  8. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  9. package/lib/components/MenuDivider/useMenuDividerStyles.js +1 -1
  10. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  11. package/lib/components/MenuGroup/renderMenuGroup.js +2 -1
  12. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  13. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
  14. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  15. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  16. package/lib/components/MenuItem/MenuItem.js +0 -2
  17. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  18. package/lib/components/MenuItem/renderMenuItem.js +7 -1
  19. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  20. package/lib/components/MenuItem/useMenuItemStyles.js +11 -4
  21. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  22. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -1
  23. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  24. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +6 -1
  25. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  26. package/lib/components/MenuList/MenuList.types.d.ts +8 -6
  27. package/lib/components/MenuList/renderMenuList.js +2 -1
  28. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  29. package/lib/components/MenuList/useMenuList.js.map +1 -1
  30. package/lib/components/MenuList/useMenuListStyles.js +4 -3
  31. package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
  32. package/lib/components/MenuPopover/renderMenuPopover.js +4 -2
  33. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  34. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  35. package/lib/components/MenuPopover/useMenuPopoverStyles.js +7 -4
  36. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  37. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +2 -1
  38. package/lib/components/MenuTrigger/useTriggerElement.js +6 -5
  39. package/lib/components/MenuTrigger/useTriggerElement.js.map +1 -1
  40. package/lib/utils/useOnMenuEnter.js.map +1 -1
  41. package/lib-commonjs/components/Menu/useMenu.js +10 -7
  42. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  43. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +2 -1
  44. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  45. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  46. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +2 -1
  47. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  48. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
  49. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  50. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  51. package/lib-commonjs/components/MenuItem/MenuItem.js +0 -3
  52. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  53. package/lib-commonjs/components/MenuItem/renderMenuItem.js +7 -1
  54. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  55. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +11 -3
  56. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  57. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -1
  58. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  59. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +6 -1
  60. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  61. package/lib-commonjs/components/MenuList/MenuList.types.d.ts +8 -6
  62. package/lib-commonjs/components/MenuList/renderMenuList.js +2 -1
  63. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  64. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  65. package/lib-commonjs/components/MenuList/useMenuListStyles.js +3 -2
  66. package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
  67. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +4 -2
  68. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  69. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  70. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +6 -3
  71. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  72. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +2 -1
  73. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +6 -5
  74. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +1 -1
  75. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  76. package/package.json +16 -16
  77. package/lib/common/isConformant.d.ts +0 -4
  78. package/lib/common/isConformant.js +0 -12
  79. package/lib/common/isConformant.js.map +0 -1
  80. package/lib/common/mockUseMenuContext.d.ts +0 -7
  81. package/lib/common/mockUseMenuContext.js +0 -29
  82. package/lib/common/mockUseMenuContext.js.map +0 -1
  83. package/lib-commonjs/common/isConformant.d.ts +0 -4
  84. package/lib-commonjs/common/isConformant.js +0 -23
  85. package/lib-commonjs/common/isConformant.js.map +0 -1
  86. package/lib-commonjs/common/mockUseMenuContext.d.ts +0 -7
  87. package/lib-commonjs/common/mockUseMenuContext.js +0 -39
  88. package/lib-commonjs/common/mockUseMenuContext.js.map +0 -1
@@ -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":""}