@fluentui-react-native/experimental-avatar 0.14.24 → 0.14.27

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 (83) hide show
  1. package/CHANGELOG.json +46 -1
  2. package/CHANGELOG.md +26 -2
  3. package/jest.config.js +2 -0
  4. package/lib/JSAvatar.d.ts.map +1 -1
  5. package/lib/JSAvatar.js +7 -6
  6. package/lib/JSAvatar.js.map +1 -1
  7. package/lib/JSAvatar.styling.d.ts.map +1 -1
  8. package/lib/JSAvatar.styling.js +9 -12
  9. package/lib/JSAvatar.styling.js.map +1 -1
  10. package/lib/JSAvatar.types.d.ts +50 -7
  11. package/lib/JSAvatar.types.d.ts.map +1 -1
  12. package/lib/JSAvatar.types.js +2 -1
  13. package/lib/JSAvatar.types.js.map +1 -1
  14. package/lib/JSAvatarTokens.d.ts.map +1 -1
  15. package/lib/JSAvatarTokens.js +142 -56
  16. package/lib/JSAvatarTokens.js.map +1 -1
  17. package/lib/titles.d.ts +2 -0
  18. package/lib/titles.d.ts.map +1 -0
  19. package/lib/titles.js +109 -0
  20. package/lib/titles.js.map +1 -0
  21. package/lib/useAvatar.d.ts +25 -0
  22. package/lib/useAvatar.d.ts.map +1 -1
  23. package/lib/useAvatar.js +49 -2
  24. package/lib/useAvatar.js.map +1 -1
  25. package/lib/utils/getInitials.d.ts +15 -0
  26. package/lib/utils/getInitials.d.ts.map +1 -0
  27. package/lib/utils/getInitials.js +78 -0
  28. package/lib/utils/getInitials.js.map +1 -0
  29. package/lib/utils/getInitials.test.d.ts +2 -0
  30. package/lib/utils/getInitials.test.d.ts.map +1 -0
  31. package/lib/utils/getInitials.test.js +116 -0
  32. package/lib/utils/getInitials.test.js.map +1 -0
  33. package/lib/utils/index.d.ts +2 -0
  34. package/lib/utils/index.d.ts.map +1 -0
  35. package/lib/utils/index.js +2 -0
  36. package/lib/utils/index.js.map +1 -0
  37. package/lib-commonjs/JSAvatar.d.ts.map +1 -1
  38. package/lib-commonjs/JSAvatar.js +7 -6
  39. package/lib-commonjs/JSAvatar.js.map +1 -1
  40. package/lib-commonjs/JSAvatar.styling.d.ts.map +1 -1
  41. package/lib-commonjs/JSAvatar.styling.js +7 -10
  42. package/lib-commonjs/JSAvatar.styling.js.map +1 -1
  43. package/lib-commonjs/JSAvatar.types.d.ts +50 -7
  44. package/lib-commonjs/JSAvatar.types.d.ts.map +1 -1
  45. package/lib-commonjs/JSAvatar.types.js +3 -2
  46. package/lib-commonjs/JSAvatar.types.js.map +1 -1
  47. package/lib-commonjs/JSAvatarTokens.d.ts.map +1 -1
  48. package/lib-commonjs/JSAvatarTokens.js +142 -56
  49. package/lib-commonjs/JSAvatarTokens.js.map +1 -1
  50. package/lib-commonjs/titles.d.ts +2 -0
  51. package/lib-commonjs/titles.d.ts.map +1 -0
  52. package/lib-commonjs/titles.js +112 -0
  53. package/lib-commonjs/titles.js.map +1 -0
  54. package/lib-commonjs/useAvatar.d.ts +25 -0
  55. package/lib-commonjs/useAvatar.d.ts.map +1 -1
  56. package/lib-commonjs/useAvatar.js +53 -3
  57. package/lib-commonjs/useAvatar.js.map +1 -1
  58. package/lib-commonjs/utils/getInitials.d.ts +15 -0
  59. package/lib-commonjs/utils/getInitials.d.ts.map +1 -0
  60. package/lib-commonjs/utils/getInitials.js +82 -0
  61. package/lib-commonjs/utils/getInitials.js.map +1 -0
  62. package/lib-commonjs/utils/getInitials.test.d.ts +2 -0
  63. package/lib-commonjs/utils/getInitials.test.d.ts.map +1 -0
  64. package/lib-commonjs/utils/getInitials.test.js +118 -0
  65. package/lib-commonjs/utils/getInitials.test.js.map +1 -0
  66. package/lib-commonjs/utils/index.d.ts +2 -0
  67. package/lib-commonjs/utils/index.d.ts.map +1 -0
  68. package/lib-commonjs/utils/index.js +6 -0
  69. package/lib-commonjs/utils/index.js.map +1 -0
  70. package/package.json +1 -1
  71. package/src/.eslintrc.js +3 -0
  72. package/src/JSAvatar.styling.ts +8 -9
  73. package/src/JSAvatar.tsx +7 -6
  74. package/src/JSAvatar.types.ts +57 -7
  75. package/src/JSAvatarTokens.ts +142 -56
  76. package/src/__tests__/JSAvatar.test.jsx +156 -0
  77. package/src/__tests__/__snapshots__/JSAvatar.test.jsx.snap +34 -0
  78. package/src/titles.ts +108 -0
  79. package/src/useAvatar.ts +53 -1
  80. package/src/utils/getInitials.test.ts +154 -0
  81. package/src/utils/getInitials.ts +92 -0
  82. package/src/utils/index.ts +1 -0
  83. package/tsconfig.json +2 -1
@@ -9,6 +9,11 @@ var defaultJSAvatarTokens = function (t) {
9
9
  color: theme_tokens_1.globalTokens.color.white,
10
10
  backgroundColor: theme_tokens_1.globalTokens.color.cornflower.primary,
11
11
  avatarOpacity: 1,
12
+ fontFamily: t.typography.families.primary,
13
+ fontWeight: theme_tokens_1.globalTokens.font.weight.semibold,
14
+ fontSize: theme_tokens_1.globalTokens.font.size[200],
15
+ width: 24,
16
+ height: 24,
12
17
  circular: {
13
18
  borderRadius: theme_tokens_1.globalTokens.corner.radius.circle,
14
19
  },
@@ -22,185 +27,266 @@ var defaultJSAvatarTokens = function (t) {
22
27
  width: 20,
23
28
  height: 20,
24
29
  badgeSize: 'smallest',
25
- iconSize: 10,
26
- initialsSize: 16,
30
+ iconSize: 16,
31
+ fontSize: theme_tokens_1.globalTokens.font.size[100],
32
+ square: {
33
+ borderRadius: theme_tokens_1.globalTokens.corner.radius.small,
34
+ },
27
35
  },
28
36
  size24: {
29
37
  width: 24,
30
38
  height: 24,
31
39
  badgeSize: 'smallest',
32
- iconSize: 10,
33
- initialsSize: 16,
40
+ iconSize: 16,
41
+ fontSize: theme_tokens_1.globalTokens.font.size[100],
42
+ square: {
43
+ borderRadius: theme_tokens_1.globalTokens.corner.radius.small,
44
+ },
34
45
  },
35
46
  size28: {
36
47
  width: 28,
37
48
  height: 28,
38
49
  badgeSize: 'smaller',
39
- iconSize: 16,
40
- initialsSize: 20,
50
+ iconSize: 20,
51
+ fontWeight: theme_tokens_1.globalTokens.font.weight.semibold,
52
+ fontSize: theme_tokens_1.globalTokens.font.size[100],
41
53
  },
42
54
  size32: {
43
55
  width: 32,
44
56
  height: 32,
45
57
  badgeSize: 'smaller',
46
- iconSize: 16,
47
- initialsSize: 20,
58
+ iconSize: 20,
59
+ fontSize: theme_tokens_1.globalTokens.font.size[100],
48
60
  },
49
61
  size36: {
50
62
  width: 36,
51
63
  height: 36,
52
64
  badgeSize: 'smaller',
53
- iconSize: 16,
54
- initialsSize: 20,
65
+ iconSize: 20,
55
66
  },
56
67
  size40: {
57
68
  width: 40,
58
69
  height: 40,
59
70
  badgeSize: 'small',
60
- iconSize: 16,
61
- initialsSize: 20,
71
+ iconSize: 20,
62
72
  },
63
73
  size48: {
64
74
  width: 48,
65
75
  height: 48,
66
76
  badgeSize: 'small',
67
- iconSize: 20,
68
- initialsSize: 24,
77
+ iconSize: 24,
69
78
  },
70
79
  size56: {
71
80
  width: 56,
72
81
  height: 56,
73
82
  badgeSize: 'medium',
74
- iconSize: 24,
75
- initialsSize: 28,
83
+ iconSize: 28,
84
+ fontSize: theme_tokens_1.globalTokens.font.size[400],
85
+ square: {
86
+ borderRadius: theme_tokens_1.globalTokens.corner.radius.large,
87
+ },
76
88
  },
77
89
  size64: {
78
90
  width: 64,
79
91
  height: 64,
80
92
  badgeSize: 'large',
81
- iconSize: 28,
82
- initialsSize: 32,
93
+ iconSize: 32,
94
+ fontSize: theme_tokens_1.globalTokens.font.size[500],
95
+ square: {
96
+ borderRadius: theme_tokens_1.globalTokens.corner.radius.large,
97
+ },
83
98
  },
84
99
  size72: {
85
100
  width: 72,
86
101
  height: 72,
87
102
  badgeSize: 'large',
88
- iconSize: 28,
89
- initialsSize: 32,
103
+ iconSize: 32,
104
+ fontSize: theme_tokens_1.globalTokens.font.size[500],
105
+ square: {
106
+ borderRadius: theme_tokens_1.globalTokens.corner.radius.large,
107
+ },
90
108
  },
91
109
  size96: {
92
110
  width: 96,
93
111
  height: 96,
94
112
  badgeSize: 'largest',
95
- iconSize: 40,
96
- initialsSize: 48,
113
+ iconSize: 48,
114
+ fontWeight: theme_tokens_1.globalTokens.font.weight.regular,
115
+ fontSize: theme_tokens_1.globalTokens.font.size[700],
116
+ square: {
117
+ borderRadius: theme_tokens_1.globalTokens.corner.radius.extraLarge,
118
+ },
97
119
  },
98
120
  size120: {
99
121
  width: 120,
100
122
  height: 120,
101
123
  badgeSize: 'largest',
102
- iconSize: 40,
103
- initialsSize: 48,
124
+ iconSize: 48,
125
+ fontWeight: theme_tokens_1.globalTokens.font.weight.regular,
126
+ fontSize: theme_tokens_1.globalTokens.font.size[900],
127
+ square: {
128
+ borderRadius: theme_tokens_1.globalTokens.corner.radius.extraLarge,
129
+ },
104
130
  },
105
131
  neutral: {
106
132
  backgroundColor: t.colors.neutralBackground6,
107
133
  color: t.colors.neutralForeground3,
108
- ringColor: t.colors.defaultBorder,
134
+ borderColor: t.colors.defaultBorder,
109
135
  },
110
136
  brand: {
111
137
  backgroundColor: t.colors.brandBackgroundStatic,
112
138
  color: t.colors.neutralForegroundOnBrand,
113
- ringColor: t.colors.brandedBorder,
139
+ borderColor: t.colors.brandedBorder,
114
140
  },
115
141
  darkRed: {
116
- backgroundColor: theme_tokens_1.globalTokens.color.darkRed.primary,
142
+ backgroundColor: theme_tokens_1.globalTokens.color.darkRed.tint40,
143
+ color: theme_tokens_1.globalTokens.color.darkRed.shade30,
144
+ borderColor: theme_tokens_1.globalTokens.color.darkRed.primary,
117
145
  },
118
146
  cranberry: {
119
- backgroundColor: theme_tokens_1.globalTokens.color.cranberry.primary,
147
+ backgroundColor: theme_tokens_1.globalTokens.color.cranberry.tint40,
148
+ color: theme_tokens_1.globalTokens.color.cranberry.shade30,
149
+ borderColor: theme_tokens_1.globalTokens.color.cranberry.primary,
120
150
  },
121
151
  red: {
122
- backgroundColor: theme_tokens_1.globalTokens.color.red.primary,
152
+ backgroundColor: theme_tokens_1.globalTokens.color.red.tint40,
153
+ color: theme_tokens_1.globalTokens.color.red.shade30,
154
+ borderColor: theme_tokens_1.globalTokens.color.red.primary,
123
155
  },
124
156
  pumpkin: {
125
- backgroundColor: theme_tokens_1.globalTokens.color.pumpkin.primary,
157
+ backgroundColor: theme_tokens_1.globalTokens.color.pumpkin.tint40,
158
+ color: theme_tokens_1.globalTokens.color.pumpkin.shade30,
159
+ borderColor: theme_tokens_1.globalTokens.color.pumpkin.primary,
126
160
  },
127
161
  peach: {
128
- backgroundColor: theme_tokens_1.globalTokens.color.peach.primary,
162
+ backgroundColor: theme_tokens_1.globalTokens.color.peach.tint40,
163
+ color: theme_tokens_1.globalTokens.color.peach.shade30,
164
+ borderColor: theme_tokens_1.globalTokens.color.peach.primary,
129
165
  },
130
166
  marigold: {
131
- backgroundColor: theme_tokens_1.globalTokens.color.marigold.primary,
167
+ backgroundColor: theme_tokens_1.globalTokens.color.marigold.tint40,
168
+ color: theme_tokens_1.globalTokens.color.marigold.shade30,
169
+ borderColor: theme_tokens_1.globalTokens.color.marigold.primary,
132
170
  },
133
171
  gold: {
134
- backgroundColor: theme_tokens_1.globalTokens.color.gold.primary,
172
+ backgroundColor: theme_tokens_1.globalTokens.color.gold.tint40,
173
+ color: theme_tokens_1.globalTokens.color.gold.shade30,
174
+ borderColor: theme_tokens_1.globalTokens.color.gold.primary,
135
175
  },
136
176
  brass: {
137
- backgroundColor: theme_tokens_1.globalTokens.color.brass.primary,
177
+ backgroundColor: theme_tokens_1.globalTokens.color.brass.tint40,
178
+ color: theme_tokens_1.globalTokens.color.brass.shade30,
179
+ borderColor: theme_tokens_1.globalTokens.color.brass.primary,
138
180
  },
139
181
  brown: {
140
- backgroundColor: theme_tokens_1.globalTokens.color.brown.primary,
182
+ backgroundColor: theme_tokens_1.globalTokens.color.brown.tint40,
183
+ color: theme_tokens_1.globalTokens.color.brown.shade30,
184
+ borderColor: theme_tokens_1.globalTokens.color.brown.primary,
141
185
  },
142
186
  forest: {
143
- backgroundColor: theme_tokens_1.globalTokens.color.forest.primary,
187
+ backgroundColor: theme_tokens_1.globalTokens.color.forest.tint40,
188
+ color: theme_tokens_1.globalTokens.color.forest.shade30,
189
+ borderColor: theme_tokens_1.globalTokens.color.forest.primary,
144
190
  },
145
191
  seafoam: {
146
- backgroundColor: theme_tokens_1.globalTokens.color.seafoam.primary,
192
+ backgroundColor: theme_tokens_1.globalTokens.color.seafoam.tint40,
193
+ color: theme_tokens_1.globalTokens.color.seafoam.shade30,
194
+ borderColor: theme_tokens_1.globalTokens.color.seafoam.primary,
147
195
  },
148
196
  darkGreen: {
149
- backgroundColor: theme_tokens_1.globalTokens.color.darkGreen.primary,
197
+ backgroundColor: theme_tokens_1.globalTokens.color.darkGreen.tint40,
198
+ color: theme_tokens_1.globalTokens.color.darkGreen.shade30,
199
+ borderColor: theme_tokens_1.globalTokens.color.darkGreen.primary,
150
200
  },
151
201
  lightTeal: {
152
- backgroundColor: theme_tokens_1.globalTokens.color.lightTeal.primary,
202
+ backgroundColor: theme_tokens_1.globalTokens.color.lightTeal.tint40,
203
+ color: theme_tokens_1.globalTokens.color.lightTeal.shade30,
204
+ borderColor: theme_tokens_1.globalTokens.color.lightTeal.primary,
153
205
  },
154
206
  teal: {
155
- backgroundColor: theme_tokens_1.globalTokens.color.teal.primary,
207
+ backgroundColor: theme_tokens_1.globalTokens.color.teal.tint40,
208
+ color: theme_tokens_1.globalTokens.color.teal.shade30,
209
+ borderColor: theme_tokens_1.globalTokens.color.teal.primary,
156
210
  },
157
211
  steel: {
158
- backgroundColor: theme_tokens_1.globalTokens.color.steel.primary,
212
+ backgroundColor: theme_tokens_1.globalTokens.color.steel.tint40,
213
+ color: theme_tokens_1.globalTokens.color.steel.shade30,
214
+ borderColor: theme_tokens_1.globalTokens.color.steel.primary,
159
215
  },
160
216
  blue: {
161
- backgroundColor: theme_tokens_1.globalTokens.color.blue.primary,
217
+ backgroundColor: theme_tokens_1.globalTokens.color.blue.tint40,
218
+ color: theme_tokens_1.globalTokens.color.blue.shade30,
219
+ borderColor: theme_tokens_1.globalTokens.color.blue.primary,
162
220
  },
163
221
  royalBlue: {
164
- backgroundColor: theme_tokens_1.globalTokens.color.royalBlue.primary,
222
+ backgroundColor: theme_tokens_1.globalTokens.color.royalBlue.tint40,
223
+ color: theme_tokens_1.globalTokens.color.royalBlue.shade30,
224
+ borderColor: theme_tokens_1.globalTokens.color.royalBlue.primary,
165
225
  },
166
226
  cornflower: {
167
- backgroundColor: theme_tokens_1.globalTokens.color.cornflower.primary,
227
+ backgroundColor: theme_tokens_1.globalTokens.color.cornflower.tint40,
228
+ color: theme_tokens_1.globalTokens.color.cornflower.shade30,
229
+ borderColor: theme_tokens_1.globalTokens.color.cornflower.primary,
168
230
  },
169
231
  navy: {
170
- backgroundColor: theme_tokens_1.globalTokens.color.navy.primary,
232
+ backgroundColor: theme_tokens_1.globalTokens.color.navy.tint40,
233
+ color: theme_tokens_1.globalTokens.color.navy.shade30,
234
+ borderColor: theme_tokens_1.globalTokens.color.navy.primary,
171
235
  },
172
236
  lavender: {
173
- backgroundColor: theme_tokens_1.globalTokens.color.lavender.primary,
237
+ backgroundColor: theme_tokens_1.globalTokens.color.lavender.tint40,
238
+ color: theme_tokens_1.globalTokens.color.lavender.shade30,
239
+ borderColor: theme_tokens_1.globalTokens.color.lavender.primary,
174
240
  },
175
241
  purple: {
176
- backgroundColor: theme_tokens_1.globalTokens.color.purple.primary,
242
+ backgroundColor: theme_tokens_1.globalTokens.color.purple.tint40,
243
+ color: theme_tokens_1.globalTokens.color.purple.shade30,
244
+ borderColor: theme_tokens_1.globalTokens.color.purple.primary,
177
245
  },
178
246
  grape: {
179
- backgroundColor: theme_tokens_1.globalTokens.color.grape.primary,
247
+ backgroundColor: theme_tokens_1.globalTokens.color.grape.tint40,
248
+ color: theme_tokens_1.globalTokens.color.grape.shade30,
249
+ borderColor: theme_tokens_1.globalTokens.color.grape.primary,
180
250
  },
181
251
  lilac: {
182
- backgroundColor: theme_tokens_1.globalTokens.color.lilac.primary,
252
+ backgroundColor: theme_tokens_1.globalTokens.color.lilac.tint40,
253
+ color: theme_tokens_1.globalTokens.color.lilac.shade30,
254
+ borderColor: theme_tokens_1.globalTokens.color.lilac.primary,
183
255
  },
184
256
  pink: {
185
- backgroundColor: theme_tokens_1.globalTokens.color.pink.primary,
257
+ backgroundColor: theme_tokens_1.globalTokens.color.pink.tint40,
258
+ color: theme_tokens_1.globalTokens.color.pink.shade30,
259
+ borderColor: theme_tokens_1.globalTokens.color.pink.primary,
186
260
  },
187
261
  magenta: {
188
- backgroundColor: theme_tokens_1.globalTokens.color.magenta.primary,
262
+ backgroundColor: theme_tokens_1.globalTokens.color.magenta.tint40,
263
+ color: theme_tokens_1.globalTokens.color.magenta.shade30,
264
+ borderColor: theme_tokens_1.globalTokens.color.magenta.primary,
189
265
  },
190
266
  plum: {
191
- backgroundColor: theme_tokens_1.globalTokens.color.plum.primary,
267
+ backgroundColor: theme_tokens_1.globalTokens.color.plum.tint40,
268
+ color: theme_tokens_1.globalTokens.color.plum.shade30,
269
+ borderColor: theme_tokens_1.globalTokens.color.plum.primary,
192
270
  },
193
271
  beige: {
194
- backgroundColor: theme_tokens_1.globalTokens.color.beige.primary,
272
+ backgroundColor: theme_tokens_1.globalTokens.color.beige.tint40,
273
+ color: theme_tokens_1.globalTokens.color.beige.shade30,
274
+ borderColor: theme_tokens_1.globalTokens.color.beige.primary,
195
275
  },
196
276
  mink: {
197
- backgroundColor: theme_tokens_1.globalTokens.color.mink.primary,
277
+ backgroundColor: theme_tokens_1.globalTokens.color.mink.tint40,
278
+ color: theme_tokens_1.globalTokens.color.mink.shade30,
279
+ borderColor: theme_tokens_1.globalTokens.color.mink.primary,
198
280
  },
199
281
  platinum: {
200
- backgroundColor: theme_tokens_1.globalTokens.color.platinum.primary,
282
+ backgroundColor: theme_tokens_1.globalTokens.color.platinum.tint40,
283
+ color: theme_tokens_1.globalTokens.color.platinum.shade30,
284
+ borderColor: theme_tokens_1.globalTokens.color.platinum.primary,
201
285
  },
202
286
  anchor: {
203
- backgroundColor: theme_tokens_1.globalTokens.color.anchor.primary,
287
+ backgroundColor: theme_tokens_1.globalTokens.color.anchor.tint40,
288
+ color: theme_tokens_1.globalTokens.color.anchor.shade30,
289
+ borderColor: theme_tokens_1.globalTokens.color.anchor.primary,
204
290
  },
205
291
  });
206
292
  };
@@ -1 +1 @@
1
- {"version":3,"file":"JSAvatarTokens.js","sourceRoot":"","sources":["../src/JSAvatarTokens.ts"],"names":[],"mappings":";;;AAGA,oEAAmE;AAE5D,IAAM,qBAAqB,GAAyC,UAAC,CAAQ;IAClF,OAAA,CAAC;QACC,uBAAuB,EAAE,KAAK;QAC9B,qBAAqB,EAAE,KAAK;QAC5B,KAAK,EAAE,2BAAY,CAAC,KAAK,CAAC,KAAK;QAC/B,eAAe,EAAE,2BAAY,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO;QACtD,aAAa,EAAE,CAAC;QAChB,QAAQ,EAAE;YACR,YAAY,EAAE,2BAAY,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM;SAChD;QACD,MAAM,EAAE;YACN,YAAY,EAAE,2BAAY,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM;SAChD;QACD,QAAQ,EAAE;YACR,aAAa,EAAE,GAAG;SACnB;QACD,MAAM,EAAE;YACN,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,EAAE;SACjB;QACD,MAAM,EAAE;YACN,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,EAAE;SACjB;QACD,MAAM,EAAE;YACN,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,EAAE;SACjB;QACD,MAAM,EAAE;YACN,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,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K,EAAE,2BAAY,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO;YACvC,WAAW,EAAE,2BAAY,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO;SAC9C;QACD,IAAI,EAAE;YACJ,eAAe,EAAE,2BAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM;YAC/C,KAAK,EAAE,2BAAY,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;YACtC,WAAW,EAAE,2BAAY,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;SAC7C;QACD,QAAQ,EAAE;YACR,eAAe,EAAE,2BAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM;YACnD,KAAK,EAAE,2BAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO;YAC1C,WAAW,EAAE,2BAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO;SACjD;QACD,MAAM,EAAE;YACN,eAAe,EAAE,2BAAY,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM;YACjD,KAAK,EAAE,2BAAY,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;YACxC,WAAW,EAAE,2BAAY,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;SAC/C;KACiB,CAAA;AA7RpB,CA6RoB,CAAC;AA9RV,QAAA,qBAAqB,yBA8RX"}
@@ -0,0 +1,2 @@
1
+ export declare const titles: Set<string>;
2
+ //# sourceMappingURL=titles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"titles.d.ts","sourceRoot":"","sources":["../src/titles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,aA2GjB,CAAC"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.titles = void 0;
4
+ exports.titles = new Set([
5
+ 'Mr',
6
+ 'Mrs',
7
+ 'Miss',
8
+ 'Ms',
9
+ 'Dr',
10
+ 'Admiral',
11
+ 'Air Comm',
12
+ 'Ambassador',
13
+ 'Baron',
14
+ 'Baroness',
15
+ 'Brig & Mrs',
16
+ 'Brig Gen',
17
+ 'Brigadier',
18
+ 'Brother',
19
+ 'Canon',
20
+ 'Capt',
21
+ 'Chief',
22
+ 'Cllr',
23
+ 'Col',
24
+ 'Commander',
25
+ 'Commander & Mrs',
26
+ 'Consul',
27
+ 'Consul General',
28
+ 'Count',
29
+ 'Countess',
30
+ 'Countess of',
31
+ 'Cpl',
32
+ 'Dame',
33
+ 'Deputy',
34
+ 'Dr & Mrs',
35
+ 'Drs',
36
+ 'Duchess',
37
+ 'Duke',
38
+ 'Earl',
39
+ 'Father',
40
+ 'General',
41
+ 'Gräfin',
42
+ 'HE',
43
+ 'HMA',
44
+ 'Her Grace',
45
+ 'His Excellency',
46
+ 'Jr',
47
+ 'Judge',
48
+ 'Justice',
49
+ 'Lady',
50
+ 'Lic',
51
+ 'Llc',
52
+ 'Lord',
53
+ 'Lord & Lady',
54
+ 'Lt',
55
+ 'Lt Col',
56
+ 'Lt Cpl',
57
+ 'M',
58
+ 'Madam',
59
+ 'Madame',
60
+ 'Major',
61
+ 'Major General',
62
+ 'Marchioness',
63
+ 'Marquis',
64
+ 'Minister',
65
+ 'Mme',
66
+ 'Mr & Dr',
67
+ 'Mr & Mrs',
68
+ 'Mr & Ms',
69
+ 'Prince',
70
+ 'Princess',
71
+ 'Professor',
72
+ 'Prof',
73
+ 'Prof & Dr',
74
+ 'Prof & Mrs',
75
+ 'Prof & Rev',
76
+ 'Prof Dame',
77
+ 'Prof Dr',
78
+ 'Pvt',
79
+ 'Rabbi',
80
+ 'Rear Admiral',
81
+ 'Rev',
82
+ 'Rev & Mrs',
83
+ 'Rev Canon',
84
+ 'Rev Dr',
85
+ 'Senator',
86
+ 'Sgt',
87
+ 'Sheriff',
88
+ 'Sir',
89
+ 'Sir & Lady',
90
+ 'Sister',
91
+ 'Sr',
92
+ 'Sqr. Leader',
93
+ 'The Earl of',
94
+ 'The Hon',
95
+ 'The Hon Dr',
96
+ 'The Hon Lady',
97
+ 'The Hon Lord',
98
+ 'The Hon Mrs',
99
+ 'The Hon Sir',
100
+ 'The Honourable',
101
+ 'The Rt Hon',
102
+ 'The Rt Hon Dr',
103
+ 'The Rt Hon Lord',
104
+ 'The Rt Hon Sir',
105
+ 'The Rt Hon Visc',
106
+ 'Viscount',
107
+ 'van',
108
+ 'I',
109
+ 'II',
110
+ 'III',
111
+ ]);
112
+ //# sourceMappingURL=titles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"titles.js","sourceRoot":"","sources":["../src/titles.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,IAAI,GAAG,CAAS;IACpC,IAAI;IACJ,KAAK;IACL,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,SAAS;IACT,UAAU;IACV,YAAY;IACZ,OAAO;IACP,UAAU;IACV,YAAY;IACZ,UAAU;IACV,WAAW;IACX,SAAS;IACT,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,WAAW;IACX,iBAAiB;IACjB,QAAQ;IACR,gBAAgB;IAChB,OAAO;IACP,UAAU;IACV,aAAa;IACb,KAAK;IACL,MAAM;IACN,QAAQ;IACR,UAAU;IACV,KAAK;IACL,SAAS;IACT,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,KAAK;IACL,WAAW;IACX,gBAAgB;IAChB,IAAI;IACJ,OAAO;IACP,SAAS;IACT,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,aAAa;IACb,IAAI;IACJ,QAAQ;IACR,QAAQ;IACR,GAAG;IACH,OAAO;IACP,QAAQ;IACR,OAAO;IACP,eAAe;IACf,aAAa;IACb,SAAS;IACT,UAAU;IACV,KAAK;IACL,SAAS;IACT,UAAU;IACV,SAAS;IACT,QAAQ;IACR,UAAU;IACV,WAAW;IACX,MAAM;IACN,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,SAAS;IACT,KAAK;IACL,OAAO;IACP,cAAc;IACd,KAAK;IACL,WAAW;IACX,WAAW;IACX,QAAQ;IACR,SAAS;IACT,KAAK;IACL,SAAS;IACT,KAAK;IACL,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,aAAa;IACb,aAAa;IACb,SAAS;IACT,YAAY;IACZ,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,eAAe;IACf,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,KAAK;IACL,GAAG;IACH,IAAI;IACJ,KAAK;CACN,CAAC,CAAC"}
@@ -7,4 +7,29 @@ import { JSAvatarProps, AvatarInfo } from './JSAvatar.types';
7
7
  * @returns configured props and state for FURN Avatar
8
8
  */
9
9
  export declare const useAvatar: (props: JSAvatarProps) => AvatarInfo;
10
+ /**
11
+ * A function which takes a name and returns initials
12
+ *
13
+ * @param name
14
+ * @returns initials. First letter of the word if only one word was provided.
15
+ * First letters of the first and last words if more words were provided.
16
+ * Words in braces, titles, special characters, parantheses and dashes should be ignored.
17
+ */
18
+ export declare const getInitials: (name: string) => string;
19
+ /**
20
+ * A function which verifies whether a name contains non-alphabetical characters
21
+ *
22
+ * @param name
23
+ * @returns true if the name contains alphabetical characters. Returns false if there are
24
+ * numeric values or the first character is non-alphabetical. In this case avatar should
25
+ * fall back to icon.
26
+ */
27
+ export declare const validateAlphabeticalCharacters: (name: string) => boolean;
28
+ /**
29
+ * A function which verifies whether words array contains title
30
+ *
31
+ * @param words array of words in name
32
+ * @returns array of words without titles
33
+ */
34
+ export declare const removeTitlesFromName: (words: string[]) => string[];
10
35
  //# sourceMappingURL=useAvatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAvatar.d.ts","sourceRoot":"","sources":["../src/useAvatar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AAG5E;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,UAAW,aAAa,KAAG,UAkChD,CAAC"}
1
+ {"version":3,"file":"useAvatar.d.ts","sourceRoot":"","sources":["../src/useAvatar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AAI5E;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,UAAW,aAAa,KAAG,UAuChD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,MAa1C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,SAAU,MAAM,KAAG,OAG7D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,UAAW,MAAM,EAAE,KAAG,MAAM,EAE5D,CAAC"}
@@ -22,7 +22,8 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  return t;
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.useAvatar = void 0;
25
+ exports.removeTitlesFromName = exports.validateAlphabeticalCharacters = exports.getInitials = exports.useAvatar = void 0;
26
+ var titles_1 = require("./titles");
26
27
  /**
27
28
  * Re-usable hook for FURN Avatar.
28
29
  * This hook configures Avatar props and state for FURN Avatar.
@@ -31,9 +32,10 @@ exports.useAvatar = void 0;
31
32
  * @returns configured props and state for FURN Avatar
32
33
  */
33
34
  var useAvatar = function (props) {
34
- var active = props.active, accessibilityLabel = props.accessibilityLabel, activeAppearance = props.activeAppearance, badge = props.badge, src = props.src, ring = props.ring, shape = props.shape, rest = __rest(props, ["active", "accessibilityLabel", "activeAppearance", "badge", "src", "ring", "shape"]);
35
+ var active = props.active, accessibilityLabel = props.accessibilityLabel, activeAppearance = props.activeAppearance, badge = props.badge, initials = props.initials, name = props.name, src = props.src, ring = props.ring, shape = props.shape, rest = __rest(props, ["active", "accessibilityLabel", "activeAppearance", "badge", "initials", "name", "src", "ring", "shape"]);
35
36
  var showRing = active === 'active' && activeAppearance === 'ring';
36
37
  var transparentRing = !!(ring === null || ring === void 0 ? void 0 : ring.transparent);
38
+ var showBadge = (!active || active === 'unset') && !!badge && !!badge.status;
37
39
  var imageProps = {
38
40
  accessibilityLabel: accessibilityLabel,
39
41
  source: src ? { uri: src } : undefined,
@@ -42,11 +44,59 @@ var useAvatar = function (props) {
42
44
  var state = {
43
45
  showRing: showRing,
44
46
  transparentRing: transparentRing,
47
+ showBadge: showBadge,
45
48
  };
49
+ var _initials = initials || (0, exports.getInitials)(name);
46
50
  return {
47
- props: __assign(__assign({ shape: shape || 'circular' }, rest), { active: active, activeAppearance: activeAppearance, image: imageProps, badge: badgeProps }),
51
+ props: __assign(__assign({ shape: shape || 'circular' }, rest), { active: active, activeAppearance: activeAppearance, image: imageProps, badge: badgeProps, initials: _initials }),
48
52
  state: __assign({}, state),
49
53
  };
50
54
  };
51
55
  exports.useAvatar = useAvatar;
56
+ /**
57
+ * A function which takes a name and returns initials
58
+ *
59
+ * @param name
60
+ * @returns initials. First letter of the word if only one word was provided.
61
+ * First letters of the first and last words if more words were provided.
62
+ * Words in braces, titles, special characters, parantheses and dashes should be ignored.
63
+ */
64
+ var getInitials = function (name) {
65
+ if (!name && !(0, exports.validateAlphabeticalCharacters)(name)) {
66
+ return '';
67
+ }
68
+ // prettier-ignore
69
+ var nonWordRegExp = new RegExp('\\W+(?<!\\S-)', 'g');
70
+ var wordsInBracesRegExp = new RegExp('(\\(|\\[|\\{)\\w+(\\)|\\]|\\})', 'g');
71
+ var words = name.replace(wordsInBracesRegExp, ' ').replace(nonWordRegExp, ' ').trim().split(' ');
72
+ words = (0, exports.removeTitlesFromName)(words);
73
+ var wordsLength = words.length;
74
+ var lastWordIdx = wordsLength - 1;
75
+ var initials = "".concat(words[0].charAt(0).toUpperCase()).concat(wordsLength > 1 ? words[lastWordIdx].charAt(0).toUpperCase() : '');
76
+ return initials;
77
+ };
78
+ exports.getInitials = getInitials;
79
+ /**
80
+ * A function which verifies whether a name contains non-alphabetical characters
81
+ *
82
+ * @param name
83
+ * @returns true if the name contains alphabetical characters. Returns false if there are
84
+ * numeric values or the first character is non-alphabetical. In this case avatar should
85
+ * fall back to icon.
86
+ */
87
+ var validateAlphabeticalCharacters = function (name) {
88
+ var alphabeticalRegExp = new RegExp('[a-zA-Z]', 'g');
89
+ return name ? alphabeticalRegExp.test(name) : false;
90
+ };
91
+ exports.validateAlphabeticalCharacters = validateAlphabeticalCharacters;
92
+ /**
93
+ * A function which verifies whether words array contains title
94
+ *
95
+ * @param words array of words in name
96
+ * @returns array of words without titles
97
+ */
98
+ var removeTitlesFromName = function (words) {
99
+ return words.filter(function (word) { return !titles_1.titles.has(word); });
100
+ };
101
+ exports.removeTitlesFromName = removeTitlesFromName;
52
102
  //# sourceMappingURL=useAvatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAvatar.js","sourceRoot":"","sources":["../src/useAvatar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;;GAMG;AACI,IAAM,SAAS,GAAG,UAAC,KAAoB;IACpC,IAAA,MAAM,GAA6E,KAAK,OAAlF,EAAE,kBAAkB,GAAyD,KAAK,mBAA9D,EAAE,gBAAgB,GAAuC,KAAK,iBAA5C,EAAE,KAAK,GAAgC,KAAK,MAArC,EAAE,GAAG,GAA2B,KAAK,IAAhC,EAAE,IAAI,GAAqB,KAAK,KAA1B,EAAE,KAAK,GAAc,KAAK,MAAnB,EAAK,IAAI,UAAK,KAAK,EAA1F,qFAAkF,CAAF,CAAW;IAEjG,IAAM,QAAQ,GAAG,MAAM,KAAK,QAAQ,IAAI,gBAAgB,KAAK,MAAM,CAAC;IACpE,IAAM,eAAe,GAAG,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAA,CAAC;IAE5C,IAAM,UAAU,GAAe;QAC7B,kBAAkB,oBAAA;QAClB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAE,EAAE,GAAG,EAAE,GAAG,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,CAAC,CAAC;IACpC,IAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;IACjC,IAAM,WAAW,GAAG,WAAW,GAAG,CAAC,CAAC;IACpC,IAAM,QAAQ,GAAG,UAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,SAAG,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAE,CAAC;IAC3H,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAbW,QAAA,WAAW,eAatB;AAEF;;;;;;;GAOG;AACI,IAAM,8BAA8B,GAAG,UAAC,IAAY;IACzD,IAAM,kBAAkB,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACvD,OAAO,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACtD,CAAC,CAAC;AAHW,QAAA,8BAA8B,kCAGzC;AAEF;;;;;GAKG;AACI,IAAM,oBAAoB,GAAG,UAAC,KAAe;IAClD,OAAO,KAAK,CAAC,MAAM,CAAC,UAAC,IAAI,IAAK,OAAA,CAAC,eAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAjB,CAAiB,CAAC,CAAC;AACnD,CAAC,CAAC;AAFW,QAAA,oBAAoB,wBAE/B"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Regular expressions matching characters to ignore when calculating the initials.
3
+ */
4
+ /**
5
+ * Get (up to 2 characters) initials based on display name of the persona.
6
+ *
7
+ * @param displayName - The full name of the person or entity
8
+ * @param isRtl - Whether the display is in RTL
9
+ * @param allowPhoneInitials - Should initials be generated from phone numbers (default false)
10
+ *
11
+ * @returns The 1 or 2 character initials based on the name. Or an empty string if no initials
12
+ * could be derived from the name.
13
+ */
14
+ export declare function getInitials(displayName: string | undefined | null, isRtl: boolean, allowPhoneInitials?: boolean): string;
15
+ //# sourceMappingURL=getInitials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInitials.d.ts","sourceRoot":"","sources":["../../src/utils/getInitials.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkEH;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAaxH"}