@fluentui/react-popover 0.0.0-nightly-20230908-0415.1 → 0.0.0-nightly-20230911-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 +27 -27
- package/CHANGELOG.md +16 -16
- 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 +13 -13
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": "Mon, 11 Sep 2023 04:25:39 GMT",
|
6
|
+
"tag": "@fluentui/react-popover_v0.0.0-nightly-20230911-0418.1",
|
7
|
+
"version": "0.0.0-nightly-20230911-0418.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,74 +16,74 @@
|
|
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-20230911-0418.1",
|
20
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
26
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
32
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
38
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
44
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
50
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
56
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
62
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
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-20230911-0418.1",
|
68
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
69
69
|
},
|
70
70
|
{
|
71
71
|
"author": "beachball",
|
72
72
|
"package": "@fluentui/react-popover",
|
73
|
-
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
74
|
-
"commit": "
|
73
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230911-0418.1",
|
74
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
75
75
|
},
|
76
76
|
{
|
77
77
|
"author": "beachball",
|
78
78
|
"package": "@fluentui/react-popover",
|
79
|
-
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-
|
80
|
-
"commit": "
|
79
|
+
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230911-0418.1",
|
80
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
81
81
|
},
|
82
82
|
{
|
83
83
|
"author": "beachball",
|
84
84
|
"package": "@fluentui/react-popover",
|
85
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
86
|
-
"commit": "
|
85
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230911-0418.1",
|
86
|
+
"commit": "14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2"
|
87
87
|
}
|
88
88
|
]
|
89
89
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
# Change Log - @fluentui/react-popover
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 11 Sep 2023 04:25:39 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-20230911-0418.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v0.0.0-nightly-20230911-0418.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.8.3..@fluentui/react-popover_v0.0.0-nightly-
|
9
|
+
Mon, 11 Sep 2023 04:25:39 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.8.3..@fluentui/react-popover_v0.0.0-nightly-20230911-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-jsx-runtime to v0.0.0-nightly-
|
25
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
26
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
16
|
+
- Bump @fluentui/react-aria to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
17
|
+
- Bump @fluentui/react-context-selector to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
18
|
+
- Bump @fluentui/react-portal to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
19
|
+
- Bump @fluentui/react-positioning to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
20
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
21
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
22
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
23
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
24
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
25
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
26
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230911-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/14d3a9a8ec9adcf3ae5ca035432ea9cb88a58ec2) by beachball)
|
27
27
|
|
28
28
|
## [9.8.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.8.3)
|
29
29
|
|
@@ -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,UAAWA,QAAQI,QAAQ;IACvE,MAAMC,OAAOV,2BAA2BK,CAAAA,UAAWA,QAAQK,IAAI;IAC/D,MAAMC,YAAYX,2BAA2BK,CAAAA,UAAWA,QAAQM,SAAS;IACzE,MAAMC,aAAaZ,2BAA2BK,CAAAA,UAAWA,QAAQO,UAAU;IAC3E,MAAMC,YAAYb,2BAA2BK,CAAAA,UAAWA,QAAQQ,SAAS;IACzE,MAAMC,iBAAiBd,2BAA2BK,CAAAA,UAAWA,QAAQS,cAAc;IACnF,MAAMC,SAASf,2BAA2BK,CAAAA,UAAWA,QAAQU,MAAM;IACnE,MAAM,EAAEC,eAAe,EAAE,GAAGjB,mBAAmB;QAC7Cc;QACAI,iBAAiB,CAACH;QAClBI,iBAAiB,CAACL;IACpB;IAEA,MAAMM,QAA6B;QACjCJ;QACAH;QACAD;QACAD;QACAD;QACAD;QACAY,YAAY;YACVC,MAAM;QACR;QACAA,MAAMvB,KAAKwB,MAAM,CACf1B,sBAAsB,OAAO;YAC3BO,KAAKN,cAAcM,KAAKC;YACxBmB,MAAMV,YAAY,WAAW;YAC7B,cAAcA,YAAY,OAAOW;YACjC,GAAGR,eAAe;YAClB,GAAGd,KAAK;QACV,IACA;YAAEuB,aAAa;QAAM;IAEzB;IAEA,MAAM,EACJC,cAAcC,oBAAoB,EAClCC,cAAcC,oBAAoB,EAClCC,WAAWC,iBAAiB,EAC7B,GAAGZ,MAAME,IAAI;IACdF,MAAME,IAAI,CAACK,YAAY,GAAG,CAACM;YAKzBL;QAJA,IAAIrB,aAAa;YACfC,QAAQyB,GAAG;QACb;SAEAL,wBAAAA,kCAAAA,4CAAAA,sBAAuBK;IACzB;IAEAb,MAAME,IAAI,CAACO,YAAY,GAAG,CAACI;YAKzBH;QAJA,IAAIvB,aAAa;YACfC,QAAQyB,GAAG;QACb;SAEAH,wBAAAA,kCAAAA,4CAAAA,sBAAuBG;IACzB;IAEAb,MAAME,IAAI,CAACS,SAAS,GAAG,CAACE;YAGI5B,qBAK1B2B;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,EAACxB,KAAKC;YACxBwB,MAAMd,YAAY,WAAW;YAC7B,cAAcA,YAAY,OAAOe;YACjC,GAAGZ,eAAe;YAClB,GAAGf,KAAK;QACZ,IAAI;YACA4B,aAAa;QACjB;IACJ;IACA,MAAM,EAAEC,cAAcC,oBAAoB,EAAEC,cAAcC,oBAAoB,EAAEC,WAAWC,iBAAiB,EAAE,GAAGf,MAAME,IAAI;IAC3HF,MAAME,IAAI,CAACQ,YAAY,GAAG,CAACM;QACvB,IAAIC;QACJ,IAAI/B,aAAa;YACbC,QAAQ6B,GAAG;QACf;QACCC,CAAAA,wBAAwBN,oBAAmB,MAAO,QAAQM,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBD;IACjI;IACAhB,MAAME,IAAI,CAACU,YAAY,GAAG,CAACI;QACvB,IAAIE;QACJ,IAAIhC,aAAa;YACbC,QAAQ6B,GAAG;QACf;QACCE,CAAAA,wBAAwBL,oBAAmB,MAAO,QAAQK,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBF;IACjI;IACAhB,MAAME,IAAI,CAACY,SAAS,GAAG,CAACE;QACpB,IAAIG,qBAAqBC;QACzB,8DAA8D;QAC9D,mHAAmH;QACnH,IAAIJ,EAAEK,GAAG,KAAK,YAAa,CAAA,AAACF,CAAAA,sBAAsBpC,WAAWuC,OAAO,AAAD,MAAO,QAAQH,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBI,QAAQ,CAACP,EAAEQ,MAAM,CAAA,GAAI;YACjKR,EAAES,cAAc;YAChBtC,QAAQ6B,GAAG;QACf;QACCI,CAAAA,qBAAqBL,iBAAgB,MAAO,QAAQK,uBAAuB,KAAK,IAAI,KAAK,IAAIA,mBAAmBJ;IACrH;IACA,OAAOhB;AACX"}
|
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-20230911-0418.1",
|
4
4
|
"description": "Popover component for Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -29,23 +29,23 @@
|
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"@fluentui/eslint-plugin": "*",
|
32
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
33
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
32
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20230911-0418.1",
|
33
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230911-0418.1",
|
34
34
|
"@fluentui/scripts-api-extractor": "*",
|
35
35
|
"@fluentui/scripts-cypress": "*",
|
36
36
|
"@fluentui/scripts-tasks": "*"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@fluentui/keyboard-keys": "0.0.0-nightly-
|
40
|
-
"@fluentui/react-aria": "0.0.0-nightly-
|
41
|
-
"@fluentui/react-context-selector": "0.0.0-nightly-
|
42
|
-
"@fluentui/react-portal": "0.0.0-nightly-
|
43
|
-
"@fluentui/react-positioning": "0.0.0-nightly-
|
44
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
45
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
46
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
47
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
48
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
39
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20230911-0418.1",
|
40
|
+
"@fluentui/react-aria": "0.0.0-nightly-20230911-0418.1",
|
41
|
+
"@fluentui/react-context-selector": "0.0.0-nightly-20230911-0418.1",
|
42
|
+
"@fluentui/react-portal": "0.0.0-nightly-20230911-0418.1",
|
43
|
+
"@fluentui/react-positioning": "0.0.0-nightly-20230911-0418.1",
|
44
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230911-0418.1",
|
45
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20230911-0418.1",
|
46
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230911-0418.1",
|
47
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230911-0418.1",
|
48
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20230911-0418.1",
|
49
49
|
"@griffel/react": "^1.5.14",
|
50
50
|
"@swc/helpers": "^0.5.1"
|
51
51
|
},
|