@fluentui-react-native/tester 0.82.13 → 0.83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.json +161 -1
  2. package/CHANGELOG.md +48 -2
  3. package/android/build.gradle +7 -2
  4. package/app.json +23 -0
  5. package/assets/fluent_app_icon_ios.png +0 -0
  6. package/assets/fluent_app_icon_macos.png +0 -0
  7. package/assets/res/drawable/fluent_app_icon_android_background.xml +74 -0
  8. package/assets/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  9. package/assets/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  10. package/assets/res/mipmap-hdpi/fluent_app_icon_android.png +0 -0
  11. package/assets/res/mipmap-hdpi/fluent_app_icon_android_foreground.png +0 -0
  12. package/assets/res/mipmap-hdpi/fluent_app_icon_android_round.png +0 -0
  13. package/assets/res/mipmap-mdpi/fluent_app_icon_android.png +0 -0
  14. package/assets/res/mipmap-mdpi/fluent_app_icon_android_foreground.png +0 -0
  15. package/assets/res/mipmap-mdpi/fluent_app_icon_android_round.png +0 -0
  16. package/assets/res/mipmap-xhdpi/fluent_app_icon_android.png +0 -0
  17. package/assets/res/mipmap-xhdpi/fluent_app_icon_android_foreground.png +0 -0
  18. package/assets/res/mipmap-xhdpi/fluent_app_icon_android_round.png +0 -0
  19. package/assets/res/mipmap-xxhdpi/fluent_app_icon_android.png +0 -0
  20. package/assets/res/mipmap-xxhdpi/fluent_app_icon_android_foreground.png +0 -0
  21. package/assets/res/mipmap-xxhdpi/fluent_app_icon_android_round.png +0 -0
  22. package/assets/res/mipmap-xxxhdpi/fluent_app_icon_android.png +0 -0
  23. package/assets/res/mipmap-xxxhdpi/fluent_app_icon_android_foreground.png +0 -0
  24. package/assets/res/mipmap-xxxhdpi/fluent_app_icon_android_round.png +0 -0
  25. package/docs/ios.md +9 -9
  26. package/docs/macos.md +7 -7
  27. package/ios/Podfile.lock +99 -104
  28. package/lib/FluentTesterApp.d.ts.map +1 -1
  29. package/lib/FluentTesterApp.js +34 -3
  30. package/lib/FluentTesterApp.js.map +1 -1
  31. package/lib-commonjs/FluentTesterApp.d.ts.map +1 -1
  32. package/lib-commonjs/FluentTesterApp.js +33 -2
  33. package/lib-commonjs/FluentTesterApp.js.map +1 -1
  34. package/macos/Podfile.lock +284 -288
  35. package/package.json +20 -20
  36. package/src/FluentTesterApp.tsx +36 -3
  37. package/src/TestComponents/Notification/assets/play_button.svg +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/tester",
3
- "version": "0.82.13",
3
+ "version": "0.83.1",
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>",
@@ -37,35 +37,35 @@
37
37
  "dependencies": {
38
38
  "@fluentui-react-native/android-theme": ">=0.11.0 <1.0.0",
39
39
  "@fluentui-react-native/apple-theme": ">=0.13.2 <1.0.0",
40
- "@fluentui-react-native/avatar": "^1.1.32",
41
- "@fluentui-react-native/badge": ">=0.1.17 <1.0.0",
42
- "@fluentui-react-native/button": ">=0.24.13 <1.0.0",
40
+ "@fluentui-react-native/avatar": "^1.1.33",
41
+ "@fluentui-react-native/badge": ">=0.1.18 <1.0.0",
42
+ "@fluentui-react-native/button": ">=0.24.14 <1.0.0",
43
43
  "@fluentui-react-native/default-theme": ">=0.14.0 <1.0.0",
44
44
  "@fluentui-react-native/experimental-activity-indicator": ">=0.6.0 <1.0.0",
45
- "@fluentui-react-native/experimental-avatar": ">=0.16.0 <1.0.0",
46
- "@fluentui-react-native/experimental-button": "0.16.13",
47
- "@fluentui-react-native/experimental-checkbox": "0.12.9",
45
+ "@fluentui-react-native/experimental-avatar": ">=0.16.1 <1.0.0",
46
+ "@fluentui-react-native/experimental-button": "0.16.14",
47
+ "@fluentui-react-native/experimental-checkbox": "0.12.10",
48
48
  "@fluentui-react-native/experimental-expander": "0.4.0",
49
- "@fluentui-react-native/experimental-menu-button": ">=0.4.16 <1.0.0",
50
- "@fluentui-react-native/experimental-native-date-picker": ">=0.6.0 <1.0.0",
49
+ "@fluentui-react-native/experimental-menu-button": ">=0.4.17 <1.0.0",
50
+ "@fluentui-react-native/experimental-native-date-picker": ">=0.6.1 <1.0.0",
51
51
  "@fluentui-react-native/experimental-shadow": "0.2.10",
52
52
  "@fluentui-react-native/experimental-shimmer": "0.7.0",
53
- "@fluentui-react-native/experimental-tabs": "0.5.8",
54
- "@fluentui-react-native/experimental-text": ">=0.11.0 <1.0.0",
53
+ "@fluentui-react-native/experimental-tabs": "0.5.9",
54
+ "@fluentui-react-native/experimental-text": ">=0.11.1 <1.0.0",
55
55
  "@fluentui-react-native/framework": ">=0.8.0 <1.0.0",
56
- "@fluentui-react-native/icon": "0.13.3",
57
- "@fluentui-react-native/interactive-hooks": ">=0.18.0 <1.0.0",
58
- "@fluentui-react-native/menu": "^1.0.22",
59
- "@fluentui-react-native/notification": "0.11.4",
60
- "@fluentui-react-native/stack": ">=0.7.2 <1.0.0",
61
- "@fluentui-react-native/switch": "^0.3.0",
62
- "@fluentui-react-native/text": ">=0.13.0 <1.0.0",
56
+ "@fluentui-react-native/icon": "0.13.4",
57
+ "@fluentui-react-native/interactive-hooks": ">=0.18.1 <1.0.0",
58
+ "@fluentui-react-native/menu": "^1.0.23",
59
+ "@fluentui-react-native/notification": "0.12.0",
60
+ "@fluentui-react-native/stack": ">=0.7.3 <1.0.0",
61
+ "@fluentui-react-native/switch": "^0.3.1",
62
+ "@fluentui-react-native/text": ">=0.14.0 <1.0.0",
63
63
  "@fluentui-react-native/theme": ">=0.7.0 <1.0.0",
64
64
  "@fluentui-react-native/theme-types": ">=0.18.0 <1.0.0",
65
65
  "@fluentui-react-native/themed-stylesheet": "^1.4.0",
66
66
  "@fluentui-react-native/theming-utils": ">=0.14.0 <1.0.0",
67
67
  "@fluentui-react-native/win32-theme": ">=0.20.1 <1.0.0",
68
- "@fluentui/react-native": ">=0.32.4 <1.0.0",
68
+ "@fluentui/react-native": ">=0.32.5 <1.0.0",
69
69
  "@react-native-community/slider": "^4.2.0",
70
70
  "@react-native-menu/menu": "^0.1.2",
71
71
  "@react-native-picker/picker": "^2.2.1",
@@ -102,7 +102,7 @@
102
102
  "react-native-macos": "^0.66.0",
103
103
  "react-native-svg": "^12.3.0",
104
104
  "react-native-svg-transformer": "^1.0.0",
105
- "react-native-test-app": "^1.4.0",
105
+ "react-native-test-app": "^1.6.2",
106
106
  "react-native-windows": "^0.66.0",
107
107
  "react-test-renderer": "17.0.2",
108
108
  "ts-node": "^8.10.1",
@@ -2,17 +2,50 @@
2
2
 
3
3
  import { ThemeProvider } from '@fluentui-react-native/theme';
4
4
  import * as React from 'react';
5
- import { Platform } from 'react-native';
5
+ import { Platform, useWindowDimensions } from 'react-native';
6
6
  import { FluentTester, FluentTesterProps } from './FluentTester';
7
7
  import { tests } from './testPages';
8
8
  import { testerTheme } from './theme/index';
9
9
 
10
- const isMobile = Platform.OS == 'android' || (Platform.OS === 'ios' && Platform.isPad === false);
10
+ type SizeClassIOS = 'regular' | 'compact' | undefined;
11
+
12
+ /**
13
+ * Hook that "guesses" our Size Class on iOS based on our window width.
14
+ * Note: this is hacky and should not be used.
15
+ *
16
+ * For more information about Size Classes, see the following:
17
+ * https://developer.apple.com/documentation/uikit/uitraitcollection
18
+ * https://developer.apple.com/design/human-interface-guidelines/foundations/layout/#platform-considerations
19
+ * @returns SizeClassIOS: enum determining our size class
20
+ */
21
+ const useSizeClassIOS_DO_NOT_USE: () => SizeClassIOS = () => {
22
+ if (Platform.OS === 'ios') {
23
+ /**
24
+ * Technically this violates the rules of hooks (calling hooks inside conditions) but Platform.OS checks are pretty non-conditional.
25
+ * This is necessary because useWindowDimensions() does not work in win32.
26
+ */
27
+ // eslint-disable-next-line react-hooks/rules-of-hooks
28
+ const width = useWindowDimensions().width;
29
+ if (Platform.isPad && width > 375) {
30
+ return 'regular';
31
+ } else {
32
+ return 'compact';
33
+ }
34
+ } else {
35
+ return undefined;
36
+ }
37
+ };
11
38
 
12
39
  export const FluentTesterApp: React.FunctionComponent<FluentTesterProps> = (props) => {
40
+ const sizeClass = useSizeClassIOS_DO_NOT_USE();
41
+ const isMobile = Platform.OS == 'android' || (Platform.OS === 'ios' && Platform.isPad === false);
42
+
43
+ // If on iPad we are presented in a Split View or Slide Over context, show the single pane view.
44
+ const shouldShowSinglePane = isMobile || (!isMobile && sizeClass === 'compact');
45
+
13
46
  return (
14
47
  <ThemeProvider theme={testerTheme}>
15
- <FluentTester enabledTests={tests} enableSinglePaneView={isMobile} {...props} />
48
+ <FluentTester enabledTests={tests} enableSinglePaneView={shouldShowSinglePane} {...props} />
16
49
  </ThemeProvider>
17
50
  );
18
51
  };
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M10.8556 8.15498C10.0225 7.69354 9 8.29608 9 9.24847V14.7516C9 15.704 10.0225 16.3065 10.8556 15.8451L16.6134 12.6561C16.852 12.524 17 12.2727 17 12C17 11.7273 16.852 11.4761 16.6134 11.3439L10.8556 8.15498ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM3.5 12C3.5 7.30558 7.30558 3.5 12 3.5C16.6944 3.5 20.5 7.30558 20.5 12C20.5 16.6944 16.6944 20.5 12 20.5C7.30558 20.5 3.5 16.6944 3.5 12Z"/></svg>