@fluentui/react-popover 9.5.3 → 9.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +127 -1
  3. package/CHANGELOG.md +36 -2
  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 +1 -0
  8. package/lib/components/Popover/Popover.js.map +1 -1
  9. package/lib/components/Popover/Popover.types.js +1 -1
  10. package/lib/components/Popover/Popover.types.js.map +1 -1
  11. package/lib/components/Popover/constants.js +1 -2
  12. package/lib/components/Popover/constants.js.map +1 -1
  13. package/lib/components/Popover/index.js.map +1 -1
  14. package/lib/components/Popover/renderPopover.js.map +1 -1
  15. package/lib/components/Popover/usePopover.js +8 -8
  16. package/lib/components/Popover/usePopover.js.map +1 -1
  17. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  18. package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  19. package/lib/components/PopoverSurface/index.js.map +1 -1
  20. package/lib/components/PopoverSurface/renderPopoverSurface.js +1 -3
  21. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  22. package/lib/components/PopoverSurface/usePopoverSurface.js +3 -2
  23. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  24. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  25. package/lib/components/PopoverTrigger/PopoverTrigger.js +1 -0
  26. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  27. package/lib/components/PopoverTrigger/PopoverTrigger.types.js +1 -1
  28. package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  29. package/lib/components/PopoverTrigger/index.js.map +1 -1
  30. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +1 -2
  31. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  32. package/lib/components/PopoverTrigger/usePopoverTrigger.js +1 -0
  33. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  34. package/lib/index.js.map +1 -1
  35. package/lib/popoverContext.js.map +1 -1
  36. package/lib-commonjs/Popover.js +5 -4
  37. package/lib-commonjs/Popover.js.map +1 -1
  38. package/lib-commonjs/PopoverSurface.js +5 -4
  39. package/lib-commonjs/PopoverSurface.js.map +1 -1
  40. package/lib-commonjs/PopoverTrigger.js +5 -4
  41. package/lib-commonjs/PopoverTrigger.js.map +1 -1
  42. package/lib-commonjs/components/Popover/Popover.js +14 -13
  43. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  44. package/lib-commonjs/components/Popover/Popover.types.js +5 -2
  45. package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
  46. package/lib-commonjs/components/Popover/constants.js +10 -8
  47. package/lib-commonjs/components/Popover/constants.js.map +1 -1
  48. package/lib-commonjs/components/Popover/index.js +8 -7
  49. package/lib-commonjs/components/Popover/index.js.map +1 -1
  50. package/lib-commonjs/components/Popover/renderPopover.js +31 -47
  51. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  52. package/lib-commonjs/components/Popover/usePopover.js +179 -173
  53. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  54. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +19 -20
  55. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  56. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js +3 -2
  57. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  58. package/lib-commonjs/components/PopoverSurface/index.js +9 -8
  59. package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
  60. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +23 -28
  61. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  62. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +70 -81
  63. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  64. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +243 -113
  65. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  66. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +15 -14
  67. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  68. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js +5 -2
  69. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  70. package/lib-commonjs/components/PopoverTrigger/index.js +8 -7
  71. package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
  72. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +12 -11
  73. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  74. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +71 -80
  75. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  76. package/lib-commonjs/index.js +30 -92
  77. package/lib-commonjs/index.js.map +1 -1
  78. package/lib-commonjs/popoverContext.js +34 -25
  79. package/lib-commonjs/popoverContext.js.map +1 -1
  80. package/package.json +14 -13
  81. package/lib-amd/Popover.js +0 -6
  82. package/lib-amd/Popover.js.map +0 -1
  83. package/lib-amd/PopoverSurface.js +0 -6
  84. package/lib-amd/PopoverSurface.js.map +0 -1
  85. package/lib-amd/PopoverTrigger.js +0 -6
  86. package/lib-amd/PopoverTrigger.js.map +0 -1
  87. package/lib-amd/components/Popover/Popover.js +0 -15
  88. package/lib-amd/components/Popover/Popover.js.map +0 -1
  89. package/lib-amd/components/Popover/Popover.types.js +0 -5
  90. package/lib-amd/components/Popover/Popover.types.js.map +0 -1
  91. package/lib-amd/components/Popover/constants.js +0 -15
  92. package/lib-amd/components/Popover/constants.js.map +0 -1
  93. package/lib-amd/components/Popover/index.js +0 -9
  94. package/lib-amd/components/Popover/index.js.map +0 -1
  95. package/lib-amd/components/Popover/renderPopover.js +0 -32
  96. package/lib-amd/components/Popover/renderPopover.js.map +0 -1
  97. package/lib-amd/components/Popover/usePopover.js +0 -147
  98. package/lib-amd/components/Popover/usePopover.js.map +0 -1
  99. package/lib-amd/components/PopoverSurface/PopoverSurface.js +0 -17
  100. package/lib-amd/components/PopoverSurface/PopoverSurface.js.map +0 -1
  101. package/lib-amd/components/PopoverSurface/PopoverSurface.types.js +0 -5
  102. package/lib-amd/components/PopoverSurface/PopoverSurface.types.js.map +0 -1
  103. package/lib-amd/components/PopoverSurface/index.js +0 -10
  104. package/lib-amd/components/PopoverSurface/index.js.map +0 -1
  105. package/lib-amd/components/PopoverSurface/renderPopoverSurface.js +0 -20
  106. package/lib-amd/components/PopoverSurface/renderPopoverSurface.js.map +0 -1
  107. package/lib-amd/components/PopoverSurface/usePopoverSurface.js +0 -69
  108. package/lib-amd/components/PopoverSurface/usePopoverSurface.js.map +0 -1
  109. package/lib-amd/components/PopoverSurface/usePopoverSurfaceStyles.js +0 -44
  110. package/lib-amd/components/PopoverSurface/usePopoverSurfaceStyles.js.map +0 -1
  111. package/lib-amd/components/PopoverTrigger/PopoverTrigger.js +0 -17
  112. package/lib-amd/components/PopoverTrigger/PopoverTrigger.js.map +0 -1
  113. package/lib-amd/components/PopoverTrigger/PopoverTrigger.types.js +0 -5
  114. package/lib-amd/components/PopoverTrigger/PopoverTrigger.types.js.map +0 -1
  115. package/lib-amd/components/PopoverTrigger/index.js +0 -9
  116. package/lib-amd/components/PopoverTrigger/index.js.map +0 -1
  117. package/lib-amd/components/PopoverTrigger/renderPopoverTrigger.js +0 -13
  118. package/lib-amd/components/PopoverTrigger/renderPopoverTrigger.js.map +0 -1
  119. package/lib-amd/components/PopoverTrigger/usePopoverTrigger.js +0 -61
  120. package/lib-amd/components/PopoverTrigger/usePopoverTrigger.js.map +0 -1
  121. package/lib-amd/index.js +0 -20
  122. package/lib-amd/index.js.map +0 -1
  123. package/lib-amd/popoverContext.js +0 -28
  124. package/lib-amd/popoverContext.js.map +0 -1
@@ -1,20 +1,21 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PopoverTrigger", {
6
+ enumerable: true,
7
+ get: ()=>PopoverTrigger
5
8
  });
6
- exports.PopoverTrigger = void 0;
7
- const usePopoverTrigger_1 = /*#__PURE__*/require("./usePopoverTrigger");
8
- const renderPopoverTrigger_1 = /*#__PURE__*/require("./renderPopoverTrigger");
9
- /**
10
- * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.
11
- */
12
- const PopoverTrigger = props => {
13
- const state = usePopoverTrigger_1.usePopoverTrigger_unstable(props);
14
- return renderPopoverTrigger_1.renderPopoverTrigger_unstable(state);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _usePopoverTrigger = require("./usePopoverTrigger");
12
+ const _renderPopoverTrigger = require("./renderPopoverTrigger");
13
+ const PopoverTrigger = (props)=>{
14
+ const state = (0, _usePopoverTrigger.usePopoverTrigger_unstable)(props);
15
+ return (0, _renderPopoverTrigger.renderPopoverTrigger_unstable)(state);
15
16
  };
16
- exports.PopoverTrigger = PopoverTrigger;
17
- exports.PopoverTrigger.displayName = 'PopoverTrigger';
17
+ PopoverTrigger.displayName = 'PopoverTrigger';
18
18
  // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
19
- exports.PopoverTrigger.isFluentTriggerComponent = true;
19
+ PopoverTrigger.isFluentTriggerComponent = true; //# sourceMappingURL=PopoverTrigger.js.map
20
+
20
21
  //# sourceMappingURL=PopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["usePopoverTrigger_1","require","renderPopoverTrigger_1","PopoverTrigger","props","state","usePopoverTrigger_unstable","renderPopoverTrigger_unstable","exports","displayName","isFluentTriggerComponent"],"sources":["../src/packages/react-components/react-popover/src/components/PopoverTrigger/PopoverTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePopoverTrigger_unstable } from './usePopoverTrigger';\nimport { renderPopoverTrigger_unstable } from './renderPopoverTrigger';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\nimport type { PopoverTriggerProps } from './PopoverTrigger.types';\n\n/**\n * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.\n */\nexport const PopoverTrigger: React.FC<PopoverTriggerProps> = props => {\n const state = usePopoverTrigger_unstable(props);\n\n return renderPopoverTrigger_unstable(state);\n};\n\nPopoverTrigger.displayName = 'PopoverTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(PopoverTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"mappings":";;;;;;AACA,MAAAA,mBAAA,gBAAAC,OAAA;AACA,MAAAC,sBAAA,gBAAAD,OAAA;AAIA;;;AAGO,MAAME,cAAc,GAAkCC,KAAK,IAAG;EACnE,MAAMC,KAAK,GAAGL,mBAAA,CAAAM,0BAA0B,CAACF,KAAK,CAAC;EAE/C,OAAOF,sBAAA,CAAAK,6BAA6B,CAACF,KAAK,CAAC;AAC7C,CAAC;AAJYG,OAAA,CAAAL,cAAc,GAAAA,cAAA;AAM3BK,OAAA,CAAAL,cAAc,CAACM,WAAW,GAAG,gBAAgB;AAC7C;AACCD,OAAA,CAAAL,cAAyC,CAACO,wBAAwB,GAAG,IAAI"}
1
+ {"version":3,"sources":["../../../lib/components/PopoverTrigger/PopoverTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { usePopoverTrigger_unstable } from './usePopoverTrigger';\nimport { renderPopoverTrigger_unstable } from './renderPopoverTrigger';\n/**\n * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.\n */\nexport const PopoverTrigger = props => {\n const state = usePopoverTrigger_unstable(props);\n return renderPopoverTrigger_unstable(state);\n};\nPopoverTrigger.displayName = 'PopoverTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\nPopoverTrigger.isFluentTriggerComponent = true;\n//# sourceMappingURL=PopoverTrigger.js.map"],"names":["PopoverTrigger","props","state","usePopoverTrigger_unstable","renderPopoverTrigger_unstable","displayName","isFluentTriggerComponent"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;mCACoB;sCACG;AAIvC,MAAMA,iBAAiBC,CAAAA,QAAS;IACrC,MAAMC,QAAQC,IAAAA,6CAA0B,EAACF;IACzC,OAAOG,IAAAA,mDAA6B,EAACF;AACvC;AACAF,eAAeK,WAAW,GAAG;AAC7B,6FAA6F;AAC7FL,eAAeM,wBAAwB,GAAG,IAAI,EAC9C,0CAA0C"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
+ //# sourceMappingURL=PopoverTrigger.types.js.map
8
+
6
9
  //# sourceMappingURL=PopoverTrigger.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-popover/src/components/PopoverTrigger/PopoverTrigger.types.ts"],"sourcesContent":["import { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\n/**\n * PopoverTrigger Props\n */\nexport type PopoverTriggerProps = TriggerProps<PopoverTriggerChildProps> & {\n /**\n * Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.\n * @default false\n */\n disableButtonEnhancement?: boolean;\n};\n\n/**\n * PopoverTrigger State\n */\nexport type PopoverTriggerState = {\n children: React.ReactElement | null;\n};\n\n/**\n * Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog\n */\nexport type PopoverTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<\n Type,\n Props & {\n 'aria-expanded'?: 'true' | 'false';\n ref: React.Ref<unknown>;\n onMouseEnter: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n onMouseLeave: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n onContextMenu: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n }\n>;\n"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/PopoverTrigger/PopoverTrigger.types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=PopoverTrigger.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,gDAAgD"}
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./PopoverTrigger"), exports);
8
- tslib_1.__exportStar(require("./PopoverTrigger.types"), exports);
9
- tslib_1.__exportStar(require("./renderPopoverTrigger"), exports);
10
- tslib_1.__exportStar(require("./usePopoverTrigger"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./PopoverTrigger"), exports);
7
+ _exportStar(require("./PopoverTrigger.types"), exports);
8
+ _exportStar(require("./renderPopoverTrigger"), exports);
9
+ _exportStar(require("./usePopoverTrigger"), exports);
10
+ //# sourceMappingURL=index.js.map
11
+
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-popover/src/components/PopoverTrigger/index.ts"],"sourcesContent":["export * from './PopoverTrigger';\nexport * from './PopoverTrigger.types';\nexport * from './renderPopoverTrigger';\nexport * from './usePopoverTrigger';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,4BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,4BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/PopoverTrigger/index.js"],"sourcesContent":["export * from './PopoverTrigger';\nexport * from './PopoverTrigger.types';\nexport * from './renderPopoverTrigger';\nexport * from './usePopoverTrigger';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,14 +1,15 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.renderPopoverTrigger_unstable = void 0;
7
1
  /**
8
2
  * Render the final JSX of PopoverTrigger
9
- */
10
- const renderPopoverTrigger_unstable = state => {
11
- return state.children;
12
- };
13
- exports.renderPopoverTrigger_unstable = renderPopoverTrigger_unstable;
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "renderPopoverTrigger_unstable", {
8
+ enumerable: true,
9
+ get: ()=>renderPopoverTrigger_unstable
10
+ });
11
+ const renderPopoverTrigger_unstable = (state)=>{
12
+ return state.children;
13
+ }; //# sourceMappingURL=renderPopoverTrigger.js.map
14
+
14
15
  //# sourceMappingURL=renderPopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["renderPopoverTrigger_unstable","state","children","exports"],"sources":["../src/packages/react-components/react-popover/src/components/PopoverTrigger/renderPopoverTrigger.tsx"],"sourcesContent":["import type { PopoverTriggerState } from './PopoverTrigger.types';\n\n/**\n * Render the final JSX of PopoverTrigger\n */\nexport const renderPopoverTrigger_unstable = (state: PopoverTriggerState) => {\n return state.children;\n};\n"],"mappings":";;;;;;AAEA;;;AAGO,MAAMA,6BAA6B,GAAIC,KAA0B,IAAI;EAC1E,OAAOA,KAAK,CAACC,QAAQ;AACvB,CAAC;AAFYC,OAAA,CAAAH,6BAA6B,GAAAA,6BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/PopoverTrigger/renderPopoverTrigger.js"],"sourcesContent":["/**\n * Render the final JSX of PopoverTrigger\n */export const renderPopoverTrigger_unstable = state => {\n return state.children;\n};\n//# sourceMappingURL=renderPopoverTrigger.js.map"],"names":["renderPopoverTrigger_unstable","state","children"],"mappings":"AAAA;;CAEC;;;;+BAAeA;;aAAAA;;AAAN,MAAMA,gCAAgCC,CAAAA,QAAS;IACvD,OAAOA,MAAMC,QAAQ;AACvB,GACA,gDAAgD"}
@@ -1,84 +1,75 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "usePopoverTrigger_unstable", {
6
+ enumerable: true,
7
+ get: ()=>usePopoverTrigger_unstable
5
8
  });
6
- exports.usePopoverTrigger_unstable = void 0;
7
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
8
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
9
- const popoverContext_1 = /*#__PURE__*/require("../../popoverContext");
10
- const react_aria_1 = /*#__PURE__*/require("@fluentui/react-aria");
11
- const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
12
- /**
13
- * Create the state required to render PopoverTrigger.
14
- *
15
- * The returned state can be modified with hooks such as usePopoverTriggerStyles,
16
- * before being passed to renderPopoverTrigger_unstable.
17
- *
18
- * @param props - props from this instance of PopoverTrigger
19
- */
20
- const usePopoverTrigger_unstable = props => {
21
- const {
22
- children,
23
- disableButtonEnhancement = false
24
- } = props;
25
- const child = react_utilities_1.getTriggerChild(children);
26
- const open = popoverContext_1.usePopoverContext_unstable(context => context.open);
27
- const setOpen = popoverContext_1.usePopoverContext_unstable(context => context.setOpen);
28
- const toggleOpen = popoverContext_1.usePopoverContext_unstable(context => context.toggleOpen);
29
- const triggerRef = popoverContext_1.usePopoverContext_unstable(context => context.triggerRef);
30
- const openOnHover = popoverContext_1.usePopoverContext_unstable(context => context.openOnHover);
31
- const openOnContext = popoverContext_1.usePopoverContext_unstable(context => context.openOnContext);
32
- const {
33
- triggerAttributes
34
- } = react_tabster_1.useModalAttributes();
35
- const onContextMenu = e => {
36
- if (openOnContext) {
37
- e.preventDefault();
38
- setOpen(e, true);
39
- }
40
- };
41
- const onClick = e => {
42
- if (!openOnContext) {
43
- toggleOpen(e);
44
- }
45
- };
46
- const onKeyDown = e => {
47
- if (e.key === keyboard_keys_1.Escape && open) {
48
- setOpen(e, false);
49
- // stop propagation to avoid conflicting with other elements that listen for `Escape`
50
- // e,g: Dialog, Menu
51
- e.stopPropagation();
52
- }
53
- };
54
- const onMouseEnter = e => {
55
- if (openOnHover) {
56
- setOpen(e, true);
57
- }
58
- };
59
- const onMouseLeave = e => {
60
- if (openOnHover) {
61
- setOpen(e, false);
62
- }
63
- };
64
- const contextMenuProps = {
65
- ...triggerAttributes,
66
- 'aria-expanded': `${open}`,
67
- ...(child === null || child === void 0 ? void 0 : child.props),
68
- onMouseEnter: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),
69
- onMouseLeave: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseLeave, onMouseLeave)),
70
- onContextMenu: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),
71
- ref: react_utilities_1.useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref)
72
- };
73
- const triggerChildProps = {
74
- ...contextMenuProps,
75
- onClick: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),
76
- onKeyDown: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))
77
- };
78
- const ariaButtonTriggerChildProps = react_aria_1.useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', triggerChildProps);
79
- return {
80
- children: react_utilities_1.applyTriggerPropsToChildren(props.children, react_aria_1.useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps))
81
- };
82
- };
83
- exports.usePopoverTrigger_unstable = usePopoverTrigger_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _reactTabster = require("@fluentui/react-tabster");
13
+ const _popoverContext = require("../../popoverContext");
14
+ const _reactAria = require("@fluentui/react-aria");
15
+ const _keyboardKeys = require("@fluentui/keyboard-keys");
16
+ const usePopoverTrigger_unstable = (props)=>{
17
+ const { children , disableButtonEnhancement =false } = props;
18
+ const child = (0, _reactUtilities.getTriggerChild)(children);
19
+ const open = (0, _popoverContext.usePopoverContext_unstable)((context)=>context.open);
20
+ const setOpen = (0, _popoverContext.usePopoverContext_unstable)((context)=>context.setOpen);
21
+ const toggleOpen = (0, _popoverContext.usePopoverContext_unstable)((context)=>context.toggleOpen);
22
+ const triggerRef = (0, _popoverContext.usePopoverContext_unstable)((context)=>context.triggerRef);
23
+ const openOnHover = (0, _popoverContext.usePopoverContext_unstable)((context)=>context.openOnHover);
24
+ const openOnContext = (0, _popoverContext.usePopoverContext_unstable)((context)=>context.openOnContext);
25
+ const { triggerAttributes } = (0, _reactTabster.useModalAttributes)();
26
+ const onContextMenu = (e)=>{
27
+ if (openOnContext) {
28
+ e.preventDefault();
29
+ setOpen(e, true);
30
+ }
31
+ };
32
+ const onClick = (e)=>{
33
+ if (!openOnContext) {
34
+ toggleOpen(e);
35
+ }
36
+ };
37
+ const onKeyDown = (e)=>{
38
+ if (e.key === _keyboardKeys.Escape && open) {
39
+ setOpen(e, false);
40
+ // stop propagation to avoid conflicting with other elements that listen for `Escape`
41
+ // e,g: Dialog, Menu
42
+ e.stopPropagation();
43
+ }
44
+ };
45
+ const onMouseEnter = (e)=>{
46
+ if (openOnHover) {
47
+ setOpen(e, true);
48
+ }
49
+ };
50
+ const onMouseLeave = (e)=>{
51
+ if (openOnHover) {
52
+ setOpen(e, false);
53
+ }
54
+ };
55
+ const contextMenuProps = {
56
+ ...triggerAttributes,
57
+ 'aria-expanded': `${open}`,
58
+ ...child === null || child === void 0 ? void 0 : child.props,
59
+ onMouseEnter: (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),
60
+ onMouseLeave: (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : child.props.onMouseLeave, onMouseLeave)),
61
+ onContextMenu: (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),
62
+ ref: (0, _reactUtilities.useMergedRefs)(triggerRef, child === null || child === void 0 ? void 0 : child.ref)
63
+ };
64
+ const triggerChildProps = {
65
+ ...contextMenuProps,
66
+ onClick: (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),
67
+ onKeyDown: (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))
68
+ };
69
+ const ariaButtonTriggerChildProps = (0, _reactAria.useARIAButtonProps)((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', triggerChildProps);
70
+ return {
71
+ children: (0, _reactUtilities.applyTriggerPropsToChildren)(props.children, (0, _reactAria.useARIAButtonProps)((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps))
72
+ };
73
+ }; //# sourceMappingURL=usePopoverTrigger.js.map
74
+
84
75
  //# sourceMappingURL=usePopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_utilities_1","require","react_tabster_1","popoverContext_1","react_aria_1","keyboard_keys_1","usePopoverTrigger_unstable","props","children","disableButtonEnhancement","child","getTriggerChild","open","usePopoverContext_unstable","context","setOpen","toggleOpen","triggerRef","openOnHover","openOnContext","triggerAttributes","useModalAttributes","onContextMenu","e","preventDefault","onClick","onKeyDown","key","Escape","stopPropagation","onMouseEnter","onMouseLeave","contextMenuProps","useEventCallback","mergeCallbacks","ref","useMergedRefs","triggerChildProps","ariaButtonTriggerChildProps","useARIAButtonProps","type","applyTriggerPropsToChildren","exports"],"sources":["../src/packages/react-components/react-popover/src/components/PopoverTrigger/usePopoverTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n mergeCallbacks,\n useMergedRefs,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { Escape } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render PopoverTrigger.\n *\n * The returned state can be modified with hooks such as usePopoverTriggerStyles,\n * before being passed to renderPopoverTrigger_unstable.\n *\n * @param props - props from this instance of PopoverTrigger\n */\nexport const usePopoverTrigger_unstable = (props: PopoverTriggerProps): PopoverTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n const child = getTriggerChild(children);\n\n const open = usePopoverContext_unstable(context => context.open);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const toggleOpen = usePopoverContext_unstable(context => context.toggleOpen);\n const triggerRef = usePopoverContext_unstable(context => context.triggerRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const openOnContext = usePopoverContext_unstable(context => context.openOnContext);\n const { triggerAttributes } = useModalAttributes();\n\n const onContextMenu = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnContext) {\n e.preventDefault();\n setOpen(e, true);\n }\n };\n\n const onClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!openOnContext) {\n toggleOpen(e);\n }\n };\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (e.key === Escape && open) {\n setOpen(e, false);\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: Dialog, Menu\n e.stopPropagation();\n }\n };\n\n const onMouseEnter = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n };\n\n const onMouseLeave = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n };\n\n const contextMenuProps = {\n ...triggerAttributes,\n 'aria-expanded': `${open}`,\n ...child?.props,\n onMouseEnter: useEventCallback(mergeCallbacks(child?.props.onMouseEnter, onMouseEnter)),\n onMouseLeave: useEventCallback(mergeCallbacks(child?.props.onMouseLeave, onMouseLeave)),\n onContextMenu: useEventCallback(mergeCallbacks(child?.props.onContextMenu, onContextMenu)),\n ref: useMergedRefs(triggerRef, child?.ref),\n } as const;\n\n const triggerChildProps = {\n ...contextMenuProps,\n onClick: useEventCallback(mergeCallbacks(child?.props.onClick, onClick)),\n onKeyDown: useEventCallback(mergeCallbacks(child?.props.onKeyDown, onKeyDown)),\n };\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n triggerChildProps,\n );\n\n return {\n children: applyTriggerPropsToChildren(\n props.children,\n useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n openOnContext 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opoverTrigger/usePopoverTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, mergeCallbacks, useMergedRefs, useEventCallback } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { Escape } from '@fluentui/keyboard-keys';\n/**\n * Create the state required to render PopoverTrigger.\n *\n * The returned state can be modified with hooks such as usePopoverTriggerStyles,\n * before being passed to renderPopoverTrigger_unstable.\n *\n * @param props - props from this instance of PopoverTrigger\n */\nexport const usePopoverTrigger_unstable = props => {\n const {\n children,\n disableButtonEnhancement = false\n } = props;\n const child = getTriggerChild(children);\n const open = usePopoverContext_unstable(context => context.open);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const toggleOpen = usePopoverContext_unstable(context => context.toggleOpen);\n const triggerRef = usePopoverContext_unstable(context => context.triggerRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const openOnContext = usePopoverContext_unstable(context => context.openOnContext);\n const {\n triggerAttributes\n } = useModalAttributes();\n const onContextMenu = e => {\n if (openOnContext) {\n e.preventDefault();\n setOpen(e, true);\n }\n };\n const onClick = e => {\n if (!openOnContext) {\n toggleOpen(e);\n }\n };\n const onKeyDown = e => {\n if (e.key === Escape && open) {\n setOpen(e, false);\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: Dialog, Menu\n e.stopPropagation();\n }\n };\n const onMouseEnter = e => {\n if (openOnHover) {\n setOpen(e, true);\n }\n };\n const onMouseLeave = e => {\n if (openOnHover) {\n setOpen(e, false);\n }\n };\n const contextMenuProps = {\n ...triggerAttributes,\n 'aria-expanded': `${open}`,\n ...(child === null || child === void 0 ? void 0 : child.props),\n onMouseEnter: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),\n onMouseLeave: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseLeave, onMouseLeave)),\n onContextMenu: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),\n ref: useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref)\n };\n const triggerChildProps = {\n ...contextMenuProps,\n onClick: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),\n onKeyDown: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))\n };\n const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', triggerChildProps);\n return {\n children: applyTriggerPropsToChildren(props.children, useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps))\n };\n};\n//# sourceMappingURL=usePopoverTrigger.js.map"],"names":["usePopoverTrigger_unstable","props","children","disableButtonEnhancement","child","getTriggerChild","open","usePopoverContext_unstable","context","setOpen","toggleOpen","triggerRef","openOnHover","openOnContext","triggerAttributes","useModalAttributes","onContextMenu","e","preventDefault","onClick","onKeyDown","key","Escape","stopPropagation","onMouseEnter","onMouseLeave","contextMenuProps","useEventCallback","mergeCallbacks","ref","useMergedRefs","triggerChildProps","ariaButtonTriggerChildProps","useARIAButtonProps","type","applyTriggerPropsToChildren"],"mappings":";;;;+BAcaA;;aAAAA;;;6DAdU;gCACuF;8BAC3E;gCACQ;2BACR;8BACZ;AAShB,MAAMA,6BAA6BC,CAAAA,QAAS;IACjD,MAAM,EACJC,SAAQ,EACRC,0BAA2B,KAAK,CAAA,EACjC,GAAGF;IACJ,MAAMG,QAAQC,IAAAA,+BAAe,EAACH;IAC9B,MAAMI,OAAOC,IAAAA,0CAA0B,EAACC,CAAAA,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AAK,IAAI,KAAK,IAAIA,MAAM8B,IAAI,AAAD,MAAO,YAAY,AAAC9B,CAAAA,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAM8B,IAAI,AAAD,MAAO,MAAM9B,MAAM8B,IAAI,GAAG,KAAK,EAAErB,gBAAgBa,mBAAmBvB,2BAA2B4B,oBAAoBC,2BAA2B;IAC5V;AACF,GACA,6CAA6C"}
@@ -1,95 +1,33 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.usePopoverTrigger_unstable = exports.renderPopoverTrigger_unstable = exports.PopoverTrigger = exports.usePopoverContext_unstable = exports.PopoverProvider = exports.usePopoverSurface_unstable = exports.usePopoverSurfaceStyles_unstable = exports.renderPopoverSurface_unstable = exports.popoverSurfaceClassNames = exports.arrowHeights = exports.PopoverSurface = exports.usePopover_unstable = exports.renderPopover_unstable = exports.Popover = void 0;
7
- var Popover_1 = /*#__PURE__*/require("./Popover");
8
- Object.defineProperty(exports, "Popover", {
9
- enumerable: true,
10
- get: function () {
11
- return Popover_1.Popover;
12
- }
13
- });
14
- Object.defineProperty(exports, "renderPopover_unstable", {
15
- enumerable: true,
16
- get: function () {
17
- return Popover_1.renderPopover_unstable;
18
- }
19
- });
20
- Object.defineProperty(exports, "usePopover_unstable", {
21
- enumerable: true,
22
- get: function () {
23
- return Popover_1.usePopover_unstable;
24
- }
25
- });
26
- var PopoverSurface_1 = /*#__PURE__*/require("./PopoverSurface");
27
- Object.defineProperty(exports, "PopoverSurface", {
28
- enumerable: true,
29
- get: function () {
30
- return PopoverSurface_1.PopoverSurface;
31
- }
32
- });
33
- Object.defineProperty(exports, "arrowHeights", {
34
- enumerable: true,
35
- get: function () {
36
- return PopoverSurface_1.arrowHeights;
37
- }
38
- });
39
- Object.defineProperty(exports, "popoverSurfaceClassNames", {
40
- enumerable: true,
41
- get: function () {
42
- return PopoverSurface_1.popoverSurfaceClassNames;
43
- }
44
- });
45
- Object.defineProperty(exports, "renderPopoverSurface_unstable", {
46
- enumerable: true,
47
- get: function () {
48
- return PopoverSurface_1.renderPopoverSurface_unstable;
49
- }
50
- });
51
- Object.defineProperty(exports, "usePopoverSurfaceStyles_unstable", {
52
- enumerable: true,
53
- get: function () {
54
- return PopoverSurface_1.usePopoverSurfaceStyles_unstable;
55
- }
56
- });
57
- Object.defineProperty(exports, "usePopoverSurface_unstable", {
58
- enumerable: true,
59
- get: function () {
60
- return PopoverSurface_1.usePopoverSurface_unstable;
61
- }
62
- });
63
- var popoverContext_1 = /*#__PURE__*/require("./popoverContext");
64
- Object.defineProperty(exports, "PopoverProvider", {
65
- enumerable: true,
66
- get: function () {
67
- return popoverContext_1.PopoverProvider;
68
- }
69
- });
70
- Object.defineProperty(exports, "usePopoverContext_unstable", {
71
- enumerable: true,
72
- get: function () {
73
- return popoverContext_1.usePopoverContext_unstable;
74
- }
75
- });
76
- var PopoverTrigger_1 = /*#__PURE__*/require("./PopoverTrigger");
77
- Object.defineProperty(exports, "PopoverTrigger", {
78
- enumerable: true,
79
- get: function () {
80
- return PopoverTrigger_1.PopoverTrigger;
81
- }
82
- });
83
- Object.defineProperty(exports, "renderPopoverTrigger_unstable", {
84
- enumerable: true,
85
- get: function () {
86
- return PopoverTrigger_1.renderPopoverTrigger_unstable;
87
- }
88
- });
89
- Object.defineProperty(exports, "usePopoverTrigger_unstable", {
90
- enumerable: true,
91
- get: function () {
92
- return PopoverTrigger_1.usePopoverTrigger_unstable;
93
- }
94
- });
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Popover: ()=>_popover.Popover,
13
+ renderPopover_unstable: ()=>_popover.renderPopover_unstable,
14
+ usePopover_unstable: ()=>_popover.usePopover_unstable,
15
+ PopoverSurface: ()=>_popoverSurface.PopoverSurface,
16
+ arrowHeights: ()=>_popoverSurface.arrowHeights,
17
+ popoverSurfaceClassNames: ()=>_popoverSurface.popoverSurfaceClassNames,
18
+ renderPopoverSurface_unstable: ()=>_popoverSurface.renderPopoverSurface_unstable,
19
+ usePopoverSurfaceStyles_unstable: ()=>_popoverSurface.usePopoverSurfaceStyles_unstable,
20
+ usePopoverSurface_unstable: ()=>_popoverSurface.usePopoverSurface_unstable,
21
+ PopoverProvider: ()=>_popoverContext.PopoverProvider,
22
+ usePopoverContext_unstable: ()=>_popoverContext.usePopoverContext_unstable,
23
+ PopoverTrigger: ()=>_popoverTrigger.PopoverTrigger,
24
+ renderPopoverTrigger_unstable: ()=>_popoverTrigger.renderPopoverTrigger_unstable,
25
+ usePopoverTrigger_unstable: ()=>_popoverTrigger.usePopoverTrigger_unstable
26
+ });
27
+ const _popover = require("./Popover");
28
+ const _popoverSurface = require("./PopoverSurface");
29
+ const _popoverContext = require("./popoverContext");
30
+ const _popoverTrigger = require("./PopoverTrigger");
31
+ //# sourceMappingURL=index.js.map
32
+
95
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Popover_1","require","Object","defineProperty","exports","enumerable","get","Popover","renderPopover_unstable","usePopover_unstable","PopoverSurface_1","PopoverSurface","arrowHeights","popoverSurfaceClassNames","renderPopoverSurface_unstable","usePopoverSurfaceStyles_unstable","usePopoverSurface_unstable","popoverContext_1","PopoverProvider","usePopoverContext_unstable","PopoverTrigger_1","PopoverTrigger","renderPopoverTrigger_unstable","usePopoverTrigger_unstable"],"sources":["../src/packages/react-components/react-popover/src/index.ts"],"sourcesContent":["export { Popover, renderPopover_unstable, usePopover_unstable } from './Popover';\nexport type { OnOpenChangeData, OpenPopoverEvents, PopoverProps, PopoverSize, PopoverState } from './Popover';\nexport {\n PopoverSurface,\n arrowHeights,\n popoverSurfaceClassNames,\n renderPopoverSurface_unstable,\n usePopoverSurfaceStyles_unstable,\n usePopoverSurface_unstable,\n} from './PopoverSurface';\nexport type { PopoverSurfaceProps, PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface';\nexport { PopoverProvider, usePopoverContext_unstable } from './popoverContext';\nexport type { PopoverContextValue } from './popoverContext';\nexport { PopoverTrigger, renderPopoverTrigger_unstable, usePopoverTrigger_unstable } from './PopoverTrigger';\nexport type { PopoverTriggerChildProps, PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger';\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,gBAAAC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,SAAA,CAAAO,OAAO;EAAA;AAAA;AAAEL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,SAAA,CAAAQ,sBAAsB;EAAA;AAAA;AAAEN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,SAAA,CAAAS,mBAAmB;EAAA;AAAA;AAE7D,IAAAC,gBAAA,gBAAAT,OAAA;AACEC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAI,gBAAA,CAAAC,cAAc;EAAA;AAAA;AACdT,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAI,gBAAA,CAAAE,YAAY;EAAA;AAAA;AACZV,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAI,gBAAA,CAAAG,wBAAwB;EAAA;AAAA;AACxBX,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAI,gBAAA,CAAAI,6BAA6B;EAAA;AAAA;AAC7BZ,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAI,gBAAA,CAAAK,gCAAgC;EAAA;AAAA;AAChCb,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAI,gBAAA,CAAAM,0BAA0B;EAAA;AAAA;AAG5B,IAAAC,gBAAA,gBAAAhB,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAW,gBAAA,CAAAC,eAAe;EAAA;AAAA;AAAEhB,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAW,gBAAA,CAAAE,0BAA0B;EAAA;AAAA;AAEpD,IAAAC,gBAAA,gBAAAnB,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAc,gBAAA,CAAAC,cAAc;EAAA;AAAA;AAAEnB,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAc,gBAAA,CAAAE,6BAA6B;EAAA;AAAA;AAAEpB,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAc,gBAAA,CAAAG,0BAA0B;EAAA;AAAA"}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Popover, renderPopover_unstable, usePopover_unstable } from './Popover';\nexport { PopoverSurface, arrowHeights, popoverSurfaceClassNames, renderPopoverSurface_unstable, usePopoverSurfaceStyles_unstable, usePopoverSurface_unstable } from './PopoverSurface';\nexport { PopoverProvider, usePopoverContext_unstable } from './popoverContext';\nexport { PopoverTrigger, renderPopoverTrigger_unstable, usePopoverTrigger_unstable } from './PopoverTrigger';\n//# sourceMappingURL=index.js.map"],"names":["Popover","renderPopover_unstable","usePopover_unstable","PopoverSurface","arrowHeights","popoverSurfaceClassNames","renderPopoverSurface_unstable","usePopoverSurfaceStyles_unstable","usePopoverSurface_unstable","PopoverProvider","usePopoverContext_unstable","PopoverTrigger","renderPopoverTrigger_unstable","usePopoverTrigger_unstable"],"mappings":";;;;;;;;;;;IAASA,OAAO,MAAPA,gBAAO;IAAEC,sBAAsB,MAAtBA,+BAAsB;IAAEC,mBAAmB,MAAnBA,4BAAmB;IACpDC,cAAc,MAAdA,8BAAc;IAAEC,YAAY,MAAZA,4BAAY;IAAEC,wBAAwB,MAAxBA,wCAAwB;IAAEC,6BAA6B,MAA7BA,6CAA6B;IAAEC,gCAAgC,MAAhCA,gDAAgC;IAAEC,0BAA0B,MAA1BA,0CAA0B;IACnJC,eAAe,MAAfA,+BAAe;IAAEC,0BAA0B,MAA1BA,0CAA0B;IAC3CC,cAAc,MAAdA,8BAAc;IAAEC,6BAA6B,MAA7BA,6CAA6B;IAAEC,0BAA0B,MAA1BA,0CAA0B;;yBAHb;gCAC+F;gCACxG;gCAC8B;CAC1F,iCAAiC"}
@@ -1,31 +1,40 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ PopoverContext: ()=>PopoverContext,
13
+ PopoverProvider: ()=>PopoverProvider,
14
+ usePopoverContext_unstable: ()=>usePopoverContext_unstable
5
15
  });
6
- exports.usePopoverContext_unstable = exports.PopoverProvider = exports.PopoverContext = void 0;
7
- const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
8
- exports.PopoverContext = /*#__PURE__*/react_context_selector_1.createContext(undefined);
16
+ const _reactContextSelector = require("@fluentui/react-context-selector");
17
+ const PopoverContext = /*#__PURE__*/ (0, _reactContextSelector.createContext)(undefined);
9
18
  const popoverContextDefaultValue = {
10
- open: false,
11
- setOpen: () => null,
12
- toggleOpen: () => null,
13
- triggerRef: {
14
- current: null
15
- },
16
- contentRef: {
17
- current: null
18
- },
19
- arrowRef: {
20
- current: null
21
- },
22
- openOnContext: false,
23
- openOnHover: false,
24
- size: 'medium',
25
- trapFocus: false,
26
- inline: false
19
+ open: false,
20
+ setOpen: ()=>null,
21
+ toggleOpen: ()=>null,
22
+ triggerRef: {
23
+ current: null
24
+ },
25
+ contentRef: {
26
+ current: null
27
+ },
28
+ arrowRef: {
29
+ current: null
30
+ },
31
+ openOnContext: false,
32
+ openOnHover: false,
33
+ size: 'medium',
34
+ trapFocus: false,
35
+ inline: false
27
36
  };
28
- exports.PopoverProvider = exports.PopoverContext.Provider;
29
- const usePopoverContext_unstable = selector => react_context_selector_1.useContextSelector(exports.PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));
30
- exports.usePopoverContext_unstable = usePopoverContext_unstable;
37
+ const PopoverProvider = PopoverContext.Provider;
38
+ const usePopoverContext_unstable = (selector)=>(0, _reactContextSelector.useContextSelector)(PopoverContext, (ctx = popoverContextDefaultValue)=>selector(ctx)); //# sourceMappingURL=popoverContext.js.map
39
+
31
40
  //# sourceMappingURL=popoverContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_context_selector_1","require","exports","PopoverContext","createContext","undefined","popoverContextDefaultValue","open","setOpen","toggleOpen","triggerRef","current","contentRef","arrowRef","openOnContext","openOnHover","size","trapFocus","inline","PopoverProvider","Provider","usePopoverContext_unstable","selector","useContextSelector","ctx"],"sources":["../src/packages/react-components/react-popover/src/popoverContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { PopoverState } from './components/Popover/index';\n\nexport const PopoverContext: Context<PopoverContextValue> = createContext<PopoverContextValue | undefined>(\n undefined,\n) as Context<PopoverContextValue>;\nconst popoverContextDefaultValue: PopoverContextValue = {\n open: false,\n setOpen: () => null,\n toggleOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n openOnContext: false,\n openOnHover: false,\n size: 'medium' as const,\n trapFocus: false,\n inline: false,\n};\n\nexport const PopoverProvider = PopoverContext.Provider;\n\n/**\n * Context shared between Popover and its children components\n */\nexport type PopoverContextValue = Pick<\n PopoverState,\n | 'open'\n | 'toggleOpen'\n | 'setOpen'\n | 'triggerRef'\n | 'contentRef'\n | 'openOnHover'\n | 'openOnContext'\n | 'mountNode'\n | 'withArrow'\n | 'arrowRef'\n | 'size'\n | 'appearance'\n | 'trapFocus'\n | 'inertTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n"],"mappings":";;;;;;AAAA,MAAAA,wBAAA,gBAAAC,OAAA;AAIaC,OAAA,CAAAC,cAAc,gBAAiCH,wBAAA,CAAAI,aAAa,CACvEC,SAAS,CACsB;AACjC,MAAMC,0BAA0B,GAAwB;EACtDC,IAAI,EAAE,KAAK;EACXC,OAAO,EAAEA,CAAA,KAAM,IAAI;EACnBC,UAAU,EAAEA,CAAA,KAAM,IAAI;EACtBC,UAAU,EAAE;IAAEC,OAAO,EAAE;EAAI,CAAE;EAC7BC,UAAU,EAAE;IAAED,OAAO,EAAE;EAAI,CAAE;EAC7BE,QAAQ,EAAE;IAAEF,OAAO,EAAE;EAAI,CAAE;EAC3BG,aAAa,EAAE,KAAK;EACpBC,WAAW,EAAE,KAAK;EAClBC,IAAI,EAAE,QAAiB;EACvBC,SAAS,EAAE,KAAK;EAChBC,MAAM,EAAE;CACT;AAEYhB,OAAA,CAAAiB,eAAe,GAAGjB,OAAA,CAAAC,cAAc,CAACiB,QAAQ;AAwB/C,MAAMC,0BAA0B,GAAOC,QAAiD,IAC7FtB,wBAAA,CAAAuB,kBAAkB,CAACrB,OAAA,CAAAC,cAAc,EAAE,CAACqB,GAAG,GAAGlB,0BAA0B,KAAKgB,QAAQ,CAACE,GAAG,CAAC,CAAC;AAD5EtB,OAAA,CAAAmB,0BAA0B,GAAAA,0BAAA"}
1
+ {"version":3,"sources":["../lib/popoverContext.js"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nexport const PopoverContext = /*#__PURE__*/createContext(undefined);\nconst popoverContextDefaultValue = {\n open: false,\n setOpen: () => null,\n toggleOpen: () => null,\n triggerRef: {\n current: null\n },\n contentRef: {\n current: null\n },\n arrowRef: {\n current: null\n },\n openOnContext: false,\n openOnHover: false,\n size: 'medium',\n trapFocus: false,\n inline: false\n};\nexport const PopoverProvider = PopoverContext.Provider;\nexport const usePopoverContext_unstable = selector => useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n//# sourceMappingURL=popoverContext.js.map"],"names":["PopoverContext","PopoverProvider","usePopoverContext_unstable","createContext","undefined","popoverContextDefaultValue","open","setOpen","toggleOpen","triggerRef","current","contentRef","arrowRef","openOnContext","openOnHover","size","trapFocus","inline","Provider","selector","useContextSelector","ctx"],"mappings":";;;;;;;;;;;IACaA,cAAc,MAAdA;IAoBAC,eAAe,MAAfA;IACAC,0BAA0B,MAA1BA;;sCAtBqC;AAC3C,MAAMF,iBAAiB,WAAW,GAAEG,IAAAA,mCAAa,EAACC;AACzD,MAAMC,6BAA6B;IACjCC,MAAM,KAAK;IACXC,SAAS,IAAM,IAAI;IACnBC,YAAY,IAAM,IAAI;IACtBC,YAAY;QACVC,SAAS,IAAI;IACf;IACAC,YAAY;QACVD,SAAS,IAAI;IACf;IACAE,UAAU;QACRF,SAAS,IAAI;IACf;IACAG,eAAe,KAAK;IACpBC,aAAa,KAAK;IAClBC,MAAM;IACNC,WAAW,KAAK;IAChBC,QAAQ,KAAK;AACf;AACO,MAAMhB,kBAAkBD,eAAekB,QAAQ;AAC/C,MAAMhB,6BAA6BiB,CAAAA,WAAYC,IAAAA,wCAAkB,EAACpB,gBAAgB,CAACqB,MAAMhB,0BAA0B,GAAKc,SAASE,OACxI,0CAA0C"}