@fluentui/react-popover 9.0.0-alpha.8 → 9.0.0-nightly.f81b28ceb3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. package/CHANGELOG.json +1800 -1
  2. package/CHANGELOG.md +566 -2
  3. package/Spec.md +6 -6
  4. package/dist/react-popover.d.ts +59 -77
  5. package/lib/Popover.js.map +1 -1
  6. package/lib/PopoverSurface.js.map +1 -1
  7. package/lib/PopoverTrigger.js.map +1 -1
  8. package/lib/common/isConformant.d.ts +1 -1
  9. package/lib/common/isConformant.js +9 -5
  10. package/lib/common/isConformant.js.map +1 -1
  11. package/lib/common/mockUsePopoverContext.d.ts +1 -1
  12. package/lib/common/mockUsePopoverContext.js +28 -6
  13. package/lib/common/mockUsePopoverContext.js.map +1 -1
  14. package/lib/components/Popover/Popover.d.ts +2 -2
  15. package/lib/components/Popover/Popover.js +4 -3
  16. package/lib/components/Popover/Popover.js.map +1 -1
  17. package/lib/components/Popover/Popover.types.d.ts +24 -33
  18. package/lib/components/Popover/Popover.types.js.map +1 -1
  19. package/lib/components/Popover/index.js.map +1 -1
  20. package/lib/components/Popover/renderPopover.d.ts +1 -1
  21. package/lib/components/Popover/renderPopover.js +29 -17
  22. package/lib/components/Popover/renderPopover.js.map +1 -1
  23. package/lib/components/Popover/usePopover.d.ts +2 -3
  24. package/lib/components/Popover/usePopover.js +110 -88
  25. package/lib/components/Popover/usePopover.js.map +1 -1
  26. package/lib/components/PopoverSurface/PopoverSurface.d.ts +3 -3
  27. package/lib/components/PopoverSurface/PopoverSurface.js +5 -4
  28. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  29. package/lib/components/PopoverSurface/PopoverSurface.types.d.ts +9 -18
  30. package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  31. package/lib/components/PopoverSurface/index.js.map +1 -1
  32. package/lib/components/PopoverSurface/renderPopoverSurface.d.ts +1 -1
  33. package/lib/components/PopoverSurface/renderPopoverSurface.js +18 -10
  34. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  35. package/lib/components/PopoverSurface/usePopoverSurface.d.ts +4 -4
  36. package/lib/components/PopoverSurface/usePopoverSurface.js +94 -54
  37. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  38. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +2 -2
  39. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js +88 -64
  40. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  41. package/lib/components/PopoverTrigger/PopoverTrigger.d.ts +2 -2
  42. package/lib/components/PopoverTrigger/PopoverTrigger.js +4 -3
  43. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  44. package/lib/components/PopoverTrigger/PopoverTrigger.types.d.ts +3 -4
  45. package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  46. package/lib/components/PopoverTrigger/index.js.map +1 -1
  47. package/lib/components/PopoverTrigger/renderPopoverTrigger.d.ts +1 -1
  48. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
  49. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  50. package/lib/components/PopoverTrigger/usePopoverTrigger.d.ts +2 -3
  51. package/lib/components/PopoverTrigger/usePopoverTrigger.js +83 -60
  52. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  53. package/lib/index.js.map +1 -1
  54. package/lib/popoverContext.d.ts +4 -5
  55. package/lib/popoverContext.js +19 -12
  56. package/lib/popoverContext.js.map +1 -1
  57. package/lib/tsdoc-metadata.json +1 -1
  58. package/lib-commonjs/Popover.js +7 -2
  59. package/lib-commonjs/Popover.js.map +1 -1
  60. package/lib-commonjs/PopoverSurface.js +7 -2
  61. package/lib-commonjs/PopoverSurface.js.map +1 -1
  62. package/lib-commonjs/PopoverTrigger.js +7 -2
  63. package/lib-commonjs/PopoverTrigger.js.map +1 -1
  64. package/lib-commonjs/common/isConformant.d.ts +1 -1
  65. package/lib-commonjs/common/isConformant.js +18 -7
  66. package/lib-commonjs/common/isConformant.js.map +1 -1
  67. package/lib-commonjs/common/mockUsePopoverContext.d.ts +1 -1
  68. package/lib-commonjs/common/mockUsePopoverContext.js +38 -9
  69. package/lib-commonjs/common/mockUsePopoverContext.js.map +1 -1
  70. package/lib-commonjs/components/Popover/Popover.d.ts +2 -2
  71. package/lib-commonjs/components/Popover/Popover.js +14 -6
  72. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  73. package/lib-commonjs/components/Popover/Popover.types.d.ts +24 -33
  74. package/lib-commonjs/components/Popover/Popover.types.js +4 -1
  75. package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
  76. package/lib-commonjs/components/Popover/index.js +10 -2
  77. package/lib-commonjs/components/Popover/index.js.map +1 -1
  78. package/lib-commonjs/components/Popover/renderPopover.d.ts +1 -1
  79. package/lib-commonjs/components/Popover/renderPopover.js +39 -20
  80. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  81. package/lib-commonjs/components/Popover/usePopover.d.ts +2 -3
  82. package/lib-commonjs/components/Popover/usePopover.js +127 -93
  83. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  84. package/lib-commonjs/components/PopoverSurface/PopoverSurface.d.ts +3 -3
  85. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +18 -9
  86. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  87. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.d.ts +9 -18
  88. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js +4 -1
  89. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  90. package/lib-commonjs/components/PopoverSurface/index.js +11 -2
  91. package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
  92. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.d.ts +1 -1
  93. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +32 -14
  94. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  95. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.d.ts +4 -4
  96. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +110 -60
  97. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  98. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +2 -2
  99. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +95 -65
  100. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  101. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.d.ts +2 -2
  102. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +14 -6
  103. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  104. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.d.ts +3 -4
  105. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js +4 -1
  106. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  107. package/lib-commonjs/components/PopoverTrigger/index.js +10 -2
  108. package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
  109. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.d.ts +1 -1
  110. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +7 -2
  111. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  112. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.d.ts +2 -3
  113. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +98 -65
  114. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  115. package/lib-commonjs/index.js +10 -2
  116. package/lib-commonjs/index.js.map +1 -1
  117. package/lib-commonjs/popoverContext.d.ts +4 -5
  118. package/lib-commonjs/popoverContext.js +28 -14
  119. package/lib-commonjs/popoverContext.js.map +1 -1
  120. package/package.json +18 -15
  121. package/.storybook/main.js +0 -11
  122. package/.storybook/preview.js +0 -4
  123. package/bundle-size/Popover.fixture.js +0 -7
  124. package/config/api-extractor.json +0 -3
  125. package/config/tests.js +0 -7
  126. package/e2e/Popover.e2e.ts +0 -139
  127. package/etc/react-popover.api.md +0 -135
  128. package/just.config.ts +0 -3
  129. package/lib/Popover.stories.d.ts +0 -62
  130. package/lib/Popover.stories.js +0 -114
  131. package/lib/Popover.stories.js.map +0 -1
  132. package/lib/components/Popover/getOffsetWithArrow.d.ts +0 -7
  133. package/lib/components/Popover/getOffsetWithArrow.js +0 -34
  134. package/lib/components/Popover/getOffsetWithArrow.js.map +0 -1
  135. package/lib-amd/Popover.d.ts +0 -1
  136. package/lib-amd/Popover.js +0 -6
  137. package/lib-amd/Popover.js.map +0 -1
  138. package/lib-amd/Popover.stories.d.ts +0 -62
  139. package/lib-amd/Popover.stories.js +0 -121
  140. package/lib-amd/Popover.stories.js.map +0 -1
  141. package/lib-amd/PopoverSurface.d.ts +0 -1
  142. package/lib-amd/PopoverSurface.js +0 -6
  143. package/lib-amd/PopoverSurface.js.map +0 -1
  144. package/lib-amd/PopoverTrigger.d.ts +0 -1
  145. package/lib-amd/PopoverTrigger.js +0 -6
  146. package/lib-amd/PopoverTrigger.js.map +0 -1
  147. package/lib-amd/common/isConformant.d.ts +0 -4
  148. package/lib-amd/common/isConformant.js +0 -14
  149. package/lib-amd/common/isConformant.js.map +0 -1
  150. package/lib-amd/common/mockUsePopoverContext.d.ts +0 -7
  151. package/lib-amd/common/mockUsePopoverContext.js +0 -20
  152. package/lib-amd/common/mockUsePopoverContext.js.map +0 -1
  153. package/lib-amd/components/Popover/Popover.d.ts +0 -6
  154. package/lib-amd/components/Popover/Popover.js +0 -15
  155. package/lib-amd/components/Popover/Popover.js.map +0 -1
  156. package/lib-amd/components/Popover/Popover.types.d.ts +0 -109
  157. package/lib-amd/components/Popover/Popover.types.js +0 -5
  158. package/lib-amd/components/Popover/Popover.types.js.map +0 -1
  159. package/lib-amd/components/Popover/getOffsetWithArrow.d.ts +0 -7
  160. package/lib-amd/components/Popover/getOffsetWithArrow.js +0 -40
  161. package/lib-amd/components/Popover/getOffsetWithArrow.js.map +0 -1
  162. package/lib-amd/components/Popover/index.d.ts +0 -4
  163. package/lib-amd/components/Popover/index.js +0 -9
  164. package/lib-amd/components/Popover/index.js.map +0 -1
  165. package/lib-amd/components/Popover/renderPopover.d.ts +0 -5
  166. package/lib-amd/components/Popover/renderPopover.js +0 -29
  167. package/lib-amd/components/Popover/renderPopover.js.map +0 -1
  168. package/lib-amd/components/Popover/usePopover.d.ts +0 -11
  169. package/lib-amd/components/Popover/usePopover.js +0 -112
  170. package/lib-amd/components/Popover/usePopover.js.map +0 -1
  171. package/lib-amd/components/PopoverSurface/PopoverSurface.d.ts +0 -6
  172. package/lib-amd/components/PopoverSurface/PopoverSurface.js +0 -15
  173. package/lib-amd/components/PopoverSurface/PopoverSurface.js.map +0 -1
  174. package/lib-amd/components/PopoverSurface/PopoverSurface.types.d.ts +0 -30
  175. package/lib-amd/components/PopoverSurface/PopoverSurface.types.js +0 -5
  176. package/lib-amd/components/PopoverSurface/PopoverSurface.types.js.map +0 -1
  177. package/lib-amd/components/PopoverSurface/index.d.ts +0 -5
  178. package/lib-amd/components/PopoverSurface/index.js +0 -10
  179. package/lib-amd/components/PopoverSurface/index.js.map +0 -1
  180. package/lib-amd/components/PopoverSurface/renderPopoverSurface.d.ts +0 -5
  181. package/lib-amd/components/PopoverSurface/renderPopoverSurface.js +0 -21
  182. package/lib-amd/components/PopoverSurface/renderPopoverSurface.js.map +0 -1
  183. package/lib-amd/components/PopoverSurface/usePopoverSurface.d.ts +0 -13
  184. package/lib-amd/components/PopoverSurface/usePopoverSurface.js +0 -69
  185. package/lib-amd/components/PopoverSurface/usePopoverSurface.js.map +0 -1
  186. package/lib-amd/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +0 -7
  187. package/lib-amd/components/PopoverSurface/usePopoverSurfaceStyles.js +0 -81
  188. package/lib-amd/components/PopoverSurface/usePopoverSurfaceStyles.js.map +0 -1
  189. package/lib-amd/components/PopoverTrigger/PopoverTrigger.d.ts +0 -6
  190. package/lib-amd/components/PopoverTrigger/PopoverTrigger.js +0 -15
  191. package/lib-amd/components/PopoverTrigger/PopoverTrigger.js.map +0 -1
  192. package/lib-amd/components/PopoverTrigger/PopoverTrigger.types.d.ts +0 -12
  193. package/lib-amd/components/PopoverTrigger/PopoverTrigger.types.js +0 -5
  194. package/lib-amd/components/PopoverTrigger/PopoverTrigger.types.js.map +0 -1
  195. package/lib-amd/components/PopoverTrigger/index.d.ts +0 -4
  196. package/lib-amd/components/PopoverTrigger/index.js +0 -9
  197. package/lib-amd/components/PopoverTrigger/index.js.map +0 -1
  198. package/lib-amd/components/PopoverTrigger/renderPopoverTrigger.d.ts +0 -5
  199. package/lib-amd/components/PopoverTrigger/renderPopoverTrigger.js +0 -13
  200. package/lib-amd/components/PopoverTrigger/renderPopoverTrigger.js.map +0 -1
  201. package/lib-amd/components/PopoverTrigger/usePopoverTrigger.d.ts +0 -11
  202. package/lib-amd/components/PopoverTrigger/usePopoverTrigger.js +0 -75
  203. package/lib-amd/components/PopoverTrigger/usePopoverTrigger.js.map +0 -1
  204. package/lib-amd/index.d.ts +0 -4
  205. package/lib-amd/index.js +0 -9
  206. package/lib-amd/index.js.map +0 -1
  207. package/lib-amd/popoverContext.d.ts +0 -9
  208. package/lib-amd/popoverContext.js +0 -22
  209. package/lib-amd/popoverContext.js.map +0 -1
  210. package/lib-commonjs/Popover.stories.d.ts +0 -62
  211. package/lib-commonjs/Popover.stories.js +0 -122
  212. package/lib-commonjs/Popover.stories.js.map +0 -1
  213. package/lib-commonjs/components/Popover/getOffsetWithArrow.d.ts +0 -7
  214. package/lib-commonjs/components/Popover/getOffsetWithArrow.js +0 -38
  215. package/lib-commonjs/components/Popover/getOffsetWithArrow.js.map +0 -1
  216. package/src/components/Popover/Popover.types.ts +0 -124
  217. package/src/components/PopoverSurface/PopoverSurface.types.ts +0 -36
  218. package/src/components/PopoverTrigger/PopoverTrigger.types.ts +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"popoverContext.js","sourceRoot":"../src/","sources":["popoverContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAA4B,MAAM,kCAAkC,CAAC;AAG/G,MAAM,CAAC,IAAM,cAAc,GAAiC,aAAa,CAAsB;IAC7F,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;IACnB,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IAC7B,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IAC3B,MAAM,EAAE,SAAS;IACjB,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,KAAK;CACjB,CAAC,CAAC;AAwBH,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAI,QAAiD;IACpF,OAAA,kBAAkB,CAAC,cAAc,EAAE,QAAQ,CAAC;AAA5C,CAA4C,CAAC","sourcesContent":["import { createContext, useContextSelector, ContextSelector, Context } from '@fluentui/react-context-selector';\nimport { PopoverState } from './components/Popover/index';\n\nexport const PopoverContext: Context<PopoverContextValue> = createContext<PopoverContextValue>({\n open: false,\n setOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n target: undefined,\n openOnContext: false,\n openOnHover: false,\n size: 'medium',\n trapFocus: false,\n});\n\n/**\n * Context shared between Popover and its children components\n */\nexport interface PopoverContextValue\n extends Pick<\n PopoverState,\n | 'open'\n | 'setOpen'\n | 'triggerRef'\n | 'contentRef'\n | 'target'\n | 'openOnHover'\n | 'openOnContext'\n | 'mountNode'\n | 'noArrow'\n | 'arrowRef'\n | 'size'\n | 'brand'\n | 'inverted'\n | 'trapFocus'\n > {}\n\nexport const usePopoverContext = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, selector);\n"]}
1
+ {"version":3,"sources":["../src/popoverContext.ts"],"names":[],"mappings":"AAAA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAIA,OAAO,IAAM,cAAc,gBAAiC,aAAa,CAAsB;AAC7F,EAAA,IAAI,EAAE,KADuF;AAE7F,EAAA,OAAO,EAAE,YAAA;AAAM,WAAA,IAAA;AAAI,GAF0E;AAG7F,EAAA,UAAU,EAAE;AAAE,IAAA,OAAO,EAAE;AAAX,GAHiF;AAI7F,EAAA,UAAU,EAAE;AAAE,IAAA,OAAO,EAAE;AAAX,GAJiF;AAK7F,EAAA,QAAQ,EAAE;AAAE,IAAA,OAAO,EAAE;AAAX,GALmF;AAM7F,EAAA,aAAa,EAAE,KAN8E;AAO7F,EAAA,WAAW,EAAE,KAPgF;AAQ7F,EAAA,IAAI,EAAE,QARuF;AAS7F,EAAA,SAAS,EAAE;AATkF,CAAtB,CAAlE;AA+BP,OAAO,IAAM,iBAAiB,GAAG,UAAI,QAAJ,EAAqD;AACpF,SAAA,kBAAkB,CAAC,cAAD,EAAiB,QAAjB,CAAlB;AAA4C,CADvC","sourceRoot":""}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.13.0"
8
+ "packageVersion": "7.18.1"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var tslib_1 = /*#__PURE__*/require("tslib");
8
+
4
9
  tslib_1.__exportStar(require("./components/Popover/index"), exports);
5
10
  //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sourceRoot":"../src/","sources":["Popover.ts"],"names":[],"mappings":";;;AAAA,qEAA2C","sourcesContent":["export * from './components/Popover/index';\n"]}
1
+ {"version":3,"sources":["../src/Popover.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var tslib_1 = /*#__PURE__*/require("tslib");
8
+
4
9
  tslib_1.__exportStar(require("./components/PopoverSurface/index"), exports);
5
10
  //# sourceMappingURL=PopoverSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverSurface.js","sourceRoot":"../src/","sources":["PopoverSurface.ts"],"names":[],"mappings":";;;AAAA,4EAAkD","sourcesContent":["export * from './components/PopoverSurface/index';\n"]}
1
+ {"version":3,"sources":["../src/PopoverSurface.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var tslib_1 = /*#__PURE__*/require("tslib");
8
+
4
9
  tslib_1.__exportStar(require("./components/PopoverTrigger/index"), exports);
5
10
  //# sourceMappingURL=PopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverTrigger.js","sourceRoot":"../src/","sources":["PopoverTrigger.ts"],"names":[],"mappings":";;;AAAA,4EAAkD","sourcesContent":["export * from './components/PopoverTrigger/index';\n"]}
1
+ {"version":3,"sources":["../src/PopoverTrigger.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,4 +1,4 @@
1
- import { IsConformantOptions } from '@fluentui/react-conformance';
1
+ import type { IsConformantOptions } from '@fluentui/react-conformance';
2
2
  export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
3
  componentPath?: string;
4
4
  }): void;
@@ -1,13 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.isConformant = void 0;
4
- var react_conformance_1 = require("@fluentui/react-conformance");
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
+
5
12
  function isConformant(testInfo) {
6
- var defaultOptions = {
7
- asPropHandlesRef: true,
8
- componentPath: module.parent.filename.replace('.test', ''),
9
- };
10
- react_conformance_1.isConformant(defaultOptions, 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);
11
21
  }
22
+
12
23
  exports.isConformant = isConformant;
13
24
  //# sourceMappingURL=isConformant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isConformant.js","sourceRoot":"../src/","sources":["common/isConformant.ts"],"names":[],"mappings":";;;AAAA,iEAAoG;AAEpG,SAAgB,YAAY,CAC1B,QAAyF;IAEzF,IAAM,cAAc,GAAyC;QAC3D,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KAC7D,CAAC;IAEF,gCAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC;AATD,oCASC","sourcesContent":["import { isConformant as baseIsConformant, IsConformantOptions } from '@fluentui/react-conformance';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"]}
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,4 +1,4 @@
1
- import { PopoverContextValue } from '../popoverContext';
1
+ import type { PopoverContextValue } from '../popoverContext';
2
2
  /**
3
3
  * A test utility to mock the usePopoverContext hook that relies on context selector
4
4
  * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
@@ -1,20 +1,49 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.mockPopoverContext = void 0;
4
- var tslib_1 = require("tslib");
5
- var popoverContext_1 = require("../popoverContext");
7
+
8
+ var tslib_1 = /*#__PURE__*/require("tslib");
9
+
10
+ var popoverContext_1 = /*#__PURE__*/require("../popoverContext");
6
11
  /**
7
12
  * A test utility to mock the usePopoverContext hook that relies on context selector
8
13
  * Don't forget to call `jest.mock(**\/popupContext.ts)` while using this
9
14
  * @param options Popover context values to set for testing
10
15
  */
16
+
17
+
11
18
  var mockPopoverContext = function (options) {
12
- if (options === void 0) { options = {}; }
13
- var mockContext = tslib_1.__assign({ open: false, setOpen: function () { return null; }, triggerRef: { current: null }, contentRef: { current: null }, arrowRef: { current: null }, target: undefined, openOnContext: false, openOnHover: false, size: 'medium' }, options);
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
- popoverContext_1.usePopoverContext.mockImplementation(function (selector) {
16
- return selector(mockContext);
17
- });
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
+ });
18
46
  };
47
+
19
48
  exports.mockPopoverContext = mockPopoverContext;
20
49
  //# sourceMappingURL=mockUsePopoverContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mockUsePopoverContext.js","sourceRoot":"../src/","sources":["common/mockUsePopoverContext.ts"],"names":[],"mappings":";;;;AAAA,oDAA2E;AAE3E;;;;GAIG;AACI,IAAM,kBAAkB,GAAG,UAAC,OAA0C;IAA1C,wBAAA,EAAA,YAA0C;IAC3E,IAAM,WAAW,sBACf,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI,EACnB,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAC7B,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAC3B,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,KAAK,EACpB,WAAW,EAAE,KAAK,EAClB,IAAI,EAAE,QAAQ,IACX,OAAO,CACX,CAAC;IACF,8DAA8D;IAC7D,kCAA+B,CAAC,kBAAkB,CAAC,UAAC,QAA+C;QAClG,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAjBW,QAAA,kBAAkB,sBAiB7B","sourcesContent":["import { PopoverContextValue, usePopoverContext } from '../popoverContext';\n\n/**\n * A test utility to mock the usePopoverContext hook that relies on context selector\n * Don't forget to call `jest.mock(**\\/popupContext.ts)` while using this\n * @param options Popover context values to set for testing\n */\nexport const mockPopoverContext = (options: Partial<PopoverContextValue> = {}) => {\n const mockContext: PopoverContextValue = {\n open: false,\n setOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n target: undefined,\n openOnContext: false,\n openOnHover: false,\n size: 'medium',\n ...options,\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (usePopoverContext as jest.Mock).mockImplementation((selector: (context: PopoverContextValue) => any) => {\n return selector(mockContext);\n });\n};\n"]}
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":""}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { PopoverProps } from './Popover.types';
2
+ import type { PopoverProps } from './Popover.types';
3
3
  /**
4
- * Popover component
4
+ * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.
5
5
  */
6
6
  export declare const Popover: React.FC<PopoverProps>;
@@ -1,15 +1,23 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.Popover = void 0;
4
- var usePopover_1 = require("./usePopover");
5
- var renderPopover_1 = require("./renderPopover");
7
+
8
+ var usePopover_1 = /*#__PURE__*/require("./usePopover");
9
+
10
+ var renderPopover_1 = /*#__PURE__*/require("./renderPopover");
6
11
  /**
7
- * Popover component
12
+ * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.
8
13
  */
14
+
15
+
9
16
  var Popover = function (props) {
10
- var state = usePopover_1.usePopover(props);
11
- return renderPopover_1.renderPopover(state);
17
+ var state = usePopover_1.usePopover(props);
18
+ return renderPopover_1.renderPopover(state);
12
19
  };
20
+
13
21
  exports.Popover = Popover;
14
22
  exports.Popover.displayName = 'Popover';
15
23
  //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sourceRoot":"../src/","sources":["components/Popover/Popover.tsx"],"names":[],"mappings":";;;AACA,2CAA0C;AAE1C,iDAAgD;AAEhD;;GAEG;AACI,IAAM,OAAO,GAA2B,UAAA,KAAK;IAClD,IAAM,KAAK,GAAG,uBAAU,CAAC,KAAK,CAAC,CAAC;IAEhC,OAAO,6BAAa,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB;AAEF,eAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import * as React from 'react';\nimport { usePopover } from './usePopover';\nimport { PopoverProps } from './Popover.types';\nimport { renderPopover } from './renderPopover';\n\n/**\n * Popover component\n */\nexport const Popover: React.FC<PopoverProps> = props => {\n const state = usePopover(props);\n\n return renderPopover(state);\n};\n\nPopover.displayName = 'Popover';\n"]}
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,20 +1,15 @@
1
1
  import * as React from 'react';
2
- import { PopperOptions, PopperVirtualElement } from '@fluentui/react-positioning';
3
- import { PortalProps } from '@fluentui/react-portal';
4
- import { ComponentState } from '@fluentui/react-utilities';
2
+ import type { PopperVirtualElement, PositioningShorthand, usePopperMouseTarget } from '@fluentui/react-positioning';
3
+ import type { PortalProps } from '@fluentui/react-portal';
5
4
  /**
6
5
  * Determines popover padding and arrow size
7
6
  */
8
7
  export declare type PopoverSize = 'small' | 'medium' | 'large';
9
- /**
10
- * Popover Props
11
- */
12
- export interface PopoverProps extends Pick<PopperOptions, 'position' | 'align' | 'offset' | 'coverTarget' | 'target'>, Pick<PortalProps, 'mountNode'> {
13
- children: React.ReactNode;
8
+ export declare type PopoverCommons = Pick<PortalProps, 'mountNode'> & {
14
9
  /**
15
10
  * Controls the opening of the Popover
16
11
  */
17
- open?: boolean;
12
+ open: boolean;
18
13
  /**
19
14
  * Used to set the initial open state of the Popover in uncontrolled mode
20
15
  */
@@ -42,36 +37,33 @@ export interface PopoverProps extends Pick<PopperOptions, 'position' | 'align' |
42
37
  */
43
38
  size?: PopoverSize;
44
39
  /**
45
- * Uses brand colour as background
46
- * Mutually exclusive with `inverted`
40
+ * A popover can appear styled with brand or inverted.
41
+ * When not specified, the default style is used.
47
42
  */
48
- brand?: boolean;
49
- /**
50
- * Inverts the foreground/background colour of the popover
51
- * Mutually exclusive with `brand`
52
- */
53
- inverted?: boolean;
43
+ appearance?: 'brand' | 'inverted';
54
44
  /**
55
45
  * Should trap focus
56
46
  */
57
47
  trapFocus?: boolean;
58
- }
59
- /**
60
- * Names of the shorthand properties in PopoverProps
61
- */
62
- export declare type PopoverShorthandProps = never;
48
+ /**
49
+ * Configures the position of the Popover
50
+ */
51
+ positioning?: PositioningShorthand;
52
+ };
63
53
  /**
64
- * Names of PopoverProps that have a default value in usePopover
54
+ * Popover Props
65
55
  */
66
- export declare type PopoverDefaultedProps = never;
56
+ export declare type PopoverProps = Partial<PopoverCommons> & {
57
+ /**
58
+ * Can contain two children including {@link PopoverTrigger} and {@link PopoverPopover}.
59
+ * Alternatively can only contain {@link PopoverPopover} if using a custom `target`.
60
+ */
61
+ children: [JSX.Element, JSX.Element] | JSX.Element;
62
+ };
67
63
  /**
68
64
  * Popover State
69
65
  */
70
- export interface PopoverState extends ComponentState<PopoverProps, PopoverShorthandProps, PopoverDefaultedProps> {
71
- /**
72
- * Open state of the Popover
73
- */
74
- open: boolean;
66
+ export declare type PopoverState = PopoverCommons & Pick<PopoverProps, 'children'> & {
75
67
  /**
76
68
  * Callback to open/close the Popover
77
69
  */
@@ -95,14 +87,13 @@ export interface PopoverState extends ComponentState<PopoverProps, PopoverShorth
95
87
  /**
96
88
  * A callback to set the target of the popper to the mouse click for context events
97
89
  */
98
- setContextTarget: React.Dispatch<PopperVirtualElement | undefined>;
90
+ setContextTarget: ReturnType<typeof usePopperMouseTarget>[1];
99
91
  size: NonNullable<PopoverProps['size']>;
100
- }
92
+ };
101
93
  /**
102
94
  * Data attached to open/close events
103
95
  */
104
- export interface OnOpenChangeData extends Pick<PopoverState, 'open'> {
105
- }
96
+ export declare type OnOpenChangeData = Pick<PopoverState, 'open'>;
106
97
  /**
107
98
  * The supported events that will trigger open/close of the menu
108
99
  */
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  //# sourceMappingURL=Popover.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.types.js","sourceRoot":"../src/","sources":["components/Popover/Popover.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { PopperOptions, PopperVirtualElement } from '@fluentui/react-positioning';\nimport { PortalProps } from '@fluentui/react-portal';\nimport { ComponentState } from '@fluentui/react-utilities';\n\n/**\n * Determines popover padding and arrow size\n */\nexport type PopoverSize = 'small' | 'medium' | 'large';\n\n/**\n * Popover Props\n */\nexport interface PopoverProps\n extends Pick<PopperOptions, 'position' | 'align' | 'offset' | 'coverTarget' | 'target'>,\n Pick<PortalProps, 'mountNode'> {\n children: React.ReactNode;\n /**\n * Controls the opening of the Popover\n */\n open?: boolean;\n /**\n * Used to set the initial open state of the Popover in uncontrolled mode\n */\n defaultOpen?: boolean;\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: OpenPopoverEvents, data: OnOpenChangeData) => void;\n /**\n * Flag to open the Popover by hovering the trigger\n */\n openOnHover?: boolean;\n /**\n * Flag to open the Popover as a context menu. Disables all other interactions\n */\n openOnContext?: boolean;\n /**\n * Do not display the arrow\n */\n noArrow?: boolean;\n /**\n * Determines popover padding and arrow size\n * @default medium\n */\n size?: PopoverSize;\n /**\n * Uses brand colour as background\n * Mutually exclusive with `inverted`\n */\n brand?: boolean;\n /**\n * Inverts the foreground/background colour of the popover\n * Mutually exclusive with `brand`\n */\n inverted?: boolean;\n\n /**\n * Should trap focus\n */\n trapFocus?: boolean;\n}\n\n/**\n * Names of the shorthand properties in PopoverProps\n */\nexport type PopoverShorthandProps = never;\n\n/**\n * Names of PopoverProps that have a default value in usePopover\n */\nexport type PopoverDefaultedProps = never;\n\n/**\n * Popover State\n */\nexport interface PopoverState extends ComponentState<PopoverProps, PopoverShorthandProps, PopoverDefaultedProps> {\n /**\n * Open state of the Popover\n */\n open: boolean;\n /**\n * Callback to open/close the Popover\n */\n setOpen: (e: OpenPopoverEvents, open: boolean) => void;\n /**\n * Ref of the PopoverTrigger\n */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n /**\n * Ref of the PopoverSurface\n */\n contentRef: React.MutableRefObject<HTMLElement | null>;\n /**\n * Ref of the pointing arrow\n */\n arrowRef: React.MutableRefObject<HTMLDivElement | null>;\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: PopperVirtualElement | undefined;\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: React.Dispatch<PopperVirtualElement | undefined>;\n\n size: NonNullable<PopoverProps['size']>;\n}\n\n/**\n * Data attached to open/close events\n */\nexport interface OnOpenChangeData extends Pick<PopoverState, 'open'> {}\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type OpenPopoverEvents =\n | MouseEvent\n | TouchEvent\n | React.MouseEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.FocusEvent<HTMLElement>;\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -1,8 +1,16 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var tslib_1 = /*#__PURE__*/require("tslib");
8
+
4
9
  tslib_1.__exportStar(require("./Popover"), exports);
10
+
5
11
  tslib_1.__exportStar(require("./Popover.types"), exports);
12
+
6
13
  tslib_1.__exportStar(require("./renderPopover"), exports);
14
+
7
15
  tslib_1.__exportStar(require("./usePopover"), exports);
8
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Popover/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,0DAAgC;AAChC,0DAAgC;AAChC,uDAA6B","sourcesContent":["export * from './Popover';\nexport * from './Popover.types';\nexport * from './renderPopover';\nexport * from './usePopover';\n"]}
1
+ {"version":3,"sources":["../../../src/components/Popover/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,4 +1,4 @@
1
- import { PopoverState } from './Popover.types';
1
+ import type { PopoverState } from './Popover.types';
2
2
  /**
3
3
  * Render the final JSX of Popover
4
4
  */
@@ -1,29 +1,48 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.renderPopover = void 0;
4
- var React = require("react");
5
- var popoverContext_1 = require("../../popoverContext");
7
+
8
+ var React = /*#__PURE__*/require("react");
9
+
10
+ var popoverContext_1 = /*#__PURE__*/require("../../popoverContext");
6
11
  /**
7
12
  * Render the final JSX of Popover
8
13
  */
14
+
15
+
9
16
  var renderPopover = function (state) {
10
- var open = state.open, setOpen = state.setOpen, triggerRef = state.triggerRef, contentRef = state.contentRef, target = state.target, openOnContext = state.openOnContext, openOnHover = state.openOnHover, mountNode = state.mountNode, arrowRef = state.arrowRef, size = state.size, noArrow = state.noArrow, brand = state.brand, inverted = state.inverted, trapFocus = state.trapFocus;
11
- return (React.createElement(popoverContext_1.PopoverContext.Provider, { value: {
12
- open: open,
13
- setOpen: setOpen,
14
- triggerRef: triggerRef,
15
- contentRef: contentRef,
16
- target: target,
17
- openOnHover: openOnHover,
18
- openOnContext: openOnContext,
19
- mountNode: mountNode,
20
- arrowRef: arrowRef,
21
- size: size,
22
- noArrow: noArrow,
23
- brand: brand,
24
- inverted: inverted,
25
- trapFocus: trapFocus,
26
- } }, state.children));
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;
29
+ return React.createElement(popoverContext_1.PopoverContext.Provider, {
30
+ 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
43
+ }
44
+ }, state.children);
27
45
  };
46
+
28
47
  exports.renderPopover = renderPopover;
29
48
  //# sourceMappingURL=renderPopover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderPopover.js","sourceRoot":"../src/","sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":";;;AAAA,6BAA+B;AAC/B,uDAAsD;AAGtD;;GAEG;AACI,IAAM,aAAa,GAAG,UAAC,KAAmB;IAE7C,IAAA,IAAI,GAcF,KAAK,KAdH,EACJ,OAAO,GAaL,KAAK,QAbA,EACP,UAAU,GAYR,KAAK,WAZG,EACV,UAAU,GAWR,KAAK,WAXG,EACV,MAAM,GAUJ,KAAK,OAVD,EACN,aAAa,GASX,KAAK,cATM,EACb,WAAW,GAQT,KAAK,YARI,EACX,SAAS,GAOP,KAAK,UAPE,EACT,QAAQ,GAMN,KAAK,SANC,EACR,IAAI,GAKF,KAAK,KALH,EACJ,OAAO,GAIL,KAAK,QAJA,EACP,KAAK,GAGH,KAAK,MAHF,EACL,QAAQ,GAEN,KAAK,SAFC,EACR,SAAS,GACP,KAAK,UADE,CACD;IAEV,OAAO,CACL,oBAAC,+BAAc,CAAC,QAAQ,IACtB,KAAK,EAAE;YACL,IAAI,MAAA;YACJ,OAAO,SAAA;YACP,UAAU,YAAA;YACV,UAAU,YAAA;YACV,MAAM,QAAA;YACN,WAAW,aAAA;YACX,aAAa,eAAA;YACb,SAAS,WAAA;YACT,QAAQ,UAAA;YACR,IAAI,MAAA;YACJ,OAAO,SAAA;YACP,KAAK,OAAA;YACL,QAAQ,UAAA;YACR,SAAS,WAAA;SACV,IAEA,KAAK,CAAC,QAAQ,CACS,CAC3B,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,aAAa,iBAwCxB","sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover = (state: PopoverState) => {\n const {\n open,\n setOpen,\n triggerRef,\n contentRef,\n target,\n openOnContext,\n openOnHover,\n mountNode,\n arrowRef,\n size,\n noArrow,\n brand,\n inverted,\n trapFocus,\n } = state;\n\n return (\n <PopoverContext.Provider\n value={{\n open,\n setOpen,\n triggerRef,\n contentRef,\n target,\n openOnHover,\n openOnContext,\n mountNode,\n arrowRef,\n size,\n noArrow,\n brand,\n inverted,\n trapFocus,\n }}\n >\n {state.children}\n </PopoverContext.Provider>\n );\n};\n"]}
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,4 +1,4 @@
1
- import { PopoverProps, PopoverState } from './Popover.types';
1
+ import type { PopoverProps, PopoverState } from './Popover.types';
2
2
  /**
3
3
  * Create the state required to render Popover.
4
4
  *
@@ -6,6 +6,5 @@ import { PopoverProps, PopoverState } from './Popover.types';
6
6
  * before being passed to renderPopover.
7
7
  *
8
8
  * @param props - props from this instance of Popover
9
- * @param defaultProps - (optional) default prop values provided by the implementing type
10
9
  */
11
- export declare const usePopover: (props: PopoverProps, defaultProps?: PopoverProps | undefined) => PopoverState;
10
+ export declare const usePopover: (props: PopoverProps) => PopoverState;