@fluentui/react-popover 9.5.15 → 9.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/CHANGELOG.json +147 -1
  2. package/CHANGELOG.md +42 -2
  3. package/lib/Popover.js +0 -1
  4. package/lib/Popover.js.map +1 -1
  5. package/lib/PopoverSurface.js +0 -1
  6. package/lib/PopoverSurface.js.map +1 -1
  7. package/lib/PopoverTrigger.js +0 -1
  8. package/lib/PopoverTrigger.js.map +1 -1
  9. package/lib/components/Popover/Popover.js +3 -5
  10. package/lib/components/Popover/Popover.js.map +1 -1
  11. package/lib/components/Popover/Popover.types.js +0 -1
  12. package/lib/components/Popover/Popover.types.js.map +1 -1
  13. package/lib/components/Popover/constants.js +1 -2
  14. package/lib/components/Popover/constants.js.map +1 -1
  15. package/lib/components/Popover/index.js +0 -1
  16. package/lib/components/Popover/index.js.map +1 -1
  17. package/lib/components/Popover/renderPopover.js +21 -39
  18. package/lib/components/Popover/renderPopover.js.map +1 -1
  19. package/lib/components/Popover/usePopover.js +165 -156
  20. package/lib/components/Popover/usePopover.js.map +1 -1
  21. package/lib/components/PopoverSurface/PopoverSurface.js +5 -7
  22. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  23. package/lib/components/PopoverSurface/PopoverSurface.types.js +1 -2
  24. package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  25. package/lib/components/PopoverSurface/index.js +0 -1
  26. package/lib/components/PopoverSurface/index.js.map +1 -1
  27. package/lib/components/PopoverSurface/renderPopoverSurface.js +13 -18
  28. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  29. package/lib/components/PopoverSurface/usePopoverSurface.js +59 -67
  30. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  31. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js +25 -3
  32. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
  33. package/lib/components/PopoverTrigger/PopoverTrigger.js +3 -5
  34. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  35. package/lib/components/PopoverTrigger/PopoverTrigger.types.js +0 -1
  36. package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  37. package/lib/components/PopoverTrigger/index.js +0 -1
  38. package/lib/components/PopoverTrigger/index.js.map +1 -1
  39. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +2 -3
  40. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  41. package/lib/components/PopoverTrigger/usePopoverTrigger.js +57 -64
  42. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  43. package/lib/index.js +0 -1
  44. package/lib/index.js.map +1 -1
  45. package/lib/popoverContext.js +19 -20
  46. package/lib/popoverContext.js.map +1 -1
  47. package/lib-commonjs/Popover.js +0 -3
  48. package/lib-commonjs/Popover.js.map +1 -1
  49. package/lib-commonjs/PopoverSurface.js +0 -3
  50. package/lib-commonjs/PopoverSurface.js.map +1 -1
  51. package/lib-commonjs/PopoverTrigger.js +0 -3
  52. package/lib-commonjs/PopoverTrigger.js.map +1 -1
  53. package/lib-commonjs/components/Popover/Popover.js +1 -3
  54. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  55. package/lib-commonjs/components/Popover/Popover.types.js +0 -3
  56. package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
  57. package/lib-commonjs/components/Popover/constants.js +1 -3
  58. package/lib-commonjs/components/Popover/constants.js.map +1 -1
  59. package/lib-commonjs/components/Popover/index.js +0 -3
  60. package/lib-commonjs/components/Popover/index.js.map +1 -1
  61. package/lib-commonjs/components/Popover/renderPopover.js +1 -3
  62. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  63. package/lib-commonjs/components/Popover/usePopover.js +1 -3
  64. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  65. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +1 -3
  66. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  67. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js +0 -3
  68. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  69. package/lib-commonjs/components/PopoverSurface/index.js +0 -3
  70. package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
  71. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +1 -3
  72. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  73. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +1 -3
  74. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  75. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js +51 -3
  76. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
  77. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +1 -3
  78. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  79. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js +0 -3
  80. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  81. package/lib-commonjs/components/PopoverTrigger/index.js +0 -3
  82. package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
  83. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +1 -3
  84. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  85. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +1 -3
  86. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  87. package/lib-commonjs/index.js +0 -3
  88. package/lib-commonjs/index.js.map +1 -1
  89. package/lib-commonjs/popoverContext.js +2 -4
  90. package/lib-commonjs/popoverContext.js.map +1 -1
  91. package/package.json +12 -12
package/CHANGELOG.json CHANGED
@@ -2,7 +2,153 @@
2
2
  "name": "@fluentui/react-popover",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 25 May 2023 09:57:45 GMT",
5
+ "date": "Tue, 20 Jun 2023 12:34:45 GMT",
6
+ "tag": "@fluentui/react-popover_v9.7.0",
7
+ "version": "9.7.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "lingfangao@hotmail.com",
12
+ "package": "@fluentui/react-popover",
13
+ "commit": "71fcadc8347a9c547066b631eb7f3ec527ca9775",
14
+ "comment": "feat: Add slide and fade in animation on open"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-popover",
19
+ "comment": "Bump @fluentui/react-aria to v9.3.23",
20
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-popover",
25
+ "comment": "Bump @fluentui/react-context-selector to v9.1.23",
26
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-popover",
31
+ "comment": "Bump @fluentui/react-portal to v9.2.13",
32
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-popover",
37
+ "comment": "Bump @fluentui/react-positioning to v9.7.0",
38
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-popover",
43
+ "comment": "Bump @fluentui/react-shared-contexts to v9.5.1",
44
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-popover",
49
+ "comment": "Bump @fluentui/react-tabster to v9.8.0",
50
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-popover",
55
+ "comment": "Bump @fluentui/react-theme to v9.1.9",
56
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/react-popover",
61
+ "comment": "Bump @fluentui/react-utilities to v9.9.3",
62
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui/react-popover",
67
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.7",
68
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@fluentui/react-popover",
73
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.23",
74
+ "commit": "81c9b35e0830297b2aca2cece2ae67b3899c4647"
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ {
80
+ "date": "Wed, 31 May 2023 06:46:16 GMT",
81
+ "tag": "@fluentui/react-popover_v9.6.0",
82
+ "version": "9.6.0",
83
+ "comments": {
84
+ "patch": [
85
+ {
86
+ "author": "seanmonahan@microsoft.com",
87
+ "package": "@fluentui/react-popover",
88
+ "commit": "d640b972d7ac86bfb76ae6c6329f12cdd33b3b7c",
89
+ "comment": "chore: Update Griffel to v1.5.7."
90
+ }
91
+ ],
92
+ "minor": [
93
+ {
94
+ "author": "yiliu9@microsoft.com",
95
+ "package": "@fluentui/react-popover",
96
+ "commit": "e1ca88c0a92d07dced9c668dd11585c0c4866919",
97
+ "comment": "Add new optional useTransform parameter to allow disabling transform for positioning "
98
+ },
99
+ {
100
+ "author": "beachball",
101
+ "package": "@fluentui/react-popover",
102
+ "comment": "Bump @fluentui/react-aria to v9.3.22",
103
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
104
+ },
105
+ {
106
+ "author": "beachball",
107
+ "package": "@fluentui/react-popover",
108
+ "comment": "Bump @fluentui/react-context-selector to v9.1.22",
109
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
110
+ },
111
+ {
112
+ "author": "beachball",
113
+ "package": "@fluentui/react-popover",
114
+ "comment": "Bump @fluentui/react-portal to v9.2.12",
115
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
116
+ },
117
+ {
118
+ "author": "beachball",
119
+ "package": "@fluentui/react-popover",
120
+ "comment": "Bump @fluentui/react-positioning to v9.6.0",
121
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
122
+ },
123
+ {
124
+ "author": "beachball",
125
+ "package": "@fluentui/react-popover",
126
+ "comment": "Bump @fluentui/react-tabster to v9.7.5",
127
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
128
+ },
129
+ {
130
+ "author": "beachball",
131
+ "package": "@fluentui/react-popover",
132
+ "comment": "Bump @fluentui/react-utilities to v9.9.2",
133
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
134
+ },
135
+ {
136
+ "author": "beachball",
137
+ "package": "@fluentui/react-popover",
138
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6",
139
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
140
+ },
141
+ {
142
+ "author": "beachball",
143
+ "package": "@fluentui/react-popover",
144
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22",
145
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ {
151
+ "date": "Thu, 25 May 2023 10:00:48 GMT",
6
152
  "tag": "@fluentui/react-popover_v9.5.15",
7
153
  "version": "9.5.15",
8
154
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,52 @@
1
1
  # Change Log - @fluentui/react-popover
2
2
 
3
- This log was last generated on Thu, 25 May 2023 09:57:45 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 20 Jun 2023 12:34:45 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.7.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.7.0)
8
+
9
+ Tue, 20 Jun 2023 12:34:45 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.6.0..@fluentui/react-popover_v9.7.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: Add slide and fade in animation on open ([PR #28119](https://github.com/microsoft/fluentui/pull/28119) by lingfangao@hotmail.com)
15
+ - Bump @fluentui/react-aria to v9.3.23 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
16
+ - Bump @fluentui/react-context-selector to v9.1.23 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
17
+ - Bump @fluentui/react-portal to v9.2.13 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
18
+ - Bump @fluentui/react-positioning to v9.7.0 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
19
+ - Bump @fluentui/react-shared-contexts to v9.5.1 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
20
+ - Bump @fluentui/react-tabster to v9.8.0 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
21
+ - Bump @fluentui/react-theme to v9.1.9 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
22
+ - Bump @fluentui/react-utilities to v9.9.3 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
23
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.7 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
24
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.23 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
25
+
26
+ ## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.6.0)
27
+
28
+ Wed, 31 May 2023 06:46:16 GMT
29
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.5.15..@fluentui/react-popover_v9.6.0)
30
+
31
+ ### Minor changes
32
+
33
+ - Add new optional useTransform parameter to allow disabling transform for positioning ([PR #27929](https://github.com/microsoft/fluentui/pull/27929) by yiliu9@microsoft.com)
34
+ - Bump @fluentui/react-aria to v9.3.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
35
+ - Bump @fluentui/react-context-selector to v9.1.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
36
+ - Bump @fluentui/react-portal to v9.2.12 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
37
+ - Bump @fluentui/react-positioning to v9.6.0 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
38
+ - Bump @fluentui/react-tabster to v9.7.5 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
39
+ - Bump @fluentui/react-utilities to v9.9.2 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
40
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
41
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
42
+
43
+ ### Patches
44
+
45
+ - chore: Update Griffel to v1.5.7. ([PR #27925](https://github.com/microsoft/fluentui/pull/27925) by seanmonahan@microsoft.com)
46
+
7
47
  ## [9.5.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.5.15)
8
48
 
9
- Thu, 25 May 2023 09:57:45 GMT
49
+ Thu, 25 May 2023 10:00:48 GMT
10
50
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.5.14..@fluentui/react-popover_v9.5.15)
11
51
 
12
52
  ### Patches
package/lib/Popover.js CHANGED
@@ -1,2 +1 @@
1
1
  export * from './components/Popover/index';
2
- //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/Popover.ts"],"sourcesContent":["export * from './components/Popover/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["Popover.ts"],"sourcesContent":["export * from './components/Popover/index';\n"],"names":[],"mappings":"AAAA,cAAc,6BAA6B"}
@@ -1,2 +1 @@
1
1
  export * from './components/PopoverSurface/index';
2
- //# sourceMappingURL=PopoverSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/PopoverSurface.ts"],"sourcesContent":["export * from './components/PopoverSurface/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["PopoverSurface.ts"],"sourcesContent":["export * from './components/PopoverSurface/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
@@ -1,2 +1 @@
1
1
  export * from './components/PopoverTrigger/index';
2
- //# sourceMappingURL=PopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/PopoverTrigger.ts"],"sourcesContent":["export * from './components/PopoverTrigger/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["PopoverTrigger.ts"],"sourcesContent":["export * from './components/PopoverTrigger/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
@@ -3,10 +3,8 @@ import { usePopover_unstable } from './usePopover';
3
3
  import { renderPopover_unstable } from './renderPopover';
4
4
  /**
5
5
  * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.
6
- */
7
- export const Popover = props => {
8
- const state = usePopover_unstable(props);
9
- return renderPopover_unstable(state);
6
+ */ export const Popover = (props)=>{
7
+ const state = usePopover_unstable(props);
8
+ return renderPopover_unstable(state);
10
9
  };
11
10
  Popover.displayName = 'Popover';
12
- //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","usePopover_unstable","renderPopover_unstable","Popover","props","state","displayName"],"sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\nimport type { PopoverProps } from './Popover.types';\n\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */\nexport const Popover: React.FC<PopoverProps> = props => {\n const state = usePopover_unstable(props);\n\n return renderPopover_unstable(state);\n};\n\nPopover.displayName = 'Popover';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,sBAAsB,QAAQ;AAGvC;;;AAGA,OAAO,MAAMC,OAAA,GAAkCC,KAAA,IAAS;EACtD,MAAMC,KAAA,GAAQJ,mBAAA,CAAoBG,KAAA;EAElC,OAAOF,sBAAA,CAAuBG,KAAA;AAChC;AAEAF,OAAA,CAAQG,WAAW,GAAG"}
1
+ {"version":3,"sources":["Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\nimport type { PopoverProps } from './Popover.types';\n\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */\nexport const Popover: React.FC<PopoverProps> = props => {\n const state = usePopover_unstable(props);\n\n return renderPopover_unstable(state);\n};\n\nPopover.displayName = 'Popover';\n"],"names":["React","usePopover_unstable","renderPopover_unstable","Popover","props","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,sBAAsB,QAAQ,kBAAkB;AAGzD;;CAEC,GACD,OAAO,MAAMC,UAAkCC,CAAAA,QAAS;IACtD,MAAMC,QAAQJ,oBAAoBG;IAElC,OAAOF,uBAAuBG;AAChC,EAAE;AAEFF,QAAQG,WAAW,GAAG"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=Popover.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../../src/components/Popover/Popover.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type {\n PositioningVirtualElement,\n PositioningShorthand,\n SetVirtualMouseTarget,\n} from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Determines popover padding and arrow size\n */\nexport type PopoverSize = 'small' | 'medium' | 'large';\n\n/**\n * Popover Props\n */\nexport type PopoverProps = Pick<PortalProps, 'mountNode'> & {\n /**\n * A popover can appear styled with brand or inverted.\n * When not specified, the default style is used.\n */\n appearance?: 'brand' | 'inverted';\n\n /**\n * Can contain two children including {@link PopoverTrigger} and {@link PopoverSurface}.\n * Alternatively can only contain {@link PopoverSurface} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n\n /**\n * Used to set the initial open state of the Popover in uncontrolled mode\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Popovers are rendered out of DOM order on `document.body` by default, use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Sets the delay for closing popover on mouse leave\n */\n mouseLeaveDelay?: number;\n\n /**\n * Display an arrow pointing to the target.\n *\n * @default false\n */\n withArrow?: boolean;\n\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 /**\n * Controls the opening of the Popover\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Flag to open the Popover as a context menu. Disables all other interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Flag to open the Popover by hovering the trigger\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Configures the position of the Popover\n */\n positioning?: PositioningShorthand;\n\n /**\n * Determines popover padding and arrow size\n *\n * @default medium\n */\n size?: PopoverSize;\n\n /**\n * Should trap focus\n *\n * @default false\n */\n trapFocus?: boolean;\n\n /**\n * Must be used with the `trapFocus` prop\n * Enables older Fluent UI focus trap behavior where the user\n * cannot tab into the window outside of the document. This is now\n * non-standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @deprecated this behavior is default provided now, to opt-out of it in favor of standard behavior use the `inertTrapFocus` property\n */\n legacyTrapFocus?: boolean;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert,\n * making navigation leak from the trapped area back to the browser toolbar and vice-versa.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n\n /**\n * By default Popover focuses the first focusable element in PopoverSurface on open.\n * Specify `disableAutoFocus` to prevent this behavior.\n *\n * @default false\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_disableAutoFocus?: boolean;\n};\n\n/**\n * Popover State\n */\nexport type PopoverState = Pick<\n PopoverProps,\n | 'appearance'\n | 'mountNode'\n | 'onOpenChange'\n | 'openOnContext'\n | 'openOnHover'\n | 'trapFocus'\n | 'withArrow'\n | 'inertTrapFocus'\n> &\n Required<Pick<PopoverProps, 'inline' | 'open'>> &\n Pick<PopoverProps, 'children'> & {\n /**\n * Ref of the pointing arrow\n */\n arrowRef: React.MutableRefObject<HTMLDivElement | null>;\n\n /**\n * Ref of the PopoverSurface\n */\n contentRef: React.MutableRefObject<HTMLElement | null>;\n\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: PositioningVirtualElement | undefined;\n\n popoverSurface: React.ReactElement | undefined;\n\n popoverTrigger: React.ReactElement | undefined;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: SetVirtualMouseTarget;\n\n /**\n * Callback to open/close the Popover\n */\n setOpen: (e: OpenPopoverEvents, open: boolean) => void;\n\n size: NonNullable<PopoverProps['size']>;\n\n /**\n * Callback to toggle the open state of the Popover\n */\n toggleOpen: (e: OpenPopoverEvents) => void;\n\n /**\n * Ref of the PopoverTrigger\n */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n };\n\n/**\n * Data attached to open/close events\n */\nexport type OnOpenChangeData = { open: boolean };\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type OpenPopoverEvents =\n | MouseEvent\n | TouchEvent\n | React.FocusEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement>;\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["Popover.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type {\n PositioningVirtualElement,\n PositioningShorthand,\n SetVirtualMouseTarget,\n} from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Determines popover padding and arrow size\n */\nexport type PopoverSize = 'small' | 'medium' | 'large';\n\n/**\n * Popover Props\n */\nexport type PopoverProps = Pick<PortalProps, 'mountNode'> & {\n /**\n * A popover can appear styled with brand or inverted.\n * When not specified, the default style is used.\n */\n appearance?: 'brand' | 'inverted';\n\n /**\n * Can contain two children including {@link PopoverTrigger} and {@link PopoverSurface}.\n * Alternatively can only contain {@link PopoverSurface} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n\n /**\n * Used to set the initial open state of the Popover in uncontrolled mode\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Popovers are rendered out of DOM order on `document.body` by default, use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Sets the delay for closing popover on mouse leave\n */\n mouseLeaveDelay?: number;\n\n /**\n * Display an arrow pointing to the target.\n *\n * @default false\n */\n withArrow?: boolean;\n\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 /**\n * Controls the opening of the Popover\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Flag to open the Popover as a context menu. Disables all other interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Flag to open the Popover by hovering the trigger\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Configures the position of the Popover\n */\n positioning?: PositioningShorthand;\n\n /**\n * Determines popover padding and arrow size\n *\n * @default medium\n */\n size?: PopoverSize;\n\n /**\n * Should trap focus\n *\n * @default false\n */\n trapFocus?: boolean;\n\n /**\n * Must be used with the `trapFocus` prop\n * Enables older Fluent UI focus trap behavior where the user\n * cannot tab into the window outside of the document. This is now\n * non-standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @deprecated this behavior is default provided now, to opt-out of it in favor of standard behavior use the `inertTrapFocus` property\n */\n legacyTrapFocus?: boolean;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert,\n * making navigation leak from the trapped area back to the browser toolbar and vice-versa.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n\n /**\n * By default Popover focuses the first focusable element in PopoverSurface on open.\n * Specify `disableAutoFocus` to prevent this behavior.\n *\n * @default false\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_disableAutoFocus?: boolean;\n};\n\n/**\n * Popover State\n */\nexport type PopoverState = Pick<\n PopoverProps,\n | 'appearance'\n | 'mountNode'\n | 'onOpenChange'\n | 'openOnContext'\n | 'openOnHover'\n | 'trapFocus'\n | 'withArrow'\n | 'inertTrapFocus'\n> &\n Required<Pick<PopoverProps, 'inline' | 'open'>> &\n Pick<PopoverProps, 'children'> & {\n /**\n * Ref of the pointing arrow\n */\n arrowRef: React.MutableRefObject<HTMLDivElement | null>;\n\n /**\n * Ref of the PopoverSurface\n */\n contentRef: React.MutableRefObject<HTMLElement | null>;\n\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: PositioningVirtualElement | undefined;\n\n popoverSurface: React.ReactElement | undefined;\n\n popoverTrigger: React.ReactElement | undefined;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: SetVirtualMouseTarget;\n\n /**\n * Callback to open/close the Popover\n */\n setOpen: (e: OpenPopoverEvents, open: boolean) => void;\n\n size: NonNullable<PopoverProps['size']>;\n\n /**\n * Callback to toggle the open state of the Popover\n */\n toggleOpen: (e: OpenPopoverEvents) => void;\n\n /**\n * Ref of the PopoverTrigger\n */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n };\n\n/**\n * Data attached to open/close events\n */\nexport type OnOpenChangeData = { open: boolean };\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type OpenPopoverEvents =\n | MouseEvent\n | TouchEvent\n | React.FocusEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement>;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -5,5 +5,4 @@
5
5
  * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.
6
6
  * While we could use getComputedStyle, that adds a performance penalty for something that
7
7
  * will likely never change.
8
- */export const popoverSurfaceBorderRadius = 4;
9
- //# sourceMappingURL=constants.js.map
8
+ */ export const popoverSurfaceBorderRadius = 4;
@@ -1 +1 @@
1
- {"version":3,"names":["popoverSurfaceBorderRadius"],"sources":["../../../src/components/Popover/constants.ts"],"sourcesContent":["/**\n * @internal\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */\nexport const popoverSurfaceBorderRadius = 4;\n"],"mappings":"AAAA;;;;;;;GAQA,OAAO,MAAMA,0BAAA,GAA6B"}
1
+ {"version":3,"sources":["constants.ts"],"sourcesContent":["/**\n * @internal\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */\nexport const popoverSurfaceBorderRadius = 4;\n"],"names":["popoverSurfaceBorderRadius"],"mappings":"AAAA;;;;;;;CAOC,GACD,OAAO,MAAMA,6BAA6B,EAAE"}
@@ -2,4 +2,3 @@ export * from './Popover';
2
2
  export * from './Popover.types';
3
3
  export * from './renderPopover';
4
4
  export * from './usePopover';
5
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/Popover/index.ts"],"sourcesContent":["export * from './Popover';\nexport * from './Popover.types';\nexport * from './renderPopover';\nexport * from './usePopover';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Popover';\nexport * from './Popover.types';\nexport * from './renderPopover';\nexport * from './usePopover';\n"],"names":[],"mappings":"AAAA,cAAc,YAAY;AAC1B,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,eAAe"}
@@ -2,43 +2,25 @@ import * as React from 'react';
2
2
  import { PopoverContext } from '../../popoverContext';
3
3
  /**
4
4
  * Render the final JSX of Popover
5
- */
6
- export const renderPopover_unstable = state => {
7
- const {
8
- appearance,
9
- arrowRef,
10
- contentRef,
11
- inline,
12
- mountNode,
13
- open,
14
- openOnContext,
15
- openOnHover,
16
- setOpen,
17
- size,
18
- toggleOpen,
19
- trapFocus,
20
- triggerRef,
21
- withArrow,
22
- inertTrapFocus
23
- } = state;
24
- return /*#__PURE__*/React.createElement(PopoverContext.Provider, {
25
- value: {
26
- appearance,
27
- arrowRef,
28
- contentRef,
29
- inline,
30
- mountNode,
31
- open,
32
- openOnContext,
33
- openOnHover,
34
- setOpen,
35
- toggleOpen,
36
- triggerRef,
37
- size,
38
- trapFocus,
39
- inertTrapFocus,
40
- withArrow
41
- }
42
- }, state.popoverTrigger, state.open && state.popoverSurface);
5
+ */ export const renderPopover_unstable = (state)=>{
6
+ const { appearance , arrowRef , contentRef , inline , mountNode , open , openOnContext , openOnHover , setOpen , size , toggleOpen , trapFocus , triggerRef , withArrow , inertTrapFocus } = state;
7
+ return /*#__PURE__*/ React.createElement(PopoverContext.Provider, {
8
+ value: {
9
+ appearance,
10
+ arrowRef,
11
+ contentRef,
12
+ inline,
13
+ mountNode,
14
+ open,
15
+ openOnContext,
16
+ openOnHover,
17
+ setOpen,
18
+ toggleOpen,
19
+ triggerRef,
20
+ size,
21
+ trapFocus,
22
+ inertTrapFocus,
23
+ withArrow
24
+ }
25
+ }, state.popoverTrigger, state.open && state.popoverSurface);
43
26
  };
44
- //# sourceMappingURL=renderPopover.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","PopoverContext","renderPopover_unstable","state","appearance","arrowRef","contentRef","inline","mountNode","open","openOnContext","openOnHover","setOpen","size","toggleOpen","trapFocus","triggerRef","withArrow","inertTrapFocus","createElement","Provider","value","popoverTrigger","popoverSurface"],"sources":["../../../src/components/Popover/renderPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n const {\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n size,\n toggleOpen,\n trapFocus,\n triggerRef,\n withArrow,\n inertTrapFocus,\n } = state;\n\n return (\n <PopoverContext.Provider\n value={{\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n toggleOpen,\n triggerRef,\n size,\n trapFocus,\n inertTrapFocus,\n withArrow,\n }}\n >\n {state.popoverTrigger}\n {state.open && state.popoverSurface}\n </PopoverContext.Provider>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,cAAc,QAAQ;AAG/B;;;AAGA,OAAO,MAAMC,sBAAA,GAA0BC,KAAA,IAAwB;EAC7D,MAAM;IACJC,UAAA;IACAC,QAAA;IACAC,UAAA;IACAC,MAAA;IACAC,SAAA;IACAC,IAAA;IACAC,aAAA;IACAC,WAAA;IACAC,OAAA;IACAC,IAAA;IACAC,UAAA;IACAC,SAAA;IACAC,UAAA;IACAC,SAAA;IACAC;EAAc,CACf,GAAGf,KAAA;EAEJ,oBACEH,KAAA,CAAAmB,aAAA,CAAClB,cAAA,CAAemB,QAAQ;IACtBC,KAAA,EAAO;MACLjB,UAAA;MACAC,QAAA;MACAC,UAAA;MACAC,MAAA;MACAC,SAAA;MACAC,IAAA;MACAC,aAAA;MACAC,WAAA;MACAC,OAAA;MACAE,UAAA;MACAE,UAAA;MACAH,IAAA;MACAE,SAAA;MACAG,cAAA;MACAD;IACF;KAECd,KAAA,CAAMmB,cAAc,EACpBnB,KAAA,CAAMM,IAAI,IAAIN,KAAA,CAAMoB,cAAc;AAGzC"}
1
+ {"version":3,"sources":["renderPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n const {\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n size,\n toggleOpen,\n trapFocus,\n triggerRef,\n withArrow,\n inertTrapFocus,\n } = state;\n\n return (\n <PopoverContext.Provider\n value={{\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n toggleOpen,\n triggerRef,\n size,\n trapFocus,\n inertTrapFocus,\n withArrow,\n }}\n >\n {state.popoverTrigger}\n {state.open && state.popoverSurface}\n </PopoverContext.Provider>\n );\n};\n"],"names":["React","PopoverContext","renderPopover_unstable","state","appearance","arrowRef","contentRef","inline","mountNode","open","openOnContext","openOnHover","setOpen","size","toggleOpen","trapFocus","triggerRef","withArrow","inertTrapFocus","Provider","value","popoverTrigger","popoverSurface"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,cAAc,QAAQ,uBAAuB;AAGtD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC,QAAwB;IAC7D,MAAM,EACJC,WAAU,EACVC,SAAQ,EACRC,WAAU,EACVC,OAAM,EACNC,UAAS,EACTC,KAAI,EACJC,cAAa,EACbC,YAAW,EACXC,QAAO,EACPC,KAAI,EACJC,WAAU,EACVC,UAAS,EACTC,WAAU,EACVC,UAAS,EACTC,eAAc,EACf,GAAGf;IAEJ,qBACE,oBAACF,eAAekB,QAAQ;QACtBC,OAAO;YACLhB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAE;YACAH;YACAE;YACAG;YACAD;QACF;OAECd,MAAMkB,cAAc,EACpBlB,MAAMM,IAAI,IAAIN,MAAMmB,cAAc;AAGzC,EAAE"}