@fluentui/react-popover 0.0.0-nightly-20230307-0423.1 → 0.0.0-nightly-20230309-0418.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-popover",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-popover_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Thu, 09 Mar 2023 04:25:30 GMT",
|
6
|
+
"tag": "@fluentui/react-popover_v0.0.0-nightly-20230309-0418.1",
|
7
|
+
"version": "0.0.0-nightly-20230309-0418.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,62 +16,133 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-popover",
|
19
|
-
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20230309-0418.1",
|
20
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-popover",
|
25
|
-
"comment": "Bump @fluentui/react-aria to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20230309-0418.1",
|
26
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-popover",
|
31
|
-
"comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20230309-0418.1",
|
32
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
33
33
|
},
|
34
34
|
{
|
35
35
|
"author": "beachball",
|
36
36
|
"package": "@fluentui/react-popover",
|
37
|
-
"comment": "Bump @fluentui/react-portal to v0.0.0-nightly-
|
38
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-portal to v0.0.0-nightly-20230309-0418.1",
|
38
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
39
39
|
},
|
40
40
|
{
|
41
41
|
"author": "beachball",
|
42
42
|
"package": "@fluentui/react-popover",
|
43
|
-
"comment": "Bump @fluentui/react-positioning to v0.0.0-nightly-
|
44
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-positioning to v0.0.0-nightly-20230309-0418.1",
|
44
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
45
45
|
},
|
46
46
|
{
|
47
47
|
"author": "beachball",
|
48
48
|
"package": "@fluentui/react-popover",
|
49
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
50
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230309-0418.1",
|
50
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
51
51
|
},
|
52
52
|
{
|
53
53
|
"author": "beachball",
|
54
54
|
"package": "@fluentui/react-popover",
|
55
|
-
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-
|
56
|
-
"commit": "
|
55
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230309-0418.1",
|
56
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
57
57
|
},
|
58
58
|
{
|
59
59
|
"author": "beachball",
|
60
60
|
"package": "@fluentui/react-popover",
|
61
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
62
|
-
"commit": "
|
61
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230309-0418.1",
|
62
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
63
63
|
},
|
64
64
|
{
|
65
65
|
"author": "beachball",
|
66
66
|
"package": "@fluentui/react-popover",
|
67
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
68
|
-
"commit": "
|
67
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230309-0418.1",
|
68
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
69
69
|
},
|
70
70
|
{
|
71
71
|
"author": "beachball",
|
72
72
|
"package": "@fluentui/react-popover",
|
73
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
74
|
-
"commit": "
|
73
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230309-0418.1",
|
74
|
+
"commit": "055a2f6430bb3e388a69f58d8ab78db4b6ae5e95"
|
75
|
+
}
|
76
|
+
]
|
77
|
+
}
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"date": "Wed, 08 Mar 2023 17:42:36 GMT",
|
81
|
+
"tag": "@fluentui/react-popover_v9.5.0",
|
82
|
+
"version": "9.5.0",
|
83
|
+
"comments": {
|
84
|
+
"minor": [
|
85
|
+
{
|
86
|
+
"author": "gcox@microsoft.com",
|
87
|
+
"package": "@fluentui/react-popover",
|
88
|
+
"commit": "4d536a76b414c5135713127ce707f8676db13fd8",
|
89
|
+
"comment": "feat: custom styles"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"author": "bernardo.sunderhus@gmail.com",
|
93
|
+
"package": "@fluentui/react-popover",
|
94
|
+
"commit": "5177d2a76ad0c003f03a883022ff5cee62c3e7e3",
|
95
|
+
"comment": "feature: introduces innerTrapFocus and deprecates legacyTrapFocus"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"author": "beachball",
|
99
|
+
"package": "@fluentui/react-popover",
|
100
|
+
"comment": "Bump @fluentui/react-aria to v9.3.11",
|
101
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"author": "beachball",
|
105
|
+
"package": "@fluentui/react-popover",
|
106
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.11",
|
107
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"author": "beachball",
|
111
|
+
"package": "@fluentui/react-popover",
|
112
|
+
"comment": "Bump @fluentui/react-portal to v9.1.10",
|
113
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"author": "beachball",
|
117
|
+
"package": "@fluentui/react-popover",
|
118
|
+
"comment": "Bump @fluentui/react-positioning to v9.5.1",
|
119
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"author": "beachball",
|
123
|
+
"package": "@fluentui/react-popover",
|
124
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.3.0",
|
125
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"author": "beachball",
|
129
|
+
"package": "@fluentui/react-popover",
|
130
|
+
"comment": "Bump @fluentui/react-tabster to v9.5.4",
|
131
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"author": "beachball",
|
135
|
+
"package": "@fluentui/react-popover",
|
136
|
+
"comment": "Bump @fluentui/react-utilities to v9.6.1",
|
137
|
+
"commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
|
138
|
+
}
|
139
|
+
],
|
140
|
+
"patch": [
|
141
|
+
{
|
142
|
+
"author": "bernardo.sunderhus@gmail.com",
|
143
|
+
"package": "@fluentui/react-popover",
|
144
|
+
"commit": "e469261b00066074c60d705150e678506f8700f0",
|
145
|
+
"comment": "fix: updates useModalAttributes flags for legacyTrapFocus"
|
75
146
|
}
|
76
147
|
]
|
77
148
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,27 +1,48 @@
|
|
1
1
|
# Change Log - @fluentui/react-popover
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 09 Mar 2023 04:25:30 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20230309-0418.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v0.0.0-nightly-20230309-0418.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.
|
9
|
+
Thu, 09 Mar 2023 04:25:30 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.5.0..@fluentui/react-popover_v0.0.0-nightly-20230309-0418.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-aria to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-context-selector to v0.0.0-nightly-
|
18
|
-
- Bump @fluentui/react-portal to v0.0.0-nightly-
|
19
|
-
- Bump @fluentui/react-positioning to v0.0.0-nightly-
|
20
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
21
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
22
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
23
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
24
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
16
|
+
- Bump @fluentui/react-aria to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
17
|
+
- Bump @fluentui/react-context-selector to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
18
|
+
- Bump @fluentui/react-portal to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
19
|
+
- Bump @fluentui/react-positioning to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
20
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
21
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
22
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
23
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
24
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230309-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/055a2f6430bb3e388a69f58d8ab78db4b6ae5e95) by beachball)
|
25
|
+
|
26
|
+
## [9.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.5.0)
|
27
|
+
|
28
|
+
Wed, 08 Mar 2023 17:42:36 GMT
|
29
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.4.11..@fluentui/react-popover_v9.5.0)
|
30
|
+
|
31
|
+
### Minor changes
|
32
|
+
|
33
|
+
- feat: custom styles ([PR #27070](https://github.com/microsoft/fluentui/pull/27070) by gcox@microsoft.com)
|
34
|
+
- feature: introduces innerTrapFocus and deprecates legacyTrapFocus ([PR #26942](https://github.com/microsoft/fluentui/pull/26942) by bernardo.sunderhus@gmail.com)
|
35
|
+
- Bump @fluentui/react-aria to v9.3.11 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
36
|
+
- Bump @fluentui/react-context-selector to v9.1.11 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
37
|
+
- Bump @fluentui/react-portal to v9.1.10 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
38
|
+
- Bump @fluentui/react-positioning to v9.5.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
39
|
+
- Bump @fluentui/react-shared-contexts to v9.3.0 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
40
|
+
- Bump @fluentui/react-tabster to v9.5.4 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
41
|
+
- Bump @fluentui/react-utilities to v9.6.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
|
42
|
+
|
43
|
+
### Patches
|
44
|
+
|
45
|
+
- fix: updates useModalAttributes flags for legacyTrapFocus ([PR #27109](https://github.com/microsoft/fluentui/pull/27109) by bernardo.sunderhus@gmail.com)
|
25
46
|
|
26
47
|
## [9.4.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.4.11)
|
27
48
|
|
package/dist/index.d.ts
CHANGED
@@ -17,7 +17,6 @@ import type { SetVirtualMouseTarget } from '@fluentui/react-positioning';
|
|
17
17
|
import type { Slot } from '@fluentui/react-utilities';
|
18
18
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
19
19
|
import type { TriggerProps } from '@fluentui/react-utilities';
|
20
|
-
import type { UseModalAttributesOptions } from '@fluentui/react-tabster';
|
21
20
|
|
22
21
|
export declare const arrowHeights: Record<PopoverSize, number>;
|
23
22
|
|
@@ -123,7 +122,7 @@ export declare type PopoverProps = Pick<PortalProps, 'mountNode'> & {
|
|
123
122
|
*
|
124
123
|
* @default false
|
125
124
|
*/
|
126
|
-
trapFocus?:
|
125
|
+
trapFocus?: boolean;
|
127
126
|
/**
|
128
127
|
* Must be used with the `trapFocus` prop
|
129
128
|
* Enables older Fluent UI focus trap behavior where the user
|
@@ -133,7 +132,7 @@ export declare type PopoverProps = Pick<PortalProps, 'mountNode'> & {
|
|
133
132
|
*
|
134
133
|
* @deprecated this behavior is default provided now, to opt-out of it in favor of standard behavior use the `inertTrapFocus` property
|
135
134
|
*/
|
136
|
-
legacyTrapFocus?:
|
135
|
+
legacyTrapFocus?: boolean;
|
137
136
|
/**
|
138
137
|
* Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)
|
139
138
|
* where the focus trap involves setting outside elements inert,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-popover/src/components/Popover/Popover.types.ts"],"names":[],"mappings":"","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';\
|
1
|
+
{"version":3,"file":"Popover.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-popover/src/components/Popover/Popover.types.ts"],"names":[],"mappings":"","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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../../../../../../packages/react-components/react-popover/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';\
|
1
|
+
{"version":3,"names":[],"sources":["../../../../../../../../../packages/react-components/react-popover/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":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-popover",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230309-0418.1",
|
4
4
|
"description": "Popover component for Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -29,21 +29,21 @@
|
|
29
29
|
"devDependencies": {
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
31
31
|
"@fluentui/react-conformance": "*",
|
32
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
32
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230309-0418.1",
|
33
33
|
"@fluentui/scripts-api-extractor": "*",
|
34
34
|
"@fluentui/scripts-cypress": "*",
|
35
35
|
"@fluentui/scripts-tasks": "*"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@fluentui/keyboard-keys": "0.0.0-nightly-
|
39
|
-
"@fluentui/react-aria": "0.0.0-nightly-
|
40
|
-
"@fluentui/react-context-selector": "0.0.0-nightly-
|
41
|
-
"@fluentui/react-portal": "0.0.0-nightly-
|
42
|
-
"@fluentui/react-positioning": "0.0.0-nightly-
|
43
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
44
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
45
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
46
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
38
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20230309-0418.1",
|
39
|
+
"@fluentui/react-aria": "0.0.0-nightly-20230309-0418.1",
|
40
|
+
"@fluentui/react-context-selector": "0.0.0-nightly-20230309-0418.1",
|
41
|
+
"@fluentui/react-portal": "0.0.0-nightly-20230309-0418.1",
|
42
|
+
"@fluentui/react-positioning": "0.0.0-nightly-20230309-0418.1",
|
43
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230309-0418.1",
|
44
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20230309-0418.1",
|
45
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230309-0418.1",
|
46
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230309-0418.1",
|
47
47
|
"@griffel/react": "^1.5.2",
|
48
48
|
"tslib": "^2.1.0"
|
49
49
|
},
|