@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.
- package/CHANGELOG.json +147 -1
- package/CHANGELOG.md +42 -2
- package/lib/Popover.js +0 -1
- package/lib/Popover.js.map +1 -1
- package/lib/PopoverSurface.js +0 -1
- package/lib/PopoverSurface.js.map +1 -1
- package/lib/PopoverTrigger.js +0 -1
- package/lib/PopoverTrigger.js.map +1 -1
- package/lib/components/Popover/Popover.js +3 -5
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/Popover.types.js +0 -1
- package/lib/components/Popover/Popover.types.js.map +1 -1
- package/lib/components/Popover/constants.js +1 -2
- package/lib/components/Popover/constants.js.map +1 -1
- package/lib/components/Popover/index.js +0 -1
- package/lib/components/Popover/index.js.map +1 -1
- package/lib/components/Popover/renderPopover.js +21 -39
- package/lib/components/Popover/renderPopover.js.map +1 -1
- package/lib/components/Popover/usePopover.js +165 -156
- package/lib/components/Popover/usePopover.js.map +1 -1
- package/lib/components/PopoverSurface/PopoverSurface.js +5 -7
- package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/PopoverSurface.types.js +1 -2
- package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
- package/lib/components/PopoverSurface/index.js +0 -1
- package/lib/components/PopoverSurface/index.js.map +1 -1
- package/lib/components/PopoverSurface/renderPopoverSurface.js +13 -18
- package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/usePopoverSurface.js +59 -67
- package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js +25 -3
- package/lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
- package/lib/components/PopoverTrigger/PopoverTrigger.js +3 -5
- package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
- package/lib/components/PopoverTrigger/PopoverTrigger.types.js +0 -1
- package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
- package/lib/components/PopoverTrigger/index.js +0 -1
- package/lib/components/PopoverTrigger/index.js.map +1 -1
- package/lib/components/PopoverTrigger/renderPopoverTrigger.js +2 -3
- package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
- package/lib/components/PopoverTrigger/usePopoverTrigger.js +57 -64
- package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/popoverContext.js +19 -20
- package/lib/popoverContext.js.map +1 -1
- package/lib-commonjs/Popover.js +0 -3
- package/lib-commonjs/Popover.js.map +1 -1
- package/lib-commonjs/PopoverSurface.js +0 -3
- package/lib-commonjs/PopoverSurface.js.map +1 -1
- package/lib-commonjs/PopoverTrigger.js +0 -3
- package/lib-commonjs/PopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/Popover/Popover.js +1 -3
- package/lib-commonjs/components/Popover/Popover.js.map +1 -1
- package/lib-commonjs/components/Popover/Popover.types.js +0 -3
- package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
- package/lib-commonjs/components/Popover/constants.js +1 -3
- package/lib-commonjs/components/Popover/constants.js.map +1 -1
- package/lib-commonjs/components/Popover/index.js +0 -3
- package/lib-commonjs/components/Popover/index.js.map +1 -1
- package/lib-commonjs/components/Popover/renderPopover.js +1 -3
- package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
- package/lib-commonjs/components/Popover/usePopover.js +1 -3
- package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +1 -3
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js +0 -3
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/index.js +0 -3
- package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +1 -3
- package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +1 -3
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js +51 -3
- package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +1 -3
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js +0 -3
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/index.js +0 -3
- package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +1 -3
- package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +1 -3
- package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/popoverContext.js +2 -4
- package/lib-commonjs/popoverContext.js.map +1 -1
- 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": "
|
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
|
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
|
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
package/lib/Popover.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["Popover.ts"],"sourcesContent":["export * from './components/Popover/index';\n"],"names":[],"mappings":"AAAA,cAAc,6BAA6B"}
|
package/lib/PopoverSurface.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["PopoverSurface.ts"],"sourcesContent":["export * from './components/PopoverSurface/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
|
package/lib/PopoverTrigger.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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
|
-
|
8
|
-
|
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,"
|
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 +1 @@
|
|
1
|
-
{"version":3,"
|
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,"
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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,"
|
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"}
|