@fluentui-react-native/experimental-avatar 0.14.43 → 0.15.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 (112) hide show
  1. package/CHANGELOG.json +46 -1
  2. package/CHANGELOG.md +26 -2
  3. package/{lib-commonjs/Avatar.d.ts → lib/NativeAvatar.d.ts} +6 -6
  4. package/lib/NativeAvatar.d.ts.map +1 -0
  5. package/lib/{Avatar.js → NativeAvatar.js} +3 -3
  6. package/lib/NativeAvatar.js.map +1 -0
  7. package/lib/index.d.ts +1 -3
  8. package/lib/index.d.ts.map +1 -1
  9. package/lib/index.js +1 -3
  10. package/lib/index.js.map +1 -1
  11. package/{lib/Avatar.d.ts → lib-commonjs/NativeAvatar.d.ts} +6 -6
  12. package/lib-commonjs/NativeAvatar.d.ts.map +1 -0
  13. package/lib-commonjs/{Avatar.js → NativeAvatar.js} +4 -4
  14. package/lib-commonjs/NativeAvatar.js.map +1 -0
  15. package/lib-commonjs/index.d.ts +1 -3
  16. package/lib-commonjs/index.d.ts.map +1 -1
  17. package/lib-commonjs/index.js +1 -3
  18. package/lib-commonjs/index.js.map +1 -1
  19. package/package.json +2 -10
  20. package/src/{Avatar.tsx → NativeAvatar.tsx} +11 -11
  21. package/src/__tests__/{JSAvatar.test.jsx → Avatar.test.jsx} +2 -2
  22. package/src/__tests__/__snapshots__/Avatar.test.jsx.snap +93 -0
  23. package/src/index.ts +1 -3
  24. package/MIGRATION.md +0 -158
  25. package/SPEC.md +0 -305
  26. package/jest.config.js +0 -2
  27. package/lib/Avatar.d.ts.map +0 -1
  28. package/lib/Avatar.js.map +0 -1
  29. package/lib/JSAvatar.d.ts +0 -12
  30. package/lib/JSAvatar.d.ts.map +0 -1
  31. package/lib/JSAvatar.helpers.d.ts +0 -7
  32. package/lib/JSAvatar.helpers.d.ts.map +0 -1
  33. package/lib/JSAvatar.helpers.js +0 -28
  34. package/lib/JSAvatar.helpers.js.map +0 -1
  35. package/lib/JSAvatar.js +0 -75
  36. package/lib/JSAvatar.js.map +0 -1
  37. package/lib/JSAvatar.styling.d.ts +0 -5
  38. package/lib/JSAvatar.styling.d.ts.map +0 -1
  39. package/lib/JSAvatar.styling.js +0 -114
  40. package/lib/JSAvatar.styling.js.map +0 -1
  41. package/lib/JSAvatar.types.d.ts +0 -192
  42. package/lib/JSAvatar.types.d.ts.map +0 -1
  43. package/lib/JSAvatar.types.js +0 -56
  44. package/lib/JSAvatar.types.js.map +0 -1
  45. package/lib/JSAvatarTokens.d.ts +0 -5
  46. package/lib/JSAvatarTokens.d.ts.map +0 -1
  47. package/lib/JSAvatarTokens.js +0 -200
  48. package/lib/JSAvatarTokens.js.map +0 -1
  49. package/lib/JSAvatarTokens.win32.d.ts +0 -5
  50. package/lib/JSAvatarTokens.win32.d.ts.map +0 -1
  51. package/lib/JSAvatarTokens.win32.js +0 -203
  52. package/lib/JSAvatarTokens.win32.js.map +0 -1
  53. package/lib/getHashCode.d.ts +0 -8
  54. package/lib/getHashCode.d.ts.map +0 -1
  55. package/lib/getHashCode.js +0 -16
  56. package/lib/getHashCode.js.map +0 -1
  57. package/lib/titles.d.ts +0 -2
  58. package/lib/titles.d.ts.map +0 -1
  59. package/lib/titles.js +0 -109
  60. package/lib/titles.js.map +0 -1
  61. package/lib/useAvatar.d.ts +0 -33
  62. package/lib/useAvatar.d.ts.map +0 -1
  63. package/lib/useAvatar.js +0 -105
  64. package/lib/useAvatar.js.map +0 -1
  65. package/lib-commonjs/Avatar.d.ts.map +0 -1
  66. package/lib-commonjs/Avatar.js.map +0 -1
  67. package/lib-commonjs/JSAvatar.d.ts +0 -12
  68. package/lib-commonjs/JSAvatar.d.ts.map +0 -1
  69. package/lib-commonjs/JSAvatar.helpers.d.ts +0 -7
  70. package/lib-commonjs/JSAvatar.helpers.d.ts.map +0 -1
  71. package/lib-commonjs/JSAvatar.helpers.js +0 -32
  72. package/lib-commonjs/JSAvatar.helpers.js.map +0 -1
  73. package/lib-commonjs/JSAvatar.js +0 -79
  74. package/lib-commonjs/JSAvatar.js.map +0 -1
  75. package/lib-commonjs/JSAvatar.styling.d.ts +0 -5
  76. package/lib-commonjs/JSAvatar.styling.d.ts.map +0 -1
  77. package/lib-commonjs/JSAvatar.styling.js +0 -117
  78. package/lib-commonjs/JSAvatar.styling.js.map +0 -1
  79. package/lib-commonjs/JSAvatar.types.d.ts +0 -192
  80. package/lib-commonjs/JSAvatar.types.d.ts.map +0 -1
  81. package/lib-commonjs/JSAvatar.types.js +0 -59
  82. package/lib-commonjs/JSAvatar.types.js.map +0 -1
  83. package/lib-commonjs/JSAvatarTokens.d.ts +0 -5
  84. package/lib-commonjs/JSAvatarTokens.d.ts.map +0 -1
  85. package/lib-commonjs/JSAvatarTokens.js +0 -204
  86. package/lib-commonjs/JSAvatarTokens.js.map +0 -1
  87. package/lib-commonjs/JSAvatarTokens.win32.d.ts +0 -5
  88. package/lib-commonjs/JSAvatarTokens.win32.d.ts.map +0 -1
  89. package/lib-commonjs/JSAvatarTokens.win32.js +0 -207
  90. package/lib-commonjs/JSAvatarTokens.win32.js.map +0 -1
  91. package/lib-commonjs/getHashCode.d.ts +0 -8
  92. package/lib-commonjs/getHashCode.d.ts.map +0 -1
  93. package/lib-commonjs/getHashCode.js +0 -20
  94. package/lib-commonjs/getHashCode.js.map +0 -1
  95. package/lib-commonjs/titles.d.ts +0 -2
  96. package/lib-commonjs/titles.d.ts.map +0 -1
  97. package/lib-commonjs/titles.js +0 -112
  98. package/lib-commonjs/titles.js.map +0 -1
  99. package/lib-commonjs/useAvatar.d.ts +0 -33
  100. package/lib-commonjs/useAvatar.d.ts.map +0 -1
  101. package/lib-commonjs/useAvatar.js +0 -112
  102. package/lib-commonjs/useAvatar.js.map +0 -1
  103. package/src/JSAvatar.helpers.ts +0 -35
  104. package/src/JSAvatar.styling.ts +0 -159
  105. package/src/JSAvatar.tsx +0 -80
  106. package/src/JSAvatar.types.ts +0 -259
  107. package/src/JSAvatarTokens.ts +0 -203
  108. package/src/JSAvatarTokens.win32.ts +0 -206
  109. package/src/__tests__/__snapshots__/JSAvatar.test.jsx.snap +0 -96
  110. package/src/getHashCode.ts +0 -16
  111. package/src/titles.ts +0 -108
  112. package/src/useAvatar.ts +0 -122
package/SPEC.md DELETED
@@ -1,305 +0,0 @@
1
- # Avatar
2
-
3
- ## Background
4
-
5
- The Avatar component represents a person or entity. It displays the person's image, initials, or an icon, and can be either circular or square.
6
- Previously it was a component PersonaCoin which used an old version of framework. There are more details in MIGRATION.md.
7
-
8
- ```ts
9
- import { JSAvatar } from '@fluentui-react-native/experimental-avatar';
10
- ```
11
-
12
- ## Sample Code
13
-
14
- Basic examples:
15
-
16
- ```jsx
17
- <JSAvatar />
18
- <JSAvatar icon={{ svgSource: { uri: 'https://www.example.com/test.svg', viewBox: '0 0 100 100' } }} size={120} />
19
- <JSAvatar src="../../path-to-image.png" active="active" activeAppearance="ring" size={56} />
20
- <JSAvatar shape="square" avatarColor="purple" name="Richard Feynman" />
21
- ```
22
-
23
- More examples on the [Test pages for the Avatar](../../../apps/fluent-tester/src/FluentTester/TestComponents/Avatar). Instructions on running the tester app can be found [here](../../../apps/fluent-tester/README.md).
24
-
25
- ## Variants
26
-
27
- ### Active
28
-
29
- Optional activity indicator.
30
- Active prop can be `unset`, `active` and `inactive`. Default is `unset`.
31
-
32
- - active: the avatar will be decorated according to activeAppearance, e.g. `ring`.
33
- - inactive: the avatar will be partially transparent (0.8 opacity).
34
- - unset: normal display
35
-
36
- ### ActiveAppearance
37
-
38
- `activeAppearance` can be used when `active` prop set to `active`.
39
- It adds `ring` as extra visual.
40
-
41
- ### Badge
42
-
43
- The `Avatar` component can include presence badge when active prop is undefined or `unset`.
44
-
45
- ### Color
46
-
47
- The Avatar supports color variants when displaying initials or an icon:
48
-
49
- - Neutral - Gray (default).
50
- - Brand - Brand colors from the theme
51
- - Colorful - Pick from a list of pre-defined Avatar colors. The color will be assigned based on a hash of the name (to "randomly" assign a person a color). The color name (like darkRed) can also be specified explicitly in case the use case requires a different algorithm to pick the color.
52
-
53
- ### Icon
54
-
55
- The `Avatar` component can include an `icon` that appears if there's no image or initials.
56
-
57
- ### Image
58
-
59
- The `Avatar` component can include an `image`.
60
-
61
- ### Initials
62
-
63
- Initials can be passed using `initials` prop or generated from `name` prop using getInitials method.
64
- Here are the requirements from Web spec:
65
-
66
- 1. If only one word is provided, pull the first letter of the word.
67
- 2. If 2 words provided, pull first letter of both words.
68
- 3. If 2+ words provided, pull first letter of first word and last word.
69
- 4. Ignore suffixes (i.e. Jr, III).
70
- 5. Ignore words in parantheses Ignore special characters i.e. parantheses, dashes If numeric, fall back to Icon If first character is not alphabetic, fall back to icon.
71
-
72
- But requirements are still being discussed. This area will be updated once we come up with final solition. There are different implementations in different teams.
73
-
74
- ### Name
75
-
76
- Name prop is used to generate initials.
77
-
78
- ### Shape
79
-
80
- The Avatar supports a circular and square (with rounded corners) shape.
81
-
82
- ### Sizes
83
-
84
- `Avatar` supports next sizes: `20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 96, 120`.
85
- Default size for win32 is 24.
86
-
87
- ## API
88
-
89
- ### Slots
90
-
91
- The `Avatar` component has the following slots:
92
-
93
- - `root` - The outer container representing the `Avatar` wrapper.
94
- - `image` - If specified, renders an `image`
95
- - `initials` - If specified, renders initials when there's no `image`
96
- - `icon` - If specified, renders an `icon` if there's no `image` or `initials`.
97
- - `initialsBackground` - It's a wrapper for initials and icon.
98
- - `ring` - If specified, renders the ring for the `Avatar` when active prop is set to `active`.
99
- - `badge` - If specified, renders presence badge. Example: `badge={{ status: 'outOfOffice' }}.`.
100
-
101
- The slots can be modified using the `compose` function on the `Avatar`. For more information on using the `compose` API, please see [this page](../../framework/composition/README.md).
102
-
103
- ### Props
104
-
105
- ```ts
106
- export interface JSAvatarProps extends IViewProps, AvatarConfigurableProps {
107
- /**
108
- * Activity indicator
109
- * * active: the avatar will be decorated according to activeAppearance
110
- * * inactive: the avatar will be reduced in size and partially transparent
111
- * * unset: normal display
112
- *
113
- * @defaultvalue unset
114
- */
115
- active?: AvatarActive;
116
-
117
- /**
118
- * The appearance when `active="active"`
119
- *
120
- * @defaultvalue ring
121
- */
122
- activeAppearance?: AvatarActiveAppearance;
123
-
124
- /**
125
- * Badge shows the avatar's presence status.
126
- * Badge can be shown only if `active` prop is undefined or unset
127
- */
128
- badge?: PresenceBadgeProps;
129
-
130
- /**
131
- * Icon to be displayed when the avatar doesn't have an image or initials.
132
- *
133
- * @defaultvalue `PersonRegular` (the default icon's size depends on the Avatar's size)
134
- */
135
- icon?: IconSourcesType;
136
-
137
- /**
138
- * Specify a string to be used instead of the name, to determine which color to use when color="colorful".
139
- * Use this when a name is not available, but there is another unique identifier that can be used instead.
140
- */
141
- idForColor?: string;
142
-
143
- /**
144
- * The initials are displayed when there is no image (including while the image is loading).
145
- *
146
- * It is usually not necessary to specify custom initials; by default they will be derived from the `name` prop, using the `getInitials` function.
147
- */
148
- initials?: string;
149
-
150
- /**
151
- * The name of the person or entity represented by this Avatar. This should always be provided if it is available.
152
- *
153
- * The name will be used to determine the initials displayed when there is no icon, as well as provided to
154
- * accessibility tools.
155
- */
156
- name?: string;
157
-
158
- /**
159
- * Size of the avatar in pixels.
160
- *
161
- * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and
162
- * based on design guidelines for the Avatar control.
163
- *
164
- * @defaultvalue 24
165
- */
166
- size?: AvatarSize;
167
-
168
- /**
169
- * The avatar can have a circular or square shape.
170
- * @defaultvalue circular
171
- */
172
- shape?: AvatarShape;
173
-
174
- /**
175
- * Shorthand for passing image URL instead of using `image` prop
176
- */
177
- imageUrl?: string;
178
- }
179
- ```
180
-
181
- ### Styling Tokens
182
-
183
- Tokens can be used to customize the styling of the control by using the `customize` function on the `Avatar`. For more information on using the `customize` API, please see [this page](../../framework/composition/README.md). The `Avatar` has the following tokens:
184
-
185
- ```ts
186
- export interface JSAvatarTokens extends IBackgroundColorTokens, IForegroundColorTokens, AvatarConfigurableProps, IBorderTokens, FontTokens {
187
- /**
188
- * Avatar ocality which is changed depending on `active` prop.
189
- */
190
- avatarOpacity?: number;
191
-
192
- /**
193
- * The size of presence badge.
194
- */
195
- badgeSize?: BadgeSize;
196
-
197
- /**
198
- * The icon color.
199
- */
200
- iconColor?: ColorValue;
201
-
202
- /**
203
- * The size of the icon.
204
- */
205
- iconSize?: number;
206
-
207
- /**
208
- * The height of the avatar.
209
- */
210
- height?: number;
211
-
212
- /**
213
- * Avatar shapes:
214
- */
215
- circular?: JSAvatarTokens;
216
- square?: JSAvatarTokens;
217
-
218
- /**
219
- * Token for inactive value of `active` prop
220
- */
221
- inactive?: JSAvatarTokens;
222
-
223
- /**
224
- * The width of the avatar.
225
- */
226
- width?: number;
227
-
228
- /**
229
- * Avatar sizes:
230
- */
231
- size20?: JSAvatarTokens;
232
- size24?: JSAvatarTokens;
233
- size28?: JSAvatarTokens;
234
- size32?: JSAvatarTokens;
235
- size36?: JSAvatarTokens;
236
- size40?: JSAvatarTokens;
237
- size48?: JSAvatarTokens;
238
- size56?: JSAvatarTokens;
239
- size64?: JSAvatarTokens;
240
- size72?: JSAvatarTokens;
241
- size96?: JSAvatarTokens;
242
- size120?: JSAvatarTokens;
243
-
244
- /**
245
- * Avatar colors:
246
- */
247
- neutral?: JSAvatarTokens;
248
- brand?: JSAvatarTokens;
249
- darkRed?: JSAvatarTokens;
250
- cranberry?: JSAvatarTokens;
251
- red?: JSAvatarTokens;
252
- pumpkin?: JSAvatarTokens;
253
- peach?: JSAvatarTokens;
254
- marigold?: JSAvatarTokens;
255
- gold?: JSAvatarTokens;
256
- brass?: JSAvatarTokens;
257
- brown?: JSAvatarTokens;
258
- forest?: JSAvatarTokens;
259
- seafoam?: JSAvatarTokens;
260
- darkGreen?: JSAvatarTokens;
261
- lightTeal?: JSAvatarTokens;
262
- teal?: JSAvatarTokens;
263
- steel?: JSAvatarTokens;
264
- blue?: JSAvatarTokens;
265
- royalBlue?: JSAvatarTokens;
266
- cornflower?: JSAvatarTokens;
267
- navy?: JSAvatarTokens;
268
- lavender?: JSAvatarTokens;
269
- purple?: JSAvatarTokens;
270
- grape?: JSAvatarTokens;
271
- lilac?: JSAvatarTokens;
272
- pink?: JSAvatarTokens;
273
- magenta?: JSAvatarTokens;
274
- plum?: JSAvatarTokens;
275
- beige?: JSAvatarTokens;
276
- mink?: JSAvatarTokens;
277
- platinum?: JSAvatarTokens;
278
- anchor?: JSAvatarTokens;
279
- }
280
- ```
281
-
282
- ## Behaviors
283
-
284
- ### States
285
-
286
- The following section describes the different states which `Avatar` can be in as a result of interaction.
287
-
288
- #### showRing state
289
-
290
- Ring is shown when `showRing` is set to true
291
-
292
- #### transparentRing state
293
-
294
- Makes ring transparent
295
-
296
- #### showBadge state
297
-
298
- showBadge is set to true when `active` prop is `unset` or undefined
299
-
300
- ### Interaction
301
-
302
- For now Avatar doesn't support interactions.
303
- For the next step we will need to add tooltip and onClick handler.
304
-
305
- ## Accessibility
package/jest.config.js DELETED
@@ -1,2 +0,0 @@
1
- const { configureReactNativeJest } = require('@fluentui-react-native/scripts');
2
- module.exports = configureReactNativeJest('android');
@@ -1 +0,0 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../src/Avatar.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,YAAY,GAAG;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,IA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e,CAAC,CAAC;AAYhE,IAAM,uBAAuB,GAAsB,aAAa,CAAC,oBAAoB,CAAC;AA6EtF,IAAM,sBAAsB,GAA2B,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAS/E,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAa;IACxC,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,KAAkB,EAAE,QAA8B;QAC5D,IAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAElC,OAAO,UAAC,IAAiB,IAAK,OAAA,UAAC,IAAI,eAAK,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,EAAI,EAArC,CAAqC,CAAC;IACtE,CAAC;CACF,CAAC,CAAC"}
package/lib/JSAvatar.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { JSAvatarProps, JSAvatarState } from './JSAvatar.types';
2
- /**
3
- * A function which determines if a set of styles should be applied to the compoent given the current state and props of the avatar.
4
- *
5
- * @param layer The name of the state that is being checked for
6
- * @param state The current state of the avatar
7
- * @param userProps The props that were passed into the avatar
8
- * @returns Whether the styles that are assigned to the layer should be applied to the avatar
9
- */
10
- export declare const avatarLookup: (layer: string, state: JSAvatarState, userProps: JSAvatarProps) => boolean;
11
- export declare const JSAvatar: import("@fluentui-react-native/framework").ComposableComponent<JSAvatarProps, import("./JSAvatar.types").AvatarSlotProps, import("./JSAvatar.types").JSAvatarTokens, object>;
12
- //# sourceMappingURL=JSAvatar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSAvatar.d.ts","sourceRoot":"","sources":["../src/JSAvatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAA8B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAS5F;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,UAAW,MAAM,SAAS,aAAa,aAAa,aAAa,KAAG,OAY5F,CAAC;AAEF,eAAO,MAAM,QAAQ,8KA8CnB,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare type AvatarSizeConfig = {
2
- iconSize: number;
3
- iconStrokeWidth: number;
4
- initialsSize: number;
5
- };
6
- export declare function getRingConfig(size: number): any;
7
- //# sourceMappingURL=JSAvatar.helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSAvatar.helpers.d.ts","sourceRoot":"","sources":["../src/JSAvatar.helpers.ts"],"names":[],"mappings":"AAQA,oBAAY,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAoB/C"}
@@ -1,28 +0,0 @@
1
- import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
- var sizeAdjustment = {
3
- small: 8,
4
- medium: 12,
5
- large: 16,
6
- };
7
- export function getRingConfig(size) {
8
- if (size <= 48) {
9
- return {
10
- size: size + sizeAdjustment.small,
11
- stroke: globalTokens.stroke.width.thick,
12
- innerStroke: globalTokens.stroke.width.thick,
13
- };
14
- }
15
- if (size <= 71) {
16
- return {
17
- size: size + sizeAdjustment.medium,
18
- stroke: globalTokens.stroke.width.thicker,
19
- innerStroke: globalTokens.stroke.width.thicker,
20
- };
21
- }
22
- return {
23
- size: size + sizeAdjustment.large,
24
- stroke: globalTokens.stroke.width.thickest,
25
- innerStroke: globalTokens.stroke.width.thickest,
26
- };
27
- }
28
- //# sourceMappingURL=JSAvatar.helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSAvatar.helpers.js","sourceRoot":"","sources":["../src/JSAvatar.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,IAAM,cAAc,GAAG;IACrB,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;CACV,CAAC;AAQF,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,IAAI,IAAI,IAAI,EAAE,EAAE;QACd,OAAO;YACL,IAAI,EAAE,IAAI,GAAG,cAAc,CAAC,KAAK;YACjC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK;YACvC,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK;SAC7C,CAAC;KACH;IACD,IAAI,IAAI,IAAI,EAAE,EAAE;QACd,OAAO;YACL,IAAI,EAAE,IAAI,GAAG,cAAc,CAAC,MAAM;YAClC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO;YACzC,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO;SAC/C,CAAC;KACH;IACD,OAAO;QACL,IAAI,EAAE,IAAI,GAAG,cAAc,CAAC,KAAK;QACjC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;QAC1C,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KAChD,CAAC;AACJ,CAAC"}
package/lib/JSAvatar.js DELETED
@@ -1,75 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- /** @jsx withSlots */
24
- import { Image, View, Text, Platform } from 'react-native';
25
- import { JSAvatarName } from './JSAvatar.types';
26
- import { stylingSettings } from './JSAvatar.styling';
27
- import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework';
28
- import { useAvatar } from './useAvatar';
29
- import { PresenceBadge } from '@fluentui-react-native/badge';
30
- import { Icon } from '@fluentui-react-native/icon';
31
- import { createIconProps } from '@fluentui-react-native/interactive-hooks';
32
- import { SvgXml } from 'react-native-svg';
33
- /**
34
- * A function which determines if a set of styles should be applied to the compoent given the current state and props of the avatar.
35
- *
36
- * @param layer The name of the state that is being checked for
37
- * @param state The current state of the avatar
38
- * @param userProps The props that were passed into the avatar
39
- * @returns Whether the styles that are assigned to the layer should be applied to the avatar
40
- */
41
- export var avatarLookup = function (layer, state, userProps) {
42
- var size = userProps.size;
43
- var avatarSize = size ? "size".concat(size) : '';
44
- return (state[layer] ||
45
- userProps[layer] ||
46
- layer === userProps['shape'] ||
47
- (!userProps['shape'] && layer === 'circular') ||
48
- layer === userProps['avatarColor'] ||
49
- layer === avatarSize ||
50
- (userProps.active === 'inactive' && layer === 'inactive'));
51
- };
52
- export var JSAvatar = compose(__assign(__assign({ displayName: JSAvatarName }, stylingSettings), { slots: {
53
- root: View,
54
- image: Image,
55
- initials: Text,
56
- initialsBackground: View,
57
- icon: Icon,
58
- ring: View,
59
- badge: PresenceBadge,
60
- }, useRender: function (userProps, useSlots) {
61
- var avatar = useAvatar(userProps);
62
- var iconProps = createIconProps(userProps.icon);
63
- var Slots = useSlots(avatar.props, function (layer) { return avatarLookup(layer, avatar.state, avatar.props); });
64
- return function (final) {
65
- var _a = mergeProps(avatar.props, final), activeAppearance = _a.activeAppearance, icon = _a.icon, initials = _a.initials, imageUrl = _a.imageUrl, badge = _a.badge, mergedProps = __rest(_a, ["activeAppearance", "icon", "initials", "imageUrl", "badge"]);
66
- var _b = avatar.state, showRing = _b.showRing, transparentRing = _b.transparentRing, showBadge = _b.showBadge;
67
- var svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS);
68
- var fallBackIconXml = "<svg width=\"14\" height=\"16\" viewBox=\"0 0 14 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z\" fill=\"currentColor\"/>\n </svg>\n ";
69
- return (withSlots(Slots.root, __assign({}, mergedProps),
70
- imageUrl ? (withSlots(Slots.image, { source: { uri: imageUrl } })) : (withSlots(Slots.initialsBackground, { accessible: false }, initials ? (withSlots(Slots.initials, { accessible: false }, initials)) : userProps.icon ? (withSlots(Slots.icon, __assign({}, iconProps, { accessible: false }))) : (svgIconsEnabled && withSlots(SvgXml, { xml: fallBackIconXml })))),
71
- showRing && !transparentRing && withSlots(Slots.ring, null),
72
- svgIconsEnabled && showBadge && withSlots(Slots.badge, __assign({}, badge))));
73
- };
74
- } }));
75
- //# sourceMappingURL=JSAvatar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSAvatar.js","sourceRoot":"","sources":["../src/JSAvatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAA+B,YAAY,EAAiB,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAY,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,KAAa,EAAE,KAAoB,EAAE,SAAwB;IACxF,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;IAC5B,IAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,cAAO,IAAI,CAAE,CAA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AAC;YACxG,IAAA,KAA2C,MAAM,CAAC,KAAK,EAArD,QAAQ,cAAA,EAAE,eAAe,qBAAA,EAAE,SAAS,eAAiB,CAAC;YAC9D,IAAM,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAY,CAAC,CAAC;YAC7F,IAAM,eAAe,GAAG,i0BAGvB,CAAC;YACF,OAAO,CACL,UAAC,KAAK,CAAC,IAAI,eAAK,WAAW;gBACxB,QAAQ,CAAC,CAAC,CAAC,CACV,UAAC,KAAK,CAAC,KAAK,IAAC,MAAM,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAI,CAC3C,CAAC,CAAC,CAAC,CACF,UAAC,KAAK,CAAC,kBAAkB,IAAC,UAAU,EAAE,KAAK,IACxC,QAAQ,CAAC,CAAC,CAAC,CACV,UAAC,KAAK,CAAC,QAAQ,IAAC,UAAU,EAAE,KAAK,IAAG,QAAQ,CAAkB,CAC/D,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB,UAAC,KAAK,CAAC,IAAI,eAAK,SAAS,IAAE,UAAU,EAAE,KAAK,IAAI,CACjD,CAAC,CAAC,CAAC,CACF,eAAe,IAAI,UAAC,MAAM,IAAC,GAAG,EAAE,eAAe,GAAI,CACpD,CACwB,CAC5B;gBACA,QAAQ,IAAI,CAAC,eAAe,IAAI,UAAC,KAAK,CAAC,IAAI,OAAG;gBAC9C,eAAe,IAAI,SAAS,IAAI,UAAC,KAAK,CAAC,KAAK,eAAK,KAAK,EAAI,CAChD,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,IACD,CAAC"}
@@ -1,5 +0,0 @@
1
- import { JSAvatarTokens, AvatarSlotProps, JSAvatarProps } from './JSAvatar.types';
2
- import { UseStylingOptions } from '@fluentui-react-native/framework';
3
- export declare const avatarStates: (keyof JSAvatarTokens)[];
4
- export declare const stylingSettings: UseStylingOptions<JSAvatarProps, AvatarSlotProps, JSAvatarTokens>;
5
- //# sourceMappingURL=JSAvatar.styling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSAvatar.styling.d.ts","sourceRoot":"","sources":["../src/JSAvatar.styling.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAEd,eAAe,EACf,aAAa,EAMd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAS,iBAAiB,EAAc,MAAM,kCAAkC,CAAC;AAYxF,eAAO,MAAM,YAAY,EAAE,CAAC,MAAM,cAAc,CAAC,EAYhD,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,aAAa,EAAE,eAAe,EAAE,cAAc,CAsH7F,CAAC"}
@@ -1,114 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
- import { JSAvatarName, AvatarColors, AvatarSizesForTokens, ColorSchemes, } from './JSAvatar.types';
22
- import { buildProps } from '@fluentui-react-native/framework';
23
- import { defaultJSAvatarTokens } from './JSAvatarTokens';
24
- import { getRingConfig } from './JSAvatar.helpers';
25
- import { borderStyles, fontStyles } from '@fluentui-react-native/tokens';
26
- var nameMap = {
27
- start: 'flex-start',
28
- center: 'center',
29
- end: 'flex-end',
30
- };
31
- export var avatarStates = __spreadArray(__spreadArray(__spreadArray([], AvatarColors, true), AvatarSizesForTokens, true), [
32
- 'neutral',
33
- 'brand',
34
- 'circular',
35
- 'square',
36
- 'inactive',
37
- 'ringColor',
38
- 'iconColor',
39
- 'iconSize',
40
- 'size',
41
- ], false);
42
- var tokensThatAreAlsoProps = ['avatarColor', 'initialsColor', 'ring'];
43
- export var stylingSettings = {
44
- tokens: [defaultJSAvatarTokens, JSAvatarName],
45
- tokensThatAreAlsoProps: tokensThatAreAlsoProps,
46
- states: avatarStates,
47
- slotProps: {
48
- root: buildProps(function (tokens) {
49
- var horizontalIconAlignment = tokens.horizontalIconAlignment, verticalIconAlignment = tokens.verticalIconAlignment, size = tokens.size, avatarOpacity = tokens.avatarOpacity;
50
- return {
51
- style: {
52
- flexDirection: 'row',
53
- width: size,
54
- height: size,
55
- justifyContent: nameMap[horizontalIconAlignment || 'end'],
56
- alignItems: nameMap[verticalIconAlignment || 'end'],
57
- horizontalIconAlignment: horizontalIconAlignment,
58
- verticalIconAlignment: verticalIconAlignment,
59
- opacity: avatarOpacity,
60
- },
61
- };
62
- }, ['horizontalIconAlignment', 'verticalIconAlignment', 'avatarOpacity', 'size']),
63
- initials: buildProps(function (tokens, theme) {
64
- return {
65
- style: __assign(__assign({}, fontStyles.from(tokens, theme)), { color: tokens.initialsColor || tokens.color, textAlign: 'center' }),
66
- };
67
- }, __spreadArray(['color', 'initialsColor'], fontStyles.keys, true)),
68
- initialsBackground: buildProps(function (tokens, theme) {
69
- var backgroundColor = tokens.backgroundColor, size = tokens.size, avatarColor = tokens.avatarColor;
70
- var _avatarColor = !avatarColor || AvatarColors.includes(avatarColor) || ColorSchemes.includes(avatarColor)
71
- ? backgroundColor
72
- : avatarColor;
73
- return {
74
- style: __assign(__assign({}, borderStyles.from(tokens, theme)), { width: size, height: size, flexGrow: 1, alignSelf: 'stretch', justifyContent: 'center', alignItems: 'center', backgroundColor: _avatarColor, borderWidth: tokens.borderWidth, borderColor: tokens.borderColor }),
75
- };
76
- }, __spreadArray(['avatarColor', 'backgroundColor', 'size', 'borderColor', 'borderWidth'], borderStyles.keys, true)),
77
- image: buildProps(function (tokens) {
78
- var borderRadius = tokens.borderRadius, size = tokens.size, borderWidth = tokens.borderWidth, borderColor = tokens.borderColor;
79
- return {
80
- style: {
81
- borderRadius: borderRadius,
82
- width: size,
83
- height: size,
84
- borderWidth: borderWidth,
85
- borderColor: borderColor,
86
- },
87
- };
88
- }, ['borderRadius', 'size', 'borderColor', 'borderWidth']),
89
- icon: buildProps(function (tokens) {
90
- return {
91
- style: {
92
- position: 'absolute',
93
- fontSize: tokens.iconSize,
94
- },
95
- color: tokens.color,
96
- width: tokens.iconSize,
97
- height: tokens.iconSize,
98
- };
99
- }, ['iconSize', 'iconColor']),
100
- ring: buildProps(function (tokens, theme) {
101
- var ringConfig = getRingConfig(tokens.size);
102
- return {
103
- style: __assign(__assign({ borderStyle: 'solid', width: ringConfig.size, height: ringConfig.size, position: 'absolute', top: -ringConfig.stroke * 2, left: -ringConfig.stroke * 2 }, borderStyles.from(tokens, theme)), { borderWidth: ringConfig.stroke, borderColor: tokens.ringColor }),
104
- };
105
- }, __spreadArray(['size', 'ringColor'], borderStyles.keys, true)),
106
- badge: buildProps(function (tokens) {
107
- return {
108
- size: tokens.badgeSize,
109
- shape: 'circular',
110
- };
111
- }, ['badgeSize']),
112
- },
113
- };
114
- //# sourceMappingURL=JSAvatar.styling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSAvatar.styling.js","sourceRoot":"","sources":["../src/JSAvatar.styling.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,YAAY,EAKZ,YAAY,EACZ,oBAAoB,EAEpB,YAAY,GAEb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAA4B,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAA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