@fluentui-react-native/tester 0.90.0 → 0.90.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.
Files changed (134) hide show
  1. package/CHANGELOG.json +64 -1
  2. package/CHANGELOG.md +29 -2
  3. package/lib/FluentTester.js +6 -6
  4. package/lib/FluentTester.js.map +1 -1
  5. package/lib/TestComponents/Avatar/BasicAvatar.js +3 -3
  6. package/lib/TestComponents/Avatar/BasicAvatar.js.map +1 -1
  7. package/lib/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
  8. package/lib/TestComponents/Avatar/CustomizedAvatar.js +14 -8
  9. package/lib/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
  10. package/lib/TestComponents/Badge/BasicBadgeTest.d.ts.map +1 -1
  11. package/lib/TestComponents/Badge/BasicBadgeTest.js +1 -2
  12. package/lib/TestComponents/Badge/BasicBadgeTest.js.map +1 -1
  13. package/lib/TestComponents/Button/ButtonIconTestSection.js +2 -2
  14. package/lib/TestComponents/Button/ButtonIconTestSection.js.map +1 -1
  15. package/lib/TestComponents/Button/ButtonShapeTestSection.js +2 -2
  16. package/lib/TestComponents/Button/ButtonShapeTestSection.js.map +1 -1
  17. package/lib/TestComponents/Button/ButtonSizeTestSection.js +2 -2
  18. package/lib/TestComponents/Button/ButtonSizeTestSection.js.map +1 -1
  19. package/lib/TestComponents/Button/ButtonVariantTestSection.js +2 -2
  20. package/lib/TestComponents/Button/ButtonVariantTestSection.js.map +1 -1
  21. package/lib/TestComponents/Button/ToggleButtonTestSection.d.ts.map +1 -1
  22. package/lib/TestComponents/Button/ToggleButtonTestSection.js +6 -7
  23. package/lib/TestComponents/Button/ToggleButtonTestSection.js.map +1 -1
  24. package/lib/TestComponents/Callout/CalloutTest.js +1 -1
  25. package/lib/TestComponents/Callout/CalloutTest.js.map +1 -1
  26. package/lib/TestComponents/Checkbox/CheckboxTest.d.ts.map +1 -1
  27. package/lib/TestComponents/Checkbox/CheckboxTest.js +8 -5
  28. package/lib/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
  29. package/lib/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
  30. package/lib/TestComponents/CheckboxExperimental/CheckboxTest.js +8 -5
  31. package/lib/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
  32. package/lib/TestComponents/Common/styles.d.ts +10 -0
  33. package/lib/TestComponents/Common/styles.d.ts.map +1 -1
  34. package/lib/TestComponents/Common/styles.js +3 -0
  35. package/lib/TestComponents/Common/styles.js.map +1 -1
  36. package/lib/TestComponents/Menu/MenuTest.d.ts.map +1 -1
  37. package/lib/TestComponents/Menu/MenuTest.js +9 -4
  38. package/lib/TestComponents/Menu/MenuTest.js.map +1 -1
  39. package/lib/TestComponents/Notification/NotificationTest.js +2 -2
  40. package/lib/TestComponents/Notification/NotificationTest.js.map +1 -1
  41. package/lib/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
  42. package/lib/TestComponents/Persona/CustomizeUsage.js +8 -5
  43. package/lib/TestComponents/Persona/CustomizeUsage.js.map +1 -1
  44. package/lib/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
  45. package/lib/TestComponents/PersonaCoin/CustomizeUsage.js +11 -8
  46. package/lib/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
  47. package/lib/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
  48. package/lib/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +3 -2
  49. package/lib/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
  50. package/lib/TestComponents/Test.js +9 -9
  51. package/lib/TestComponents/Test.js.map +1 -1
  52. package/lib/TestComponents/Theme/ThemeTest.d.ts.map +1 -1
  53. package/lib/TestComponents/Theme/ThemeTest.js +11 -12
  54. package/lib/TestComponents/Theme/ThemeTest.js.map +1 -1
  55. package/lib/TestComponents/Tokens/TokenTest.d.ts.map +1 -1
  56. package/lib/TestComponents/Tokens/TokenTest.js +8 -10
  57. package/lib/TestComponents/Tokens/TokenTest.js.map +1 -1
  58. package/lib-commonjs/FluentTester.js +5 -5
  59. package/lib-commonjs/FluentTester.js.map +1 -1
  60. package/lib-commonjs/TestComponents/Avatar/BasicAvatar.js +2 -2
  61. package/lib-commonjs/TestComponents/Avatar/BasicAvatar.js.map +1 -1
  62. package/lib-commonjs/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
  63. package/lib-commonjs/TestComponents/Avatar/CustomizedAvatar.js +13 -7
  64. package/lib-commonjs/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
  65. package/lib-commonjs/TestComponents/Badge/BasicBadgeTest.d.ts.map +1 -1
  66. package/lib-commonjs/TestComponents/Badge/BasicBadgeTest.js +1 -2
  67. package/lib-commonjs/TestComponents/Badge/BasicBadgeTest.js.map +1 -1
  68. package/lib-commonjs/TestComponents/Button/ButtonIconTestSection.js +1 -1
  69. package/lib-commonjs/TestComponents/Button/ButtonIconTestSection.js.map +1 -1
  70. package/lib-commonjs/TestComponents/Button/ButtonShapeTestSection.js +1 -1
  71. package/lib-commonjs/TestComponents/Button/ButtonShapeTestSection.js.map +1 -1
  72. package/lib-commonjs/TestComponents/Button/ButtonSizeTestSection.js +1 -1
  73. package/lib-commonjs/TestComponents/Button/ButtonSizeTestSection.js.map +1 -1
  74. package/lib-commonjs/TestComponents/Button/ButtonVariantTestSection.js +1 -1
  75. package/lib-commonjs/TestComponents/Button/ButtonVariantTestSection.js.map +1 -1
  76. package/lib-commonjs/TestComponents/Button/ToggleButtonTestSection.d.ts.map +1 -1
  77. package/lib-commonjs/TestComponents/Button/ToggleButtonTestSection.js +4 -6
  78. package/lib-commonjs/TestComponents/Button/ToggleButtonTestSection.js.map +1 -1
  79. package/lib-commonjs/TestComponents/Callout/CalloutTest.js +1 -1
  80. package/lib-commonjs/TestComponents/Callout/CalloutTest.js.map +1 -1
  81. package/lib-commonjs/TestComponents/Checkbox/CheckboxTest.d.ts.map +1 -1
  82. package/lib-commonjs/TestComponents/Checkbox/CheckboxTest.js +7 -5
  83. package/lib-commonjs/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
  84. package/lib-commonjs/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
  85. package/lib-commonjs/TestComponents/CheckboxExperimental/CheckboxTest.js +7 -5
  86. package/lib-commonjs/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
  87. package/lib-commonjs/TestComponents/Common/styles.d.ts +10 -0
  88. package/lib-commonjs/TestComponents/Common/styles.d.ts.map +1 -1
  89. package/lib-commonjs/TestComponents/Common/styles.js +4 -1
  90. package/lib-commonjs/TestComponents/Common/styles.js.map +1 -1
  91. package/lib-commonjs/TestComponents/Menu/MenuTest.d.ts.map +1 -1
  92. package/lib-commonjs/TestComponents/Menu/MenuTest.js +8 -4
  93. package/lib-commonjs/TestComponents/Menu/MenuTest.js.map +1 -1
  94. package/lib-commonjs/TestComponents/Notification/NotificationTest.js +2 -2
  95. package/lib-commonjs/TestComponents/Notification/NotificationTest.js.map +1 -1
  96. package/lib-commonjs/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
  97. package/lib-commonjs/TestComponents/Persona/CustomizeUsage.js +7 -5
  98. package/lib-commonjs/TestComponents/Persona/CustomizeUsage.js.map +1 -1
  99. package/lib-commonjs/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
  100. package/lib-commonjs/TestComponents/PersonaCoin/CustomizeUsage.js +10 -8
  101. package/lib-commonjs/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
  102. package/lib-commonjs/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
  103. package/lib-commonjs/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +2 -1
  104. package/lib-commonjs/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
  105. package/lib-commonjs/TestComponents/Test.js +9 -9
  106. package/lib-commonjs/TestComponents/Test.js.map +1 -1
  107. package/lib-commonjs/TestComponents/Theme/ThemeTest.d.ts.map +1 -1
  108. package/lib-commonjs/TestComponents/Theme/ThemeTest.js +10 -12
  109. package/lib-commonjs/TestComponents/Theme/ThemeTest.js.map +1 -1
  110. package/lib-commonjs/TestComponents/Tokens/TokenTest.d.ts.map +1 -1
  111. package/lib-commonjs/TestComponents/Tokens/TokenTest.js +8 -10
  112. package/lib-commonjs/TestComponents/Tokens/TokenTest.js.map +1 -1
  113. package/package.json +5 -5
  114. package/src/FluentTester.tsx +6 -6
  115. package/src/TestComponents/Avatar/BasicAvatar.tsx +2 -2
  116. package/src/TestComponents/Avatar/CustomizedAvatar.tsx +15 -8
  117. package/src/TestComponents/Badge/BasicBadgeTest.tsx +2 -3
  118. package/src/TestComponents/Button/ButtonIconTestSection.tsx +2 -2
  119. package/src/TestComponents/Button/ButtonShapeTestSection.tsx +2 -2
  120. package/src/TestComponents/Button/ButtonSizeTestSection.tsx +2 -2
  121. package/src/TestComponents/Button/ButtonVariantTestSection.tsx +2 -2
  122. package/src/TestComponents/Button/ToggleButtonTestSection.tsx +6 -5
  123. package/src/TestComponents/Callout/CalloutTest.tsx +1 -1
  124. package/src/TestComponents/Checkbox/CheckboxTest.tsx +11 -7
  125. package/src/TestComponents/CheckboxExperimental/CheckboxTest.tsx +10 -7
  126. package/src/TestComponents/Common/styles.ts +5 -0
  127. package/src/TestComponents/Menu/MenuTest.tsx +10 -4
  128. package/src/TestComponents/Notification/NotificationTest.tsx +2 -2
  129. package/src/TestComponents/Persona/CustomizeUsage.tsx +10 -7
  130. package/src/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx +4 -9
  131. package/src/TestComponents/PersonaCoin/CustomizeUsage.tsx +13 -10
  132. package/src/TestComponents/Test.tsx +9 -9
  133. package/src/TestComponents/Theme/ThemeTest.tsx +15 -11
  134. package/src/TestComponents/Tokens/TokenTest.tsx +8 -9
@@ -16,11 +16,6 @@ const getThemedStyles = themedStyleSheet((theme: Theme) => {
16
16
  borderWidth: 2,
17
17
  borderColor: theme.colors.bodyText,
18
18
  },
19
- stackStyle: {
20
- borderWidth: 2,
21
- padding: 12,
22
- margin: 8,
23
- },
24
19
  };
25
20
  });
26
21
 
@@ -30,18 +25,28 @@ const styles = StyleSheet.create({
30
25
  alignItems: 'center',
31
26
  marginVertical: 5,
32
27
  },
28
+ panel: {
29
+ ...commonTestStyles.view,
30
+ borderWidth: 2,
31
+ padding: 12,
32
+ margin: 8,
33
+ },
33
34
  pickerContainer: {
34
35
  flexDirection: 'row',
35
36
  justifyContent: 'space-evenly',
36
37
  },
38
+ stackStyle: {
39
+ borderWidth: 2,
40
+ padding: 12,
41
+ margin: 8,
42
+ },
37
43
  });
38
44
 
39
45
  const Panel: React.FunctionComponent = () => {
40
46
  const [disabled, setDisabled] = React.useState(false);
41
47
  const onClick = React.useCallback(() => setDisabled(!disabled), [disabled, setDisabled]);
42
- const themedStyles = getThemedStyles(useTheme());
43
48
  return (
44
- <View style={[commonTestStyles.view, themedStyles.stackStyle]}>
49
+ <View style={styles.panel}>
45
50
  <PrimaryButton onClick={onClick} content="Primary Button" disabled={disabled} />
46
51
  <Button onClick={onClick} content="Default Button" disabled={disabled} />
47
52
  <StealthButton onClick={onClick} content="Stealth Button" disabled={disabled} />
@@ -69,7 +74,6 @@ const SemanticColor: React.FunctionComponent<SemanticColorProps> = (p: SemanticC
69
74
 
70
75
  const SwatchList: React.FunctionComponent = () => {
71
76
  const theme = useTheme();
72
- const themedStyles = getThemedStyles(theme);
73
77
  const palette = theme.colors;
74
78
 
75
79
  const aggregator = React.useCallback(
@@ -84,14 +88,14 @@ const SwatchList: React.FunctionComponent = () => {
84
88
  }, [palette, aggregator]);
85
89
 
86
90
  const paletteAsArray = React.useMemo(flattenArray, [flattenArray]);
87
- const renderSwatch = React.useCallback(({ item }) => {
91
+ const renderSwatch = React.useCallback((item) => {
88
92
  const { color, key } = item;
89
93
  return <SemanticColor key={key} color={color} name={key} />;
90
94
  }, []);
91
95
  return (
92
- <View style={[commonTestStyles.view]}>
96
+ <View style={commonTestStyles.view}>
93
97
  <Text>getHostSettingsWin32(theme: ITheme).palette</Text>
94
- <View style={themedStyles.stackStyle}>{paletteAsArray.map((item) => renderSwatch({ item }))}</View>
98
+ <View style={styles.stackStyle}>{paletteAsArray.map((item) => renderSwatch(item))}</View>
95
99
  </View>
96
100
  );
97
101
  };
@@ -19,11 +19,6 @@ const getThemedStyles = themedStyleSheet((theme: Theme) => {
19
19
  borderWidth: 2,
20
20
  borderColor: theme.colors.bodyText,
21
21
  },
22
- stackStyle: {
23
- borderWidth: 2,
24
- padding: 12,
25
- margin: 8,
26
- },
27
22
  };
28
23
  });
29
24
 
@@ -37,6 +32,11 @@ const styles = StyleSheet.create({
37
32
  flexDirection: 'row',
38
33
  justifyContent: 'space-evenly',
39
34
  },
35
+ stackStyle: {
36
+ borderWidth: 2,
37
+ padding: 12,
38
+ margin: 8,
39
+ },
40
40
  });
41
41
 
42
42
  const getSwatchColorStyle = (name: string, color: ColorValue): ViewStyle => {
@@ -57,7 +57,6 @@ const ColorToken: React.FunctionComponent<ColorTokenProps> = (p: ColorTokenProps
57
57
 
58
58
  const AliasTokensSwatchList: React.FunctionComponent = () => {
59
59
  const theme = useTheme();
60
- const themedStyles = getThemedStyles(theme);
61
60
  const isOfficeTheme =
62
61
  theme.name === 'White' ||
63
62
  theme.name === 'Colorful' ||
@@ -80,14 +79,14 @@ const AliasTokensSwatchList: React.FunctionComponent = () => {
80
79
  }, [aliasColorTokens, aggregator]);
81
80
 
82
81
  const aliasTokensAsArray = React.useMemo(flattenArray, [flattenArray]);
83
- const renderSwatch = React.useCallback(({ item }) => {
82
+ const renderSwatch = React.useCallback((item) => {
84
83
  const { color, key } = item;
85
84
  return <ColorToken key={key} color={color} name={key} />;
86
85
  }, []);
87
86
  return (
88
- <View style={[commonTestStyles.view]}>
87
+ <View style={commonTestStyles.view}>
89
88
  <Text>Alias Color Tokens from Token Pipeline</Text>
90
- <View style={themedStyles.stackStyle}>{aliasTokensAsArray.map((item) => renderSwatch({ item }))}</View>
89
+ <View style={styles.stackStyle}>{aliasTokensAsArray.map((item) => renderSwatch(item))}</View>
91
90
  </View>
92
91
  );
93
92
  };