@fluentui-react-native/tester 0.56.1 → 0.57.0

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 (131) hide show
  1. package/CHANGELOG.json +60 -1
  2. package/CHANGELOG.md +20 -2
  3. package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts +11 -0
  4. package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts.map +1 -0
  5. package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js +57 -0
  6. package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js.map +1 -0
  7. package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts +2 -0
  8. package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts.map +1 -0
  9. package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js +26 -0
  10. package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js.map +1 -0
  11. package/lib/FluentTester/FluentTester.d.ts.map +1 -1
  12. package/lib/FluentTester/FluentTester.js +8 -8
  13. package/lib/FluentTester/FluentTester.js.map +1 -1
  14. package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.d.ts.map +1 -1
  15. package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +28 -23
  16. package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
  17. package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
  18. package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.js +24 -29
  19. package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
  20. package/lib/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
  21. package/lib/FluentTester/TestComponents/Badge/BadgeTest.js +9 -9
  22. package/lib/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
  23. package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js +27 -27
  24. package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
  25. package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
  26. package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +23 -23
  27. package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
  28. package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +2 -2
  29. package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
  30. package/lib/FluentTester/TestComponents/Expander/ExpanderTest.d.ts.map +1 -1
  31. package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js +22 -22
  32. package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
  33. package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.d.ts.map +1 -1
  34. package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js +11 -11
  35. package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js.map +1 -1
  36. package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.d.ts.map +1 -1
  37. package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js +11 -11
  38. package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js.map +1 -1
  39. package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
  40. package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.js +13 -26
  41. package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.js.map +1 -1
  42. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
  43. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js +24 -29
  44. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
  45. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
  46. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +11 -20
  47. package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
  48. package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts +2 -0
  49. package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts.map +1 -1
  50. package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.js +21 -9
  51. package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.js.map +1 -1
  52. package/lib/FluentTester/TestComponents/Text/CustomizeUsage.d.ts.map +1 -1
  53. package/lib/FluentTester/TestComponents/Text/CustomizeUsage.js +36 -36
  54. package/lib/FluentTester/TestComponents/Text/CustomizeUsage.js.map +1 -1
  55. package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.d.ts.map +1 -1
  56. package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +36 -36
  57. package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
  58. package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts +11 -0
  59. package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts.map +1 -0
  60. package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js +59 -0
  61. package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js.map +1 -0
  62. package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts +2 -0
  63. package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts.map +1 -0
  64. package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js +29 -0
  65. package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js.map +1 -0
  66. package/lib-commonjs/FluentTester/FluentTester.d.ts.map +1 -1
  67. package/lib-commonjs/FluentTester/FluentTester.js +8 -8
  68. package/lib-commonjs/FluentTester/FluentTester.js.map +1 -1
  69. package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.d.ts.map +1 -1
  70. package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +28 -23
  71. package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
  72. package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
  73. package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.js +24 -29
  74. package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
  75. package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
  76. package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js +9 -9
  77. package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
  78. package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js +27 -27
  79. package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
  80. package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
  81. package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +23 -23
  82. package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
  83. package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +2 -2
  84. package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
  85. package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.d.ts.map +1 -1
  86. package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js +22 -22
  87. package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
  88. package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.d.ts.map +1 -1
  89. package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js +11 -11
  90. package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js.map +1 -1
  91. package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.d.ts.map +1 -1
  92. package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js +11 -11
  93. package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js.map +1 -1
  94. package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
  95. package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.js +13 -26
  96. package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.js.map +1 -1
  97. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
  98. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js +24 -29
  99. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
  100. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
  101. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +11 -20
  102. package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
  103. package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts +2 -0
  104. package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts.map +1 -1
  105. package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.js +24 -10
  106. package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.js.map +1 -1
  107. package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.d.ts.map +1 -1
  108. package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.js +36 -36
  109. package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.js.map +1 -1
  110. package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.d.ts.map +1 -1
  111. package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +36 -36
  112. package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
  113. package/package.json +4 -4
  114. package/src/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.ts +56 -0
  115. package/src/E2E/common/NativeTesting/specs/NativeTesting.spec.win.ts +28 -0
  116. package/src/FluentTester/FluentTester.tsx +10 -10
  117. package/src/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.tsx +36 -26
  118. package/src/FluentTester/TestComponents/Avatar/CustomizedAvatar.tsx +25 -31
  119. package/src/FluentTester/TestComponents/Badge/BadgeTest.tsx +11 -11
  120. package/src/FluentTester/TestComponents/Checkbox/CheckboxTest.tsx +29 -29
  121. package/src/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.tsx +30 -25
  122. package/src/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.tsx +3 -3
  123. package/src/FluentTester/TestComponents/Expander/ExpanderTest.tsx +23 -22
  124. package/src/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.tsx +12 -11
  125. package/src/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.tsx +12 -11
  126. package/src/FluentTester/TestComponents/Persona/CustomizeUsage.tsx +15 -28
  127. package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx +12 -22
  128. package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.tsx +25 -31
  129. package/src/FluentTester/TestComponents/Shimmer/ShimmerTest.tsx +50 -10
  130. package/src/FluentTester/TestComponents/Text/CustomizeUsage.tsx +42 -42
  131. package/src/FluentTester/TestComponents/TextExperimental/CustomizeUsage.tsx +42 -42
@@ -7,14 +7,43 @@ var react_native_1 = require("react-native");
7
7
  var stack_1 = require("@fluentui-react-native/stack");
8
8
  var experimental_text_1 = require("@fluentui-react-native/experimental-text");
9
9
  var styles_1 = require("../Common/styles");
10
+ var RedCaptionBold = experimental_text_1.Text.customize({ variant: 'captionStandard', fontWeight: '700', color: '#ff0000' });
11
+ var OrangeSecondaryBold = experimental_text_1.Text.customize({ variant: 'secondaryStandard', fontWeight: '700', color: '#ff9900' });
12
+ var YellowBodyBold = experimental_text_1.Text.customize({ variant: 'bodyStandard', fontWeight: '700', color: '#f3ce00' });
13
+ var GreenSubheaderBold = experimental_text_1.Text.customize({ variant: 'subheaderStandard', fontWeight: '700', color: '#02c440' });
14
+ var BlueHeaderBold = experimental_text_1.Text.customize({ variant: 'headerStandard', fontWeight: '700', color: '#0229c4' });
15
+ var IndigoHeroBold = experimental_text_1.Text.customize({ variant: 'heroStandard', fontWeight: '700', color: '#4b0082' });
16
+ var PurpleHeroLargeBold = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontWeight: '700', color: '#8402c4' });
17
+ // Android has a limited fontFamily support and unknown fonts fallback to sans-serif (Roboto).
18
+ // Custom fonts (ttf, otf) are supported but need to be linked using 'react-native link'
19
+ // The supported font families can be found as <aliases> at https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml
20
+ var CustomFontNames = (0, tslib_1.__assign)({}, react_native_1.Platform.select({
21
+ android: {
22
+ CourierNew: 'courier new',
23
+ Georgia: 'georgia',
24
+ TimesNewRoman: 'times new roman',
25
+ },
26
+ default: {
27
+ CourierNew: 'Courier New',
28
+ Georgia: 'Georgia',
29
+ TimesNewRoman: 'Times New Roman',
30
+ },
31
+ }));
32
+ var ArialBlack = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Arial Black' });
33
+ var BrushScriptMT = experimental_text_1.Text.customize({ variant: 'heroStandard', fontFamily: 'Brush Script MT' });
34
+ var CourierNew = experimental_text_1.Text.customize({ variant: 'headerStandard', fontFamily: CustomFontNames.CourierNew });
35
+ var Georgia = experimental_text_1.Text.customize({ variant: 'subheaderStandard', fontFamily: CustomFontNames.Georgia });
36
+ var TimesNewRoman = experimental_text_1.Text.customize({ variant: 'secondaryStandard', fontFamily: CustomFontNames.TimesNewRoman });
37
+ var Wingdings = experimental_text_1.Text.customize({ variant: 'captionStandard', fontFamily: 'Wingdings' });
38
+ // Examples of supported Android fonts.
39
+ var Casual = experimental_text_1.Text.customize({ variant: 'heroStandard', fontFamily: 'casual' });
40
+ var Cursive = experimental_text_1.Text.customize({ variant: 'heroStandard', fontFamily: 'cursive' });
41
+ // Examples of iOS fonts.
42
+ var Papyrus = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Papyrus' });
43
+ var Helvetica = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Helvetica' });
44
+ // Fonts supported on Android and iOS
45
+ var Arial = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'arial' });
10
46
  var CustomizeUsage = function () {
11
- var RedCaptionBold = experimental_text_1.Text.customize({ variant: 'captionStandard', fontWeight: '700', color: '#ff0000' });
12
- var OrangeSecondaryBold = experimental_text_1.Text.customize({ variant: 'secondaryStandard', fontWeight: '700', color: '#ff9900' });
13
- var YellowBodyBold = experimental_text_1.Text.customize({ variant: 'bodyStandard', fontWeight: '700', color: '#f3ce00' });
14
- var GreenSubheaderBold = experimental_text_1.Text.customize({ variant: 'subheaderStandard', fontWeight: '700', color: '#02c440' });
15
- var BlueHeaderBold = experimental_text_1.Text.customize({ variant: 'headerStandard', fontWeight: '700', color: '#0229c4' });
16
- var IndigoHeroBold = experimental_text_1.Text.customize({ variant: 'heroStandard', fontWeight: '700', color: '#4b0082' });
17
- var PurpleHeroLargeBold = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontWeight: '700', color: '#8402c4' });
18
47
  var CustomUsageStack = function () {
19
48
  return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle, gap: 5 },
20
49
  React.createElement(RedCaptionBold, null, "RedCaptionBold"),
@@ -25,35 +54,6 @@ var CustomizeUsage = function () {
25
54
  React.createElement(IndigoHeroBold, null, "IndigoHeroBold"),
26
55
  React.createElement(PurpleHeroLargeBold, null, "PurpleHeroLargeBold")));
27
56
  };
28
- // Android has a limited fontFamily support and unknown fonts fallback to sans-serif (Roboto).
29
- // Custom fonts (ttf, otf) are supported but need to be linked using 'react-native link'
30
- // The supported font families can be found as <aliases> at https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml
31
- var CustomFontNames = (0, tslib_1.__assign)({}, react_native_1.Platform.select({
32
- android: {
33
- CourierNew: 'courier new',
34
- Georgia: 'georgia',
35
- TimesNewRoman: 'times new roman',
36
- },
37
- default: {
38
- CourierNew: 'Courier New',
39
- Georgia: 'Georgia',
40
- TimesNewRoman: 'Times New Roman',
41
- },
42
- }));
43
- var ArialBlack = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Arial Black' });
44
- var BrushScriptMT = experimental_text_1.Text.customize({ variant: 'heroStandard', fontFamily: 'Brush Script MT' });
45
- var CourierNew = experimental_text_1.Text.customize({ variant: 'headerStandard', fontFamily: CustomFontNames.CourierNew });
46
- var Georgia = experimental_text_1.Text.customize({ variant: 'subheaderStandard', fontFamily: CustomFontNames.Georgia });
47
- var TimesNewRoman = experimental_text_1.Text.customize({ variant: 'secondaryStandard', fontFamily: CustomFontNames.TimesNewRoman });
48
- var Wingdings = experimental_text_1.Text.customize({ variant: 'captionStandard', fontFamily: 'Wingdings' });
49
- // Examples of supported Android fonts.
50
- var Casual = experimental_text_1.Text.customize({ variant: 'heroStandard', fontFamily: 'casual' });
51
- var Cursive = experimental_text_1.Text.customize({ variant: 'heroStandard', fontFamily: 'cursive' });
52
- // Examples of iOS fonts.
53
- var Papyrus = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Papyrus' });
54
- var Helvetica = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'Helvetica' });
55
- // Fonts supported on Android and iOS
56
- var Arial = experimental_text_1.Text.customize({ variant: 'heroLargeStandard', fontFamily: 'arial' });
57
57
  var CustomFontStack = function () {
58
58
  return (React.createElement(stack_1.Stack, { style: styles_1.stackStyle, gap: 5 },
59
59
  React.createElement(ArialBlack, null, "Arial Black"),
@@ -1 +1 @@
1
- {"version":3,"file":"CustomizeUsage.js","sourceRoot":"","sources":["../../../../src/FluentTester/TestComponents/TextExperimental/CustomizeUsage.tsx"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAC/B,6CAA8C;AAC9C,sDAAqD;AACrD,8EAAgE;AAChE,2CAA8C;AAEvC,IAAM,cAAc,GAA4B;IACrD,IAAM,cAAc,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3G,IAAM,mBAAmB,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAClH,IAAM,cAAc,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACxG,IAAM,kBAAkB,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACjH,IAAM,cAAc,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1G,IAAM,cAAc,GAAG,wBAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE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,UAAU,sBAAyB;YACpC,oBAAC,OAAO,kBAAkB;YAC1B,oBAAC,aAAa,wBAA8B,CACtC,CACT,CAAC;IACJ,CAAC,CAAC;IACF,IAAM,kBAAkB,GAAG;QACzB,OAAO,CACL,oBAAC,aAAK,IAAC,KAAK,EAAE,mBAAU,EAAE,GAAG,EAAE,CAAC;YAC9B,oBAAC,KAAK,gBAAc;YACpB,oBAAC,OAAO,kBAAkB;YAC1B,oBAAC,SAAS,oBAAsB;YAChC,oBAAC,UAAU,sBAAyB;YACpC,oBAAC,OAAO,kBAAkB;YAC1B,oBAAC,aAAa,wBAA8B,CACtC,CACT,CAAC;IACJ,CAAC,CAAC;IAEF,QAAQ,uBAAQ,CAAC,EAAE,EAAE;QACnB,KAAK,SAAS;YACZ,OAAO,CACL,oBAAC,mBAAI;gBACH,oBAAC,gBAAgB,OAAG;gBACpB,oBAAC,sBAAsB,OAAG,CACrB,CACR,CAAC;QACJ,KAAK,KAAK;YACR,OAAO,CACL,oBAAC,mBAAI;gBACH,oBAAC,gBAAgB,OAAG;gBACpB,oBAAC,kBAAkB,OAAG,CACjB,CACR,CAAC;QACJ;YACE,OAAO,CACL,oBAAC,mBAAI;gBACH,oBAAC,gBAAgB,OAAG;gBACpB,oBAAC,eAAe,OAAG,CACd,CACR,CAAC;KACL;AACH,CAAC,CAAC;AA3EW,QAAA,cAAc,kBA2EzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/tester",
3
- "version": "0.56.1",
3
+ "version": "0.57.0",
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,17 +27,17 @@
27
27
  "dependencies": {
28
28
  "@fluentui-react-native/android-theme": ">=0.5.4 <1.0.0",
29
29
  "@fluentui-react-native/apple-theme": ">=0.9.10 <1.0.0",
30
- "@fluentui-react-native/badge": ">=0.0.13 <1.0.0",
30
+ "@fluentui-react-native/badge": ">=0.0.14 <1.0.0",
31
31
  "@fluentui-react-native/button": ">=0.22.4 <1.0.0",
32
32
  "@fluentui-react-native/default-theme": ">=0.9.10 <1.0.0",
33
33
  "@fluentui-react-native/experimental-activity-indicator": ">=0.5.13 <1.0.0",
34
34
  "@fluentui-react-native/experimental-avatar": ">=0.14.5 <1.0.0",
35
35
  "@fluentui-react-native/experimental-button": "0.15.4",
36
- "@fluentui-react-native/experimental-checkbox": "0.7.0",
36
+ "@fluentui-react-native/experimental-checkbox": "0.8.0",
37
37
  "@fluentui-react-native/experimental-native-date-picker": ">=0.4.1 <1.0.0",
38
38
  "@fluentui-react-native/experimental-expander": "0.3.14",
39
39
  "@fluentui-react-native/experimental-menu-button": ">=0.3.13 <1.0.0",
40
- "@fluentui-react-native/experimental-shimmer": "0.6.16",
40
+ "@fluentui-react-native/experimental-shimmer": "0.6.17",
41
41
  "@fluentui-react-native/experimental-tabs": "0.4.23",
42
42
  "@fluentui-react-native/experimental-text": ">=0.7.14 <1.0.0",
43
43
  "@fluentui-react-native/framework": ">=0.7.14 <1.0.0",
@@ -0,0 +1,56 @@
1
+ import { BasePage, By } from '../../../common/BasePage.win';
2
+
3
+ const ScrollViewTestId = 'SCROLLVIEW_TEST_ID';
4
+
5
+ class NativeTestingPageObject extends BasePage {
6
+ waitForScrollViewDisplayed(timeout?: number): void {
7
+ browser.waitUntil(
8
+ () => {
9
+ return this.doesScrollViewParentExist();
10
+ },
11
+ {
12
+ timeout: timeout ?? this.waitForPageTimeout,
13
+ timeoutMsg:
14
+ 'For testing purposes we require that the root view contains a non-empty, immutable ScrollView of buttons that navigate to test pages.',
15
+ interval: 1000,
16
+ },
17
+ );
18
+ }
19
+
20
+ doesScrollViewParentExist(): boolean {
21
+ return this._scrollViewParent.isExisting();
22
+ }
23
+
24
+ /* Validate the Children of the ScrollView stay intact. The children are the buttons that
25
+ * navigate to each test page. Also, validate these children exist with the proper testId format */
26
+ validateScrollViewChildren(): boolean {
27
+ // Gets all the children
28
+ const testChildren = this._scrollViewParent.$$('//*');
29
+ let foundValidButton = false;
30
+
31
+ // Ensure the testID (maps 1:1 to automationId) properties of the button children match the defined testing format
32
+ const reg = new RegExp('Homepage_[a-zA-Z]*_Button');
33
+
34
+ // Iterate through children. Validate at least one valid button exists as a child to the ScrollView.
35
+ // If automationId is found in the wrong format, return false.
36
+ for (const child of testChildren) {
37
+ const autoId = child.getAttribute('AutomationId');
38
+ if (autoId && autoId !== ScrollViewTestId) {
39
+ if (autoId.match(reg)) {
40
+ foundValidButton = true;
41
+ } else {
42
+ // The correct format for testId was not followed. Return a failure.
43
+ return false;
44
+ }
45
+ }
46
+ }
47
+
48
+ return foundValidButton;
49
+ }
50
+
51
+ get _scrollViewParent() {
52
+ return By(ScrollViewTestId);
53
+ }
54
+ }
55
+
56
+ export default new NativeTestingPageObject();
@@ -0,0 +1,28 @@
1
+ import NavigateAppPage from '../../../common/NavigateAppPage.win';
2
+ import NativeTestingPageObject from '../pages/NativeTestingPageObject.win';
3
+ import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../../common/consts';
4
+
5
+ describe('Native Safety Check Testing Initialization', () => {
6
+ it('Wait for app load', () => {
7
+ NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
8
+ expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
9
+ });
10
+
11
+ // The ScrollView in testing is the one that contains all the buttons that navigate to each component's
12
+ // test page. This is vital for our native testing, as we grab this ScrollView on the native side and
13
+ // to climb down the UI tree and find all of FURN's testable components.
14
+ // We need to make sure this ScrollView:
15
+ // 1) Continues to parent all the test buttons
16
+ // 2) Keeps testID='SCROLLVIEW_TEST_ID'
17
+ it('Validate the ScrollView containing all the navigational buttons exists', () => {
18
+ NativeTestingPageObject.waitForScrollViewDisplayed(PAGE_TIMEOUT);
19
+ expect(NativeTestingPageObject.doesScrollViewParentExist()).toBeTruthy();
20
+ });
21
+
22
+ // In addition to existing, we want to ensure the Children of the ScrollView stay intact. The children are the buttons that
23
+ // navigate to each test page. Validate these children exist with the proper testId format.
24
+ it('Validate the children of ScrollView are the buttons that navigate to each test page with proper automationId', () => {
25
+ NativeTestingPageObject.waitForScrollViewDisplayed(PAGE_TIMEOUT);
26
+ expect(NativeTestingPageObject.validateScrollViewChildren()).toBeTruthy();
27
+ });
28
+ });
@@ -44,6 +44,16 @@ const getThemedStyles = themedStyleSheet((t: Theme) => {
44
44
  };
45
45
  });
46
46
 
47
+ const HeaderSeparator = Separator.customize((t) => ({
48
+ color: t.colors.bodyFrameDivider,
49
+ separatorWidth: 2,
50
+ }));
51
+
52
+ const TestListSeparator = Separator.customize((t) => ({
53
+ color: t.colors.menuDivider,
54
+ separatorWidth: 2,
55
+ }));
56
+
47
57
  export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props: FluentTesterProps) => {
48
58
  // sort tests alphabetically by name
49
59
  const sortedTestComponents = props.enabledTests.sort((a, b) => a.name.localeCompare(b.name));
@@ -66,16 +76,6 @@ export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props:
66
76
 
67
77
  const TestComponent = selectedTestIndex == -1 ? EmptyComponent : sortedTestComponents[selectedTestIndex].component;
68
78
 
69
- const HeaderSeparator = Separator.customize((t) => ({
70
- color: t.colors.bodyFrameDivider,
71
- separatorWidth: 2,
72
- }));
73
-
74
- const TestListSeparator = Separator.customize((t) => ({
75
- color: t.colors.menuDivider,
76
- separatorWidth: 2,
77
- }));
78
-
79
79
  const themedStyles = getThemedStyles(useTheme());
80
80
 
81
81
  const RootView = Platform.select({
@@ -7,14 +7,30 @@ 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 = () => {
11
+ const [animating, setAnimating] = React.useState(true);
12
+ const [hidesWhenStopped, setHidesWhenStopped] = React.useState(true);
13
+
14
+ return (
15
+ <Stack style={stackStyle}>
16
+ <View style={commonStyles.root}>
17
+ <View style={commonStyles.settings}>
18
+ <View style={commonStyles.switch}>
19
+ <Text>Animating</Text>
20
+ <Switch value={animating} onValueChange={setAnimating} />
21
+ </View>
22
+ <View style={commonStyles.switch}>
23
+ <Text>HidesWhenStopped</Text>
24
+ <Switch value={hidesWhenStopped} onValueChange={setHidesWhenStopped} />
25
+ </View>
26
+ </View>
27
+ <ActivityIndicator animating={animating} hidesWhenStopped={hidesWhenStopped} />
28
+ </View>
29
+ </Stack>
30
+ );
31
+ };
32
+
10
33
  const activityIndicatorTest: React.FunctionComponent = () => {
11
- /** Customize doesn't do anything
12
- * Tried having tokens not be props, but didn't work
13
- * Not sure how to test/check where the tokens are passed through other than just looking at the final render
14
- */
15
- const CustomizedActivityIndicator = ActivityIndicator.customize({
16
- activityIndicatorColor: 'orange',
17
- });
18
34
  return (
19
35
  <Stack style={stackStyle}>
20
36
  <Text>Extra Small</Text>
@@ -32,38 +48,27 @@ const activityIndicatorTest: React.FunctionComponent = () => {
32
48
  <ActivityIndicator size="xLarge" lineThickness="large" />
33
49
  <Text>Color props</Text>
34
50
  <ActivityIndicator activityIndicatorColor="orange" accessibilityLabel="orange progressbar" />
35
- <Text>Customized Activity Indicator (currently not working)</Text>
36
- <CustomizedActivityIndicator />
37
51
  </Stack>
38
52
  );
39
53
  };
40
54
 
41
- const basicActivityIndicator: React.FunctionComponent = () => {
42
- const [animating, setAnimating] = React.useState(true);
43
- const [hidesWhenStopped, setHidesWhenStopped] = React.useState(true);
55
+ const CustomizedActivityIndicator = ActivityIndicator.customize({
56
+ activityIndicatorColor: 'orange',
57
+ size: 'large',
58
+ });
44
59
 
60
+ const customizedActivityIndicatorTest: React.FunctionComponent = () => {
45
61
  return (
46
62
  <Stack style={stackStyle}>
47
- <View style={commonStyles.root}>
48
- <View style={commonStyles.settings}>
49
- <View style={commonStyles.switch}>
50
- <Text>Animating</Text>
51
- <Switch value={animating} onValueChange={setAnimating} />
52
- </View>
53
- <View style={commonStyles.switch}>
54
- <Text>HidesWhenStopped</Text>
55
- <Switch value={hidesWhenStopped} onValueChange={setHidesWhenStopped} />
56
- </View>
57
- </View>
58
- <ActivityIndicator animating={animating} hidesWhenStopped={hidesWhenStopped} />
59
- </View>
63
+ <Text>Customized Activity Indicator</Text>
64
+ <CustomizedActivityIndicator />
60
65
  </Stack>
61
66
  );
62
67
  };
63
68
 
64
69
  const activityIndicatorSections: TestSection[] = [
65
70
  {
66
- name: 'BaseActivityIndicator',
71
+ name: 'Base ActivityIndicator',
67
72
  testID: ACTIVITY_INDICATOR_TESTPAGE,
68
73
  component: basicActivityIndicator,
69
74
  },
@@ -72,6 +77,11 @@ const activityIndicatorSections: TestSection[] = [
72
77
  testID: ACTIVITY_INDICATOR_TESTPAGE,
73
78
  component: activityIndicatorTest,
74
79
  },
80
+ {
81
+ name: 'Customized ActivityIndicator',
82
+ testID: ACTIVITY_INDICATOR_TESTPAGE,
83
+ component: customizedActivityIndicatorTest,
84
+ },
75
85
  ];
76
86
 
77
87
  export const ActivityIndicatorTest: React.FunctionComponent = () => {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { JSAvatar, IconAlignment, JSAvatarTokens } from '@fluentui-react-native/experimental-avatar';
2
+ import { JSAvatar, IconAlignment } from '@fluentui-react-native/experimental-avatar';
3
3
  import { Switch, View, Text, TextInput, TextStyle } from 'react-native';
4
4
  import { Slider } from '../Common/Slider';
5
5
  import { steveBallmerPhotoUrl } from './../PersonaCoin/styles';
@@ -29,36 +29,30 @@ export const CustomizeUsage: React.FunctionComponent = () => {
29
29
  borderColor: theme.colors.inputBorder,
30
30
  };
31
31
 
32
- const tokens: JSAvatarTokens = {};
33
- if (coinColor) {
34
- tokens.backgroundColor = coinColor;
35
- }
36
- if (textColor) {
37
- tokens.color = textColor;
38
- }
39
- if (horizontalAlignment) {
40
- tokens.horizontalIconAlignment = horizontalAlignment;
41
- }
42
- if (verticalAlignment) {
43
- tokens.verticalIconAlignment = verticalAlignment;
44
- }
45
- if (iconSize) {
46
- tokens.iconSize = iconSize;
47
- }
48
- if (iconStrokeWidth) {
49
- tokens.iconStrokeWidth = iconStrokeWidth;
50
- }
51
- if (iconStrokeColor) {
52
- tokens.iconStrokeColor = iconStrokeColor;
53
- }
54
- if (initialsSize) {
55
- tokens.initialsSize = initialsSize;
56
- }
57
- if (physicalSize) {
58
- tokens.avatarSize = physicalSize;
59
- }
60
-
61
- const CustomizedAvatar = JSAvatar.customize(tokens);
32
+ const CustomizedAvatar = React.useMemo(() => {
33
+ const tokens = {
34
+ backgroundColor: coinColor,
35
+ color: textColor,
36
+ horizontalIconAlignment: horizontalAlignment,
37
+ verticalIconAlignment: verticalAlignment,
38
+ iconSize: iconSize,
39
+ iconStrokeWidth: iconStrokeWidth,
40
+ iconStrokeColor: iconStrokeColor,
41
+ initialsSize: initialsSize,
42
+ avatarSize: physicalSize,
43
+ };
44
+ return JSAvatar.customize(tokens);
45
+ }, [
46
+ coinColor,
47
+ textColor,
48
+ horizontalAlignment,
49
+ verticalAlignment,
50
+ iconSize,
51
+ iconStrokeWidth,
52
+ iconStrokeColor,
53
+ initialsSize,
54
+ physicalSize,
55
+ ]);
62
56
 
63
57
  return (
64
58
  <View style={commonStyles.root}>
@@ -8,6 +8,17 @@ import BadgeSvg from './oof.svg';
8
8
 
9
9
  import { SvgIconProps } from '@fluentui-react-native/icon';
10
10
 
11
+ const BadgeNoBorder = Badge.customize({
12
+ borderColor: 'transparent',
13
+ borderWidth: 0,
14
+ });
15
+
16
+ const StyledBadge = Badge.customize({
17
+ backgroundColor: 'yellow',
18
+ borderColor: '#f09',
19
+ borderWidth: 4,
20
+ });
21
+
11
22
  export const BasicBadge: React.FunctionComponent = () => {
12
23
  const svgProps: SvgIconProps = {
13
24
  src: BadgeSvg,
@@ -20,17 +31,6 @@ export const BasicBadge: React.FunctionComponent = () => {
20
31
  fontSize: 16,
21
32
  };
22
33
 
23
- const BadgeNoBorder = Badge.customize({
24
- borderColor: 'transparent',
25
- borderWidth: 0,
26
- });
27
-
28
- const StyledBadge = Badge.customize({
29
- backgroundColor: 'yellow',
30
- borderColor: '#f09',
31
- borderWidth: 4,
32
- });
33
-
34
34
  const svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS as string);
35
35
  const iconProps = { svgSource: svgProps, width: 20, height: 20 };
36
36
 
@@ -53,41 +53,41 @@ const otherCheckbox: React.FunctionComponent = () => {
53
53
  );
54
54
  };
55
55
 
56
- const tokenCheckbox: React.FunctionComponent = () => {
57
- const CircularCheckbox = Checkbox.customize({ tokens: { borderRadius: 50 } });
58
-
59
- const CircleColorCheckbox = Checkbox.customize({
60
- tokens: { borderRadius: 50, checkboxBackgroundColor: 'white' },
61
- _overrides: {
62
- checked: {
63
- tokens: {
64
- checkboxBackgroundColor: 'green',
65
- checkboxBorderColor: 'green',
66
- checkmarkColor: 'white',
67
- },
56
+ const CircularCheckbox = Checkbox.customize({ tokens: { borderRadius: 50 } });
57
+
58
+ const CircleColorCheckbox = Checkbox.customize({
59
+ tokens: { borderRadius: 50, checkboxBackgroundColor: 'white' },
60
+ _overrides: {
61
+ checked: {
62
+ tokens: {
63
+ checkboxBackgroundColor: 'green',
64
+ checkboxBorderColor: 'green',
65
+ checkmarkColor: 'white',
68
66
  },
69
- focused: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
70
- hovered: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
71
- pressed: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundPressed' } },
72
67
  },
73
- });
74
-
75
- const HoverCheckbox = Checkbox.customize({
76
- _overrides: {
77
- checked: {
78
- tokens: {
79
- checkboxBackgroundColor: 'black',
80
- checkmarkColor: 'white',
81
- },
68
+ focused: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
69
+ hovered: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
70
+ pressed: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundPressed' } },
71
+ },
72
+ });
73
+
74
+ const HoverCheckbox = Checkbox.customize({
75
+ _overrides: {
76
+ checked: {
77
+ tokens: {
78
+ checkboxBackgroundColor: 'black',
79
+ checkmarkColor: 'white',
82
80
  },
83
- hovered: {
84
- tokens: {
85
- checkmarkVisibility: 1,
86
- },
81
+ },
82
+ hovered: {
83
+ tokens: {
84
+ checkmarkVisibility: 1,
87
85
  },
88
86
  },
89
- });
87
+ },
88
+ });
90
89
 
90
+ const tokenCheckbox: React.FunctionComponent = () => {
91
91
  const [checkboxColor, setCheckboxColor] = React.useState('blue');
92
92
  const [checkmarkColor, setCheckmarkColor] = React.useState('white');
93
93
 
@@ -20,8 +20,8 @@ const basicCheckbox: React.FunctionComponent = () => {
20
20
  <Checkbox label="Disabled checkbox" disabled />
21
21
  <Checkbox label="Disabled checked checkbox" defaultChecked disabled />
22
22
  <Checkbox label="Checkbox will display a tooltip" tooltip="This is a tooltip" />
23
- <Checkbox label="A circular checkbox" circular />
24
- <Checkbox label="A circular checkbox" labelPosition="before" />
23
+ <Checkbox label="A circular checkbox" shape="circular" />
24
+ <Checkbox label="A checkbox with label placed before" labelPosition="before" />
25
25
  </View>
26
26
  );
27
27
  };
@@ -61,29 +61,29 @@ const otherCheckbox: React.FunctionComponent = () => {
61
61
  );
62
62
  };
63
63
 
64
- const tokenCheckbox: React.FunctionComponent = () => {
65
- const CircleColorCheckbox = Checkbox.customize({
66
- checkboxBackgroundColor: 'white',
67
- checked: {
68
- checkboxBackgroundColor: 'green',
69
- checkboxBorderColor: 'green',
70
- checkmarkColor: 'white',
71
- },
72
- focused: { checkboxBackgroundColor: 'menuItemBackgroundHovered' },
73
- hovered: { checkboxBackgroundColor: 'menuItemBackgroundHovered' },
74
- pressed: { checkboxBackgroundColor: 'menuItemBackgroundPressed' },
75
- });
76
-
77
- const HoverCheckbox = Checkbox.customize({
78
- checked: {
79
- checkboxBackgroundColor: 'black',
80
- checkmarkColor: 'white',
81
- },
82
- hovered: {
83
- checkmarkOpacity: 1,
84
- },
85
- });
64
+ const CircleColorCheckbox = Checkbox.customize({
65
+ checkboxBackgroundColor: 'white',
66
+ checked: {
67
+ checkboxBackgroundColor: 'green',
68
+ checkboxBorderColor: 'green',
69
+ checkmarkColor: 'white',
70
+ },
71
+ focused: { checkboxBackgroundColor: 'menuItemBackgroundHovered' },
72
+ hovered: { checkboxBackgroundColor: 'menuItemBackgroundHovered' },
73
+ pressed: { checkboxBackgroundColor: 'menuItemBackgroundPressed' },
74
+ });
75
+
76
+ const HoverCheckbox = Checkbox.customize({
77
+ checked: {
78
+ checkboxBackgroundColor: 'black',
79
+ checkmarkColor: 'white',
80
+ },
81
+ hovered: {
82
+ checkmarkOpacity: 1,
83
+ },
84
+ });
86
85
 
86
+ const tokenCheckbox: React.FunctionComponent = () => {
87
87
  const [checkboxColor, setCheckboxColor] = React.useState('blue');
88
88
  const [checkmarkColor, setCheckmarkColor] = React.useState('white');
89
89
 
@@ -106,7 +106,12 @@ const tokenCheckbox: React.FunctionComponent = () => {
106
106
  return (
107
107
  <View>
108
108
  <HoverCheckbox label="A checkbox with checkmark visible on hover" onChange={onChangeUncontrolled} defaultChecked={false} />
109
- <CircleColorCheckbox label="A circular token-customized checkbox" circular onChange={onChangeUncontrolled} defaultChecked={true} />
109
+ <CircleColorCheckbox
110
+ label="A circular token-customized checkbox"
111
+ shape="circular"
112
+ onChange={onChangeUncontrolled}
113
+ defaultChecked={true}
114
+ />
110
115
  <BlueCheckbox
111
116
  label="Token-customized checkbox. Customizable below."
112
117
  onChange={onChangeUncontrolled}
@@ -232,6 +232,9 @@ const nestedContextualMenu: React.FunctionComponent = () => {
232
232
  );
233
233
  };
234
234
 
235
+ // custom text
236
+ const IndigoHeroBold = FURNText.customize({ tokens: { variant: 'heroStandard', fontWeight: '100', color: '#4b0082' } });
237
+
235
238
  const IconContextualMenu: React.FunctionComponent = () => {
236
239
  const stdBtnRef = React.useRef(null);
237
240
 
@@ -258,9 +261,6 @@ const IconContextualMenu: React.FunctionComponent = () => {
258
261
  setIsContextualMenuVisible(false);
259
262
  }, [setShowContextualMenu]);
260
263
 
261
- // custom text
262
- const IndigoHeroBold = FURNText.customize({ tokens: { variant: 'heroStandard', fontWeight: '100', color: '#4b0082' } });
263
-
264
264
  return (
265
265
  <View>
266
266
  <View style={{ flexDirection: 'row', paddingVertical: 5 }}>