@fluentui-react-native/tester 0.58.0 → 0.58.3
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 +286 -1
- package/CHANGELOG.md +66 -2
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +6 -6
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Callout/CalloutTest.js +7 -7
- package/lib/FluentTester/TestComponents/Callout/CalloutTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js +6 -6
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +12 -10
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Common/Slider.js +1 -1
- package/lib/FluentTester/TestComponents/Common/Slider.js.map +1 -1
- package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +4 -4
- package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js +4 -4
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/FocusTrapZone/FocusTrapZoneTest.js +2 -2
- package/lib/FluentTester/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/FocusZone/FocusZoneTest.js +24 -26
- package/lib/FluentTester/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Icon/IconTest.js +2 -2
- package/lib/FluentTester/TestComponents/Link/LinkTest.js +2 -2
- package/lib/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js +2 -2
- package/lib/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
- package/lib/FluentTester/TestComponents/Pressable/PressableTest.js +2 -2
- package/lib/FluentTester/TestComponents/Pressable/PressableTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/RadioGroup/RadioGroupTest.js +2 -2
- package/lib/FluentTester/TestComponents/Separator/SeparatorTest.js +2 -2
- package/lib/FluentTester/TestComponents/Separator/SeparatorTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Svg/SvgTest.js +20 -20
- package/lib/FluentTester/TestComponents/Svg/SvgTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Tabs/TabsTest.js +18 -18
- package/lib/FluentTester/TestComponents/Tabs/TabsTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/TabsExperimental/TabsTest.js +16 -16
- package/lib/FluentTester/TestComponents/TabsExperimental/TabsTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +6 -6
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.js +7 -7
- package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js +6 -6
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +12 -10
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/Slider.js +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Common/Slider.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +4 -4
- package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js +4 -4
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/FocusTrapZone/FocusTrapZoneTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/FocusZone/FocusZoneTest.js +24 -26
- package/lib-commonjs/FluentTester/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Icon/IconTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/Link/LinkTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Pressable/PressableTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/Pressable/PressableTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/RadioGroup/RadioGroupTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/Separator/SeparatorTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/Separator/SeparatorTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Svg/SvgTest.js +20 -20
- package/lib-commonjs/FluentTester/TestComponents/Svg/SvgTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Tabs/TabsTest.js +18 -18
- package/lib-commonjs/FluentTester/TestComponents/Tabs/TabsTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TabsExperimental/TabsTest.js +16 -16
- package/lib-commonjs/FluentTester/TestComponents/TabsExperimental/TabsTest.js.map +1 -1
- package/package.json +24 -24
- package/src/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.tsx +6 -6
- package/src/FluentTester/TestComponents/Callout/CalloutTest.tsx +34 -28
- package/src/FluentTester/TestComponents/Checkbox/CheckboxTest.tsx +6 -6
- package/src/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.tsx +10 -8
- package/src/FluentTester/TestComponents/Common/Slider.tsx +1 -1
- package/src/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.tsx +4 -4
- package/src/FluentTester/TestComponents/Expander/ExpanderTest.tsx +4 -4
- package/src/FluentTester/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx +2 -2
- package/src/FluentTester/TestComponents/FocusZone/FocusZoneTest.tsx +27 -25
- package/src/FluentTester/TestComponents/Icon/IconTest.tsx +2 -2
- package/src/FluentTester/TestComponents/Link/LinkTest.tsx +2 -2
- package/src/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.tsx +2 -2
- package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx +1 -1
- package/src/FluentTester/TestComponents/Pressable/PressableTest.tsx +2 -2
- package/src/FluentTester/TestComponents/RadioGroup/RadioGroupTest.tsx +2 -2
- package/src/FluentTester/TestComponents/Separator/SeparatorTest.tsx +2 -2
- package/src/FluentTester/TestComponents/Svg/SvgTest.tsx +20 -20
- package/src/FluentTester/TestComponents/Tabs/TabsTest.tsx +18 -18
- package/src/FluentTester/TestComponents/TabsExperimental/TabsTest.tsx +16 -16
|
@@ -12,7 +12,7 @@ var consts_1 = require("./consts");
|
|
|
12
12
|
var Test_1 = require("../Test");
|
|
13
13
|
var test_svg_1 = (0, tslib_1.__importDefault)(require("./test.svg"));
|
|
14
14
|
var TabsExperimentalE2ETest_1 = require("./TabsExperimentalE2ETest");
|
|
15
|
-
var
|
|
15
|
+
var TabsMainTest = function () {
|
|
16
16
|
return (React.createElement(react_native_1.View, { style: styles_1.stackStyle },
|
|
17
17
|
React.createElement(experimental_tabs_1.Tabs, { label: "Tabs" },
|
|
18
18
|
React.createElement(experimental_tabs_1.TabsItem, { headerText: "Home", itemKey: "A" },
|
|
@@ -22,7 +22,7 @@ var tabs = function () {
|
|
|
22
22
|
React.createElement(experimental_tabs_1.TabsItem, { headerText: "Settings", itemKey: "C" },
|
|
23
23
|
React.createElement(experimental_text_1.Text, null, "Tabs #3")))));
|
|
24
24
|
};
|
|
25
|
-
var
|
|
25
|
+
var DisabledTabs = function () {
|
|
26
26
|
return (React.createElement(react_native_1.View, { style: styles_1.stackStyle },
|
|
27
27
|
React.createElement(experimental_tabs_1.Tabs, { label: "Tabs" },
|
|
28
28
|
React.createElement(experimental_tabs_1.TabsItem, { headerText: "Home", itemKey: "A" },
|
|
@@ -32,7 +32,7 @@ var disabledTabs = function () {
|
|
|
32
32
|
React.createElement(experimental_tabs_1.TabsItem, { headerText: "Settings", itemKey: "C" },
|
|
33
33
|
React.createElement(experimental_text_1.Text, null, "Tabs #3")))));
|
|
34
34
|
};
|
|
35
|
-
var
|
|
35
|
+
var TabsCountIcon = function () {
|
|
36
36
|
var svgProps = {
|
|
37
37
|
src: test_svg_1.default,
|
|
38
38
|
viewBox: '0 0 500 500',
|
|
@@ -46,7 +46,7 @@ var tabsCountIcon = function () {
|
|
|
46
46
|
React.createElement(experimental_tabs_1.TabsItem, { itemKey: "C", icon: { svgSource: svgProps, width: 20, height: 20 } },
|
|
47
47
|
React.createElement(experimental_text_1.Text, null, "Tabs #3")))));
|
|
48
48
|
};
|
|
49
|
-
var
|
|
49
|
+
var TabsClickEventTest = function () {
|
|
50
50
|
var _a = React.useState('home_key'), selectedKey = _a[0], setSelectedKey = _a[1];
|
|
51
51
|
var onTabsClick = React.useCallback(function (key) {
|
|
52
52
|
setSelectedKey(key);
|
|
@@ -61,7 +61,7 @@ var onTabsClickEvent = function () {
|
|
|
61
61
|
React.createElement(experimental_tabs_1.TabsItem, { headerText: "Settings", itemKey: "settings_key" },
|
|
62
62
|
React.createElement(experimental_text_1.Text, null, "Tabs #3")))));
|
|
63
63
|
};
|
|
64
|
-
var
|
|
64
|
+
var TabsChangingViews = function () {
|
|
65
65
|
// If User wants to control what gets rendered example
|
|
66
66
|
var _a = React.useState('home'), selectedKey = _a[0], setSelectedKey = _a[1];
|
|
67
67
|
var onTabsClick = React.useCallback(function (key) {
|
|
@@ -77,7 +77,7 @@ var tabsChangingViews = function () {
|
|
|
77
77
|
selectedKey == 'file' && React.createElement(experimental_text_1.Text, null, "Tabs #2"),
|
|
78
78
|
selectedKey == 'settings' && React.createElement(experimental_text_1.Text, null, "Tabs #3"))));
|
|
79
79
|
};
|
|
80
|
-
var
|
|
80
|
+
var TabsRenderSeparately = function () {
|
|
81
81
|
var _a = React.useState('rectangleRed'), selectedKey = _a[0], setSelectedKey = _a[1];
|
|
82
82
|
var onTabsClick = React.useCallback(function (key) {
|
|
83
83
|
setSelectedKey(key);
|
|
@@ -96,7 +96,7 @@ var tabsRenderSeparately = function () {
|
|
|
96
96
|
React.createElement(experimental_tabs_1.TabsItem, { headerText: "Square Red", itemKey: "squareRed" }),
|
|
97
97
|
React.createElement(experimental_tabs_1.TabsItem, { headerText: "Rectangle Green", itemKey: "rectangleGreen" }))));
|
|
98
98
|
};
|
|
99
|
-
var
|
|
99
|
+
var TabsSettingSelectedKey = function () {
|
|
100
100
|
// If user wants to programmatically set the selectedKey to control the view
|
|
101
101
|
var _a = React.useState('home'), selectedKey = _a[0], setSelectedKey = _a[1];
|
|
102
102
|
var _b = React.useState(0), currTabItemIndex = _b[0], setCurrTabItemIndex = _b[1];
|
|
@@ -116,7 +116,7 @@ var tabsSettingSelectedKey = function () {
|
|
|
116
116
|
React.createElement(experimental_text_1.Text, null, "Tabs #3"))),
|
|
117
117
|
React.createElement(experimental_button_1.Button, { onClick: goToNextTab }, "View Next Tab")));
|
|
118
118
|
};
|
|
119
|
-
var
|
|
119
|
+
var TabsWithFlexibility = function () {
|
|
120
120
|
var _a = React.useState('home'), selectedKey = _a[0], setSelectedKey = _a[1];
|
|
121
121
|
var goHomeTab = React.useCallback(function () {
|
|
122
122
|
setSelectedKey('home');
|
|
@@ -138,31 +138,31 @@ var tabsSections = [
|
|
|
138
138
|
{
|
|
139
139
|
name: 'Default Tabs',
|
|
140
140
|
testID: consts_1.EXPERIMENTAL_TABS_TESTPAGE,
|
|
141
|
-
component:
|
|
141
|
+
component: TabsMainTest,
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
name: 'Tabs with disabled',
|
|
145
|
-
component:
|
|
145
|
+
component: DisabledTabs,
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
name: 'Trigger onTabsClick event',
|
|
149
|
-
component:
|
|
149
|
+
component: TabsClickEventTest,
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
name: 'User Custom Render',
|
|
153
|
-
component:
|
|
153
|
+
component: TabsChangingViews,
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
name: 'Render Content Separately',
|
|
157
|
-
component:
|
|
157
|
+
component: TabsRenderSeparately,
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
name: 'Override Selected Key',
|
|
161
|
-
component:
|
|
161
|
+
component: TabsSettingSelectedKey,
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
name: 'More Flexibility',
|
|
165
|
-
component:
|
|
165
|
+
component: TabsWithFlexibility,
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
name: 'E2E Testing Experimental Tabs',
|
|
@@ -172,7 +172,7 @@ var tabsSections = [
|
|
|
172
172
|
if (react_native_1.Platform.OS !== 'windows') {
|
|
173
173
|
tabsSections.push({
|
|
174
174
|
name: 'Count and Icon',
|
|
175
|
-
component:
|
|
175
|
+
component: TabsCountIcon,
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
var ExperimentalTabsTest = function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsTest.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/TabsExperimental/TabsTest.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAA8C;AAC9C,8EAAgE;AAChE,kFAAoE;AACpE,8EAA0E;AAC1E,2CAA8C;AAC9C,mCAAsD;AACtD,gCAA4D;AAE5D,qEAAiC;AACjC,qEAAoE;AAEpE,IAAM,
|
|
1
|
+
{"version":3,"file":"TabsTest.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/TabsExperimental/TabsTest.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAA8C;AAC9C,8EAAgE;AAChE,kFAAoE;AACpE,8EAA0E;AAC1E,2CAA8C;AAC9C,mCAAsD;AACtD,gCAA4D;AAE5D,qEAAiC;AACjC,qEAAoE;AAEpE,IAAM,YAAY,GAA4B;IAC5C,OAAO,CACL,oBAAC,mBAAI,IAAC,KAAK,EAAE,mBAAU;QACrB,oBAAC,wBAAI,IAAC,KAAK,EAAC,MAAM;YAChB,oBAAC,4BAAQ,IAAC,UAAU,EAAC,MAAM,EAAC,OAAO,EAAC,GAAG;gBACrC,oBAAC,wBAAI,kBAAe,CACX;YACX,oBAAC,4BAAQ,IAAC,UAAU,EAAC,OAAO,EAAC,OAAO,EAAC,GAAG;gBACtC,oBAAC,wBAAI,kBAAe,CACX;YACX,oBAAC,4BAAQ,IAAC,UAAU,EAAC,UAAU,EAAC,OAAO,EAAC,GAAG;gBACzC,oBAAC,wBAAI,kBAAe,CACX,CACN,CACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,YAAY,GAA4B;IAC5C,OAAO,CACL,oBAAC,mBAAI,IAAC,KAAK,EAAE,mBAAU;QACrB,oBAAC,wBAAI,IAAC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AW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AAClH,CAAC,CAAC;AAZW,QAAA,oBAAoB,wBAY/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.3",
|
|
4
4
|
"description": "A test app to test FluentUI React Native Components during development",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Microsoft <fluentuinativeowners@microsoft.com>",
|
|
@@ -25,31 +25,31 @@
|
|
|
25
25
|
"directory": "apps/fluent-tester"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@fluentui-react-native/android-theme": ">=0.5.
|
|
29
|
-
"@fluentui-react-native/apple-theme": ">=0.9.
|
|
30
|
-
"@fluentui-react-native/badge": ">=0.0.
|
|
31
|
-
"@fluentui-react-native/button": ">=0.22.
|
|
32
|
-
"@fluentui-react-native/default-theme": ">=0.9.
|
|
33
|
-
"@fluentui-react-native/experimental-activity-indicator": ">=0.5.
|
|
34
|
-
"@fluentui-react-native/experimental-avatar": ">=0.14.
|
|
35
|
-
"@fluentui-react-native/experimental-button": "0.15.
|
|
36
|
-
"@fluentui-react-native/experimental-checkbox": "0.
|
|
28
|
+
"@fluentui-react-native/android-theme": ">=0.5.5 <1.0.0",
|
|
29
|
+
"@fluentui-react-native/apple-theme": ">=0.9.11 <1.0.0",
|
|
30
|
+
"@fluentui-react-native/badge": ">=0.0.17 <1.0.0",
|
|
31
|
+
"@fluentui-react-native/button": ">=0.22.7 <1.0.0",
|
|
32
|
+
"@fluentui-react-native/default-theme": ">=0.9.11 <1.0.0",
|
|
33
|
+
"@fluentui-react-native/experimental-activity-indicator": ">=0.5.15 <1.0.0",
|
|
34
|
+
"@fluentui-react-native/experimental-avatar": ">=0.14.7 <1.0.0",
|
|
35
|
+
"@fluentui-react-native/experimental-button": "0.15.7",
|
|
36
|
+
"@fluentui-react-native/experimental-checkbox": "0.10.2",
|
|
37
37
|
"@fluentui-react-native/experimental-native-date-picker": ">=0.4.1 <1.0.0",
|
|
38
|
-
"@fluentui-react-native/experimental-expander": "0.3.
|
|
39
|
-
"@fluentui-react-native/experimental-menu-button": ">=0.3.
|
|
40
|
-
"@fluentui-react-native/experimental-shimmer": "0.6.
|
|
41
|
-
"@fluentui-react-native/experimental-tabs": "0.4.
|
|
42
|
-
"@fluentui-react-native/experimental-text": ">=0.7.
|
|
43
|
-
"@fluentui-react-native/framework": ">=0.7.
|
|
44
|
-
"@fluentui-react-native/icon": "0.11.
|
|
45
|
-
"@fluentui-react-native/interactive-hooks": ">=0.14.
|
|
46
|
-
"@fluentui-react-native/stack": ">=0.6.
|
|
47
|
-
"@fluentui-react-native/theme": ">=0.6.
|
|
48
|
-
"@fluentui-react-native/theme-types": ">=0.
|
|
38
|
+
"@fluentui-react-native/experimental-expander": "0.3.16",
|
|
39
|
+
"@fluentui-react-native/experimental-menu-button": ">=0.3.16 <1.0.0",
|
|
40
|
+
"@fluentui-react-native/experimental-shimmer": "0.6.19",
|
|
41
|
+
"@fluentui-react-native/experimental-tabs": "0.4.26",
|
|
42
|
+
"@fluentui-react-native/experimental-text": ">=0.7.16 <1.0.0",
|
|
43
|
+
"@fluentui-react-native/framework": ">=0.7.16 <1.0.0",
|
|
44
|
+
"@fluentui-react-native/icon": "0.11.11",
|
|
45
|
+
"@fluentui-react-native/interactive-hooks": ">=0.14.2 <1.0.0",
|
|
46
|
+
"@fluentui-react-native/stack": ">=0.6.16 <1.0.0",
|
|
47
|
+
"@fluentui-react-native/theme": ">=0.6.5 <1.0.0",
|
|
48
|
+
"@fluentui-react-native/theme-types": ">=0.14.0 <1.0.0",
|
|
49
49
|
"@fluentui-react-native/themed-stylesheet": "^1.3.2",
|
|
50
|
-
"@fluentui-react-native/theming-utils": ">=0.
|
|
51
|
-
"@fluentui-react-native/win32-theme": ">=0.14.
|
|
52
|
-
"@fluentui/react-native": ">=0.27.
|
|
50
|
+
"@fluentui-react-native/theming-utils": ">=0.9.0 <1.0.0",
|
|
51
|
+
"@fluentui-react-native/win32-theme": ">=0.14.13 <1.0.0",
|
|
52
|
+
"@fluentui/react-native": ">=0.27.37 <1.0.0",
|
|
53
53
|
"@react-native-community/slider": "^4.2.0",
|
|
54
54
|
"@react-native-menu/menu": "^0.1.2",
|
|
55
55
|
"@react-native-picker/picker": "^2.2.1",
|
|
@@ -7,7 +7,7 @@ import { Test, TestSection, PlatformStatus } from '../Test';
|
|
|
7
7
|
import { ACTIVITY_INDICATOR_TESTPAGE } from './consts';
|
|
8
8
|
import { View, Switch } from 'react-native';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const BasicActivityIndicator: React.FunctionComponent = () => {
|
|
11
11
|
const [animating, setAnimating] = React.useState(true);
|
|
12
12
|
const [hidesWhenStopped, setHidesWhenStopped] = React.useState(true);
|
|
13
13
|
|
|
@@ -30,7 +30,7 @@ const basicActivityIndicator: React.FunctionComponent = () => {
|
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const
|
|
33
|
+
const ActivityIndicatorMainTest: React.FunctionComponent = () => {
|
|
34
34
|
return (
|
|
35
35
|
<Stack style={stackStyle}>
|
|
36
36
|
<Text>Extra Small</Text>
|
|
@@ -57,7 +57,7 @@ const CustomizedActivityIndicator = ActivityIndicator.customize({
|
|
|
57
57
|
size: 'large',
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
const
|
|
60
|
+
const CustomizedActivityIndicatorTest: React.FunctionComponent = () => {
|
|
61
61
|
return (
|
|
62
62
|
<Stack style={stackStyle}>
|
|
63
63
|
<Text>Customized Activity Indicator</Text>
|
|
@@ -70,17 +70,17 @@ const activityIndicatorSections: TestSection[] = [
|
|
|
70
70
|
{
|
|
71
71
|
name: 'Base ActivityIndicator',
|
|
72
72
|
testID: ACTIVITY_INDICATOR_TESTPAGE,
|
|
73
|
-
component:
|
|
73
|
+
component: BasicActivityIndicator,
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
name: 'ActivityIndicator',
|
|
77
77
|
testID: ACTIVITY_INDICATOR_TESTPAGE,
|
|
78
|
-
component:
|
|
78
|
+
component: ActivityIndicatorMainTest,
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
name: 'Customized ActivityIndicator',
|
|
82
82
|
testID: ACTIVITY_INDICATOR_TESTPAGE,
|
|
83
|
-
component:
|
|
83
|
+
component: CustomizedActivityIndicatorTest,
|
|
84
84
|
},
|
|
85
85
|
];
|
|
86
86
|
|
|
@@ -6,7 +6,7 @@ import { Test, TestSection, PlatformStatus } from '../Test';
|
|
|
6
6
|
import { E2ECalloutTest } from './CalloutE2ETest';
|
|
7
7
|
import { fluentTesterStyles } from '../Common/styles';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const StandardCallout: React.FunctionComponent = () => {
|
|
10
10
|
const [showStandardCallout, setShowStandardCallout] = React.useState(false);
|
|
11
11
|
const [isStandardCalloutVisible, setIsStandardCalloutVisible] = React.useState(false);
|
|
12
12
|
|
|
@@ -23,29 +23,35 @@ const standardCallout: React.FunctionComponent = () => {
|
|
|
23
23
|
const [preventDismissOnClickOutside, setPreventDismissOnClickOutside] = React.useState(false);
|
|
24
24
|
const [calloutDismissBehaviors, setDismissBehaviors] = React.useState<DismissBehaviors[]>([]);
|
|
25
25
|
|
|
26
|
-
const onPreventDismissOnKeyDownChange = React.useCallback(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
value
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
26
|
+
const onPreventDismissOnKeyDownChange = React.useCallback(
|
|
27
|
+
(value) => {
|
|
28
|
+
setPreventDismissOnKeyDown(value);
|
|
29
|
+
if (value) {
|
|
30
|
+
setDismissBehaviors(calloutDismissBehaviors.concat('preventDismissOnKeyDown'));
|
|
31
|
+
} else {
|
|
32
|
+
const newDismissBehaviors = calloutDismissBehaviors.filter((value) => {
|
|
33
|
+
value != 'preventDismissOnKeyDown';
|
|
34
|
+
});
|
|
35
|
+
setDismissBehaviors(newDismissBehaviors);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
[calloutDismissBehaviors],
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const onPreventDismissOnClickOutsideChange = React.useCallback(
|
|
42
|
+
(value) => {
|
|
43
|
+
setPreventDismissOnClickOutside(value);
|
|
44
|
+
if (value) {
|
|
45
|
+
setDismissBehaviors(calloutDismissBehaviors.concat('preventDismissOnClickOutside'));
|
|
46
|
+
} else {
|
|
47
|
+
const newDismissBehaviors = calloutDismissBehaviors.filter((value) => {
|
|
48
|
+
value != 'preventDismissOnClickOutside';
|
|
49
|
+
});
|
|
50
|
+
setDismissBehaviors(newDismissBehaviors);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
[calloutDismissBehaviors],
|
|
54
|
+
);
|
|
49
55
|
|
|
50
56
|
const redTargetRef = React.useRef<View>(null);
|
|
51
57
|
const blueTargetRef = React.useRef<View>(null);
|
|
@@ -113,7 +119,7 @@ const standardCallout: React.FunctionComponent = () => {
|
|
|
113
119
|
|
|
114
120
|
const addButton = React.useCallback(() => {
|
|
115
121
|
setScrollviewContents((arr) => [...arr, 1]);
|
|
116
|
-
}, [setScrollviewContents
|
|
122
|
+
}, [setScrollviewContents]);
|
|
117
123
|
|
|
118
124
|
return (
|
|
119
125
|
<View>
|
|
@@ -245,7 +251,7 @@ const standardCallout: React.FunctionComponent = () => {
|
|
|
245
251
|
);
|
|
246
252
|
};
|
|
247
253
|
|
|
248
|
-
const
|
|
254
|
+
const CustomCallout: React.FunctionComponent = () => {
|
|
249
255
|
const [showCustomizedCallout, setShowCustomizedCallout] = React.useState(false);
|
|
250
256
|
const [isCustomizedCalloutVisible, setIsCustomizedCalloutVisible] = React.useState(false);
|
|
251
257
|
|
|
@@ -304,11 +310,11 @@ const calloutSections: TestSection[] = [
|
|
|
304
310
|
{
|
|
305
311
|
name: 'Standard Usage',
|
|
306
312
|
testID: CALLOUT_TESTPAGE,
|
|
307
|
-
component:
|
|
313
|
+
component: StandardCallout,
|
|
308
314
|
},
|
|
309
315
|
{
|
|
310
316
|
name: 'Customized Usage',
|
|
311
|
-
component:
|
|
317
|
+
component: CustomCallout,
|
|
312
318
|
},
|
|
313
319
|
{
|
|
314
320
|
name: 'E2E Testing Callout',
|
|
@@ -11,7 +11,7 @@ function onChangeUncontrolled(isChecked: boolean) {
|
|
|
11
11
|
console.log(isChecked);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const BasicCheckbox: React.FunctionComponent = () => {
|
|
15
15
|
return (
|
|
16
16
|
<View>
|
|
17
17
|
<Checkbox label="Unchecked checkbox (undefined)" onChange={onChangeUncontrolled} />
|
|
@@ -29,7 +29,7 @@ const basicCheckbox: React.FunctionComponent = () => {
|
|
|
29
29
|
);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const
|
|
32
|
+
const OtherCheckbox: React.FunctionComponent = () => {
|
|
33
33
|
const [isCheckedControlled1, setCheckedControlled1] = React.useState(false);
|
|
34
34
|
const onChangeControlled1 = React.useCallback((checked) => {
|
|
35
35
|
setCheckedControlled1(checked);
|
|
@@ -87,7 +87,7 @@ const HoverCheckbox = Checkbox.customize({
|
|
|
87
87
|
},
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
const
|
|
90
|
+
const TokenCheckbox: React.FunctionComponent = () => {
|
|
91
91
|
const [checkboxColor, setCheckboxColor] = React.useState('blue');
|
|
92
92
|
const [checkmarkColor, setCheckmarkColor] = React.useState('white');
|
|
93
93
|
|
|
@@ -148,15 +148,15 @@ const checkboxSections: TestSection[] = [
|
|
|
148
148
|
{
|
|
149
149
|
name: 'Basic Checkboxes',
|
|
150
150
|
testID: CHECKBOX_TESTPAGE,
|
|
151
|
-
component:
|
|
151
|
+
component: BasicCheckbox,
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
name: 'Other Implementations',
|
|
155
|
-
component:
|
|
155
|
+
component: OtherCheckbox,
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
name: 'Token Customized Checkboxes',
|
|
159
|
-
component:
|
|
159
|
+
component: TokenCheckbox,
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
name: 'Checkbox for E2E Testing',
|
|
@@ -12,7 +12,7 @@ function onChangeUncontrolled(_e: InteractionEvent, isChecked: boolean) {
|
|
|
12
12
|
console.log(isChecked);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const BasicCheckbox: React.FunctionComponent = () => {
|
|
16
16
|
return (
|
|
17
17
|
<View>
|
|
18
18
|
<Checkbox label="Unchecked checkbox (undefined)" onChange={onChangeUncontrolled} />
|
|
@@ -23,11 +23,12 @@ const basicCheckbox: React.FunctionComponent = () => {
|
|
|
23
23
|
<Checkbox label="Checkbox will display a tooltip" tooltip="This is a tooltip" />
|
|
24
24
|
<Checkbox label="A circular checkbox" shape="circular" />
|
|
25
25
|
<Checkbox label="A checkbox with label placed before" labelPosition="before" />
|
|
26
|
+
<Checkbox label="A required checkbox" required />
|
|
26
27
|
</View>
|
|
27
28
|
);
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
const
|
|
31
|
+
const SizeCheckbox: React.FunctionComponent = () => {
|
|
31
32
|
return (
|
|
32
33
|
<View>
|
|
33
34
|
<Checkbox tooltip="Medium checkbox" size="medium" />
|
|
@@ -38,7 +39,7 @@ const sizeCheckbox: React.FunctionComponent = () => {
|
|
|
38
39
|
);
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
const
|
|
42
|
+
const OtherCheckbox: React.FunctionComponent = () => {
|
|
42
43
|
const [isCheckedControlled1, setCheckedControlled1] = React.useState(false);
|
|
43
44
|
const onChangeControlled1 = React.useCallback((checked) => {
|
|
44
45
|
setCheckedControlled1(checked);
|
|
@@ -58,6 +59,7 @@ const otherCheckbox: React.FunctionComponent = () => {
|
|
|
58
59
|
labelPosition="before"
|
|
59
60
|
checked={Boolean(isCheckedControlled2)}
|
|
60
61
|
/>
|
|
62
|
+
<Checkbox label="A required checkbox with other required text" required="**" />
|
|
61
63
|
</View>
|
|
62
64
|
);
|
|
63
65
|
};
|
|
@@ -84,7 +86,7 @@ const HoverCheckbox = Checkbox.customize({
|
|
|
84
86
|
},
|
|
85
87
|
});
|
|
86
88
|
|
|
87
|
-
const
|
|
89
|
+
const TokenCheckbox: React.FunctionComponent = () => {
|
|
88
90
|
const [checkboxColor, setCheckboxColor] = React.useState('blue');
|
|
89
91
|
const [checkmarkColor, setCheckmarkColor] = React.useState('white');
|
|
90
92
|
|
|
@@ -145,19 +147,19 @@ const checkboxSections: TestSection[] = [
|
|
|
145
147
|
{
|
|
146
148
|
name: 'Basic Checkboxes',
|
|
147
149
|
testID: EXPERIMENTAL_CHECKBOX_TESTPAGE,
|
|
148
|
-
component:
|
|
150
|
+
component: BasicCheckbox,
|
|
149
151
|
},
|
|
150
152
|
{
|
|
151
153
|
name: 'Size Checkboxes',
|
|
152
|
-
component:
|
|
154
|
+
component: SizeCheckbox,
|
|
153
155
|
},
|
|
154
156
|
{
|
|
155
157
|
name: 'Other Implementations',
|
|
156
|
-
component:
|
|
158
|
+
component: OtherCheckbox,
|
|
157
159
|
},
|
|
158
160
|
{
|
|
159
161
|
name: 'Token Customized Checkboxes',
|
|
160
|
-
component:
|
|
162
|
+
component: TokenCheckbox,
|
|
161
163
|
},
|
|
162
164
|
{
|
|
163
165
|
name: 'E2E Testing for Experimental Checkbox',
|
|
@@ -121,7 +121,7 @@ export const Slider: React.FunctionComponent<ISliderProps> = (props: ISliderProp
|
|
|
121
121
|
setThumbLocation(initialThumbLocation);
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
-
}, [ref
|
|
124
|
+
}, [ref, initialValue, maximum, minimum]);
|
|
125
125
|
|
|
126
126
|
return (
|
|
127
127
|
<View style={[userStyle, styles.root]}>
|
|
@@ -16,7 +16,7 @@ import { Test, TestSection, PlatformStatus } from '../Test';
|
|
|
16
16
|
import { svgProps, fontProps, testImage } from '../Common/iconExamples';
|
|
17
17
|
import { E2EContextualMenuTest } from './E2EContextualMenuTest';
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const ContextualMenuMainTest: React.FunctionComponent = () => {
|
|
20
20
|
const stdBtnRef = React.useRef(null);
|
|
21
21
|
|
|
22
22
|
const [showContextualMenu, setShowContextualMenu] = React.useState(false);
|
|
@@ -114,7 +114,7 @@ const contextualMenu: React.FunctionComponent = () => {
|
|
|
114
114
|
);
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
const
|
|
117
|
+
const NestedContextualMenu: React.FunctionComponent = () => {
|
|
118
118
|
const stdBtnRef = React.useRef(null);
|
|
119
119
|
|
|
120
120
|
const [showContextualMenu, setShowContextualMenu] = React.useState(false);
|
|
@@ -472,11 +472,11 @@ const contextualMenuSections: TestSection[] = [
|
|
|
472
472
|
{
|
|
473
473
|
name: 'Standard ContextualMenu',
|
|
474
474
|
testID: CONTEXTUALMENU_TESTPAGE,
|
|
475
|
-
component:
|
|
475
|
+
component: ContextualMenuMainTest,
|
|
476
476
|
},
|
|
477
477
|
{
|
|
478
478
|
name: 'Nested ContextualMenu',
|
|
479
|
-
component:
|
|
479
|
+
component: NestedContextualMenu,
|
|
480
480
|
},
|
|
481
481
|
{
|
|
482
482
|
name: 'IconButton with Customized ContextualMenu',
|
|
@@ -30,7 +30,7 @@ const CustomizedExpander = Expander.customize({
|
|
|
30
30
|
chevronBorderThickness: 2,
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
const
|
|
33
|
+
const ExpanderMainTest: React.FunctionComponent = () => {
|
|
34
34
|
/** This test page has not yet been tested and does not currently build because
|
|
35
35
|
* the react-native-test-app does not yet support WinUI 2.6
|
|
36
36
|
* Filed issue in react-native-test-app: https://github.com/microsoft/react-native-test-app/issues/444
|
|
@@ -87,7 +87,7 @@ const expanderTest: React.FunctionComponent = () => {
|
|
|
87
87
|
);
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
const
|
|
90
|
+
const BasicExpander: React.FunctionComponent = () => {
|
|
91
91
|
return (
|
|
92
92
|
<Stack style={stackStyle}>
|
|
93
93
|
<View style={commonStyles.root}>
|
|
@@ -104,12 +104,12 @@ const expanderSections: TestSection[] = [
|
|
|
104
104
|
{
|
|
105
105
|
name: 'BaseExpander',
|
|
106
106
|
testID: EXPANDER_TESTPAGE,
|
|
107
|
-
component:
|
|
107
|
+
component: BasicExpander,
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
name: 'Expander',
|
|
111
111
|
testID: EXPANDER_TESTPAGE,
|
|
112
|
-
component:
|
|
112
|
+
component: ExpanderMainTest,
|
|
113
113
|
},
|
|
114
114
|
];
|
|
115
115
|
|
|
@@ -52,7 +52,7 @@ export const ComponentTwiddler: React.FunctionComponent<IComponentTwiddlerProps>
|
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
const
|
|
55
|
+
const BasicFocusTrapZone: React.FunctionComponent = () => {
|
|
56
56
|
const [state, setState] = React.useState({
|
|
57
57
|
useTrapZone: false,
|
|
58
58
|
renderTrapZone: true,
|
|
@@ -133,7 +133,7 @@ const focusTrapZoneSections: TestSection[] = [
|
|
|
133
133
|
{
|
|
134
134
|
name: 'Basic FocusTrapZone Usage',
|
|
135
135
|
testID: FOCUSTRAPZONE_TESTPAGE,
|
|
136
|
-
component:
|
|
136
|
+
component: BasicFocusTrapZone,
|
|
137
137
|
},
|
|
138
138
|
];
|
|
139
139
|
|