@fluentui/react-popover 9.8.3 → 9.8.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +41 -8
- package/CHANGELOG.md +21 -9
- package/lib/components/PopoverSurface/usePopoverSurface.js +1 -1
- package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,40 @@
|
|
2
2
|
"name": "@fluentui/react-popover",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Tue, 12 Sep 2023 08:48:15 GMT",
|
6
|
+
"tag": "@fluentui/react-popover_v9.8.4",
|
7
|
+
"version": "9.8.4",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "lingfangao@hotmail.com",
|
12
|
+
"package": "@fluentui/react-popover",
|
13
|
+
"commit": "bb8a191dbdd562a2ef077c1bd5fa3dbfd00f0fdf",
|
14
|
+
"comment": "fix: don't apply modalizer attributes when focus trap isn't configured"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-popover",
|
19
|
+
"comment": "Bump @fluentui/react-portal to v9.3.14",
|
20
|
+
"commit": "6fa505d282299778ee9c160ab91f2f510e2d4335"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-popover",
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v9.12.9",
|
26
|
+
"commit": "6fa505d282299778ee9c160ab91f2f510e2d4335"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-popover",
|
31
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.7",
|
32
|
+
"commit": "6fa505d282299778ee9c160ab91f2f510e2d4335"
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"date": "Wed, 06 Sep 2023 13:31:31 GMT",
|
6
39
|
"tag": "@fluentui/react-popover_v9.8.3",
|
7
40
|
"version": "9.8.3",
|
8
41
|
"comments": {
|
@@ -11,43 +44,43 @@
|
|
11
44
|
"author": "beachball",
|
12
45
|
"package": "@fluentui/react-popover",
|
13
46
|
"comment": "Bump @fluentui/react-aria to v9.3.36",
|
14
|
-
"commit": "
|
47
|
+
"commit": "52532950407fd4d3664ec6aa337855214233813b"
|
15
48
|
},
|
16
49
|
{
|
17
50
|
"author": "beachball",
|
18
51
|
"package": "@fluentui/react-popover",
|
19
52
|
"comment": "Bump @fluentui/react-context-selector to v9.1.34",
|
20
|
-
"commit": "
|
53
|
+
"commit": "52532950407fd4d3664ec6aa337855214233813b"
|
21
54
|
},
|
22
55
|
{
|
23
56
|
"author": "beachball",
|
24
57
|
"package": "@fluentui/react-popover",
|
25
58
|
"comment": "Bump @fluentui/react-portal to v9.3.13",
|
26
|
-
"commit": "
|
59
|
+
"commit": "52532950407fd4d3664ec6aa337855214233813b"
|
27
60
|
},
|
28
61
|
{
|
29
62
|
"author": "beachball",
|
30
63
|
"package": "@fluentui/react-popover",
|
31
64
|
"comment": "Bump @fluentui/react-positioning to v9.9.11",
|
32
|
-
"commit": "
|
65
|
+
"commit": "52532950407fd4d3664ec6aa337855214233813b"
|
33
66
|
},
|
34
67
|
{
|
35
68
|
"author": "beachball",
|
36
69
|
"package": "@fluentui/react-popover",
|
37
70
|
"comment": "Bump @fluentui/react-tabster to v9.12.8",
|
38
|
-
"commit": "
|
71
|
+
"commit": "52532950407fd4d3664ec6aa337855214233813b"
|
39
72
|
},
|
40
73
|
{
|
41
74
|
"author": "beachball",
|
42
75
|
"package": "@fluentui/react-popover",
|
43
76
|
"comment": "Bump @fluentui/react-utilities to v9.13.3",
|
44
|
-
"commit": "
|
77
|
+
"commit": "52532950407fd4d3664ec6aa337855214233813b"
|
45
78
|
},
|
46
79
|
{
|
47
80
|
"author": "beachball",
|
48
81
|
"package": "@fluentui/react-popover",
|
49
82
|
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.6",
|
50
|
-
"commit": "
|
83
|
+
"commit": "52532950407fd4d3664ec6aa337855214233813b"
|
51
84
|
}
|
52
85
|
]
|
53
86
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,23 +1,35 @@
|
|
1
1
|
# Change Log - @fluentui/react-popover
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 12 Sep 2023 08:48:15 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.8.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.8.4)
|
8
|
+
|
9
|
+
Tue, 12 Sep 2023 08:48:15 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.8.3..@fluentui/react-popover_v9.8.4)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- fix: don't apply modalizer attributes when focus trap isn't configured ([PR #29110](https://github.com/microsoft/fluentui/pull/29110) by lingfangao@hotmail.com)
|
15
|
+
- Bump @fluentui/react-portal to v9.3.14 ([PR #29129](https://github.com/microsoft/fluentui/pull/29129) by beachball)
|
16
|
+
- Bump @fluentui/react-tabster to v9.12.9 ([PR #29129](https://github.com/microsoft/fluentui/pull/29129) by beachball)
|
17
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.7 ([PR #29129](https://github.com/microsoft/fluentui/pull/29129) by beachball)
|
18
|
+
|
7
19
|
## [9.8.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.8.3)
|
8
20
|
|
9
|
-
Wed, 06 Sep 2023 13:
|
21
|
+
Wed, 06 Sep 2023 13:31:31 GMT
|
10
22
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.8.2..@fluentui/react-popover_v9.8.3)
|
11
23
|
|
12
24
|
### Patches
|
13
25
|
|
14
|
-
- Bump @fluentui/react-aria to v9.3.36 ([PR #
|
15
|
-
- Bump @fluentui/react-context-selector to v9.1.34 ([PR #
|
16
|
-
- Bump @fluentui/react-portal to v9.3.13 ([PR #
|
17
|
-
- Bump @fluentui/react-positioning to v9.9.11 ([PR #
|
18
|
-
- Bump @fluentui/react-tabster to v9.12.8 ([PR #
|
19
|
-
- Bump @fluentui/react-utilities to v9.13.3 ([PR #
|
20
|
-
- Bump @fluentui/react-jsx-runtime to v9.0.6 ([PR #
|
26
|
+
- Bump @fluentui/react-aria to v9.3.36 ([PR #29080](https://github.com/microsoft/fluentui/pull/29080) by beachball)
|
27
|
+
- Bump @fluentui/react-context-selector to v9.1.34 ([PR #29080](https://github.com/microsoft/fluentui/pull/29080) by beachball)
|
28
|
+
- Bump @fluentui/react-portal to v9.3.13 ([PR #29080](https://github.com/microsoft/fluentui/pull/29080) by beachball)
|
29
|
+
- Bump @fluentui/react-positioning to v9.9.11 ([PR #29080](https://github.com/microsoft/fluentui/pull/29080) by beachball)
|
30
|
+
- Bump @fluentui/react-tabster to v9.12.8 ([PR #29080](https://github.com/microsoft/fluentui/pull/29080) by beachball)
|
31
|
+
- Bump @fluentui/react-utilities to v9.13.3 ([PR #29080](https://github.com/microsoft/fluentui/pull/29080) by beachball)
|
32
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.6 ([PR #29080](https://github.com/microsoft/fluentui/pull/29080) by beachball)
|
21
33
|
|
22
34
|
## [9.8.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.8.2)
|
23
35
|
|
@@ -41,7 +41,7 @@ import { usePopoverContext_unstable } from '../../popoverContext';
|
|
41
41
|
ref: useMergedRefs(ref, contentRef),
|
42
42
|
role: trapFocus ? 'dialog' : 'group',
|
43
43
|
'aria-modal': trapFocus ? true : undefined,
|
44
|
-
...
|
44
|
+
...modalAttributes,
|
45
45
|
...props
|
46
46
|
}), {
|
47
47
|
elementType: 'div'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["usePopoverSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverSurfaceProps, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */\nexport const usePopoverSurface_unstable = (\n props: PopoverSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PopoverSurfaceState => {\n const contentRef = usePopoverContext_unstable(context => context.contentRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const mountNode = usePopoverContext_unstable(context => context.mountNode);\n const arrowRef = usePopoverContext_unstable(context => context.arrowRef);\n const size = usePopoverContext_unstable(context => context.size);\n const withArrow = usePopoverContext_unstable(context => context.withArrow);\n const appearance = usePopoverContext_unstable(context => context.appearance);\n const trapFocus = usePopoverContext_unstable(context => context.trapFocus);\n const inertTrapFocus = usePopoverContext_unstable(context => context.inertTrapFocus);\n const inline = usePopoverContext_unstable(context => context.inline);\n const { modalAttributes } = useModalAttributes({\n trapFocus,\n legacyTrapFocus: !inertTrapFocus,\n alwaysFocusable: !trapFocus,\n });\n\n const state: PopoverSurfaceState = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'group',\n 'aria-modal': trapFocus ? true : undefined,\n ...
|
1
|
+
{"version":3,"sources":["usePopoverSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverSurfaceProps, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */\nexport const usePopoverSurface_unstable = (\n props: PopoverSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PopoverSurfaceState => {\n const contentRef = usePopoverContext_unstable(context => context.contentRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const mountNode = usePopoverContext_unstable(context => context.mountNode);\n const arrowRef = usePopoverContext_unstable(context => context.arrowRef);\n const size = usePopoverContext_unstable(context => context.size);\n const withArrow = usePopoverContext_unstable(context => context.withArrow);\n const appearance = usePopoverContext_unstable(context => context.appearance);\n const trapFocus = usePopoverContext_unstable(context => context.trapFocus);\n const inertTrapFocus = usePopoverContext_unstable(context => context.inertTrapFocus);\n const inline = usePopoverContext_unstable(context => context.inline);\n const { modalAttributes } = useModalAttributes({\n trapFocus,\n legacyTrapFocus: !inertTrapFocus,\n alwaysFocusable: !trapFocus,\n });\n\n const state: PopoverSurfaceState = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'group',\n 'aria-modal': trapFocus ? true : undefined,\n ...modalAttributes,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n\n const {\n onMouseEnter: onMouseEnterOriginal,\n onMouseLeave: onMouseLeaveOriginal,\n onKeyDown: onKeyDownOriginal,\n } = state.root;\n state.root.onMouseEnter = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n\n onMouseEnterOriginal?.(e);\n };\n\n state.root.onMouseLeave = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n\n onMouseLeaveOriginal?.(e);\n };\n\n state.root.onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n // only close if the event happened inside the current popover\n // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n if (e.key === 'Escape' && contentRef.current?.contains(e.target as HTMLDivElement)) {\n e.preventDefault();\n setOpen(e, false);\n }\n\n onKeyDownOriginal?.(e);\n };\n\n return state;\n};\n"],"names":["React","getNativeElementProps","useMergedRefs","slot","useModalAttributes","usePopoverContext_unstable","usePopoverSurface_unstable","props","ref","contentRef","context","openOnHover","setOpen","mountNode","arrowRef","size","withArrow","appearance","trapFocus","inertTrapFocus","inline","modalAttributes","legacyTrapFocus","alwaysFocusable","state","components","root","always","role","undefined","elementType","onMouseEnter","onMouseEnterOriginal","onMouseLeave","onMouseLeaveOriginal","onKeyDown","onKeyDownOriginal","e","key","current","contains","target","preventDefault"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AACvF,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,0BAA0B,QAAQ,uBAAuB;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAMC,aAAaJ,2BAA2BK,CAAAA,UAAWA,QAAQD,UAAU;IAC3E,MAAME,cAAcN,2BAA2BK,CAAAA,UAAWA,QAAQC,WAAW;IAC7E,MAAMC,UAAUP,2BAA2BK,CAAAA,UAAWA,QAAQE,OAAO;IACrE,MAAMC,YAAYR,2BAA2BK,CAAAA,UAAWA,QAAQG,SAAS;IACzE,MAAMC,WAAWT,2BAA2BK,CAAAA,UA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B2B;QAPA,8DAA8D;QAC9D,mHAAmH;QACnH,IAAIC,EAAEC,GAAG,KAAK,cAAY7B,sBAAAA,WAAW8B,OAAO,cAAlB9B,0CAAAA,oBAAoB+B,QAAQ,CAACH,EAAEI,MAAM,IAAqB;YAClFJ,EAAEK,cAAc;YAChB9B,QAAQyB,GAAG;QACb;SAEAD,qBAAAA,+BAAAA,yCAAAA,mBAAoBC;IACtB;IAEA,OAAOb;AACT,EAAE"}
|
@@ -44,7 +44,7 @@ const usePopoverSurface_unstable = (props, ref)=>{
|
|
44
44
|
ref: (0, _reactutilities.useMergedRefs)(ref, contentRef),
|
45
45
|
role: trapFocus ? 'dialog' : 'group',
|
46
46
|
'aria-modal': trapFocus ? true : undefined,
|
47
|
-
...
|
47
|
+
...modalAttributes,
|
48
48
|
...props
|
49
49
|
}), {
|
50
50
|
elementType: 'div'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["usePopoverSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */ export const usePopoverSurface_unstable = (props, ref)=>{\n const contentRef = usePopoverContext_unstable((context)=>context.contentRef);\n const openOnHover = usePopoverContext_unstable((context)=>context.openOnHover);\n const setOpen = usePopoverContext_unstable((context)=>context.setOpen);\n const mountNode = usePopoverContext_unstable((context)=>context.mountNode);\n const arrowRef = usePopoverContext_unstable((context)=>context.arrowRef);\n const size = usePopoverContext_unstable((context)=>context.size);\n const withArrow = usePopoverContext_unstable((context)=>context.withArrow);\n const appearance = usePopoverContext_unstable((context)=>context.appearance);\n const trapFocus = usePopoverContext_unstable((context)=>context.trapFocus);\n const inertTrapFocus = usePopoverContext_unstable((context)=>context.inertTrapFocus);\n const inline = usePopoverContext_unstable((context)=>context.inline);\n const { modalAttributes } = useModalAttributes({\n trapFocus,\n legacyTrapFocus: !inertTrapFocus,\n alwaysFocusable: !trapFocus\n });\n const state = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'group',\n 'aria-modal': trapFocus ? true : undefined,\n ...
|
1
|
+
{"version":3,"sources":["usePopoverSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */ export const usePopoverSurface_unstable = (props, ref)=>{\n const contentRef = usePopoverContext_unstable((context)=>context.contentRef);\n const openOnHover = usePopoverContext_unstable((context)=>context.openOnHover);\n const setOpen = usePopoverContext_unstable((context)=>context.setOpen);\n const mountNode = usePopoverContext_unstable((context)=>context.mountNode);\n const arrowRef = usePopoverContext_unstable((context)=>context.arrowRef);\n const size = usePopoverContext_unstable((context)=>context.size);\n const withArrow = usePopoverContext_unstable((context)=>context.withArrow);\n const appearance = usePopoverContext_unstable((context)=>context.appearance);\n const trapFocus = usePopoverContext_unstable((context)=>context.trapFocus);\n const inertTrapFocus = usePopoverContext_unstable((context)=>context.inertTrapFocus);\n const inline = usePopoverContext_unstable((context)=>context.inline);\n const { modalAttributes } = useModalAttributes({\n trapFocus,\n legacyTrapFocus: !inertTrapFocus,\n alwaysFocusable: !trapFocus\n });\n const state = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'group',\n 'aria-modal': trapFocus ? true : undefined,\n ...modalAttributes,\n ...props\n }), {\n elementType: 'div'\n })\n };\n const { onMouseEnter: onMouseEnterOriginal, onMouseLeave: onMouseLeaveOriginal, onKeyDown: onKeyDownOriginal } = state.root;\n state.root.onMouseEnter = (e)=>{\n var _onMouseEnterOriginal;\n if (openOnHover) {\n setOpen(e, true);\n }\n (_onMouseEnterOriginal = onMouseEnterOriginal) === null || _onMouseEnterOriginal === void 0 ? void 0 : _onMouseEnterOriginal(e);\n };\n state.root.onMouseLeave = (e)=>{\n var _onMouseLeaveOriginal;\n if (openOnHover) {\n setOpen(e, false);\n }\n (_onMouseLeaveOriginal = onMouseLeaveOriginal) === null || _onMouseLeaveOriginal === void 0 ? void 0 : _onMouseLeaveOriginal(e);\n };\n state.root.onKeyDown = (e)=>{\n var _contentRef_current, _onKeyDownOriginal;\n // only close if the event happened inside the current popover\n // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n if (e.key === 'Escape' && ((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.contains(e.target))) {\n e.preventDefault();\n setOpen(e, false);\n }\n (_onKeyDownOriginal = onKeyDownOriginal) === null || _onKeyDownOriginal === void 0 ? void 0 : _onKeyDownOriginal(e);\n };\n return state;\n};\n"],"names":["usePopoverSurface_unstable","props","ref","contentRef","usePopoverContext_unstable","context","openOnHover","setOpen","mountNode","arrowRef","size","withArrow","appearance","trapFocus","inertTrapFocus","inline","modalAttributes","useModalAttributes","legacyTrapFocus","alwaysFocusable","state","components","root","slot","always","getNativeElementProps","useMergedRefs","role","undefined","elementType","onMouseEnter","onMouseEnterOriginal","onMouseLeave","onMouseLeaveOriginal","onKeyDown","onKeyDownOriginal","e","_onMouseEnterOriginal","_onMouseLeaveOriginal","_contentRef_current","_onKeyDownOriginal","key","current","contains","target","preventDefault"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;gCACoC;8BACxB;gCACQ;AAShC,MAAMA,6BAA6B,CAACC,OAAOC;IAClD,MAAMC,aAAaC,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQF,UAAU;IAC3E,MAAMG,cAAcF,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQC,WAAW;IAC7E,MAAMC,UAAUH,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQE,OAAO;IACrE,MAAMC,YAAYJ,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQG,SAAS;IACzE,MAAMC,WAAWL,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQI,QAAQ;IACvE,MAAMC,OAAON,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQK,IAAI;IAC/D,MAAMC,YAAYP,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQM,SAAS;IACzE,MAAMC,aAAaR,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQO,UAAU;IAC3E,MAAMC,YAAYT,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQQ,SAAS;IACzE,MAAMC,iBAAiBV,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQS,cAAc;IACnF,MAAMC,SAASX,IAAAA,0CAA0B,EAAC,CAACC,UAAUA,QAAQU,MAAM;IACnE,MAAM,EAAEC,eAAe,EAAE,GAAGC,IAAAA,gCAAkB,EAAC;QAC3CJ;QACAK,iBAAiB,CAACJ;QAClBK,iBAAiB,CAACN;IACtB;IACA,MAAMO,QAAQ;QACVL;QACAH;QACAD;QACAD;QACAD;QACAD;QACAa,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3CvB,KAAKwB,IAAAA,6BAAa,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Popover component for Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -39,13 +39,13 @@
|
|
39
39
|
"@fluentui/keyboard-keys": "^9.0.4",
|
40
40
|
"@fluentui/react-aria": "^9.3.36",
|
41
41
|
"@fluentui/react-context-selector": "^9.1.34",
|
42
|
-
"@fluentui/react-portal": "^9.3.
|
42
|
+
"@fluentui/react-portal": "^9.3.14",
|
43
43
|
"@fluentui/react-positioning": "^9.9.11",
|
44
44
|
"@fluentui/react-shared-contexts": "^9.7.3",
|
45
|
-
"@fluentui/react-tabster": "^9.12.
|
45
|
+
"@fluentui/react-tabster": "^9.12.9",
|
46
46
|
"@fluentui/react-theme": "^9.1.12",
|
47
47
|
"@fluentui/react-utilities": "^9.13.3",
|
48
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
48
|
+
"@fluentui/react-jsx-runtime": "^9.0.7",
|
49
49
|
"@griffel/react": "^1.5.14",
|
50
50
|
"@swc/helpers": "^0.5.1"
|
51
51
|
},
|