@fluentui/react-popover 0.0.0-nightly050f89bf0020211102.1 → 0.0.0-nightly07d9ed6d1b20211221.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 (71) hide show
  1. package/CHANGELOG.json +214 -24
  2. package/CHANGELOG.md +56 -15
  3. package/dist/react-popover.d.ts +3 -1
  4. package/lib/components/Popover/Popover.js +2 -2
  5. package/lib/components/Popover/Popover.js.map +1 -1
  6. package/lib/components/Popover/renderPopover.js +27 -25
  7. package/lib/components/Popover/renderPopover.js.map +1 -1
  8. package/lib/components/Popover/usePopover.js +41 -52
  9. package/lib/components/Popover/usePopover.js.map +1 -1
  10. package/lib/components/PopoverSurface/PopoverSurface.js +2 -2
  11. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  12. package/lib/components/PopoverSurface/renderPopoverSurface.js +7 -7
  13. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  14. package/lib/components/PopoverSurface/usePopoverSurface.js +41 -55
  15. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  16. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +1 -0
  17. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js +29 -16
  18. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  19. package/lib/components/PopoverTrigger/PopoverTrigger.js +2 -2
  20. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  21. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
  22. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  23. package/lib/components/PopoverTrigger/usePopoverTrigger.js +25 -33
  24. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  25. package/lib/popoverContext.d.ts +1 -1
  26. package/lib/popoverContext.js +3 -7
  27. package/lib/popoverContext.js.map +1 -1
  28. package/lib-commonjs/Popover.js +1 -1
  29. package/lib-commonjs/PopoverSurface.js +1 -1
  30. package/lib-commonjs/PopoverTrigger.js +1 -1
  31. package/lib-commonjs/components/Popover/Popover.js +4 -4
  32. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  33. package/lib-commonjs/components/Popover/index.js +1 -1
  34. package/lib-commonjs/components/Popover/renderPopover.js +29 -27
  35. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  36. package/lib-commonjs/components/Popover/usePopover.js +47 -59
  37. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  38. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +6 -6
  39. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  40. package/lib-commonjs/components/PopoverSurface/index.js +1 -1
  41. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +11 -12
  42. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  43. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +44 -59
  44. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  45. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +1 -0
  46. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +30 -16
  47. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  48. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +4 -4
  49. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  50. package/lib-commonjs/components/PopoverTrigger/index.js +1 -1
  51. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
  52. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  53. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +29 -38
  54. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  55. package/lib-commonjs/index.js +1 -1
  56. package/lib-commonjs/popoverContext.d.ts +1 -1
  57. package/lib-commonjs/popoverContext.js +3 -7
  58. package/lib-commonjs/popoverContext.js.map +1 -1
  59. package/package.json +13 -13
  60. package/lib/common/isConformant.d.ts +0 -4
  61. package/lib/common/isConformant.js +0 -13
  62. package/lib/common/isConformant.js.map +0 -1
  63. package/lib/common/mockUsePopoverContext.d.ts +0 -7
  64. package/lib/common/mockUsePopoverContext.js +0 -38
  65. package/lib/common/mockUsePopoverContext.js.map +0 -1
  66. package/lib-commonjs/common/isConformant.d.ts +0 -4
  67. package/lib-commonjs/common/isConformant.js +0 -24
  68. package/lib-commonjs/common/isConformant.js.map +0 -1
  69. package/lib-commonjs/common/mockUsePopoverContext.d.ts +0 -7
  70. package/lib-commonjs/common/mockUsePopoverContext.js +0 -49
  71. package/lib-commonjs/common/mockUsePopoverContext.js.map +0 -1
@@ -1,13 +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
- var defaultOptions = {
5
- asPropHandlesRef: true,
6
- componentPath: module.parent.filename.replace('.test', ''),
7
- // TODO // https://github.com/microsoft/fluentui/issues/19522
8
- skipAsPropTests: true,
9
- extraTests: makeStylesTests
10
- };
11
- baseIsConformant(defaultOptions, testInfo);
12
- }
13
- //# 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,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D;AACA,IAAA,eAAe,EAAE,IAJ0C;AAK3D,IAAA,UAAU,EAAE;AAL+C,GAA7D;AAQA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
@@ -1,7 +0,0 @@
1
- import type { PopoverContextValue } from '../popoverContext';
2
- /**
3
- * A test utility to mock the usePopoverContext hook that relies on context selector
4
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
5
- * @param options Popover context values to set for testing
6
- */
7
- export declare const mockPopoverContext: (options?: Partial<PopoverContextValue>) => void;
@@ -1,38 +0,0 @@
1
- import { __assign } from "tslib";
2
- import { usePopoverContext } from '../popoverContext';
3
- /**
4
- * A test utility to mock the usePopoverContext hook that relies on context selector
5
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
6
- * @param options Popover context values to set for testing
7
- */
8
-
9
- export var mockPopoverContext = function (options) {
10
- if (options === void 0) {
11
- options = {};
12
- }
13
-
14
- var mockContext = __assign({
15
- open: false,
16
- setOpen: function () {
17
- return null;
18
- },
19
- triggerRef: {
20
- current: null
21
- },
22
- contentRef: {
23
- current: null
24
- },
25
- arrowRef: {
26
- current: null
27
- },
28
- openOnContext: false,
29
- openOnHover: false,
30
- size: 'medium'
31
- }, options); // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
-
33
-
34
- usePopoverContext.mockImplementation(function (selector) {
35
- return selector(mockContext);
36
- });
37
- };
38
- //# sourceMappingURL=mockUsePopoverContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/mockUsePopoverContext.ts"],"names":[],"mappings":";AAAA,SAAS,iBAAT,QAAkC,mBAAlC;AAGA;;;;AAIG;;AACH,OAAO,IAAM,kBAAkB,GAAG,UAAC,OAAD,EAA2C;AAA1C,MAAA,OAAA,KAAA,KAAA,CAAA,EAAA;AAAA,IAAA,OAAA,GAAA,EAAA;AAA0C;;AAC3E,MAAM,WAAW,GAAA,QAAA,CAAA;AACf,IAAA,IAAI,EAAE,KADS;AAEf,IAAA,OAAO,EAAE,YAAA;AAAM,aAAA,IAAA;AAAI,KAFJ;AAGf,IAAA,UAAU,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KAHG;AAIf,IAAA,UAAU,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KAJG;AAKf,IAAA,QAAQ,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KALK;AAMf,IAAA,aAAa,EAAE,KANA;AAOf,IAAA,WAAW,EAAE,KAPE;AAQf,IAAA,IAAI,EAAE;AARS,GAAA,EASZ,OATY,CAAjB,CAD2E,CAY3E;;;AACC,EAAA,iBAA+B,CAAC,kBAAhC,CAAmD,UAAC,QAAD,EAAgD;AAClG,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,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isConformant = void 0;
7
-
8
- var react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
9
-
10
- var react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
11
-
12
- function isConformant(testInfo) {
13
- var defaultOptions = {
14
- asPropHandlesRef: true,
15
- componentPath: module.parent.filename.replace('.test', ''),
16
- // TODO // https://github.com/microsoft/fluentui/issues/19522
17
- skipAsPropTests: true,
18
- extraTests: react_conformance_make_styles_1.default
19
- };
20
- react_conformance_1.isConformant(defaultOptions, testInfo);
21
- }
22
-
23
- exports.isConformant = isConformant;
24
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D;AACA,IAAA,eAAe,EAAE,IAJ0C;AAK3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAL+C,GAA7D;AAQA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAZD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
@@ -1,7 +0,0 @@
1
- import type { PopoverContextValue } from '../popoverContext';
2
- /**
3
- * A test utility to mock the usePopoverContext hook that relies on context selector
4
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
5
- * @param options Popover context values to set for testing
6
- */
7
- export declare const mockPopoverContext: (options?: Partial<PopoverContextValue>) => void;
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.mockPopoverContext = void 0;
7
-
8
- var tslib_1 = /*#__PURE__*/require("tslib");
9
-
10
- var popoverContext_1 = /*#__PURE__*/require("../popoverContext");
11
- /**
12
- * A test utility to mock the usePopoverContext hook that relies on context selector
13
- * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
14
- * @param options Popover context values to set for testing
15
- */
16
-
17
-
18
- var mockPopoverContext = function (options) {
19
- if (options === void 0) {
20
- options = {};
21
- }
22
-
23
- var mockContext = tslib_1.__assign({
24
- open: false,
25
- setOpen: function () {
26
- return null;
27
- },
28
- triggerRef: {
29
- current: null
30
- },
31
- contentRef: {
32
- current: null
33
- },
34
- arrowRef: {
35
- current: null
36
- },
37
- openOnContext: false,
38
- openOnHover: false,
39
- size: 'medium'
40
- }, options); // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
-
42
-
43
- popoverContext_1.usePopoverContext.mockImplementation(function (selector) {
44
- return selector(mockContext);
45
- });
46
- };
47
-
48
- exports.mockPopoverContext = mockPopoverContext;
49
- //# sourceMappingURL=mockUsePopoverContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/mockUsePopoverContext.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,gBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAGA;;;;AAIG;;;AACI,IAAM,kBAAkB,GAAG,UAAC,OAAD,EAA2C;AAA1C,MAAA,OAAA,KAAA,KAAA,CAAA,EAAA;AAAA,IAAA,OAAA,GAAA,EAAA;AAA0C;;AAC3E,MAAM,WAAW,GAAA,OAAA,CAAA,QAAA,CAAA;AACf,IAAA,IAAI,EAAE,KADS;AAEf,IAAA,OAAO,EAAE,YAAA;AAAM,aAAA,IAAA;AAAI,KAFJ;AAGf,IAAA,UAAU,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KAHG;AAIf,IAAA,UAAU,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KAJG;AAKf,IAAA,QAAQ,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KALK;AAMf,IAAA,aAAa,EAAE,KANA;AAOf,IAAA,WAAW,EAAE,KAPE;AAQf,IAAA,IAAI,EAAE;AARS,GAAA,EASZ,OATY,CAAjB,CAD2E,CAY3E;;;AACC,EAAA,gBAAA,CAAA,iBAAA,CAAgC,kBAAhC,CAAmD,UAAC,QAAD,EAAgD;AAClG,WAAO,QAAQ,CAAC,WAAD,CAAf;AACD,GAFA;AAGF,CAhBM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}