@fluentui-react-native/tester 0.58.1 → 0.58.4

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.
Files changed (90) hide show
  1. package/CHANGELOG.json +238 -1
  2. package/CHANGELOG.md +58 -2
  3. package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +6 -6
  4. package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
  5. package/lib/FluentTester/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
  6. package/lib/FluentTester/TestComponents/Callout/CalloutTest.js +7 -7
  7. package/lib/FluentTester/TestComponents/Callout/CalloutTest.js.map +1 -1
  8. package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js +6 -6
  9. package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +8 -8
  10. package/lib/FluentTester/TestComponents/Common/Slider.js +1 -1
  11. package/lib/FluentTester/TestComponents/Common/Slider.js.map +1 -1
  12. package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +4 -4
  13. package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
  14. package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js +4 -4
  15. package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
  16. package/lib/FluentTester/TestComponents/FocusTrapZone/FocusTrapZoneTest.js +2 -2
  17. package/lib/FluentTester/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
  18. package/lib/FluentTester/TestComponents/FocusZone/FocusZoneTest.js +24 -26
  19. package/lib/FluentTester/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
  20. package/lib/FluentTester/TestComponents/Icon/IconTest.js +2 -2
  21. package/lib/FluentTester/TestComponents/Link/LinkTest.js +2 -2
  22. package/lib/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js +2 -2
  23. package/lib/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js.map +1 -1
  24. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +1 -1
  25. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
  26. package/lib/FluentTester/TestComponents/Pressable/PressableTest.js +2 -2
  27. package/lib/FluentTester/TestComponents/Pressable/PressableTest.js.map +1 -1
  28. package/lib/FluentTester/TestComponents/RadioGroup/RadioGroupTest.js +2 -2
  29. package/lib/FluentTester/TestComponents/Separator/SeparatorTest.js +2 -2
  30. package/lib/FluentTester/TestComponents/Separator/SeparatorTest.js.map +1 -1
  31. package/lib/FluentTester/TestComponents/Svg/SvgTest.js +20 -20
  32. package/lib/FluentTester/TestComponents/Svg/SvgTest.js.map +1 -1
  33. package/lib/FluentTester/TestComponents/Tabs/TabsTest.js +18 -18
  34. package/lib/FluentTester/TestComponents/Tabs/TabsTest.js.map +1 -1
  35. package/lib/FluentTester/TestComponents/TabsExperimental/TabsTest.js +16 -16
  36. package/lib/FluentTester/TestComponents/TabsExperimental/TabsTest.js.map +1 -1
  37. package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +6 -6
  38. package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
  39. package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
  40. package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.js +7 -7
  41. package/lib-commonjs/FluentTester/TestComponents/Callout/CalloutTest.js.map +1 -1
  42. package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js +6 -6
  43. package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +8 -8
  44. package/lib-commonjs/FluentTester/TestComponents/Common/Slider.js +1 -1
  45. package/lib-commonjs/FluentTester/TestComponents/Common/Slider.js.map +1 -1
  46. package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +4 -4
  47. package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
  48. package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js +4 -4
  49. package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
  50. package/lib-commonjs/FluentTester/TestComponents/FocusTrapZone/FocusTrapZoneTest.js +2 -2
  51. package/lib-commonjs/FluentTester/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
  52. package/lib-commonjs/FluentTester/TestComponents/FocusZone/FocusZoneTest.js +24 -26
  53. package/lib-commonjs/FluentTester/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
  54. package/lib-commonjs/FluentTester/TestComponents/Icon/IconTest.js +2 -2
  55. package/lib-commonjs/FluentTester/TestComponents/Link/LinkTest.js +2 -2
  56. package/lib-commonjs/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js +2 -2
  57. package/lib-commonjs/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.js.map +1 -1
  58. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +1 -1
  59. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
  60. package/lib-commonjs/FluentTester/TestComponents/Pressable/PressableTest.js +2 -2
  61. package/lib-commonjs/FluentTester/TestComponents/Pressable/PressableTest.js.map +1 -1
  62. package/lib-commonjs/FluentTester/TestComponents/RadioGroup/RadioGroupTest.js +2 -2
  63. package/lib-commonjs/FluentTester/TestComponents/Separator/SeparatorTest.js +2 -2
  64. package/lib-commonjs/FluentTester/TestComponents/Separator/SeparatorTest.js.map +1 -1
  65. package/lib-commonjs/FluentTester/TestComponents/Svg/SvgTest.js +20 -20
  66. package/lib-commonjs/FluentTester/TestComponents/Svg/SvgTest.js.map +1 -1
  67. package/lib-commonjs/FluentTester/TestComponents/Tabs/TabsTest.js +18 -18
  68. package/lib-commonjs/FluentTester/TestComponents/Tabs/TabsTest.js.map +1 -1
  69. package/lib-commonjs/FluentTester/TestComponents/TabsExperimental/TabsTest.js +16 -16
  70. package/lib-commonjs/FluentTester/TestComponents/TabsExperimental/TabsTest.js.map +1 -1
  71. package/package.json +18 -18
  72. package/src/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.tsx +6 -6
  73. package/src/FluentTester/TestComponents/Callout/CalloutTest.tsx +34 -28
  74. package/src/FluentTester/TestComponents/Checkbox/CheckboxTest.tsx +6 -6
  75. package/src/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.tsx +8 -8
  76. package/src/FluentTester/TestComponents/Common/Slider.tsx +1 -1
  77. package/src/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.tsx +4 -4
  78. package/src/FluentTester/TestComponents/Expander/ExpanderTest.tsx +4 -4
  79. package/src/FluentTester/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx +2 -2
  80. package/src/FluentTester/TestComponents/FocusZone/FocusZoneTest.tsx +27 -25
  81. package/src/FluentTester/TestComponents/Icon/IconTest.tsx +2 -2
  82. package/src/FluentTester/TestComponents/Link/LinkTest.tsx +2 -2
  83. package/src/FluentTester/TestComponents/NativeDatePicker/NativeDatePickerTest.tsx +2 -2
  84. package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx +1 -1
  85. package/src/FluentTester/TestComponents/Pressable/PressableTest.tsx +2 -2
  86. package/src/FluentTester/TestComponents/RadioGroup/RadioGroupTest.tsx +2 -2
  87. package/src/FluentTester/TestComponents/Separator/SeparatorTest.tsx +2 -2
  88. package/src/FluentTester/TestComponents/Svg/SvgTest.tsx +20 -20
  89. package/src/FluentTester/TestComponents/Tabs/TabsTest.tsx +18 -18
  90. package/src/FluentTester/TestComponents/TabsExperimental/TabsTest.tsx +16 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/tester",
3
- "version": "0.58.1",
3
+ "version": "0.58.4",
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>",
@@ -27,29 +27,29 @@
27
27
  "dependencies": {
28
28
  "@fluentui-react-native/android-theme": ">=0.5.5 <1.0.0",
29
29
  "@fluentui-react-native/apple-theme": ">=0.9.11 <1.0.0",
30
- "@fluentui-react-native/badge": ">=0.0.16 <1.0.0",
31
- "@fluentui-react-native/button": ">=0.22.6 <1.0.0",
30
+ "@fluentui-react-native/badge": ">=0.0.18 <1.0.0",
31
+ "@fluentui-react-native/button": ">=0.22.8 <1.0.0",
32
32
  "@fluentui-react-native/default-theme": ">=0.9.11 <1.0.0",
33
- "@fluentui-react-native/experimental-activity-indicator": ">=0.5.14 <1.0.0",
34
- "@fluentui-react-native/experimental-avatar": ">=0.14.6 <1.0.0",
35
- "@fluentui-react-native/experimental-button": "0.15.6",
36
- "@fluentui-react-native/experimental-checkbox": "0.10.0",
33
+ "@fluentui-react-native/experimental-activity-indicator": ">=0.5.16 <1.0.0",
34
+ "@fluentui-react-native/experimental-avatar": ">=0.14.8 <1.0.0",
35
+ "@fluentui-react-native/experimental-button": "0.15.8",
36
+ "@fluentui-react-native/experimental-checkbox": "0.10.3",
37
37
  "@fluentui-react-native/experimental-native-date-picker": ">=0.4.1 <1.0.0",
38
- "@fluentui-react-native/experimental-expander": "0.3.15",
39
- "@fluentui-react-native/experimental-menu-button": ">=0.3.15 <1.0.0",
40
- "@fluentui-react-native/experimental-shimmer": "0.6.18",
41
- "@fluentui-react-native/experimental-tabs": "0.4.25",
42
- "@fluentui-react-native/experimental-text": ">=0.7.15 <1.0.0",
43
- "@fluentui-react-native/framework": ">=0.7.15 <1.0.0",
44
- "@fluentui-react-native/icon": "0.11.10",
45
- "@fluentui-react-native/interactive-hooks": ">=0.14.1 <1.0.0",
46
- "@fluentui-react-native/stack": ">=0.6.15 <1.0.0",
38
+ "@fluentui-react-native/experimental-expander": "0.3.17",
39
+ "@fluentui-react-native/experimental-menu-button": ">=0.3.17 <1.0.0",
40
+ "@fluentui-react-native/experimental-shimmer": "0.6.20",
41
+ "@fluentui-react-native/experimental-tabs": "0.4.27",
42
+ "@fluentui-react-native/experimental-text": ">=0.7.17 <1.0.0",
43
+ "@fluentui-react-native/framework": ">=0.7.17 <1.0.0",
44
+ "@fluentui-react-native/icon": "0.11.12",
45
+ "@fluentui-react-native/interactive-hooks": ">=0.14.3 <1.0.0",
46
+ "@fluentui-react-native/stack": ">=0.6.17 <1.0.0",
47
47
  "@fluentui-react-native/theme": ">=0.6.5 <1.0.0",
48
48
  "@fluentui-react-native/theme-types": ">=0.14.0 <1.0.0",
49
49
  "@fluentui-react-native/themed-stylesheet": "^1.3.2",
50
50
  "@fluentui-react-native/theming-utils": ">=0.9.0 <1.0.0",
51
- "@fluentui-react-native/win32-theme": ">=0.14.12 <1.0.0",
52
- "@fluentui/react-native": ">=0.27.36 <1.0.0",
51
+ "@fluentui-react-native/win32-theme": ">=0.14.13 <1.0.0",
52
+ "@fluentui/react-native": ">=0.27.38 <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 basicActivityIndicator: React.FunctionComponent = () => {
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 activityIndicatorTest: React.FunctionComponent = () => {
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 customizedActivityIndicatorTest: React.FunctionComponent = () => {
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: basicActivityIndicator,
73
+ component: BasicActivityIndicator,
74
74
  },
75
75
  {
76
76
  name: 'ActivityIndicator',
77
77
  testID: ACTIVITY_INDICATOR_TESTPAGE,
78
- component: activityIndicatorTest,
78
+ component: ActivityIndicatorMainTest,
79
79
  },
80
80
  {
81
81
  name: 'Customized ActivityIndicator',
82
82
  testID: ACTIVITY_INDICATOR_TESTPAGE,
83
- component: customizedActivityIndicatorTest,
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 standardCallout: React.FunctionComponent = () => {
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((value) => {
27
- setPreventDismissOnKeyDown(value);
28
- if (value) {
29
- setDismissBehaviors(calloutDismissBehaviors.concat('preventDismissOnKeyDown'));
30
- } else {
31
- const newDismissBehaviors = calloutDismissBehaviors.filter((value) => {
32
- value != 'preventDismissOnKeyDown';
33
- });
34
- setDismissBehaviors(newDismissBehaviors);
35
- }
36
- }, []);
37
-
38
- const onPreventDismissOnClickOutsideChange = React.useCallback((value) => {
39
- setPreventDismissOnClickOutside(value);
40
- if (value) {
41
- setDismissBehaviors(calloutDismissBehaviors.concat('preventDismissOnClickOutside'));
42
- } else {
43
- const newDismissBehaviors = calloutDismissBehaviors.filter((value) => {
44
- value != 'preventDismissOnClickOutside';
45
- });
46
- setDismissBehaviors(newDismissBehaviors);
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, scrollviewContents]);
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 customCallout: React.FunctionComponent = () => {
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: standardCallout,
313
+ component: StandardCallout,
308
314
  },
309
315
  {
310
316
  name: 'Customized Usage',
311
- component: customCallout,
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 basicCheckbox: React.FunctionComponent = () => {
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 otherCheckbox: React.FunctionComponent = () => {
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 tokenCheckbox: React.FunctionComponent = () => {
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: basicCheckbox,
151
+ component: BasicCheckbox,
152
152
  },
153
153
  {
154
154
  name: 'Other Implementations',
155
- component: otherCheckbox,
155
+ component: OtherCheckbox,
156
156
  },
157
157
  {
158
158
  name: 'Token Customized Checkboxes',
159
- component: tokenCheckbox,
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 basicCheckbox: React.FunctionComponent = () => {
15
+ const BasicCheckbox: React.FunctionComponent = () => {
16
16
  return (
17
17
  <View>
18
18
  <Checkbox label="Unchecked checkbox (undefined)" onChange={onChangeUncontrolled} />
@@ -28,7 +28,7 @@ const basicCheckbox: React.FunctionComponent = () => {
28
28
  );
29
29
  };
30
30
 
31
- const sizeCheckbox: React.FunctionComponent = () => {
31
+ const SizeCheckbox: React.FunctionComponent = () => {
32
32
  return (
33
33
  <View>
34
34
  <Checkbox tooltip="Medium checkbox" size="medium" />
@@ -39,7 +39,7 @@ const sizeCheckbox: React.FunctionComponent = () => {
39
39
  );
40
40
  };
41
41
 
42
- const otherCheckbox: React.FunctionComponent = () => {
42
+ const OtherCheckbox: React.FunctionComponent = () => {
43
43
  const [isCheckedControlled1, setCheckedControlled1] = React.useState(false);
44
44
  const onChangeControlled1 = React.useCallback((checked) => {
45
45
  setCheckedControlled1(checked);
@@ -86,7 +86,7 @@ const HoverCheckbox = Checkbox.customize({
86
86
  },
87
87
  });
88
88
 
89
- const tokenCheckbox: React.FunctionComponent = () => {
89
+ const TokenCheckbox: React.FunctionComponent = () => {
90
90
  const [checkboxColor, setCheckboxColor] = React.useState('blue');
91
91
  const [checkmarkColor, setCheckmarkColor] = React.useState('white');
92
92
 
@@ -147,19 +147,19 @@ const checkboxSections: TestSection[] = [
147
147
  {
148
148
  name: 'Basic Checkboxes',
149
149
  testID: EXPERIMENTAL_CHECKBOX_TESTPAGE,
150
- component: basicCheckbox,
150
+ component: BasicCheckbox,
151
151
  },
152
152
  {
153
153
  name: 'Size Checkboxes',
154
- component: sizeCheckbox,
154
+ component: SizeCheckbox,
155
155
  },
156
156
  {
157
157
  name: 'Other Implementations',
158
- component: otherCheckbox,
158
+ component: OtherCheckbox,
159
159
  },
160
160
  {
161
161
  name: 'Token Customized Checkboxes',
162
- component: tokenCheckbox,
162
+ component: TokenCheckbox,
163
163
  },
164
164
  {
165
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.current, initialValue, maximum, minimum]);
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 contextualMenu: React.FunctionComponent = () => {
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 nestedContextualMenu: React.FunctionComponent = () => {
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: contextualMenu,
475
+ component: ContextualMenuMainTest,
476
476
  },
477
477
  {
478
478
  name: 'Nested ContextualMenu',
479
- component: nestedContextualMenu,
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 expanderTest: React.FunctionComponent = () => {
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 basicExpander: React.FunctionComponent = () => {
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: basicExpander,
107
+ component: BasicExpander,
108
108
  },
109
109
  {
110
110
  name: 'Expander',
111
111
  testID: EXPANDER_TESTPAGE,
112
- component: expanderTest,
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 basicFocusTrapZone: React.FunctionComponent = () => {
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: basicFocusTrapZone,
136
+ component: BasicFocusTrapZone,
137
137
  },
138
138
  ];
139
139
 
@@ -7,7 +7,7 @@ import { focusZoneTestStyles, stackStyleFocusZone } from './styles';
7
7
  import { commonTestStyles } from '../Common/styles';
8
8
  import { Stack } from '@fluentui-react-native/stack';
9
9
 
10
- const directionalFocusZone: React.FunctionComponent = () => {
10
+ const DirectionalFocusZone: React.FunctionComponent = () => {
11
11
  return (
12
12
  <View>
13
13
  <Button content="Outside FocusZone" />
@@ -55,7 +55,7 @@ const directionalFocusZone: React.FunctionComponent = () => {
55
55
  );
56
56
  };
57
57
 
58
- const commonUsageFocusZone: React.FunctionComponent = () => {
58
+ const CommonUsageFocusZone: React.FunctionComponent = () => {
59
59
  return (
60
60
  <View>
61
61
  <Button content="Outside FocusZone" />
@@ -79,42 +79,44 @@ const commonUsageFocusZone: React.FunctionComponent = () => {
79
79
  );
80
80
  };
81
81
 
82
- const navigation2DFocusZone: React.FunctionComponent = () => {
82
+ const Navigation2DFocusZone: React.FunctionComponent = () => {
83
83
  const buttonRefs = [];
84
- const onClicks = [];
85
84
  const [defaultTabbableElementIndex, setDefaultTabbableElementIndex] = React.useState<number>(5);
85
+ const onClick = React.useCallback(
86
+ (i: number) => {
87
+ setDefaultTabbableElementIndex(i);
88
+ },
89
+ [setDefaultTabbableElementIndex],
90
+ );
86
91
 
87
92
  for (let i = 0; i <= 9; i++) {
88
- buttonRefs.push(i == 0 ? undefined : React.useRef<View>(null));
89
- onClicks.push(
90
- React.useCallback(() => {
91
- setDefaultTabbableElementIndex(i);
92
- }, [setDefaultTabbableElementIndex]),
93
- );
93
+ // eslint-disable-next-line react-hooks/rules-of-hooks
94
+ const ref = React.useRef<View>(null);
95
+ buttonRefs.push(i == 0 ? undefined : ref);
94
96
  }
95
97
 
96
98
  return (
97
99
  <View>
98
100
  <View>
99
101
  <Button content="Outside FocusZone" />
100
- <Button content="Clear default tabble element" onClick={onClicks[0]} />
102
+ <Button content="Clear default tabble element" onClick={() => onClick(0)} />
101
103
  </View>
102
104
  <FocusZone use2DNavigation={true} defaultTabbableElement={buttonRefs[defaultTabbableElementIndex]} isCircularNavigation={true}>
103
105
  <View style={focusZoneTestStyles.focusZoneContainer}>
104
106
  <View style={focusZoneTestStyles.focusZoneViewStyle}>
105
- <Button content="#1" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[1]} onClick={onClicks[1]} />
106
- <Button content="#2" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[2]} onClick={onClicks[2]} />
107
- <Button content="#3" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[3]} onClick={onClicks[3]} />
107
+ <Button content="#1" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[1]} onClick={() => onClick(1)} />
108
+ <Button content="#2" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[2]} onClick={() => onClick(2)} />
109
+ <Button content="#3" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[3]} onClick={() => onClick(3)} />
108
110
  </View>
109
111
  <View style={focusZoneTestStyles.focusZoneViewStyle}>
110
- <Button content="#4" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[4]} onClick={onClicks[4]} />
111
- <Button content="#5" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[5]} onClick={onClicks[5]} />
112
- <Button content="#6" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[6]} onClick={onClicks[6]} />
112
+ <Button content="#4" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[4]} onClick={() => onClick(4)} />
113
+ <Button content="#5" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[5]} onClick={() => onClick(5)} />
114
+ <Button content="#6" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[6]} onClick={() => onClick(6)} />
113
115
  </View>
114
116
  <View style={focusZoneTestStyles.focusZoneViewStyle}>
115
- <Button content="#7" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[7]} onClick={onClicks[7]} />
116
- <Button content="#8" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[8]} onClick={onClicks[8]} />
117
- <Button content="#9" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[9]} onClick={onClicks[9]} />
117
+ <Button content="#7" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[7]} onClick={() => onClick(7)} />
118
+ <Button content="#8" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[8]} onClick={() => onClick(8)} />
119
+ <Button content="#9" style={focusZoneTestStyles.focusZoneButton} componentRef={buttonRefs[9]} onClick={() => onClick(9)} />
118
120
  </View>
119
121
  </View>
120
122
  </FocusZone>
@@ -143,7 +145,7 @@ function SwitchWithLabel(props: ISwitchWithLabelProps): React.ReactElement {
143
145
 
144
146
  const focusZoneDirectionStrings = ['Bidirectional', 'Horizontal', 'Vertical', 'None'];
145
147
 
146
- const customizableFocusZone: React.FunctionComponent = () => {
148
+ const CustomizableFocusZone: React.FunctionComponent = () => {
147
149
  const [is2DNav, set2dNav] = React.useState(false);
148
150
  const [isDisabled, setDisabled] = React.useState(false);
149
151
  const [isCircularNav, setIsCircularNav] = React.useState(false);
@@ -223,19 +225,19 @@ const focusZoneSections: TestSection[] = [
223
225
  {
224
226
  name: 'Directional FocusZone Usage',
225
227
  testID: FOCUSZONE_TESTPAGE,
226
- component: directionalFocusZone,
228
+ component: DirectionalFocusZone,
227
229
  },
228
230
  {
229
231
  name: 'Common FocusZone Usage',
230
- component: commonUsageFocusZone,
232
+ component: CommonUsageFocusZone,
231
233
  },
232
234
  {
233
235
  name: '2D Navigation with Default Tabbable Element (#5) FocusZone Usage',
234
- component: navigation2DFocusZone,
236
+ component: Navigation2DFocusZone,
235
237
  },
236
238
  {
237
239
  name: 'Customizable FocusZone',
238
- component: customizableFocusZone,
240
+ component: CustomizableFocusZone,
239
241
  },
240
242
  ];
241
243
 
@@ -11,7 +11,7 @@ const testImage = require('./../../../../assets/testicon.png');
11
11
  const testTtf = require('./../../../../assets/Font_Awesome_900.otf');
12
12
  import TestSvg from './assets/test.svg';
13
13
 
14
- const icons: React.FunctionComponent = () => {
14
+ const Icons: React.FunctionComponent = () => {
15
15
  const fontCustomFontProps: FontIconProps = {
16
16
  fontFamily: 'Font Awesome 5 Free',
17
17
  fontSrcFile: testTtf,
@@ -94,7 +94,7 @@ const iconSections: TestSection[] = [
94
94
  {
95
95
  name: 'Icon',
96
96
  testID: ICON_TESTPAGE,
97
- component: icons,
97
+ component: Icons,
98
98
  },
99
99
  {
100
100
  name: 'Icon for E2E Testing',
@@ -7,7 +7,7 @@ import { LINK_TESTPAGE } from './consts';
7
7
  import { Test, TestSection, PlatformStatus } from '../Test';
8
8
  import { LinkE2ETest } from './E2ELinkTest';
9
9
 
10
- const links: React.FunctionComponent = () => {
10
+ const Links: React.FunctionComponent = () => {
11
11
  const doPress = (): void => {
12
12
  Alert.alert('Alert.', 'You have been alerted.');
13
13
  };
@@ -24,7 +24,7 @@ const linkSections: TestSection[] = [
24
24
  {
25
25
  name: 'Navigation and Alert',
26
26
  testID: LINK_TESTPAGE,
27
- component: links,
27
+ component: Links,
28
28
  },
29
29
  {
30
30
  name: 'Link E2E Test',
@@ -7,7 +7,7 @@ import { Stack } from '@fluentui-react-native/stack';
7
7
  import { stackStyle } from '../Common/styles';
8
8
  import { Text } from '@fluentui/react-native';
9
9
 
10
- const nativeDatePicker: React.FunctionComponent = () => {
10
+ const NativeDatePickerMainTest: React.FunctionComponent = () => {
11
11
  const [startDate, setStartDate] = React.useState<Date>(new Date());
12
12
  const [endDate, setEndDate] = React.useState<Date>(null);
13
13
 
@@ -109,7 +109,7 @@ const nativeDatePickerSections: TestSection[] = [
109
109
  {
110
110
  name: 'Native Date Picker',
111
111
  testID: NATIVEDATEPICKER_TESTPAGE,
112
- component: nativeDatePicker,
112
+ component: NativeDatePickerMainTest,
113
113
  },
114
114
  ];
115
115
 
@@ -73,7 +73,7 @@ export const CustomizeUsage: React.FunctionComponent = () => {
73
73
  iconStrokeWidth: iconStrokeWidth,
74
74
  };
75
75
  return PersonaCoin.customize({ tokens });
76
- }, [coinColor, textColor, showRings, coinSize, iconSize, iconStrokeWidth]);
76
+ }, [coinColor, textColor, coinSize, iconSize, iconStrokeWidth]);
77
77
 
78
78
  return (
79
79
  <View style={{ flexDirection: 'column', padding: 10, backgroundColor: showColoredBackground ? 'gray' : 'transparent' }}>
@@ -92,7 +92,7 @@ const PressComponent: React.FunctionComponent<ViewProps> = (props: ViewProps) =>
92
92
  );
93
93
  };
94
94
 
95
- const pressable: React.FunctionComponent = () => {
95
+ const PressableMainTest: React.FunctionComponent = () => {
96
96
  const [hoverProps, hoverState] = useHoverState({});
97
97
 
98
98
  return (
@@ -126,7 +126,7 @@ const pressableSections: TestSection[] = [
126
126
  {
127
127
  name: 'Pressable Components',
128
128
  testID: PRESSABLE_TESTPAGE,
129
- component: pressable,
129
+ component: PressableMainTest,
130
130
  },
131
131
  ];
132
132
 
@@ -5,7 +5,7 @@ import { RADIOGROUP_TESTPAGE } from './consts';
5
5
  import { Test, TestSection, PlatformStatus } from '../Test';
6
6
  import { E2ERadioGroupTest } from './RadioGroupE2ETest';
7
7
 
8
- const basicRadioGroup: React.FunctionComponent = () => {
8
+ const BasicRadioGroup: React.FunctionComponent = () => {
9
9
  // Client's example onChange function
10
10
  const onChange = (key: string) => {
11
11
  console.log(key);
@@ -56,7 +56,7 @@ const radioGroupSections: TestSection[] = [
56
56
  {
57
57
  name: 'Basic RadioGroup Usage',
58
58
  testID: RADIOGROUP_TESTPAGE,
59
- component: basicRadioGroup,
59
+ component: BasicRadioGroup,
60
60
  },
61
61
  {
62
62
  name: 'RadioGroup for E2E Testing',
@@ -9,7 +9,7 @@ import { Test, TestSection, PlatformStatus } from '../Test';
9
9
  const BlueSeparator = Separator.customize({ color: 'blue' });
10
10
  const RedSeparator = Separator.customize({ color: 'red' });
11
11
 
12
- const separator: React.FunctionComponent = () => {
12
+ const SeparatorMainTest: React.FunctionComponent = () => {
13
13
  return (
14
14
  <Stack style={stackStyle} gap={5}>
15
15
  <Stack gap={4} style={separatorStackStyle}>
@@ -31,7 +31,7 @@ const separatorSections: TestSection[] = [
31
31
  {
32
32
  name: 'Basic Button',
33
33
  testID: SEPARATOR_TESTPAGE,
34
- component: separator,
34
+ component: SeparatorMainTest,
35
35
  },
36
36
  ];
37
37