@fluentui/react-popover 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. package/CHANGELOG.json +478 -25
  2. package/CHANGELOG.md +115 -15
  3. package/dist/react-popover.d.ts +36 -23
  4. package/lib/Popover.js.map +1 -1
  5. package/lib/PopoverSurface.js.map +1 -1
  6. package/lib/PopoverTrigger.js.map +1 -1
  7. package/lib/components/Popover/Popover.js +5 -5
  8. package/lib/components/Popover/Popover.js.map +1 -1
  9. package/lib/components/Popover/Popover.types.d.ts +7 -4
  10. package/lib/components/Popover/Popover.types.js.map +1 -1
  11. package/lib/components/Popover/index.js.map +1 -1
  12. package/lib/components/Popover/renderPopover.d.ts +1 -1
  13. package/lib/components/Popover/renderPopover.js +27 -25
  14. package/lib/components/Popover/renderPopover.js.map +1 -1
  15. package/lib/components/Popover/usePopover.d.ts +2 -2
  16. package/lib/components/Popover/usePopover.js +42 -53
  17. package/lib/components/Popover/usePopover.js.map +1 -1
  18. package/lib/components/PopoverSurface/PopoverSurface.js +7 -7
  19. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  20. package/lib/components/PopoverSurface/PopoverSurface.types.d.ts +2 -2
  21. package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  22. package/lib/components/PopoverSurface/index.js.map +1 -1
  23. package/lib/components/PopoverSurface/renderPopoverSurface.d.ts +1 -1
  24. package/lib/components/PopoverSurface/renderPopoverSurface.js +7 -8
  25. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  26. package/lib/components/PopoverSurface/usePopoverSurface.d.ts +4 -5
  27. package/lib/components/PopoverSurface/usePopoverSurface.js +44 -58
  28. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  29. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +2 -1
  30. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js +34 -22
  31. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  32. package/lib/components/PopoverTrigger/PopoverTrigger.d.ts +2 -1
  33. package/lib/components/PopoverTrigger/PopoverTrigger.js +6 -5
  34. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  35. package/lib/components/PopoverTrigger/PopoverTrigger.types.d.ts +9 -2
  36. package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  37. package/lib/components/PopoverTrigger/index.js.map +1 -1
  38. package/lib/components/PopoverTrigger/renderPopoverTrigger.d.ts +1 -1
  39. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
  40. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  41. package/lib/components/PopoverTrigger/usePopoverTrigger.d.ts +2 -2
  42. package/lib/components/PopoverTrigger/usePopoverTrigger.js +39 -54
  43. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  44. package/lib/index.js.map +1 -1
  45. package/lib/popoverContext.d.ts +1 -1
  46. package/lib/popoverContext.js +3 -7
  47. package/lib/popoverContext.js.map +1 -1
  48. package/lib-commonjs/Popover.js +1 -1
  49. package/lib-commonjs/Popover.js.map +1 -1
  50. package/lib-commonjs/PopoverSurface.js +1 -1
  51. package/lib-commonjs/PopoverSurface.js.map +1 -1
  52. package/lib-commonjs/PopoverTrigger.js +1 -1
  53. package/lib-commonjs/PopoverTrigger.js.map +1 -1
  54. package/lib-commonjs/components/Popover/Popover.js +5 -5
  55. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  56. package/lib-commonjs/components/Popover/Popover.types.d.ts +7 -4
  57. package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
  58. package/lib-commonjs/components/Popover/index.js +1 -1
  59. package/lib-commonjs/components/Popover/index.js.map +1 -1
  60. package/lib-commonjs/components/Popover/renderPopover.d.ts +1 -1
  61. package/lib-commonjs/components/Popover/renderPopover.js +31 -29
  62. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  63. package/lib-commonjs/components/Popover/usePopover.d.ts +2 -2
  64. package/lib-commonjs/components/Popover/usePopover.js +50 -62
  65. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  66. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +8 -8
  67. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  68. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.d.ts +2 -2
  69. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  70. package/lib-commonjs/components/PopoverSurface/index.js +1 -1
  71. package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
  72. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.d.ts +1 -1
  73. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +12 -15
  74. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  75. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.d.ts +4 -5
  76. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +50 -65
  77. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  78. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +2 -1
  79. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +38 -24
  80. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  81. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.d.ts +2 -1
  82. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +6 -5
  83. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  84. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.d.ts +9 -2
  85. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  86. package/lib-commonjs/components/PopoverTrigger/index.js +1 -1
  87. package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
  88. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.d.ts +1 -1
  89. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +3 -3
  90. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  91. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.d.ts +2 -2
  92. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +44 -60
  93. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  94. package/lib-commonjs/index.js +1 -1
  95. package/lib-commonjs/index.js.map +1 -1
  96. package/lib-commonjs/popoverContext.d.ts +1 -1
  97. package/lib-commonjs/popoverContext.js +5 -9
  98. package/lib-commonjs/popoverContext.js.map +1 -1
  99. package/package.json +14 -15
  100. package/lib/common/isConformant.d.ts +0 -4
  101. package/lib/common/isConformant.js +0 -13
  102. package/lib/common/isConformant.js.map +0 -1
  103. package/lib/common/mockUsePopoverContext.d.ts +0 -7
  104. package/lib/common/mockUsePopoverContext.js +0 -38
  105. package/lib/common/mockUsePopoverContext.js.map +0 -1
  106. package/lib-commonjs/common/isConformant.d.ts +0 -4
  107. package/lib-commonjs/common/isConformant.js +0 -24
  108. package/lib-commonjs/common/isConformant.js.map +0 -1
  109. package/lib-commonjs/common/mockUsePopoverContext.d.ts +0 -7
  110. package/lib-commonjs/common/mockUsePopoverContext.js +0 -49
  111. 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":""}