@fluentui-react-native/menu 1.12.18 → 1.12.20
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 +61 -1
- package/CHANGELOG.md +23 -2
- package/lib/MenuGroup/MenuGroup.d.ts.map +1 -1
- package/lib/MenuGroup/MenuGroup.js +16 -1
- package/lib/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/MenuGroup/MenuGroup.d.ts.map +1 -1
- package/lib-commonjs/MenuGroup/MenuGroup.js +16 -1
- package/lib-commonjs/MenuGroup/MenuGroup.js.map +1 -1
- package/package.json +7 -7
- package/src/MenuGroup/MenuGroup.tsx +22 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,67 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/menu",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 01 Mar 2024 01:03:51 GMT",
|
|
6
|
+
"version": "1.12.20",
|
|
7
|
+
"tag": "@fluentui-react-native/menu_v1.12.20",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "krsiler@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/menu",
|
|
13
|
+
"commit": "17974c7b86abaa7769834551ff5743691819c905",
|
|
14
|
+
"comment": "fix menu group accessibility"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Fri, 23 Feb 2024 03:22:29 GMT",
|
|
21
|
+
"version": "1.12.19",
|
|
22
|
+
"tag": "@fluentui-react-native/menu_v1.12.19",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "beachball",
|
|
27
|
+
"package": "@fluentui-react-native/menu",
|
|
28
|
+
"comment": "Bump @fluentui-react-native/callout to v0.25.10",
|
|
29
|
+
"commit": "not available"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@fluentui-react-native/menu",
|
|
34
|
+
"comment": "Bump @fluentui-react-native/focus-zone to v0.16.9",
|
|
35
|
+
"commit": "not available"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@fluentui-react-native/menu",
|
|
40
|
+
"comment": "Bump @fluentui-react-native/icon to v0.20.10",
|
|
41
|
+
"commit": "not available"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui-react-native/menu",
|
|
46
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.26.0",
|
|
47
|
+
"commit": "not available"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui-react-native/menu",
|
|
52
|
+
"comment": "Bump @fluentui-react-native/text to v0.22.9",
|
|
53
|
+
"commit": "not available"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui-react-native/menu",
|
|
58
|
+
"comment": "Bump @fluentui-react-native/button to v0.36.12",
|
|
59
|
+
"commit": "not available"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"date": "Thu, 22 Feb 2024 23:27:46 GMT",
|
|
6
66
|
"version": "1.12.18",
|
|
7
67
|
"tag": "@fluentui-react-native/menu_v1.12.18",
|
|
8
68
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/menu
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 01 Mar 2024 01:03:51 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.12.20
|
|
8
|
+
|
|
9
|
+
Fri, 01 Mar 2024 01:03:51 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- fix menu group accessibility (krsiler@microsoft.com)
|
|
14
|
+
|
|
15
|
+
## 1.12.19
|
|
16
|
+
|
|
17
|
+
Fri, 23 Feb 2024 03:22:29 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Bump @fluentui-react-native/callout to v0.25.10
|
|
22
|
+
- Bump @fluentui-react-native/focus-zone to v0.16.9
|
|
23
|
+
- Bump @fluentui-react-native/icon to v0.20.10
|
|
24
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.26.0
|
|
25
|
+
- Bump @fluentui-react-native/text to v0.22.9
|
|
26
|
+
- Bump @fluentui-react-native/button to v0.36.12
|
|
27
|
+
|
|
7
28
|
## 1.12.18
|
|
8
29
|
|
|
9
|
-
Thu, 22 Feb 2024 23:
|
|
30
|
+
Thu, 22 Feb 2024 23:27:46 GMT
|
|
10
31
|
|
|
11
32
|
### Patches
|
|
12
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../src/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../src/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS,uOAwEpB,CAAC"}
|
|
@@ -17,6 +17,7 @@ export var MenuGroup = compose({
|
|
|
17
17
|
useRender: function (userProps, useSlots) {
|
|
18
18
|
var Slots = useSlots(userProps);
|
|
19
19
|
return function (final, children) {
|
|
20
|
+
var _a;
|
|
20
21
|
var mergedProps = __rest(mergeProps(userProps, final), []);
|
|
21
22
|
var itemPosition = 0;
|
|
22
23
|
var childrenWithSet = React.Children.toArray(children).map(function (child) {
|
|
@@ -37,7 +38,21 @@ export var MenuGroup = compose({
|
|
|
37
38
|
}
|
|
38
39
|
return child;
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
+
// Check if this MenuGroup has a MenuGroupHeader. If so, use the MenuGroupHeader
|
|
42
|
+
// as the accessibilityLabel for the MenuGroup.
|
|
43
|
+
var menuGroupHeader = React.Children.toArray(children).find(function (child) { return React.isValidElement(child) && child.type.displayName === 'MenuGroupHeader'; });
|
|
44
|
+
// On win32, in order for assistive technology to read a group, it must have a name which is why
|
|
45
|
+
// we use a string with a space as the default accessibilityLabel for MenuGroup.
|
|
46
|
+
// If an empty string was used, the group context would not be read.
|
|
47
|
+
var menuGroupA11yLabel = ' ';
|
|
48
|
+
if (menuGroupHeader && typeof menuGroupHeader.props.children === 'string') {
|
|
49
|
+
menuGroupA11yLabel = menuGroupHeader.props.children;
|
|
50
|
+
}
|
|
51
|
+
return (withSlots(Slots.root, __assign({}, mergedProps, (Platform.OS == 'win32' && {
|
|
52
|
+
accessible: true,
|
|
53
|
+
accessibilityRole: 'group',
|
|
54
|
+
accessibilityLabel: (_a = mergedProps.accessibilityLabel) !== null && _a !== void 0 ? _a : menuGroupA11yLabel,
|
|
55
|
+
})),
|
|
41
56
|
withSlots(Slots.contentWrapper
|
|
42
57
|
// avoid error that fires when props are passed into React.fragment
|
|
43
58
|
, __assign({}, (hasFocusZone && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuGroup.js","sourceRoot":"","sources":["../../src/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,qBAAqB;AACrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;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,CAAC,CAAC,IAAI,CAC3D,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAK,KAAa,CAAC,IAAI,CAAC,WAAW,KAAK,iBAAiB,EAApF,CAAoF,CAChG,CAAC;YAEF,gGAAgG;YAChG,gFAAgF;YAChF,oEAAoE;YACpE,IAAI,kBAAkB,GAAG,GAAG,CAAC;YAC7B,IAAI,eAAe,IAAI,OAAQ,eAAsC,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBACjG,kBAAkB,GAAI,eAAsC,CAAC,KAAK,CAAC,QAAQ,CAAC;aAC7E;YAED,OAAO,CACL,UAAC,KAAK,CAAC,IAAI,eACL,WAAW,EACX,CAAC,QAAQ,CAAC,EAAE,IAAK,OAAe,IAAI;gBACtC,UAAU,EAAE,IAAI;gBAChB,iBAAiB,EAAE,OAAc;gBACjC,kBAAkB,EAAE,MAAA,WAAW,CAAC,kBAAkB,mCAAI,kBAAkB;aACzE,CAAC;gBAEF,UAAC,KAAK,CAAC,cAAc;gBACnB,mEAAmE;+BAC/D,CAAC,YAAY,IAAI;oBACnB,kBAAkB,EAAE,UAAU;oBAC9B,eAAe,EAAE,KAAK;oBACtB,aAAa,EAAE,kBAAkB;iBAClC,CAAC,GAED,eAAe,CACK,CACZ,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../src/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../src/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS,uOAwEpB,CAAC"}
|
|
@@ -20,6 +20,7 @@ exports.MenuGroup = (0, framework_1.compose)({
|
|
|
20
20
|
useRender: function (userProps, useSlots) {
|
|
21
21
|
var Slots = useSlots(userProps);
|
|
22
22
|
return function (final, children) {
|
|
23
|
+
var _a;
|
|
23
24
|
var mergedProps = tslib_1.__rest((0, framework_1.mergeProps)(userProps, final), []);
|
|
24
25
|
var itemPosition = 0;
|
|
25
26
|
var childrenWithSet = react_1.default.Children.toArray(children).map(function (child) {
|
|
@@ -40,7 +41,21 @@ exports.MenuGroup = (0, framework_1.compose)({
|
|
|
40
41
|
}
|
|
41
42
|
return child;
|
|
42
43
|
});
|
|
43
|
-
|
|
44
|
+
// Check if this MenuGroup has a MenuGroupHeader. If so, use the MenuGroupHeader
|
|
45
|
+
// as the accessibilityLabel for the MenuGroup.
|
|
46
|
+
var menuGroupHeader = react_1.default.Children.toArray(children).find(function (child) { return react_1.default.isValidElement(child) && child.type.displayName === 'MenuGroupHeader'; });
|
|
47
|
+
// On win32, in order for assistive technology to read a group, it must have a name which is why
|
|
48
|
+
// we use a string with a space as the default accessibilityLabel for MenuGroup.
|
|
49
|
+
// If an empty string was used, the group context would not be read.
|
|
50
|
+
var menuGroupA11yLabel = ' ';
|
|
51
|
+
if (menuGroupHeader && typeof menuGroupHeader.props.children === 'string') {
|
|
52
|
+
menuGroupA11yLabel = menuGroupHeader.props.children;
|
|
53
|
+
}
|
|
54
|
+
return ((0, framework_1.withSlots)(Slots.root, tslib_1.__assign({}, mergedProps, (react_native_1.Platform.OS == 'win32' && {
|
|
55
|
+
accessible: true,
|
|
56
|
+
accessibilityRole: 'group',
|
|
57
|
+
accessibilityLabel: (_a = mergedProps.accessibilityLabel) !== null && _a !== void 0 ? _a : menuGroupA11yLabel,
|
|
58
|
+
})),
|
|
44
59
|
(0, framework_1.withSlots)(Slots.contentWrapper
|
|
45
60
|
// avoid error that fires when props are passed into React.fragment
|
|
46
61
|
, tslib_1.__assign({}, (hasFocusZone && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuGroup.js","sourceRoot":"","sources":["../../src/MenuGroup/MenuGroup.t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C,WAAW,KAAK,iBAAiB,EAApF,CAAoF,CAChG,CAAC;YAEF,gGAAgG;YAChG,gFAAgF;YAChF,oEAAoE;YACpE,IAAI,kBAAkB,GAAG,GAAG,CAAC;YAC7B,IAAI,eAAe,IAAI,OAAQ,eAAsC,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBACjG,kBAAkB,GAAI,eAAsC,CAAC,KAAK,CAAC,QAAQ,CAAC;aAC7E;YAED,OAAO,CACL,2BAAC,KAAK,CAAC,IAAI,uBACL,WAAW,EACX,CAAC,uBAAQ,CAAC,EAAE,IAAK,OAAe,IAAI;gBACtC,UAAU,EAAE,IAAI;gBAChB,iBAAiB,EAAE,OAAc;gBACjC,kBAAkB,EAAE,MAAA,WAAW,CAAC,kBAAkB,mCAAI,kBAAkB;aACzE,CAAC;gBAEF,2BAAC,KAAK,CAAC,cAAc;gBACnB,mEAAmE;uCAC/D,CAAC,YAAY,IAAI;oBACnB,kBAAkB,EAAE,UAAU;oBAC9B,eAAe,EAAE,KAAK;oBACtB,aAAa,EAAE,kBAAkB;iBAClC,CAAC,GAED,eAAe,CACK,CACZ,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/menu",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.20",
|
|
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,19 +23,19 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@fluentui-react-native/adapters": "^0.12.0",
|
|
26
|
-
"@fluentui-react-native/callout": "^0.25.
|
|
27
|
-
"@fluentui-react-native/focus-zone": "^0.16.
|
|
26
|
+
"@fluentui-react-native/callout": "^0.25.10",
|
|
27
|
+
"@fluentui-react-native/focus-zone": "^0.16.9",
|
|
28
28
|
"@fluentui-react-native/framework": "0.13.7",
|
|
29
|
-
"@fluentui-react-native/icon": "^0.20.
|
|
30
|
-
"@fluentui-react-native/interactive-hooks": "^0.
|
|
31
|
-
"@fluentui-react-native/text": "^0.22.
|
|
29
|
+
"@fluentui-react-native/icon": "^0.20.10",
|
|
30
|
+
"@fluentui-react-native/interactive-hooks": "^0.26.0",
|
|
31
|
+
"@fluentui-react-native/text": "^0.22.9",
|
|
32
32
|
"@fluentui-react-native/theme-tokens": "^0.26.6",
|
|
33
33
|
"@fluentui-react-native/tokens": "^0.22.6",
|
|
34
34
|
"@fluentui-react-native/use-styling": "^0.12.0",
|
|
35
35
|
"tslib": "^2.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@fluentui-react-native/button": "^0.36.
|
|
38
|
+
"@fluentui-react-native/button": "^0.36.12",
|
|
39
39
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
40
40
|
"@fluentui-react-native/scripts": "^0.1.1",
|
|
41
41
|
"@fluentui-react-native/test-tools": "^0.1.1",
|
|
@@ -48,8 +48,29 @@ export const MenuGroup = compose<MenuGroupType>({
|
|
|
48
48
|
return child;
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
+
// Check if this MenuGroup has a MenuGroupHeader. If so, use the MenuGroupHeader
|
|
52
|
+
// as the accessibilityLabel for the MenuGroup.
|
|
53
|
+
const menuGroupHeader = React.Children.toArray(children).find(
|
|
54
|
+
(child) => React.isValidElement(child) && (child as any).type.displayName === 'MenuGroupHeader',
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
// On win32, in order for assistive technology to read a group, it must have a name which is why
|
|
58
|
+
// we use a string with a space as the default accessibilityLabel for MenuGroup.
|
|
59
|
+
// If an empty string was used, the group context would not be read.
|
|
60
|
+
let menuGroupA11yLabel = ' ';
|
|
61
|
+
if (menuGroupHeader && typeof (menuGroupHeader as React.ReactElement).props.children === 'string') {
|
|
62
|
+
menuGroupA11yLabel = (menuGroupHeader as React.ReactElement).props.children;
|
|
63
|
+
}
|
|
64
|
+
|
|
51
65
|
return (
|
|
52
|
-
<Slots.root
|
|
66
|
+
<Slots.root
|
|
67
|
+
{...mergedProps}
|
|
68
|
+
{...(Platform.OS == ('win32' as any) && {
|
|
69
|
+
accessible: true,
|
|
70
|
+
accessibilityRole: 'group' as any,
|
|
71
|
+
accessibilityLabel: mergedProps.accessibilityLabel ?? menuGroupA11yLabel,
|
|
72
|
+
})}
|
|
73
|
+
>
|
|
53
74
|
<Slots.contentWrapper
|
|
54
75
|
// avoid error that fires when props are passed into React.fragment
|
|
55
76
|
{...(hasFocusZone && {
|