@fluentui-react-native/menu 1.4.12 → 1.4.14
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 +55 -1
- package/CHANGELOG.md +22 -2
- package/lib/MenuPopover/useMenuPopover.d.ts.map +1 -1
- package/lib/MenuPopover/useMenuPopover.js +5 -14
- package/lib/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/MenuPopover/useMenuPopover.d.ts.map +1 -1
- package/lib-commonjs/MenuPopover/useMenuPopover.js +5 -14
- package/lib-commonjs/MenuPopover/useMenuPopover.js.map +1 -1
- package/package.json +6 -6
- package/src/MenuPopover/useMenuPopover.ts +5 -14
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,61 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/menu",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 01 Mar 2023 23:21:50 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/menu_v1.4.14",
|
|
7
|
+
"version": "1.4.14",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "winlarry@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/menu",
|
|
13
|
+
"commit": "1dc7301cd2470ae817b9a26ca07e82da359be90b",
|
|
14
|
+
"comment": "Add 'Escape' to list of keys stopping event propagation in MenuPopover key handlers."
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 28 Feb 2023 21:34:10 GMT",
|
|
21
|
+
"tag": "@fluentui-react-native/menu_v1.4.13",
|
|
22
|
+
"version": "1.4.13",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "beachball",
|
|
27
|
+
"package": "@fluentui-react-native/menu",
|
|
28
|
+
"comment": "Bump @fluentui-react-native/callout to v0.23.4",
|
|
29
|
+
"commit": "175d5c71de6bd6cd59fab8bffee463ff1e595b2f"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@fluentui-react-native/menu",
|
|
34
|
+
"comment": "Bump @fluentui-react-native/focus-zone to v0.11.33",
|
|
35
|
+
"commit": "175d5c71de6bd6cd59fab8bffee463ff1e595b2f"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@fluentui-react-native/menu",
|
|
40
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.21",
|
|
41
|
+
"commit": "175d5c71de6bd6cd59fab8bffee463ff1e595b2f"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui-react-native/menu",
|
|
46
|
+
"comment": "Bump @fluentui-react-native/text to v0.19.23",
|
|
47
|
+
"commit": "175d5c71de6bd6cd59fab8bffee463ff1e595b2f"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui-react-native/menu",
|
|
52
|
+
"comment": "Bump @fluentui-react-native/button to v0.32.36",
|
|
53
|
+
"commit": "175d5c71de6bd6cd59fab8bffee463ff1e595b2f"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"date": "Sat, 25 Feb 2023 01:17:04 GMT",
|
|
6
60
|
"tag": "@fluentui-react-native/menu_v1.4.12",
|
|
7
61
|
"version": "1.4.12",
|
|
8
62
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/menu
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 01 Mar 2023 23:21:50 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.4.14
|
|
8
|
+
|
|
9
|
+
Wed, 01 Mar 2023 23:21:50 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Add 'Escape' to list of keys stopping event propagation in MenuPopover key handlers. (winlarry@microsoft.com)
|
|
14
|
+
|
|
15
|
+
## 1.4.13
|
|
16
|
+
|
|
17
|
+
Tue, 28 Feb 2023 21:34:10 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Bump @fluentui-react-native/callout to v0.23.4
|
|
22
|
+
- Bump @fluentui-react-native/focus-zone to v0.11.33
|
|
23
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.22.21
|
|
24
|
+
- Bump @fluentui-react-native/text to v0.19.23
|
|
25
|
+
- Bump @fluentui-react-native/button to v0.32.36
|
|
26
|
+
|
|
7
27
|
## 1.4.12
|
|
8
28
|
|
|
9
|
-
Sat, 25 Feb 2023 01:
|
|
29
|
+
Sat, 25 Feb 2023 01:17:04 GMT
|
|
10
30
|
|
|
11
31
|
### Patches
|
|
12
32
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuPopover.d.ts","sourceRoot":"","sources":["../../src/MenuPopover/useMenuPopover.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useMenuPopover.d.ts","sourceRoot":"","sources":["../../src/MenuPopover/useMenuPopover.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM9E,eAAO,MAAM,cAAc,UAAW,gBAAgB,KAAG,gBAyGxD,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { I18nManager, Platform } from 'react-native';
|
|
3
3
|
import { useMenuContext } from '../context/menuContext';
|
|
4
4
|
var controlledDismissBehaviors = ['preventDismissOnKeyDown', 'preventDismissOnClickOutside'];
|
|
5
|
+
var stopPropagationKeys = ['ArrowUp', 'ArrowDown', 'Tab', 'Home', 'End', 'Escape'];
|
|
5
6
|
export var useMenuPopover = function (props) {
|
|
6
7
|
var context = useMenuContext();
|
|
7
8
|
var setOpen = context.setOpen, triggerRef = context.triggerRef, isControlled = context.isControlled, isSubmenu = context.isSubmenu, openOnHover = context.openOnHover, parentPopoverHoverOutTimer = context.parentPopoverHoverOutTimer, popoverHoverOutTimer = context.popoverHoverOutTimer, setPopoverHoverOutTimer = context.setPopoverHoverOutTimer, shouldFocusOnContainer = context.shouldFocusOnContainer, triggerHoverOutTimer = context.triggerHoverOutTimer;
|
|
@@ -36,26 +37,16 @@ export var useMenuPopover = function (props) {
|
|
|
36
37
|
onKeyDownProp && onKeyDownProp(e);
|
|
37
38
|
// Mark key events that move selection as handled.
|
|
38
39
|
// These key events are handled on the native side.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
case 'ArrowDown':
|
|
42
|
-
case 'Tab':
|
|
43
|
-
case 'Home':
|
|
44
|
-
case 'End':
|
|
45
|
-
e.stopPropagation();
|
|
40
|
+
if (stopPropagationKeys.includes(e.nativeEvent.key)) {
|
|
41
|
+
e.stopPropagation();
|
|
46
42
|
}
|
|
47
43
|
}, [onKeyDownProp]);
|
|
48
44
|
var onKeyUp = React.useCallback(function (e) {
|
|
49
45
|
onKeyUpProp && onKeyUpProp(e);
|
|
50
46
|
// Mark key events that move selection as handled.
|
|
51
47
|
// These key events are handled on the native side.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
case 'ArrowDown':
|
|
55
|
-
case 'Tab':
|
|
56
|
-
case 'Home':
|
|
57
|
-
case 'End':
|
|
58
|
-
e.stopPropagation();
|
|
48
|
+
if (stopPropagationKeys.includes(e.nativeEvent.key)) {
|
|
49
|
+
e.stopPropagation();
|
|
59
50
|
}
|
|
60
51
|
}, [onKeyUpProp]);
|
|
61
52
|
var _a = React.useState(shouldFocusOnContainer), canFocusOnPopover = _a[0], setCanFocusOnPopover = _a[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuPopover.js","sourceRoot":"","sources":["../../src/MenuPopover/useMenuPopover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,IAAM,0BAA0B,GAAG,CAAC,yBAAyB,EAAE,8BAA8B,CAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useMenuPopover.js","sourceRoot":"","sources":["../../src/MenuPopover/useMenuPopover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,IAAM,0BAA0B,GAAG,CAAC,yBAAyB,EAAE,8BAA8B,CAAuB,CAAC;AACrH,IAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAE9F,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,KAAuB;IACpD,IAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IAE/B,IAAA,OAAO,GAUL,OAAO,QAVF,EACP,UAAU,GASR,OAAO,WATC,EACV,YAAY,GAQV,OAAO,aARG,EACZ,SAAS,GAOP,OAAO,UAPA,EACT,WAAW,GAMT,OAAO,YANE,EACX,0BAA0B,GAKxB,OAAO,2BALiB,EAC1B,oBAAoB,GAIlB,OAAO,qBAJW,EACpB,uBAAuB,GAGrB,OAAO,wBAHc,EACvB,sBAAsB,GAEpB,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;YACpB,eAAe,iBAAA;YACf,gBAAgB,kBAAA;YAChB,uBAAuB,yBAAA;YACvB,eAAe,iBAAA;SAChB;QACD,SAAS,EAAE;YACT,YAAY,cAAA;YACZ,YAAY,cAAA;YACZ,SAAS,WAAA;YACT,OAAO,SAAA;YACP,UAAU,EAAE,sBAAsB;YAClC,SAAS,EAAE,iBAAiB;YAC5B,MAAM,QAAA;SACP;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,kBAAkB,GAAG,UAAC,SAAkB,EAAE,KAAc;IAC5D,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,KAAK,EAAE;QACT,OAAO,aAAa,CAAC;KACtB;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuPopover.d.ts","sourceRoot":"","sources":["../../src/MenuPopover/useMenuPopover.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useMenuPopover.d.ts","sourceRoot":"","sources":["../../src/MenuPopover/useMenuPopover.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM9E,eAAO,MAAM,cAAc,UAAW,gBAAgB,KAAG,gBAyGxD,CAAC"}
|
|
@@ -6,6 +6,7 @@ var react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
var react_native_1 = require("react-native");
|
|
7
7
|
var menuContext_1 = require("../context/menuContext");
|
|
8
8
|
var controlledDismissBehaviors = ['preventDismissOnKeyDown', 'preventDismissOnClickOutside'];
|
|
9
|
+
var stopPropagationKeys = ['ArrowUp', 'ArrowDown', 'Tab', 'Home', 'End', 'Escape'];
|
|
9
10
|
var useMenuPopover = function (props) {
|
|
10
11
|
var context = (0, menuContext_1.useMenuContext)();
|
|
11
12
|
var setOpen = context.setOpen, triggerRef = context.triggerRef, isControlled = context.isControlled, isSubmenu = context.isSubmenu, openOnHover = context.openOnHover, parentPopoverHoverOutTimer = context.parentPopoverHoverOutTimer, popoverHoverOutTimer = context.popoverHoverOutTimer, setPopoverHoverOutTimer = context.setPopoverHoverOutTimer, shouldFocusOnContainer = context.shouldFocusOnContainer, triggerHoverOutTimer = context.triggerHoverOutTimer;
|
|
@@ -40,26 +41,16 @@ var useMenuPopover = function (props) {
|
|
|
40
41
|
onKeyDownProp && onKeyDownProp(e);
|
|
41
42
|
// Mark key events that move selection as handled.
|
|
42
43
|
// These key events are handled on the native side.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
case 'ArrowDown':
|
|
46
|
-
case 'Tab':
|
|
47
|
-
case 'Home':
|
|
48
|
-
case 'End':
|
|
49
|
-
e.stopPropagation();
|
|
44
|
+
if (stopPropagationKeys.includes(e.nativeEvent.key)) {
|
|
45
|
+
e.stopPropagation();
|
|
50
46
|
}
|
|
51
47
|
}, [onKeyDownProp]);
|
|
52
48
|
var onKeyUp = react_1.default.useCallback(function (e) {
|
|
53
49
|
onKeyUpProp && onKeyUpProp(e);
|
|
54
50
|
// Mark key events that move selection as handled.
|
|
55
51
|
// These key events are handled on the native side.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
case 'ArrowDown':
|
|
59
|
-
case 'Tab':
|
|
60
|
-
case 'Home':
|
|
61
|
-
case 'End':
|
|
62
|
-
e.stopPropagation();
|
|
52
|
+
if (stopPropagationKeys.includes(e.nativeEvent.key)) {
|
|
53
|
+
e.stopPropagation();
|
|
63
54
|
}
|
|
64
55
|
}, [onKeyUpProp]);
|
|
65
56
|
var _a = react_1.default.useState(shouldFocusOnContainer), canFocusOnPopover = _a[0], setCanFocusOnPopover = _a[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuPopover.js","sourceRoot":"","sources":["../../src/MenuPopover/useMenuPopover.ts"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AAC;KAClB;IAED,IAAI,KAAK,EAAE;QACT,OAAO,aAAa,CAAC;KACtB;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/menu",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.14",
|
|
4
4
|
"description": "A cross-platform Menu component using the Fluent Design System",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@fluentui-react-native/adapters": ">=0.10.2 <1.0.0",
|
|
26
|
-
"@fluentui-react-native/callout": ">=0.23.
|
|
27
|
-
"@fluentui-react-native/focus-zone": ">=0.11.
|
|
26
|
+
"@fluentui-react-native/callout": ">=0.23.4 <1.0.0",
|
|
27
|
+
"@fluentui-react-native/focus-zone": ">=0.11.33 <1.0.0",
|
|
28
28
|
"@fluentui-react-native/framework": "0.9.3",
|
|
29
|
-
"@fluentui-react-native/interactive-hooks": ">=0.22.
|
|
30
|
-
"@fluentui-react-native/text": ">=0.19.
|
|
29
|
+
"@fluentui-react-native/interactive-hooks": ">=0.22.21 <1.0.0",
|
|
30
|
+
"@fluentui-react-native/text": ">=0.19.23 <1.0.0",
|
|
31
31
|
"@fluentui-react-native/theme-tokens": ">=0.24.3 <1.0.0",
|
|
32
32
|
"@fluentui-react-native/tokens": ">=0.20.10 <1.0.0",
|
|
33
33
|
"@fluentui-react-native/use-styling": ">=0.9.4 <1.0.0",
|
|
34
34
|
"tslib": "^2.3.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@fluentui-react-native/button": ">=0.32.
|
|
37
|
+
"@fluentui-react-native/button": ">=0.32.36 <1.0.0",
|
|
38
38
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
39
39
|
"@fluentui-react-native/scripts": "^0.1.1",
|
|
40
40
|
"@fluentui-react-native/test-tools": ">=0.1.1 <1.0.0",
|
|
@@ -7,6 +7,7 @@ import type { MenuPopoverProps, MenuPopoverState } from './MenuPopover.types';
|
|
|
7
7
|
import { useMenuContext } from '../context/menuContext';
|
|
8
8
|
|
|
9
9
|
const controlledDismissBehaviors = ['preventDismissOnKeyDown', 'preventDismissOnClickOutside'] as DismissBehaviors[];
|
|
10
|
+
const stopPropagationKeys = ['ArrowUp', 'ArrowDown', 'Tab', 'Home', 'End', 'Escape'] as const;
|
|
10
11
|
|
|
11
12
|
export const useMenuPopover = (props: MenuPopoverProps): MenuPopoverState => {
|
|
12
13
|
const context = useMenuContext();
|
|
@@ -61,13 +62,8 @@ export const useMenuPopover = (props: MenuPopoverProps): MenuPopoverState => {
|
|
|
61
62
|
|
|
62
63
|
// Mark key events that move selection as handled.
|
|
63
64
|
// These key events are handled on the native side.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
case 'ArrowDown':
|
|
67
|
-
case 'Tab':
|
|
68
|
-
case 'Home':
|
|
69
|
-
case 'End':
|
|
70
|
-
e.stopPropagation();
|
|
65
|
+
if (stopPropagationKeys.includes(e.nativeEvent.key)) {
|
|
66
|
+
e.stopPropagation();
|
|
71
67
|
}
|
|
72
68
|
},
|
|
73
69
|
[onKeyDownProp],
|
|
@@ -79,13 +75,8 @@ export const useMenuPopover = (props: MenuPopoverProps): MenuPopoverState => {
|
|
|
79
75
|
|
|
80
76
|
// Mark key events that move selection as handled.
|
|
81
77
|
// These key events are handled on the native side.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
case 'ArrowDown':
|
|
85
|
-
case 'Tab':
|
|
86
|
-
case 'Home':
|
|
87
|
-
case 'End':
|
|
88
|
-
e.stopPropagation();
|
|
78
|
+
if (stopPropagationKeys.includes(e.nativeEvent.key)) {
|
|
79
|
+
e.stopPropagation();
|
|
89
80
|
}
|
|
90
81
|
},
|
|
91
82
|
[onKeyUpProp],
|