@fluentui-react-native/experimental-avatar 0.14.44 → 0.15.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 (103) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +26 -2
  3. package/FRNAvatar.podspec +2 -2
  4. package/{lib-commonjs/Avatar.d.ts → lib/NativeAvatar.d.ts} +6 -6
  5. package/lib/NativeAvatar.d.ts.map +1 -0
  6. package/lib/{Avatar.js → NativeAvatar.js} +3 -3
  7. package/lib/NativeAvatar.js.map +1 -0
  8. package/lib/index.d.ts +1 -3
  9. package/lib/index.d.ts.map +1 -1
  10. package/lib/index.js +1 -3
  11. package/lib/index.js.map +1 -1
  12. package/{lib/Avatar.d.ts → lib-commonjs/NativeAvatar.d.ts} +6 -6
  13. package/lib-commonjs/NativeAvatar.d.ts.map +1 -0
  14. package/lib-commonjs/{Avatar.js → NativeAvatar.js} +4 -4
  15. package/lib-commonjs/NativeAvatar.js.map +1 -0
  16. package/lib-commonjs/index.d.ts +1 -3
  17. package/lib-commonjs/index.d.ts.map +1 -1
  18. package/lib-commonjs/index.js +1 -3
  19. package/lib-commonjs/index.js.map +1 -1
  20. package/package.json +2 -10
  21. package/src/{Avatar.tsx → NativeAvatar.tsx} +11 -11
  22. package/src/__tests__/{JSAvatar.test.jsx → Avatar.test.jsx} +2 -2
  23. package/src/__tests__/__snapshots__/{JSAvatar.test.jsx.snap → Avatar.test.jsx.snap} +0 -0
  24. package/src/index.ts +1 -3
  25. package/MIGRATION.md +0 -157
  26. package/SPEC.md +0 -295
  27. package/jest.config.js +0 -2
  28. package/lib/Avatar.d.ts.map +0 -1
  29. package/lib/Avatar.js.map +0 -1
  30. package/lib/JSAvatar.d.ts +0 -12
  31. package/lib/JSAvatar.d.ts.map +0 -1
  32. package/lib/JSAvatar.js +0 -84
  33. package/lib/JSAvatar.js.map +0 -1
  34. package/lib/JSAvatar.styling.d.ts +0 -5
  35. package/lib/JSAvatar.styling.d.ts.map +0 -1
  36. package/lib/JSAvatar.styling.js +0 -158
  37. package/lib/JSAvatar.styling.js.map +0 -1
  38. package/lib/JSAvatar.types.d.ts +0 -213
  39. package/lib/JSAvatar.types.d.ts.map +0 -1
  40. package/lib/JSAvatar.types.js +0 -56
  41. package/lib/JSAvatar.types.js.map +0 -1
  42. package/lib/JSAvatarTokens.d.ts +0 -5
  43. package/lib/JSAvatarTokens.d.ts.map +0 -1
  44. package/lib/JSAvatarTokens.js +0 -198
  45. package/lib/JSAvatarTokens.js.map +0 -1
  46. package/lib/JSAvatarTokens.win32.d.ts +0 -5
  47. package/lib/JSAvatarTokens.win32.d.ts.map +0 -1
  48. package/lib/JSAvatarTokens.win32.js +0 -201
  49. package/lib/JSAvatarTokens.win32.js.map +0 -1
  50. package/lib/getHashCode.d.ts +0 -8
  51. package/lib/getHashCode.d.ts.map +0 -1
  52. package/lib/getHashCode.js +0 -16
  53. package/lib/getHashCode.js.map +0 -1
  54. package/lib/titles.d.ts +0 -2
  55. package/lib/titles.d.ts.map +0 -1
  56. package/lib/titles.js +0 -109
  57. package/lib/titles.js.map +0 -1
  58. package/lib/useAvatar.d.ts +0 -33
  59. package/lib/useAvatar.d.ts.map +0 -1
  60. package/lib/useAvatar.js +0 -106
  61. package/lib/useAvatar.js.map +0 -1
  62. package/lib-commonjs/Avatar.d.ts.map +0 -1
  63. package/lib-commonjs/Avatar.js.map +0 -1
  64. package/lib-commonjs/JSAvatar.d.ts +0 -12
  65. package/lib-commonjs/JSAvatar.d.ts.map +0 -1
  66. package/lib-commonjs/JSAvatar.js +0 -88
  67. package/lib-commonjs/JSAvatar.js.map +0 -1
  68. package/lib-commonjs/JSAvatar.styling.d.ts +0 -5
  69. package/lib-commonjs/JSAvatar.styling.d.ts.map +0 -1
  70. package/lib-commonjs/JSAvatar.styling.js +0 -161
  71. package/lib-commonjs/JSAvatar.styling.js.map +0 -1
  72. package/lib-commonjs/JSAvatar.types.d.ts +0 -213
  73. package/lib-commonjs/JSAvatar.types.d.ts.map +0 -1
  74. package/lib-commonjs/JSAvatar.types.js +0 -59
  75. package/lib-commonjs/JSAvatar.types.js.map +0 -1
  76. package/lib-commonjs/JSAvatarTokens.d.ts +0 -5
  77. package/lib-commonjs/JSAvatarTokens.d.ts.map +0 -1
  78. package/lib-commonjs/JSAvatarTokens.js +0 -202
  79. package/lib-commonjs/JSAvatarTokens.js.map +0 -1
  80. package/lib-commonjs/JSAvatarTokens.win32.d.ts +0 -5
  81. package/lib-commonjs/JSAvatarTokens.win32.d.ts.map +0 -1
  82. package/lib-commonjs/JSAvatarTokens.win32.js +0 -205
  83. package/lib-commonjs/JSAvatarTokens.win32.js.map +0 -1
  84. package/lib-commonjs/getHashCode.d.ts +0 -8
  85. package/lib-commonjs/getHashCode.d.ts.map +0 -1
  86. package/lib-commonjs/getHashCode.js +0 -20
  87. package/lib-commonjs/getHashCode.js.map +0 -1
  88. package/lib-commonjs/titles.d.ts +0 -2
  89. package/lib-commonjs/titles.d.ts.map +0 -1
  90. package/lib-commonjs/titles.js +0 -112
  91. package/lib-commonjs/titles.js.map +0 -1
  92. package/lib-commonjs/useAvatar.d.ts +0 -33
  93. package/lib-commonjs/useAvatar.d.ts.map +0 -1
  94. package/lib-commonjs/useAvatar.js +0 -113
  95. package/lib-commonjs/useAvatar.js.map +0 -1
  96. package/src/JSAvatar.styling.ts +0 -201
  97. package/src/JSAvatar.tsx +0 -96
  98. package/src/JSAvatar.types.ts +0 -286
  99. package/src/JSAvatarTokens.ts +0 -201
  100. package/src/JSAvatarTokens.win32.ts +0 -204
  101. package/src/getHashCode.ts +0 -16
  102. package/src/titles.ts +0 -108
  103. package/src/useAvatar.ts +0 -126
package/CHANGELOG.json CHANGED
@@ -2,7 +2,67 @@
2
2
  "name": "@fluentui-react-native/experimental-avatar",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 16 Jun 2022 19:10:48 GMT",
5
+ "date": "Thu, 23 Jun 2022 16:07:53 GMT",
6
+ "tag": "@fluentui-react-native/experimental-avatar_v0.15.1",
7
+ "version": "0.15.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "78454019+lyzhan7@users.noreply.github.com",
12
+ "package": "@fluentui-react-native/experimental-avatar",
13
+ "commit": "7880dae12f6e2283020d0a6413fdb7e8193afb2b",
14
+ "comment": "Bump FUA podspecs/podfile.lock to 0.5.2"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 21 Jun 2022 23:39:02 GMT",
21
+ "tag": "@fluentui-react-native/experimental-avatar_v0.15.0",
22
+ "version": "0.15.0",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "joannaquu@gmail.com",
27
+ "package": "@fluentui-react-native/experimental-avatar",
28
+ "commit": "6426ed850d4667d8cefdd7140017959dca5642fe",
29
+ "comment": "merge"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Tue, 21 Jun 2022 21:07:14 GMT",
36
+ "tag": "@fluentui-react-native/experimental-avatar_v0.15.0",
37
+ "version": "0.15.0",
38
+ "comments": {
39
+ "minor": [
40
+ {
41
+ "author": "v.kozova13@gmail.com",
42
+ "package": "@fluentui-react-native/experimental-avatar",
43
+ "commit": "2ad8751db36583b42e819bbf6667161d2687cf7a",
44
+ "comment": "Renamed Avatar to NativeAvatar, JSAvatar to Avatar"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Tue, 21 Jun 2022 20:05:26 GMT",
51
+ "tag": "@fluentui-react-native/experimental-avatar_v0.14.45",
52
+ "version": "0.14.45",
53
+ "comments": {
54
+ "patch": [
55
+ {
56
+ "author": "v.kozova13@gmail.com",
57
+ "package": "@fluentui-react-native/experimental-avatar",
58
+ "commit": "f93c1716455fb220897d993f4450f00b05f0bf0a",
59
+ "comment": "Rewrote tests using it.each method"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Thu, 16 Jun 2022 19:11:01 GMT",
6
66
  "tag": "@fluentui-react-native/experimental-avatar_v0.14.44",
7
67
  "version": "0.14.44",
8
68
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,36 @@
1
1
  # Change Log - @fluentui-react-native/experimental-avatar
2
2
 
3
- This log was last generated on Thu, 16 Jun 2022 19:10:48 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 Jun 2022 16:07:53 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.15.1
8
+
9
+ Thu, 23 Jun 2022 16:07:53 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump FUA podspecs/podfile.lock to 0.5.2 (78454019+lyzhan7@users.noreply.github.com)
14
+
15
+ ## 0.15.0
16
+
17
+ Tue, 21 Jun 2022 21:07:14 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - Renamed Avatar to NativeAvatar, JSAvatar to Avatar (v.kozova13@gmail.com)
22
+
23
+ ## 0.14.45
24
+
25
+ Tue, 21 Jun 2022 20:05:26 GMT
26
+
27
+ ### Patches
28
+
29
+ - Rewrote tests using it.each method (v.kozova13@gmail.com)
30
+
7
31
  ## 0.14.44
8
32
 
9
- Thu, 16 Jun 2022 19:10:48 GMT
33
+ Thu, 16 Jun 2022 19:11:01 GMT
10
34
 
11
35
  ### Patches
12
36
 
package/FRNAvatar.podspec CHANGED
@@ -16,11 +16,11 @@ Pod::Spec.new do |s|
16
16
 
17
17
  s.ios.deployment_target = "14.0"
18
18
  s.ios.source_files = "ios/*.{swift,h,m}"
19
- s.ios.dependency 'MicrosoftFluentUI/Avatar_ios', '0.5.0'
19
+ s.ios.dependency 'MicrosoftFluentUI/Avatar_ios', '0.5.2'
20
20
 
21
21
  s.osx.deployment_target = "10.15"
22
22
  s.osx.source_files = "macos/*.{swift,h,m}"
23
- s.osx.dependency 'MicrosoftFluentUI', '0.5.0'
23
+ s.osx.dependency 'MicrosoftFluentUI', '0.5.2'
24
24
 
25
25
  s.dependency 'React'
26
26
  end
@@ -2,7 +2,7 @@ import { ImageURISource, ViewProps, ColorValue } from 'react-native';
2
2
  export declare type Size = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge';
3
3
  export declare type AvatarStyle = 'default' | 'accent' | 'group' | 'outlined' | 'outlinedPrimary' | 'overflow';
4
4
  export declare type Presence = 'none' | 'available' | 'away' | 'blocked' | 'doNotDisturb' | 'offline' | 'unknown';
5
- export declare type AvatarTokens = {
5
+ export declare type NativeAvatarTokens = {
6
6
  /**
7
7
  * Supported Avatar sizes
8
8
  */
@@ -12,7 +12,7 @@ export declare type AvatarTokens = {
12
12
  */
13
13
  avatarStyle?: AvatarStyle;
14
14
  };
15
- export declare type AvatarProps = AvatarTokens & {
15
+ export declare type NativeAvatarProps = NativeAvatarTokens & {
16
16
  /**
17
17
  * The image to be displayed
18
18
  */
@@ -63,8 +63,8 @@ export declare type AvatarProps = AvatarTokens & {
63
63
  */
64
64
  customBorderImageSource?: ImageURISource;
65
65
  };
66
- export declare type NativeAvatarViewProps = ViewProps & AvatarProps;
67
- export declare const Avatar: import("@fluentui-react-native/framework").ComposableComponent<AvatarProps, {
66
+ export declare type NativeAvatarViewProps = ViewProps & NativeAvatarProps;
67
+ export declare const NativeAvatar: import("@fluentui-react-native/framework").ComposableComponent<NativeAvatarProps, {
68
68
  root: NativeAvatarViewProps;
69
- }, AvatarTokens, object>;
70
- //# sourceMappingURL=Avatar.d.ts.map
69
+ }, NativeAvatarTokens, object>;
70
+ //# sourceMappingURL=NativeAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAvatar.d.ts","sourceRoot":"","sources":["../src/NativeAvatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAiB,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAOpF,oBAAY,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElF,oBAAY,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,iBAAiB,GAAG,UAAU,CAAC;AAEvG,oBAAY,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAQ1G,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,oBAAY,iBAAiB,GAAG,kBAAkB,GAAG;IACnD;;OAEG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,cAAc,CAAC;CAC1C,CAAC;AAIF,oBAAY,qBAAqB,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAOlE,eAAO,MAAM,YAAY;UAJJ,qBAAqB;8BAgCxC,CAAC"}
@@ -13,11 +13,11 @@ var __assign = (this && this.__assign) || function () {
13
13
  import { compose, buildProps, mergeProps, withSlots } from '@fluentui-react-native/framework';
14
14
  import { NativeModules } from 'react-native';
15
15
  import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
16
- var avatarName = 'Avatar';
16
+ var avatarName = 'NativeAvatar';
17
17
  var NativeAvatarView = ensureNativeComponent('FRNAvatarView');
18
18
  var ExportedNativeConstants = NativeModules.FRNAvatarViewManager;
19
19
  var tokensThatAreAlsoProps = ['size', 'avatarStyle'];
20
- export var Avatar = compose({
20
+ export var NativeAvatar = compose({
21
21
  displayName: avatarName,
22
22
  tokens: [
23
23
  {
@@ -42,4 +42,4 @@ export var Avatar = compose({
42
42
  return function (rest) { return withSlots(Root, __assign({}, mergeProps(props, rest))); };
43
43
  },
44
44
  });
45
- //# sourceMappingURL=Avatar.js.map
45
+ //# sourceMappingURL=NativeAvatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAvatar.js","sourceRoot":"","sources":["../src/NativeAvatar.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,OAAO,EAAY,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAkB,aAAa,EAAyB,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,IAAM,UAAU,GAAG,cAAc,CAAC;AAElC,IAAM,gBAAgB,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;AAYhE,IAAM,uBAAuB,GAAsB,aAAa,CAAC,oBAAoB,CAAC;AA6EtF,IAAM,sBAAsB,GAAiC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AASrF,MAAM,CAAC,IAAM,YAAY,GAAG,OAAO,CAAa;IAC9C,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE;QACN;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,SAAS;SACvB;QACD,UAAU;KACX;IACD,sBAAsB,wBAAA;IACtB,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACjC,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAM,IAAK,OAAA,CAAC;YACX,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE;gBACL,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;gBAClD,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;aAClD;SACF,CAAC,EANU,CAMV,EACF,CAAC,MAAM,CAAC,CACT;KACF;IACD,SAAS,EAAE,UAAC,KAAwB,EAAE,QAA8B;QAClE,IAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAElC,OAAO,UAAC,IAAuB,IAAK,OAAA,UAAC,IAAI,eAAK,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,EAAI,EAArC,CAAqC,CAAC;IAC5E,CAAC;CACF,CAAC,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,4 +1,2 @@
1
- export * from './Avatar';
2
- export * from './JSAvatar';
3
- export * from './JSAvatar.types';
1
+ export * from './NativeAvatar';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
package/lib/index.js CHANGED
@@ -1,4 +1,2 @@
1
- export * from './Avatar';
2
- export * from './JSAvatar';
3
- export * from './JSAvatar.types';
1
+ export * from './NativeAvatar';
4
2
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -2,7 +2,7 @@ import { ImageURISource, ViewProps, ColorValue } from 'react-native';
2
2
  export declare type Size = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge';
3
3
  export declare type AvatarStyle = 'default' | 'accent' | 'group' | 'outlined' | 'outlinedPrimary' | 'overflow';
4
4
  export declare type Presence = 'none' | 'available' | 'away' | 'blocked' | 'doNotDisturb' | 'offline' | 'unknown';
5
- export declare type AvatarTokens = {
5
+ export declare type NativeAvatarTokens = {
6
6
  /**
7
7
  * Supported Avatar sizes
8
8
  */
@@ -12,7 +12,7 @@ export declare type AvatarTokens = {
12
12
  */
13
13
  avatarStyle?: AvatarStyle;
14
14
  };
15
- export declare type AvatarProps = AvatarTokens & {
15
+ export declare type NativeAvatarProps = NativeAvatarTokens & {
16
16
  /**
17
17
  * The image to be displayed
18
18
  */
@@ -63,8 +63,8 @@ export declare type AvatarProps = AvatarTokens & {
63
63
  */
64
64
  customBorderImageSource?: ImageURISource;
65
65
  };
66
- export declare type NativeAvatarViewProps = ViewProps & AvatarProps;
67
- export declare const Avatar: import("@fluentui-react-native/framework").ComposableComponent<AvatarProps, {
66
+ export declare type NativeAvatarViewProps = ViewProps & NativeAvatarProps;
67
+ export declare const NativeAvatar: import("@fluentui-react-native/framework").ComposableComponent<NativeAvatarProps, {
68
68
  root: NativeAvatarViewProps;
69
- }, AvatarTokens, object>;
70
- //# sourceMappingURL=Avatar.d.ts.map
69
+ }, NativeAvatarTokens, object>;
70
+ //# sourceMappingURL=NativeAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAvatar.d.ts","sourceRoot":"","sources":["../src/NativeAvatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAiB,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAOpF,oBAAY,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElF,oBAAY,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,iBAAiB,GAAG,UAAU,CAAC;AAEvG,oBAAY,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAQ1G,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,oBAAY,iBAAiB,GAAG,kBAAkB,GAAG;IACnD;;OAEG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,cAAc,CAAC;CAC1C,CAAC;AAIF,oBAAY,qBAAqB,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAOlE,eAAO,MAAM,YAAY;UAJJ,qBAAqB;8BAgCxC,CAAC"}
@@ -11,16 +11,16 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.Avatar = void 0;
14
+ exports.NativeAvatar = void 0;
15
15
  /** @jsx withSlots */
16
16
  var framework_1 = require("@fluentui-react-native/framework");
17
17
  var react_native_1 = require("react-native");
18
18
  var component_cache_1 = require("@fluentui-react-native/component-cache");
19
- var avatarName = 'Avatar';
19
+ var avatarName = 'NativeAvatar';
20
20
  var NativeAvatarView = (0, component_cache_1.ensureNativeComponent)('FRNAvatarView');
21
21
  var ExportedNativeConstants = react_native_1.NativeModules.FRNAvatarViewManager;
22
22
  var tokensThatAreAlsoProps = ['size', 'avatarStyle'];
23
- exports.Avatar = (0, framework_1.compose)({
23
+ exports.NativeAvatar = (0, framework_1.compose)({
24
24
  displayName: avatarName,
25
25
  tokens: [
26
26
  {
@@ -45,4 +45,4 @@ exports.Avatar = (0, framework_1.compose)({
45
45
  return function (rest) { return (0, framework_1.withSlots)(Root, __assign({}, (0, framework_1.mergeProps)(props, rest))); };
46
46
  },
47
47
  });
48
- //# sourceMappingURL=Avatar.js.map
48
+ //# sourceMappingURL=NativeAvatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAvatar.js","sourceRoot":"","sources":["../src/NativeAvatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,8DAAwG;AACxG,6CAAoF;AACpF,0EAA+E;AAE/E,IAAM,UAAU,GAAG,cAAc,CAAC;AAElC,IAAM,gBAAgB,GAAG,IAAA,uCAAqB,EAAC,eAAe,CAAC,CAAC;AAYhE,IAAM,uBAAuB,GAAsB,4BAAa,CAAC,oBAAoB,CAAC;AA6EtF,IAAM,sBAAsB,GAAiC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AASxE,QAAA,YAAY,GAAG,IAAA,mBAAO,EAAa;IAC9C,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE;QACN;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,SAAS;SACvB;QACD,UAAU;KACX;IACD,sBAAsB,wBAAA;IACtB,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACjC,SAAS,EAAE;QACT,IAAI,EAAE,IAAA,sBAAU,EACd,UAAC,MAAM,IAAK,OAAA,CAAC;YACX,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE;gBACL,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;gBAClD,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;aAClD;SACF,CAAC,EANU,CAMV,EACF,CAAC,MAAM,CAAC,CACT;KACF;IACD,SAAS,EAAE,UAAC,KAAwB,EAAE,QAA8B;QAClE,IAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAElC,OAAO,UAAC,IAAuB,IAAK,OAAA,2BAAC,IAAI,eAAK,IAAA,sBAAU,EAAC,KAAK,EAAE,IAAI,CAAC,EAAI,EAArC,CAAqC,CAAC;IAC5E,CAAC;CACF,CAAC,CAAC"}
@@ -1,4 +1,2 @@
1
- export * from './Avatar';
2
- export * from './JSAvatar';
3
- export * from './JSAvatar.types';
1
+ export * from './NativeAvatar';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -10,7 +10,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./Avatar"), exports);
14
- __exportStar(require("./JSAvatar"), exports);
15
- __exportStar(require("./JSAvatar.types"), exports);
13
+ __exportStar(require("./NativeAvatar"), exports);
16
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/experimental-avatar",
3
- "version": "0.14.44",
3
+ "version": "0.15.1",
4
4
  "description": "A cross-platform Avatar component using the Fluent Design System. Currently only implemented on iOS",
5
5
  "license": "MIT",
6
6
  "author": "Microsoft <fluentuinativeowners@microsoft.com>",
@@ -25,16 +25,8 @@
25
25
  "directory": "packages/experimental/Avatar"
26
26
  },
27
27
  "dependencies": {
28
- "@fluentui-react-native/adapters": "^0.8.5",
29
- "@fluentui-react-native/badge": "^0.0.43",
30
28
  "@fluentui-react-native/component-cache": "^1.3.2",
31
- "@fluentui-react-native/framework": "0.7.30",
32
- "@fluentui-react-native/icon": "^0.12.1",
33
- "@fluentui-react-native/interactive-hooks": "^0.16.3",
34
- "@fluentui-react-native/theme-tokens": "^0.18.0",
35
- "@fluentui-react-native/tokens": "^0.14.0",
36
- "@fluentui-react-native/use-styling": "^0.8.3",
37
- "react-native-svg": "^12.3.0"
29
+ "@fluentui-react-native/framework": "0.7.30"
38
30
  },
39
31
  "devDependencies": {
40
32
  "@fluentui-react-native/eslint-config-rules": "^0.1.1",
@@ -3,7 +3,7 @@ import { compose, UseSlots, buildProps, mergeProps, withSlots } from '@fluentui-
3
3
  import { ImageURISource, NativeModules, ViewProps, ColorValue } from 'react-native';
4
4
  import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
5
5
 
6
- const avatarName = 'Avatar';
6
+ const avatarName = 'NativeAvatar';
7
7
 
8
8
  const NativeAvatarView = ensureNativeComponent('FRNAvatarView');
9
9
 
@@ -19,7 +19,7 @@ interface ExportedConstants {
19
19
 
20
20
  const ExportedNativeConstants: ExportedConstants = NativeModules.FRNAvatarViewManager;
21
21
 
22
- export type AvatarTokens = {
22
+ export type NativeAvatarTokens = {
23
23
  /**
24
24
  * Supported Avatar sizes
25
25
  */
@@ -31,7 +31,7 @@ export type AvatarTokens = {
31
31
  avatarStyle?: AvatarStyle;
32
32
  };
33
33
 
34
- export type AvatarProps = AvatarTokens & {
34
+ export type NativeAvatarProps = NativeAvatarTokens & {
35
35
  /**
36
36
  * The image to be displayed
37
37
  */
@@ -94,16 +94,16 @@ export type AvatarProps = AvatarTokens & {
94
94
  customBorderImageSource?: ImageURISource;
95
95
  };
96
96
 
97
- const tokensThatAreAlsoProps: (keyof AvatarTokens)[] = ['size', 'avatarStyle'];
97
+ const tokensThatAreAlsoProps: (keyof NativeAvatarTokens)[] = ['size', 'avatarStyle'];
98
98
 
99
- export type NativeAvatarViewProps = ViewProps & AvatarProps;
99
+ export type NativeAvatarViewProps = ViewProps & NativeAvatarProps;
100
100
  interface AvatarType {
101
- props: AvatarProps;
101
+ props: NativeAvatarProps;
102
102
  slotProps: { root: NativeAvatarViewProps };
103
- tokens: AvatarTokens;
103
+ tokens: NativeAvatarTokens;
104
104
  }
105
105
 
106
- export const Avatar = compose<AvatarType>({
106
+ export const NativeAvatar = compose<AvatarType>({
107
107
  displayName: avatarName,
108
108
  tokens: [
109
109
  {
@@ -115,7 +115,7 @@ export const Avatar = compose<AvatarType>({
115
115
  tokensThatAreAlsoProps,
116
116
  slots: { root: NativeAvatarView },
117
117
  slotProps: {
118
- root: buildProps<NativeAvatarViewProps, AvatarTokens>(
118
+ root: buildProps<NativeAvatarViewProps, NativeAvatarTokens>(
119
119
  (tokens) => ({
120
120
  size: tokens.size,
121
121
  style: {
@@ -126,9 +126,9 @@ export const Avatar = compose<AvatarType>({
126
126
  ['size'],
127
127
  ),
128
128
  },
129
- useRender: (props: AvatarProps, useSlots: UseSlots<AvatarType>) => {
129
+ useRender: (props: NativeAvatarProps, useSlots: UseSlots<AvatarType>) => {
130
130
  const Root = useSlots(props).root;
131
131
 
132
- return (rest: AvatarProps) => <Root {...mergeProps(props, rest)} />;
132
+ return (rest: NativeAvatarProps) => <Root {...mergeProps(props, rest)} />;
133
133
  },
134
134
  });
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { JSAvatar } from '..';
2
+ import { Avatar } from '..';
3
3
  import { getInitials } from '../useAvatar';
4
4
  import * as renderer from 'react-test-renderer';
5
5
 
@@ -23,7 +23,7 @@ const initialsForNameWithTitles = ['F', 'RF'];
23
23
 
24
24
  describe('Avatar rendering', () => {
25
25
  it('renders Avatar', () => {
26
- const tree = renderer.create(<JSAvatar />).toJSON();
26
+ const tree = renderer.create(<Avatar />).toJSON();
27
27
  expect(tree).toMatchSnapshot();
28
28
  });
29
29
  });
package/src/index.ts CHANGED
@@ -1,3 +1 @@
1
- export * from './Avatar';
2
- export * from './JSAvatar';
3
- export * from './JSAvatar.types';
1
+ export * from './NativeAvatar';
package/MIGRATION.md DELETED
@@ -1,157 +0,0 @@
1
- # Avatar Migration
2
-
3
- ## Migration from PersonaCoin component
4
-
5
- ### Component renames
6
-
7
- | `PersonaCoin` | `Avatar` |
8
- | ------------------------------------------------------------ | ------------------------------------------------ |
9
- | `<PersonaCoin size='size24' initials="SN" />` | `<Avatar size={24} initials="SN" />` |
10
- | `<PersonaCoin presence='available' coinColorFluent="red" />` | `<Avatar size={24} initials="SN" />` |
11
- | `<PersonaCoin imageUrl="./path/name.png" />` | `<Avatar image={{source: './path/name.png'}} />` |
12
- | `<PersonaCoin imageDescription="Photo" />` | `<Avatar accessibilityLabel="Photo" />` |
13
-
14
- ### Props that remain as is
15
-
16
- - `icon`
17
- - `initials`
18
- - `size`
19
- - `imageUrl`
20
-
21
- ### Props no longer supported with an equivalent functionality in Avatar
22
-
23
- - `coinColorFluent` => Use `avatarColor` instead.
24
- - `imageDescription` => Use `accessibilityLabel` instead.
25
- - `isOutOfOffice` => `outOfOffice` is part of `badge` slot. Use `badge={{ outOfOffice: true }} />`.
26
- - `presence` => It's part of `badge` slot. Use `badge={{ presence: 'available' }} />`.
27
- - `ring` => `ring` became part of `activeAppearance` prop. It's used together with `active='active'` prop.
28
-
29
- ### New props
30
-
31
- - `active`
32
- - `activeAppearance` - According to Web spec there should be `ring`, `shadow`, `glow`, `ring-shadow`, `ring-glow`.
33
- Currently we support only `ring`. `activeAppearance` can be used when `active` prop set to `active`.
34
- - `name` - is used for generation initials with `getInitials` method.
35
- - `shape` - can be `circular` and `square`.
36
- - `idForColor`
37
-
38
- ### Tokens that remain as is
39
-
40
- - Any props that are part of `IBackgroundColorTokens`, `IForegroundColorTokens`
41
-
42
- - `iconSize`
43
- - `iconWeight`
44
- - `size`
45
-
46
- ### Tokens no longer supported with an equivalent functionality in Avatar
47
-
48
- - `initialsSize` => Use `fontSize` token instead
49
- - `coinColorFluent` => Use `avatarColor` token instead
50
- - `coinSize` => Use size tokens instead.
51
- - `ring` => Use `ringBackgroundColor`, `ringColor`, `ringThickness` and `ringInnerGap`
52
-
53
- ### Tokens no longer supported without an equivalent functionality in Avatar
54
-
55
- - `iconStrokeWidth` and `iconStrokeColor` => This was for activity ring around the Avatar.
56
- We support ring in `activeAppearance` prop. `borderColor` will be changed using `ringColor` token and `borderWidth` using ringThickness token.
57
- - `horizontalIconAlignment` and `verticalIconAlignment` => these props were responsible for presence badge position.
58
-
59
- ### New tokens
60
-
61
- - Any props that are part of `FontTokens` and `IBorderTokens`.
62
- - `avatarOpacity`
63
- - `badgeSize`
64
- - `circular`
65
- - `iconColor`
66
- - `inactive`
67
- - `square`
68
-
69
- Size tokens:
70
-
71
- - `size20`
72
- - `size24`
73
- - `size28`
74
- - `size32`
75
- - `size36`
76
- - `size40`
77
- - `size48`
78
- - `size56`
79
- - `size64`
80
- - `size72`
81
- - `size96`
82
- - `size120`
83
-
84
- Color tokens:
85
-
86
- - `neutral`
87
- - `brand`
88
- - `darkRed`
89
- - `cranberry`
90
- - `red`
91
- - `pumpkin`
92
- - `peach`
93
- - `marigold`
94
- - `gold`
95
- - `brass`
96
- - `brown`
97
- - `forest`
98
- - `seafoam`
99
- - `darkGreen`
100
- - `lightTeal`
101
- - `teal`
102
- - `steel`
103
- - `blue`
104
- - `royalBlue`
105
- - `cornflower`
106
- - `navy`
107
- - `lavender`
108
- - `purple`
109
- - `grape`
110
- - `lilac`
111
- - `pink`
112
- - `magenta`
113
- - `plum`
114
- - `beige`
115
- - `mink`
116
- - `platinum`
117
- - `anchor`
118
-
119
- ### Slots no longer supported with an equivalent functionality in v1 Avatar
120
-
121
- - `photo` => Use `image` slot instead or `imageUrl` prop.
122
-
123
- ### Slots no longer supported without an equivalent functionality in v1 Avatar
124
-
125
- - `glow` => is not suported in this version of Avatar
126
-
127
- ### New slots
128
-
129
- - `badge`
130
-
131
- ### Prop differences due to technical differences and limitations
132
-
133
- - Web uses `image` slot which is part of `react-image` component. They use syntax `image={{ src: './MonaKane.jpg' }}`. If we use similar syntax, our users will need to write `image={{ source: { uri: './MonaKane.jpg' } }} />`. In majority of cases users pass image URL that's why we still have opportunity to pass this parameter using `imageUrl` prop. But there's also a way to pass `image` object similar to Web.
134
-
135
- ### Other Prop differences
136
-
137
- - `avatarColor` => Web uses `color` prop and omits it from `ComponentProps<AvatarSlots>`. Their users can style font color using CSS but our users can style the component via tokens. If we use the same prop name (color), we'll need to omit it from foregroundTokens and come up with a new name for the font color prop. That's why we use `avatarColor` prop instead of `color`.
138
-
139
- ## Property mapping
140
-
141
- | `PersonaCoin` | `Avatar` |
142
- | ------------------ | -------------------- |
143
- | | `active` |
144
- | | `activeAppearance` |
145
- | | `badge` |
146
- | `coinColorFluent` | `avatarColor` |
147
- | `icon` | `icon` |
148
- | | `idForColor` |
149
- | `imageUrl` | `imageUrl` |
150
- | `imageDescription` | `accessibilityLabel` |
151
- | `isOutOfOffice` | |
152
- | `initials` | `initials` |
153
- | | `name` |
154
- | `presence` | |
155
- | `ring` | |
156
- | | `shape` |
157
- | `size` | `size` |