@fluentui/react-popover 9.0.0-beta.1 → 9.0.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/CHANGELOG.json +287 -1
  2. package/CHANGELOG.md +72 -2
  3. package/dist/react-popover.d.ts +7 -3
  4. package/lib/components/Popover/Popover.js +2 -2
  5. package/lib/components/Popover/Popover.js.map +1 -1
  6. package/lib/components/Popover/Popover.types.d.ts +5 -3
  7. package/lib/components/Popover/renderPopover.js +27 -25
  8. package/lib/components/Popover/renderPopover.js.map +1 -1
  9. package/lib/components/Popover/usePopover.js +39 -51
  10. package/lib/components/Popover/usePopover.js.map +1 -1
  11. package/lib/components/PopoverSurface/PopoverSurface.js +2 -2
  12. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  13. package/lib/components/PopoverSurface/renderPopoverSurface.js +6 -7
  14. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  15. package/lib/components/PopoverSurface/usePopoverSurface.js +41 -55
  16. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  17. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +1 -0
  18. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js +16 -8
  19. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  20. package/lib/components/PopoverTrigger/PopoverTrigger.js +2 -2
  21. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  22. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
  23. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  24. package/lib/components/PopoverTrigger/usePopoverTrigger.js +25 -33
  25. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +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/Popover.types.d.ts +5 -3
  34. package/lib-commonjs/components/Popover/index.js +1 -1
  35. package/lib-commonjs/components/Popover/renderPopover.js +29 -27
  36. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  37. package/lib-commonjs/components/Popover/usePopover.js +45 -58
  38. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  39. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +6 -6
  40. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  41. package/lib-commonjs/components/PopoverSurface/index.js +1 -1
  42. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +10 -12
  43. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  44. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +44 -59
  45. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  46. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +1 -0
  47. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +18 -9
  48. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  49. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +4 -4
  50. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  51. package/lib-commonjs/components/PopoverTrigger/index.js +1 -1
  52. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
  53. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  54. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +29 -38
  55. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  56. package/lib-commonjs/index.js +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 +1 @@
1
- {"version":3,"sources":["../../../src/components/PopoverTrigger/usePopoverTrigger.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,aAAT,EAAwB,gBAAxB,EAA0C,6BAA1C,QAA+E,2BAA/E;AACA,SAAS,kBAAT,QAAmC,yBAAnC;AACA,SAAS,iBAAT,QAAkC,sBAAlC;AAGA;;;;;;;AAOG;;AACH,OAAO,IAAM,iBAAiB,GAAG,UAAC,KAAD,EAA2B;AAC1D,MAAM,OAAO,GAAG,iBAAiB,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,OAAA;AAAe,GAA3B,CAAjC;AACA,MAAM,IAAI,GAAG,iBAAiB,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,IAAA;AAAY,GAAxB,CAA9B;AACA,MAAM,UAAU,GAAG,iBAAiB,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,UAAA;AAAkB,GAA9B,CAApC;AACA,MAAM,WAAW,GAAG,iBAAiB,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OAAO,CAAP,WAAA;AAAmB,GAA/B,CAArC;AACA,MAAM,aAAa,GAAG,iBAAiB,CAAC,UAAA,OAAA,EAAO;AAAI,WAAA,OA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AAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAK,CAAC,KAAN,MAAW,IAAX,IAAW,EAAA,KAAA,KAAA,CAAX,GAAW,KAAA,CAAX,GAAW,EAAA,CAAE,YAAb,MAAyB,IAAzB,IAAyB,EAAA,KAAA,KAAA,CAAzB,GAAyB,KAAA,CAAzB,GAAyB,EAAA,CAAA,IAAA,CAAA,EAAA,EAAG,CAAH,CAAzB;AACD,GALoC,CAArC;AAOA,QAAM,KAAK,GAAG,KAAK,CAAC,QAAN,CAAe,IAAf,CAAoB,KAAK,CAAC,QAA1B,CAAd;AACA,SAAO;AACL,IAAA,QAAQ,eAAE,KAAK,CAAC,YAAN,CAAmB,KAAnB,EAA0B,EAClC,GAAG,iBAD+B;AAElC,uBAAiB,SAAS,GAAG,QAAH,GAAc,MAFN;AAGlC,SAAG,KAAK,CAAC,KAHyB;AAIlC,MAAA,OAJkC;AAKlC,MAAA,YALkC;AAMlC,MAAA,SANkC;AAOlC,MAAA,YAPkC;AAQlC,MAAA,aARkC;AASlC,MAAA,GAAG,EAAE,aAAa,CAAG,KAAuE,CAAC,GAA3E,EAAgF,UAAhF;AATgB,KAA1B;AADL,GAAP;AAaD,CAlEM","sourceRoot":""}
@@ -1,9 +1,7 @@
1
1
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
- export var PopoverContext = /*#__PURE__*/createContext({
2
+ export const PopoverContext = /*#__PURE__*/createContext({
3
3
  open: false,
4
- setOpen: function () {
5
- return null;
6
- },
4
+ setOpen: () => null,
7
5
  triggerRef: {
8
6
  current: null
9
7
  },
@@ -18,7 +16,5 @@ export var PopoverContext = /*#__PURE__*/createContext({
18
16
  size: 'medium',
19
17
  trapFocus: false
20
18
  });
21
- export var usePopoverContext = function (selector) {
22
- return useContextSelector(PopoverContext, selector);
23
- };
19
+ export const usePopoverContext = selector => useContextSelector(PopoverContext, selector);
24
20
  //# sourceMappingURL=popoverContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/popoverCont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AM,iBAAiB,GAAO,QAAJ,IAC/B,kBAAkB,CAAC,cAAD,EAAiB,QAAjB,CADb","sourceRoot":""}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./components/Popover/index"), exports);
10
10
  //# sourceMappingURL=Popover.js.map
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./components/PopoverSurface/index"), exports);
10
10
  //# sourceMappingURL=PopoverSurface.js.map
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./components/PopoverTrigger/index"), exports);
10
10
  //# sourceMappingURL=PopoverTrigger.js.map
@@ -5,16 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Popover = void 0;
7
7
 
8
- var usePopover_1 = /*#__PURE__*/require("./usePopover");
8
+ const usePopover_1 = /*#__PURE__*/require("./usePopover");
9
9
 
10
- var renderPopover_1 = /*#__PURE__*/require("./renderPopover");
10
+ const renderPopover_1 = /*#__PURE__*/require("./renderPopover");
11
11
  /**
12
12
  * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.
13
13
  */
14
14
 
15
15
 
16
- var Popover = function (props) {
17
- var state = usePopover_1.usePopover(props);
16
+ const Popover = props => {
17
+ const state = usePopover_1.usePopover(props);
18
18
  return renderPopover_1.renderPopover(state);
19
19
  };
20
20
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";;;;;;;AACA,IAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,OAAO,GAA2B,UAAA,KAAA,EAAK;AAClD,MAAM,KAAK,GAAG,YAAA,CAAA,UAAA,CAAW,KAAX,CAAd;AAEA,SAAO,eAAA,CAAA,aAAA,CAAc,KAAd,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,OAAA,GAAO,OAAP;AAMb,OAAA,CAAA,OAAA,CAAQ,WAAR,GAAsB,SAAtB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,OAAO,GAA2B,KAAK,IAAG;AACrD,QAAM,KAAK,GAAG,YAAA,CAAA,UAAA,CAAW,KAAX,CAAd;AAEA,SAAO,eAAA,CAAA,aAAA,CAAc,KAAd,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,OAAA,GAAO,OAAP;AAMb,OAAA,CAAA,OAAA,CAAQ,WAAR,GAAsB,SAAtB","sourceRoot":""}
@@ -55,8 +55,8 @@ export declare type PopoverCommons = Pick<PortalProps, 'mountNode'> & {
55
55
  */
56
56
  export declare type PopoverProps = Partial<PopoverCommons> & {
57
57
  /**
58
- * Can contain two children including {@link PopoverTrigger} and {@link PopoverPopover}.
59
- * Alternatively can only contain {@link PopoverPopover} if using a custom `target`.
58
+ * Can contain two children including {@link PopoverTrigger} and {@link PopoverSurface}.
59
+ * Alternatively can only contain {@link PopoverSurface} if using a custom `target`.
60
60
  */
61
61
  children: [JSX.Element, JSX.Element] | JSX.Element;
62
62
  };
@@ -93,7 +93,9 @@ export declare type PopoverState = PopoverCommons & Pick<PopoverProps, 'children
93
93
  /**
94
94
  * Data attached to open/close events
95
95
  */
96
- export declare type OnOpenChangeData = Pick<PopoverState, 'open'>;
96
+ export declare type OnOpenChangeData = {
97
+ open: boolean;
98
+ };
97
99
  /**
98
100
  * The supported events that will trigger open/close of the menu
99
101
  */
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./Popover"), exports);
10
10
 
@@ -5,41 +5,43 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.renderPopover = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var popoverContext_1 = /*#__PURE__*/require("../../popoverContext");
10
+ const popoverContext_1 = /*#__PURE__*/require("../../popoverContext");
11
11
  /**
12
12
  * Render the final JSX of Popover
13
13
  */
14
14
 
15
15
 
16
- var renderPopover = function (state) {
17
- var open = state.open,
18
- setOpen = state.setOpen,
19
- triggerRef = state.triggerRef,
20
- contentRef = state.contentRef,
21
- openOnContext = state.openOnContext,
22
- openOnHover = state.openOnHover,
23
- mountNode = state.mountNode,
24
- arrowRef = state.arrowRef,
25
- size = state.size,
26
- noArrow = state.noArrow,
27
- appearance = state.appearance,
28
- trapFocus = state.trapFocus;
16
+ const renderPopover = state => {
17
+ const {
18
+ open,
19
+ setOpen,
20
+ triggerRef,
21
+ contentRef,
22
+ openOnContext,
23
+ openOnHover,
24
+ mountNode,
25
+ arrowRef,
26
+ size,
27
+ noArrow,
28
+ appearance,
29
+ trapFocus
30
+ } = state;
29
31
  return React.createElement(popoverContext_1.PopoverContext.Provider, {
30
32
  value: {
31
- open: open,
32
- setOpen: setOpen,
33
- triggerRef: triggerRef,
34
- contentRef: contentRef,
35
- openOnHover: openOnHover,
36
- openOnContext: openOnContext,
37
- mountNode: mountNode,
38
- arrowRef: arrowRef,
39
- size: size,
40
- noArrow: noArrow,
41
- appearance: appearance,
42
- trapFocus: trapFocus
33
+ open,
34
+ setOpen,
35
+ triggerRef,
36
+ contentRef,
37
+ openOnHover,
38
+ openOnContext,
39
+ mountNode,
40
+ arrowRef,
41
+ size,
42
+ noArrow,
43
+ appearance,
44
+ trapFocus
43
45
  }
44
46
  }, state.children);
45
47
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Popover/renderPopover.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,aAAa,GAAG,UAAC,KAAD,EAAoB;AAE7C,MAAA,IAAI,GAYF,KAAK,CAZH,IAAJ;AAAA,MACA,OAAO,GAWL,KAAK,CAXA,OADP;AAAA,MAEA,UAAU,GAUR,KAAK,CAVG,UAFV;AAAA,MAGA,UAAU,GASR,KAAK,CATG,UAHV;AAAA,MAIA,aAAa,GAQX,KAAK,CARM,aAJb;AAAA,MAKA,WAAW,GAOT,KAAK,CAPI,WALX;AAAA,MAMA,SAAS,GAMP,KAAK,CANE,SANT;AAAA,MAOA,QAAQ,GAKN,KAAK,CALC,QAPR;AAAA,MAQA,IAAI,GAIF,KAAK,CAJH,IARJ;AAAA,MASA,OAAO,GAGL,KAAK,CAHA,OATP;AAAA,MAUA,UAAU,GAER,KAAK,CAFG,UAVV;AAAA,MAWA,SAAS,GACP,KAAK,CADE,SAXT;AAcF,SACE,KAAA,CAAA,aAAA,CAAC,gBAAA,CAAA,cAAA,CAAe,QAAhB,EAAwB;AACtB,IAAA,KAAK,EAAE;AACL,MAAA,IAAI,EAAA,IADC;AAEL,MAAA,OAAO,EAAA,OAFF;AAGL,MAAA,UAAU,EAAA,UAHL;AAIL,MAAA,UAAU,EAAA,UAJL;AAKL,MAAA,WAAW,EAAA,WALN;AAML,MAAA,aAAa,EAAA,aANR;AAOL,MAAA,SAAS,EAAA,SAPJ;AAQL,MAAA,QAAQ,EAAA,QARH;AASL,MAAA,IAAI,EAAA,IATC;AAUL,MAAA,OAAO,EAAA,OAVF;AAWL,MAAA,UAAU,EAAA,UAXL;AAYL,MAAA,SAAS,EAAA;AAZJ;AADe,GAAxB,EAgBG,KAAK,CAAC,QAhBT,CADF;AAoBD,CApCM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Popover/renderPopover.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,aAAa,GAAI,KAAD,IAAwB;AACnD,QAAM;AACJ,IAAA,IADI;AAEJ,IAAA,OAFI;AAGJ,IAAA,UAHI;AAIJ,IAAA,UAJI;AAKJ,IAAA,aALI;AAMJ,IAAA,WANI;AAOJ,IAAA,SAPI;AAQJ,IAAA,QARI;AASJ,IAAA,IATI;AAUJ,IAAA,OAVI;AAWJ,IAAA,UAXI;AAYJ,IAAA;AAZI,MAaF,KAbJ;AAeA,SACE,KAAA,CAAA,aAAA,CAAC,gBAAA,CAAA,cAAA,CAAe,QAAhB,EAAwB;AACtB,IAAA,KAAK,EAAE;AACL,MAAA,IADK;AAEL,MAAA,OAFK;AAGL,MAAA,UAHK;AAIL,MAAA,UAJK;AAKL,MAAA,WALK;AAML,MAAA,aANK;AAOL,MAAA,SAPK;AAQL,MAAA,QARK;AASL,MAAA,IATK;AAUL,MAAA,OAVK;AAWL,MAAA,UAXK;AAYL,MAAA;AAZK;AADe,GAAxB,EAgBG,KAAK,CAAC,QAhBT,CADF;AAoBD,CApCM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourceRoot":""}
@@ -5,19 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.usePopover = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var React = /*#__PURE__*/require("react");
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
11
 
12
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
12
+ const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
13
13
 
14
- var react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
14
+ const react_positioning_1 = /*#__PURE__*/require("@fluentui/react-positioning");
15
15
 
16
- var react_positioning_1 = /*#__PURE__*/require("@fluentui/react-positioning");
16
+ const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
17
17
 
18
- var react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
19
-
20
- var index_1 = /*#__PURE__*/require("../PopoverSurface/index");
18
+ const index_1 = /*#__PURE__*/require("../PopoverSurface/index");
21
19
  /**
22
20
  * Create the state required to render Popover.
23
21
  *
@@ -28,47 +26,40 @@ var index_1 = /*#__PURE__*/require("../PopoverSurface/index");
28
26
  */
29
27
 
30
28
 
31
- var usePopover = function (props) {
32
- var _a = react_positioning_1.usePopperMouseTarget(),
33
- contextTarget = _a[0],
34
- setContextTarget = _a[1];
35
-
36
- var initialState = tslib_1.__assign({
29
+ const usePopover = props => {
30
+ const [contextTarget, setContextTarget] = react_positioning_1.usePopperMouseTarget();
31
+ const initialState = {
37
32
  size: 'medium',
38
- contextTarget: contextTarget,
39
- setContextTarget: setContextTarget
40
- }, props);
41
-
42
- var _b = useOpenState(initialState),
43
- open = _b[0],
44
- setOpen = _b[1];
45
-
46
- var popperRefs = usePopoverRefs(initialState);
47
- var targetDocument = react_shared_contexts_1.useFluent().targetDocument;
33
+ contextTarget,
34
+ setContextTarget,
35
+ ...props
36
+ };
37
+ const [open, setOpen] = useOpenState(initialState);
38
+ const popperRefs = usePopoverRefs(initialState);
39
+ const {
40
+ targetDocument
41
+ } = react_shared_contexts_1.useFluent();
48
42
  react_utilities_1.useOnClickOutside({
49
43
  contains: react_portal_1.elementContains,
50
44
  element: targetDocument,
51
- callback: function (ev) {
52
- return setOpen(ev, false);
53
- },
45
+ callback: ev => setOpen(ev, false),
54
46
  refs: [popperRefs.triggerRef, popperRefs.contentRef],
55
47
  disabled: !open
56
48
  });
57
49
  react_utilities_1.useOnScrollOutside({
58
50
  contains: react_portal_1.elementContains,
59
51
  element: targetDocument,
60
- callback: function (ev) {
61
- return setOpen(ev, false);
62
- },
52
+ callback: ev => setOpen(ev, false),
63
53
  refs: [popperRefs.triggerRef, popperRefs.contentRef],
64
54
  disabled: !open || !initialState.openOnContext
65
55
  });
66
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, initialState), popperRefs), {
67
- open: open,
68
- setOpen: setOpen,
69
- setContextTarget: setContextTarget,
70
- contextTarget: contextTarget
71
- });
56
+ return { ...initialState,
57
+ ...popperRefs,
58
+ open,
59
+ setOpen,
60
+ setContextTarget,
61
+ contextTarget
62
+ };
72
63
  };
73
64
 
74
65
  exports.usePopover = usePopover;
@@ -77,23 +68,19 @@ exports.usePopover = usePopover;
77
68
  */
78
69
 
79
70
  function useOpenState(state) {
80
- var onOpenChange = react_utilities_1.useEventCallback(function (e, data) {
71
+ const onOpenChange = react_utilities_1.useEventCallback((e, data) => {
81
72
  var _a;
82
73
 
83
74
  return (_a = state.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(state, e, data);
84
75
  });
85
-
86
- var _a = react_utilities_1.useControllableState({
76
+ const [open, setOpenState] = react_utilities_1.useControllableState({
87
77
  state: state.open,
88
78
  defaultState: state.defaultOpen,
89
79
  initialState: false
90
- }),
91
- open = _a[0],
92
- setOpenState = _a[1];
93
-
80
+ });
94
81
  state.open = open !== undefined ? open : state.open;
95
- var setContextTarget = state.setContextTarget;
96
- var setOpen = React.useCallback(function (e, shouldOpen) {
82
+ const setContextTarget = state.setContextTarget;
83
+ const setOpen = React.useCallback((e, shouldOpen) => {
97
84
  if (shouldOpen && e.type === 'contextmenu') {
98
85
  setContextTarget(e);
99
86
  }
@@ -102,7 +89,7 @@ function useOpenState(state) {
102
89
  setContextTarget(undefined);
103
90
  }
104
91
 
105
- setOpenState(function (prevOpen) {
92
+ setOpenState(prevOpen => {
106
93
  // More than one event (mouse, focus, keyboard) can request the Popover to close
107
94
  // We assume the first event is the correct one
108
95
  if (prevOpen !== shouldOpen) {
@@ -122,12 +109,12 @@ function useOpenState(state) {
122
109
 
123
110
 
124
111
  function usePopoverRefs(state) {
125
- var popperOptions = tslib_1.__assign({
112
+ const popperOptions = {
126
113
  position: 'above',
127
114
  align: 'center',
128
- target: state.openOnContext ? state.contextTarget : undefined
129
- }, react_positioning_1.resolvePositioningShorthand(state.positioning)); // no reason to render arrow when covering the target
130
-
115
+ target: state.openOnContext ? state.contextTarget : undefined,
116
+ ...react_positioning_1.resolvePositioningShorthand(state.positioning)
117
+ }; // no reason to render arrow when covering the target
131
118
 
132
119
  if (popperOptions.coverTarget) {
133
120
  state.noArrow = true;
@@ -137,15 +124,15 @@ function usePopoverRefs(state) {
137
124
  popperOptions.offset = react_positioning_1.mergeArrowOffset(popperOptions.offset, index_1.arrowHeights[state.size]);
138
125
  }
139
126
 
140
- var _a = react_positioning_1.usePopper(popperOptions),
141
- triggerRef = _a.targetRef,
142
- contentRef = _a.containerRef,
143
- arrowRef = _a.arrowRef;
144
-
127
+ const {
128
+ targetRef: triggerRef,
129
+ containerRef: contentRef,
130
+ arrowRef
131
+ } = react_positioning_1.usePopper(popperOptions);
145
132
  return {
146
- triggerRef: triggerRef,
147
- contentRef: contentRef,
148
- arrowRef: arrowRef
133
+ triggerRef,
134
+ contentRef,
135
+ arrowRef
149
136
  };
150
137
  }
151
138
  //# sourceMappingURL=usePopover.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Popover/usePopover.ts"],"names":[],"mappings":";;;;;;;;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;AAED;;AAEG;;;AACH,SAAS,cAAT,CACE,KADF,EACuH;AAErH,QAAM,aAAa,GAAG;AACpB,IAAA,QAAQ,EAAE,OADU;AAEpB,IAAA,KAAK,EAAE,QAFa;AAGpB,IAAA,MAAM,EAAE,KAAK,CAAC,aAAN,GAAsB,KAAK,CAAC,aAA5B,GAA4C,SAHhC;AAIpB,OAAG,mBAAA,CAAA,2BAAA,CAA4B,KAAK,CAAC,WAAlC;AAJiB,GAAtB,CAFqH,CASrH;;AACA,MAAI,aAAa,CAAC,WAAlB,EAA+B;AAC7B,IAAA,KAAK,CAAC,OAAN,GAAgB,IAAhB;AACD;;AAED,MAAI,CAAC,KAAK,CAAC,OAAX,EAAoB;AAClB,IAAA,aAAa,CAAC,MAAd,GAAuB,mBAAA,CAAA,gBAAA,CAAiB,aAAa,CAAC,MAA/B,EAAuC,OAAA,CAAA,YAAA,CAAa,KAAK,CAAC,IAAnB,CAAvC,CAAvB;AACD;;AAED,QAAM;AAAE,IAAA,SAAS,EAAE,UAAb;AAAyB,IAAA,YAAY,EAAE,UAAvC;AAAmD,IAAA;AAAnD,MAAgE,mBAAA,CAAA,SAAA,CAAU,aAAV,CAAtE;AAEA,SAAO;AACL,IAAA,UADK;AAEL,IAAA,UAFK;AAGL,IAAA;AAHK,GAAP;AAKD","sourceRoot":""}
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.PopoverSurface = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var usePopoverSurface_1 = /*#__PURE__*/require("./usePopoverSurface");
10
+ const usePopoverSurface_1 = /*#__PURE__*/require("./usePopoverSurface");
11
11
 
12
- var renderPopoverSurface_1 = /*#__PURE__*/require("./renderPopoverSurface");
12
+ const renderPopoverSurface_1 = /*#__PURE__*/require("./renderPopoverSurface");
13
13
 
14
- var usePopoverSurfaceStyles_1 = /*#__PURE__*/require("./usePopoverSurfaceStyles");
14
+ const usePopoverSurfaceStyles_1 = /*#__PURE__*/require("./usePopoverSurfaceStyles");
15
15
  /**
16
16
  * PopoverSurface component renders react children in a positioned box
17
17
  */
18
18
 
19
19
 
20
- exports.PopoverSurface = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
- var state = usePopoverSurface_1.usePopoverSurface(props, ref);
20
+ exports.PopoverSurface = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = usePopoverSurface_1.usePopoverSurface(props, ref);
22
22
  usePopoverSurfaceStyles_1.usePopoverSurfaceStyles(state);
23
23
  return renderPopoverSurface_1.renderPopoverSurface(state);
24
24
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/PopoverSurface/PopoverSurface.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,IAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,IAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAClG,MAAM,KAAK,GAAG,mBAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;AAEA,EAAA,yBAAA,CAAA,uBAAA,CAAwB,KAAxB;AACA,SAAO,sBAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALuE,CAA3D;AAOb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/PopoverSurface/PopoverSurface.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtG,QAAM,KAAK,GAAG,mBAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;AAEA,EAAA,yBAAA,CAAA,uBAAA,CAAwB,KAAxB;AACA,SAAO,sBAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALuE,CAA3D;AAOb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourceRoot":""}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./PopoverSurface"), exports);
10
10
 
@@ -5,25 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.renderPopoverSurface = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var React = /*#__PURE__*/require("react");
10
+ const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
11
11
 
12
- var react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
12
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
13
 
14
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
15
-
16
- var usePopoverSurface_1 = /*#__PURE__*/require("./usePopoverSurface");
14
+ const usePopoverSurface_1 = /*#__PURE__*/require("./usePopoverSurface");
17
15
  /**
18
16
  * Render the final JSX of PopoverSurface
19
17
  */
20
18
 
21
19
 
22
- var renderPopoverSurface = function (state) {
23
- var _a = react_utilities_1.getSlots(state, usePopoverSurface_1.popoverSurfaceSlots),
24
- slots = _a.slots,
25
- slotProps = _a.slotProps; // TODO should hidden Popovers be supported ?
26
-
20
+ const renderPopoverSurface = state => {
21
+ const {
22
+ slots,
23
+ slotProps
24
+ } = react_utilities_1.getSlots(state, usePopoverSurface_1.popoverSurfaceSlots); // TODO should hidden Popovers be supported ?
27
25
 
28
26
  if (!state.open) {
29
27
  return null;
@@ -31,7 +29,7 @@ var renderPopoverSurface = function (state) {
31
29
 
32
30
  return React.createElement(react_portal_1.Portal, {
33
31
  mountNode: state.mountNode
34
- }, React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), !state.noArrow && React.createElement("div", {
32
+ }, React.createElement(slots.root, Object.assign({}, slotProps.root), !state.noArrow && React.createElement("div", {
35
33
  ref: state.arrowRef,
36
34
  className: state.arrowClassName
37
35
  }), slotProps.root.children));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/PopoverSurface/renderPopoverSurface.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAEA;;AAEG;;;AACI,IAAM,oBAAoB,GAAG,UAAC,KAAD,EAA2B;AACvD,MAAA,EAAA,GAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,EAAqC,mBAAA,CAAA,mBAArC,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB,CADuD,CAG7D;;;AACA,MAAI,CAAC,KAAK,CAAC,IAAX,EAAiB;AACf,WAAO,IAAP;AACD;;AAED,SACE,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,MAAD,EAAO;AAAC,IAAA,SAAS,EAAE,KAAK,CA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