@fluentui-react-native/menu 1.1.3 → 1.2.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 +67 -1
- package/CHANGELOG.md +24 -2
- package/lib/MenuList/MenuList.d.ts.map +1 -1
- package/lib/MenuList/MenuList.js +7 -6
- package/lib/MenuList/MenuList.js.map +1 -1
- package/lib/MenuList/MenuList.types.d.ts +2 -0
- package/lib/MenuList/MenuList.types.d.ts.map +1 -1
- package/lib/MenuList/MenuList.types.js.map +1 -1
- package/lib-commonjs/MenuList/MenuList.d.ts.map +1 -1
- package/lib-commonjs/MenuList/MenuList.js +6 -5
- package/lib-commonjs/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/MenuList/MenuList.types.d.ts +2 -0
- package/lib-commonjs/MenuList/MenuList.types.d.ts.map +1 -1
- package/lib-commonjs/MenuList/MenuList.types.js.map +1 -1
- package/package.json +8 -8
- package/src/MenuList/MenuList.tsx +14 -12
- package/src/MenuList/MenuList.types.ts +2 -0
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,73 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/menu",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 27 Dec 2022 10:15:40 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/menu_v1.2.1",
|
|
7
|
+
"version": "1.2.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/menu",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/callout to v0.21.44",
|
|
14
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/menu",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/focus-zone to v0.11.14",
|
|
20
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui-react-native/menu",
|
|
25
|
+
"comment": "Bump @fluentui-react-native/framework to v0.8.27",
|
|
26
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui-react-native/menu",
|
|
31
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.2",
|
|
32
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui-react-native/menu",
|
|
37
|
+
"comment": "Bump @fluentui-react-native/text to v0.19.1",
|
|
38
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui-react-native/menu",
|
|
43
|
+
"comment": "Bump @fluentui-react-native/theme-tokens to v0.22.3",
|
|
44
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui-react-native/menu",
|
|
49
|
+
"comment": "Bump @fluentui-react-native/button to v0.32.9",
|
|
50
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"date": "Wed, 21 Dec 2022 23:00:53 GMT",
|
|
57
|
+
"tag": "@fluentui-react-native/menu_v1.2.0",
|
|
58
|
+
"version": "1.2.0",
|
|
59
|
+
"comments": {
|
|
60
|
+
"minor": [
|
|
61
|
+
{
|
|
62
|
+
"author": "amchiu@microsoft.com",
|
|
63
|
+
"package": "@fluentui-react-native/menu",
|
|
64
|
+
"commit": "c6f0feaa01969cab2a902cd4c4c603729e39ef24",
|
|
65
|
+
"comment": "Add ScrollView to Menu (macOS)"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"date": "Thu, 15 Dec 2022 14:50:50 GMT",
|
|
6
72
|
"tag": "@fluentui-react-native/menu_v1.1.3",
|
|
7
73
|
"version": "1.1.3",
|
|
8
74
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/menu
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 27 Dec 2022 10:15:40 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.2.1
|
|
8
|
+
|
|
9
|
+
Tue, 27 Dec 2022 10:15:40 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/callout to v0.21.44
|
|
14
|
+
- Bump @fluentui-react-native/focus-zone to v0.11.14
|
|
15
|
+
- Bump @fluentui-react-native/framework to v0.8.27
|
|
16
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.22.2
|
|
17
|
+
- Bump @fluentui-react-native/text to v0.19.1
|
|
18
|
+
- Bump @fluentui-react-native/theme-tokens to v0.22.3
|
|
19
|
+
- Bump @fluentui-react-native/button to v0.32.9
|
|
20
|
+
|
|
21
|
+
## 1.2.0
|
|
22
|
+
|
|
23
|
+
Wed, 21 Dec 2022 23:00:53 GMT
|
|
24
|
+
|
|
25
|
+
### Minor changes
|
|
26
|
+
|
|
27
|
+
- Add ScrollView to Menu (macOS) (amchiu@microsoft.com)
|
|
28
|
+
|
|
7
29
|
## 1.1.3
|
|
8
30
|
|
|
9
|
-
Thu, 15 Dec 2022 14:
|
|
31
|
+
Thu, 15 Dec 2022 14:50:50 GMT
|
|
10
32
|
|
|
11
33
|
### Patches
|
|
12
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AA2B7E,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AA2B7E,eAAO,MAAM,QAAQ,gLA2CnB,CAAC"}
|
package/lib/MenuList/MenuList.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
2
|
/** @jsx withSlots */
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { Platform, View } from 'react-native';
|
|
4
|
+
import { Platform, ScrollView, View } from 'react-native';
|
|
5
5
|
import { compose, mergeProps, stagedComponent, withSlots } from '@fluentui-react-native/framework';
|
|
6
6
|
import { menuListName } from './MenuList.types';
|
|
7
7
|
import { stylingSettings } from './MenuList.styling';
|
|
@@ -26,7 +26,7 @@ var MenuStack = stagedComponent(function (props) {
|
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
28
|
MenuStack.displayName = 'MenuStack';
|
|
29
|
-
export var MenuList = compose(__assign(__assign({ displayName: menuListName }, stylingSettings), { slots: __assign({ root: MenuStack }, (Platform.OS === 'macos' && { focusZone: FocusZone })), useRender: function (userProps, useSlots) {
|
|
29
|
+
export var MenuList = compose(__assign(__assign({ displayName: menuListName }, stylingSettings), { slots: __assign(__assign({ root: MenuStack }, (Platform.OS === 'macos' && { scrollView: ScrollView })), (Platform.OS === 'macos' && { focusZone: FocusZone })), useRender: function (userProps, useSlots) {
|
|
30
30
|
var menuList = useMenuList(userProps);
|
|
31
31
|
var contextValue = useMenuListContextValue(menuList);
|
|
32
32
|
var Slots = useSlots(menuList.props);
|
|
@@ -37,10 +37,11 @@ export var MenuList = compose(__assign(__assign({ displayName: menuListName }, s
|
|
|
37
37
|
}, []);
|
|
38
38
|
return function (_final, children) {
|
|
39
39
|
var content = Platform.OS === 'macos' ? (withSlots(Slots.root, null,
|
|
40
|
-
withSlots(Slots.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
withSlots(Slots.scrollView, null,
|
|
41
|
+
withSlots(Slots.focusZone, { componentRef: focusZoneRef, focusZoneDirection: 'vertical', defaultTabbableElement: focusZoneRef,
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
43
|
+
// @ts-ignore FocusZone takes ViewProps, but that isn't defined on it's type.
|
|
44
|
+
enableFocusRing: false }, children)))) : (withSlots(Slots.root, null, children));
|
|
44
45
|
return withSlots(MenuListProvider, { value: contextValue }, content);
|
|
45
46
|
};
|
|
46
47
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":";AAAA,qBAAqB;AACrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":";AAAA,qBAAqB;AACrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAY,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7G,OAAO,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC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
3
3
|
import { InteractionEvent } from '@fluentui-react-native/interactive-hooks';
|
|
4
4
|
import { IBackgroundColorTokens, LayoutTokens } from '@fluentui-react-native/tokens';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { ScrollViewProps } from 'react-native';
|
|
6
7
|
export declare const menuListName = "MenuList";
|
|
7
8
|
export interface MenuListTokens extends LayoutTokens, IBackgroundColorTokens {
|
|
8
9
|
/**
|
|
@@ -45,6 +46,7 @@ export interface MenuListSlotProps {
|
|
|
45
46
|
gap?: number;
|
|
46
47
|
};
|
|
47
48
|
focusZone?: FocusZoneProps;
|
|
49
|
+
scrollView?: ScrollViewProps;
|
|
48
50
|
}
|
|
49
51
|
export interface MenuListType {
|
|
50
52
|
props: MenuListProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.types.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuList.types.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,c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CAAA;KAAE,CAAC;IACxD,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,iBAAiB,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.types.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuList.types.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,YAAY,GAAG,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AA2B7E,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AA2B7E,eAAO,MAAM,QAAQ,gLA2CnB,CAAC"}
|
|
@@ -29,7 +29,7 @@ var MenuStack = (0, framework_1.stagedComponent)(function (props) {
|
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
31
|
MenuStack.displayName = 'MenuStack';
|
|
32
|
-
exports.MenuList = (0, framework_1.compose)((0, tslib_1.__assign)((0, tslib_1.__assign)({ displayName: MenuList_types_1.menuListName }, MenuList_styling_1.stylingSettings), { slots: (0, tslib_1.__assign)({ root: MenuStack }, (react_native_1.Platform.OS === 'macos' && { focusZone: focus_zone_1.FocusZone })), useRender: function (userProps, useSlots) {
|
|
32
|
+
exports.MenuList = (0, framework_1.compose)((0, tslib_1.__assign)((0, tslib_1.__assign)({ displayName: MenuList_types_1.menuListName }, MenuList_styling_1.stylingSettings), { slots: (0, tslib_1.__assign)((0, tslib_1.__assign)({ root: MenuStack }, (react_native_1.Platform.OS === 'macos' && { scrollView: react_native_1.ScrollView })), (react_native_1.Platform.OS === 'macos' && { focusZone: focus_zone_1.FocusZone })), useRender: function (userProps, useSlots) {
|
|
33
33
|
var menuList = (0, useMenuList_1.useMenuList)(userProps);
|
|
34
34
|
var contextValue = (0, useMenuListContextValue_1.useMenuListContextValue)(menuList);
|
|
35
35
|
var Slots = useSlots(menuList.props);
|
|
@@ -40,10 +40,11 @@ exports.MenuList = (0, framework_1.compose)((0, tslib_1.__assign)((0, tslib_1.__
|
|
|
40
40
|
}, []);
|
|
41
41
|
return function (_final, children) {
|
|
42
42
|
var content = react_native_1.Platform.OS === 'macos' ? ((0, framework_1.withSlots)(Slots.root, null,
|
|
43
|
-
(0, framework_1.withSlots)(Slots.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
(0, framework_1.withSlots)(Slots.scrollView, null,
|
|
44
|
+
(0, framework_1.withSlots)(Slots.focusZone, { componentRef: focusZoneRef, focusZoneDirection: 'vertical', defaultTabbableElement: focusZoneRef,
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
46
|
+
// @ts-ignore FocusZone takes ViewProps, but that isn't defined on it's type.
|
|
47
|
+
enableFocusRing: false }, children)))) : ((0, framework_1.withSlots)(Slots.root, null, children));
|
|
47
48
|
return (0, framework_1.withSlots)(menuListContext_1.MenuListProvider, { value: contextValue }, content);
|
|
48
49
|
};
|
|
49
50
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.tsx"],"names":[],"mappings":";;;;AAAA,qBAAqB;AACrB,6DAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../src/M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luentui-react-native/interactive-hooks';
|
|
4
4
|
import { IBackgroundColorTokens, LayoutTokens } from '@fluentui-react-native/tokens';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { ScrollViewProps } from 'react-native';
|
|
6
7
|
export declare const menuListName = "MenuList";
|
|
7
8
|
export interface MenuListTokens extends LayoutTokens, IBackgroundColorTokens {
|
|
8
9
|
/**
|
|
@@ -45,6 +46,7 @@ export interface MenuListSlotProps {
|
|
|
45
46
|
gap?: number;
|
|
46
47
|
};
|
|
47
48
|
focusZone?: FocusZoneProps;
|
|
49
|
+
scrollView?: ScrollViewProps;
|
|
48
50
|
}
|
|
49
51
|
export interface MenuListType {
|
|
50
52
|
props: MenuListProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.types.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuList.types.d.ts","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,M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AAS,CAAC,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,iBAAiB,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.types.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"MenuList.types.js","sourceRoot":"","sources":["../../src/MenuList/MenuList.types.ts"],"names":[],"mappings":";;;AAOa,QAAA,YAAY,GAAG,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/menu",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
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.10.0 <1.0.0",
|
|
26
|
-
"@fluentui-react-native/callout": ">=0.21.
|
|
27
|
-
"@fluentui-react-native/focus-zone": ">=0.11.
|
|
28
|
-
"@fluentui-react-native/framework": "0.8.
|
|
29
|
-
"@fluentui-react-native/interactive-hooks": ">=0.22.
|
|
30
|
-
"@fluentui-react-native/text": ">=0.19.
|
|
31
|
-
"@fluentui-react-native/theme-tokens": ">=0.22.
|
|
26
|
+
"@fluentui-react-native/callout": ">=0.21.44 <1.0.0",
|
|
27
|
+
"@fluentui-react-native/focus-zone": ">=0.11.14 <1.0.0",
|
|
28
|
+
"@fluentui-react-native/framework": "0.8.27",
|
|
29
|
+
"@fluentui-react-native/interactive-hooks": ">=0.22.2 <1.0.0",
|
|
30
|
+
"@fluentui-react-native/text": ">=0.19.1 <1.0.0",
|
|
31
|
+
"@fluentui-react-native/theme-tokens": ">=0.22.3 <1.0.0",
|
|
32
32
|
"@fluentui-react-native/tokens": ">=0.20.0 <1.0.0",
|
|
33
33
|
"@fluentui-react-native/use-styling": ">=0.9.1 <1.0.0",
|
|
34
34
|
"react-native-svg": "12.5.0",
|
|
35
35
|
"tslib": "^2.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@fluentui-react-native/button": ">=0.32.
|
|
38
|
+
"@fluentui-react-native/button": ">=0.32.9 <1.0.0",
|
|
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 <1.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx withSlots */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Platform, View } from 'react-native';
|
|
3
|
+
import { Platform, ScrollView, View } from 'react-native';
|
|
4
4
|
import { compose, mergeProps, stagedComponent, UseSlots, withSlots } from '@fluentui-react-native/framework';
|
|
5
5
|
import { menuListName, MenuListProps, MenuListType } from './MenuList.types';
|
|
6
6
|
import { stylingSettings } from './MenuList.styling';
|
|
@@ -34,6 +34,7 @@ export const MenuList = compose<MenuListType>({
|
|
|
34
34
|
...stylingSettings,
|
|
35
35
|
slots: {
|
|
36
36
|
root: MenuStack,
|
|
37
|
+
...(Platform.OS === 'macos' && { scrollView: ScrollView }),
|
|
37
38
|
...(Platform.OS === 'macos' && { focusZone: FocusZone }),
|
|
38
39
|
},
|
|
39
40
|
useRender: (userProps: MenuListProps, useSlots: UseSlots<MenuListType>) => {
|
|
@@ -51,17 +52,18 @@ export const MenuList = compose<MenuListType>({
|
|
|
51
52
|
const content =
|
|
52
53
|
Platform.OS === 'macos' ? (
|
|
53
54
|
<Slots.root>
|
|
54
|
-
<Slots.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
<Slots.scrollView>
|
|
56
|
+
<Slots.focusZone
|
|
57
|
+
componentRef={focusZoneRef}
|
|
58
|
+
focusZoneDirection={'vertical'}
|
|
59
|
+
defaultTabbableElement={focusZoneRef}
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
61
|
+
// @ts-ignore FocusZone takes ViewProps, but that isn't defined on it's type.
|
|
62
|
+
enableFocusRing={false}
|
|
63
|
+
>
|
|
64
|
+
{children}
|
|
65
|
+
</Slots.focusZone>
|
|
66
|
+
</Slots.scrollView>
|
|
65
67
|
</Slots.root>
|
|
66
68
|
) : (
|
|
67
69
|
<Slots.root>{children}</Slots.root>
|
|
@@ -3,6 +3,7 @@ import { FocusZoneProps } from '@fluentui-react-native/focus-zone';
|
|
|
3
3
|
import { InteractionEvent } from '@fluentui-react-native/interactive-hooks';
|
|
4
4
|
import { IBackgroundColorTokens, LayoutTokens } from '@fluentui-react-native/tokens';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { ScrollViewProps } from 'react-native';
|
|
6
7
|
|
|
7
8
|
export const menuListName = 'MenuList';
|
|
8
9
|
|
|
@@ -51,6 +52,7 @@ export interface MenuListState extends Omit<MenuListProps, 'checked' | 'onChecke
|
|
|
51
52
|
export interface MenuListSlotProps {
|
|
52
53
|
root: React.PropsWithRef<IViewProps> & { gap?: number };
|
|
53
54
|
focusZone?: FocusZoneProps; // macOS only
|
|
55
|
+
scrollView?: ScrollViewProps; // macOS only
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
export interface MenuListType {
|