@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
@@ -1,203 +0,0 @@
1
- import { Theme } from '@fluentui-react-native/framework';
2
- import { TokenSettings } from '@fluentui-react-native/use-styling';
3
- import { JSAvatarTokens } from '.';
4
- import { globalTokens } from '@fluentui-react-native/theme-tokens';
5
-
6
- export const defaultJSAvatarTokens: TokenSettings<JSAvatarTokens, Theme> = (t: Theme) =>
7
- ({
8
- horizontalIconAlignment: 'end',
9
- verticalIconAlignment: 'end',
10
- color: t.colors.neutralForeground3,
11
- backgroundColor: t.colors.neutralBackground6,
12
- avatarOpacity: 1,
13
- fontFamily: t.typography.families.primary,
14
- fontWeight: globalTokens.font.weight.semibold,
15
- fontSize: globalTokens.font.size[200],
16
- size: 24,
17
- iconSize: 16,
18
- iconColor: t.colors.neutralForeground3,
19
- ringColor: t.colors.transparentStroke,
20
- borderColor: globalTokens.color.white,
21
- borderWidth: t.host.appearance === 'highContrast' ? 1 : 0,
22
- circular: {
23
- borderRadius: globalTokens.corner.radius.circle,
24
- },
25
- square: {
26
- borderRadius: globalTokens.corner.radius.medium,
27
- },
28
- inactive: {
29
- avatarOpacity: 0.8,
30
- },
31
- size20: {
32
- size: 20,
33
- badgeSize: 'smallest',
34
- iconSize: 16,
35
- fontSize: globalTokens.font.size[100],
36
- square: {
37
- borderRadius: globalTokens.corner.radius.small,
38
- },
39
- },
40
- size24: {
41
- size: 24,
42
- badgeSize: 'smallest',
43
- iconSize: 16,
44
- fontSize: globalTokens.font.size[100],
45
- square: {
46
- borderRadius: globalTokens.corner.radius.small,
47
- },
48
- },
49
- size28: {
50
- size: 28,
51
- badgeSize: 'smaller',
52
- iconSize: 20,
53
- fontWeight: globalTokens.font.weight.semibold,
54
- fontSize: globalTokens.font.size[100],
55
- },
56
- size32: {
57
- size: 32,
58
- badgeSize: 'smaller',
59
- iconSize: 20,
60
- fontSize: globalTokens.font.size[100],
61
- },
62
- size36: {
63
- size: 36,
64
- badgeSize: 'smaller',
65
- iconSize: 20,
66
- },
67
- size40: {
68
- size: 40,
69
- badgeSize: 'small',
70
- iconSize: 20,
71
- },
72
- size48: {
73
- size: 48,
74
- badgeSize: 'small',
75
- iconSize: 24,
76
- },
77
- size56: {
78
- size: 56,
79
- badgeSize: 'medium',
80
- iconSize: 28,
81
- fontSize: globalTokens.font.size[400],
82
- square: {
83
- borderRadius: globalTokens.corner.radius.large,
84
- },
85
- },
86
- size64: {
87
- size: 64,
88
- badgeSize: 'large',
89
- iconSize: 32,
90
- fontSize: globalTokens.font.size[500],
91
- square: {
92
- borderRadius: globalTokens.corner.radius.large,
93
- },
94
- },
95
- size72: {
96
- size: 72,
97
- badgeSize: 'large',
98
- iconSize: 32,
99
- fontSize: globalTokens.font.size[500],
100
- square: {
101
- borderRadius: globalTokens.corner.radius.large,
102
- },
103
- },
104
- size96: {
105
- size: 96,
106
- badgeSize: 'largest',
107
- iconSize: 48,
108
- fontWeight: globalTokens.font.weight.regular,
109
- fontSize: globalTokens.font.size[700],
110
- square: {
111
- borderRadius: globalTokens.corner.radius.extraLarge,
112
- },
113
- },
114
- size120: {
115
- size: 120,
116
- badgeSize: 'largest',
117
- iconSize: 48,
118
- fontWeight: globalTokens.font.weight.regular,
119
- fontSize: globalTokens.font.size[900],
120
- square: {
121
- borderRadius: globalTokens.corner.radius.extraLarge,
122
- },
123
- },
124
- neutral: {
125
- backgroundColor: t.colors.neutralBackground6,
126
- color: t.colors.neutralForeground3,
127
- iconColor: t.colors.neutralForeground3,
128
- ringColor: t.colors.transparentStroke,
129
- },
130
- brand: {
131
- backgroundColor: t.colors.brandBackgroundStatic,
132
- color: t.colors.neutralForegroundOnBrand,
133
- iconColor: t.colors.neutralForegroundOnBrand,
134
- ringColor: t.colors.transparentStroke,
135
- },
136
- darkRed: getColorProps('darkRed', t),
137
- cranberry: getColorProps('cranberry', t),
138
- red: getColorProps('red', t),
139
- pumpkin: getColorProps('pumpkin', t),
140
- peach: getColorProps('peach', t),
141
- marigold: getColorProps('marigold', t),
142
- gold: getColorProps('gold', t),
143
- brass: getColorProps('brass', t),
144
- brown: getColorProps('brown', t),
145
- forest: getColorProps('forest', t),
146
- seafoam: getColorProps('seafoam', t),
147
- darkGreen: getColorProps('darkGreen', t),
148
- lightTeal: getColorProps('lightTeal', t),
149
- teal: getColorProps('teal', t),
150
- steel: getColorProps('steel', t),
151
- blue: getColorProps('blue', t),
152
- royalBlue: getColorProps('royalBlue', t),
153
- cornflower: getColorProps('cornflower', t),
154
- navy: getColorProps('navy', t),
155
- lavender: getColorProps('lavender', t),
156
- purple: getColorProps('purple', t),
157
- grape: getColorProps('grape', t),
158
- lilac: getColorProps('lilac', t),
159
- pink: getColorProps('pink', t),
160
- magenta: getColorProps('magenta', t),
161
- plum: getColorProps('plum', t),
162
- beige: getColorProps('beige', t),
163
- mink: getColorProps('mink', t),
164
- platinum: getColorProps('platinum', t),
165
- anchor: getColorProps('anchor', t),
166
- burgundy: getColorProps('burgundy', t),
167
- hotPink: getColorProps('hotPink', t),
168
- orchid: getColorProps('orchid', t),
169
- } as JSAvatarTokens);
170
-
171
- /**
172
- * A function which returns object of props depending on color and theme.
173
- * @param color
174
- * @param theme
175
- * @returns object of props - backgroundColor, color and ringColor
176
- */
177
- function getColorProps(color: string, theme: Theme) {
178
- const themeAppearance = theme.host.appearance;
179
- switch (themeAppearance) {
180
- case 'light':
181
- default:
182
- return {
183
- backgroundColor: globalTokens.color[color].tint40,
184
- color: globalTokens.color[color].shade30,
185
- iconColor: globalTokens.color[color].shade30,
186
- ringColor: globalTokens.color[color].primary,
187
- };
188
- case 'dark':
189
- return {
190
- backgroundColor: globalTokens.color[color].shade30,
191
- color: globalTokens.color[color].tint40,
192
- iconColor: globalTokens.color[color].tint40,
193
- ringColor: globalTokens.color[color].tint30,
194
- };
195
- case 'highContrast':
196
- return {
197
- backgroundColor: theme.colors.neutralBackground6,
198
- color: theme.colors.neutralForeground3,
199
- iconColor: theme.colors.neutralForeground3,
200
- ringColor: theme.colors.transparentStroke,
201
- };
202
- }
203
- }
@@ -1,206 +0,0 @@
1
- import { Theme } from '@fluentui-react-native/framework';
2
- import { TokenSettings } from '@fluentui-react-native/use-styling';
3
- import { JSAvatarTokens } from '.';
4
- import { globalTokens } from '@fluentui-react-native/theme-tokens';
5
-
6
- export const defaultJSAvatarTokens: TokenSettings<JSAvatarTokens, Theme> = (t: Theme) =>
7
- ({
8
- badgeSize: 'smallest',
9
- horizontalIconAlignment: 'end',
10
- verticalIconAlignment: 'end',
11
- color: t.colors.neutralForeground3,
12
- backgroundColor: t.colors.neutralBackground6,
13
- avatarOpacity: 1,
14
- fontFamily: t.typography.families.primary,
15
- fontWeight: globalTokens.font.weight.semibold,
16
- fontSize: globalTokens.font.size[200],
17
- size: 24,
18
- iconSize: 16,
19
- iconColor: t.colors.neutralForeground3,
20
- ringColor: t.colors.transparentStroke,
21
- borderColor: globalTokens.color.white,
22
- borderWidth: t.name === 'HighContrast' ? 1 : 0,
23
- circular: {
24
- borderRadius: globalTokens.corner.radius.circle,
25
- },
26
- square: {
27
- borderRadius: globalTokens.corner.radius.medium,
28
- },
29
- inactive: {
30
- avatarOpacity: 0.8,
31
- },
32
- size20: {
33
- size: 20,
34
- badgeSize: 'smallest',
35
- iconSize: 16,
36
- fontSize: globalTokens.font.size[100],
37
- square: {
38
- borderRadius: globalTokens.corner.radius.small,
39
- },
40
- },
41
- size24: {
42
- size: 24,
43
- badgeSize: 'smallest',
44
- iconSize: 16,
45
- fontSize: globalTokens.font.size[100],
46
- square: {
47
- borderRadius: globalTokens.corner.radius.small,
48
- },
49
- },
50
- size28: {
51
- size: 28,
52
- badgeSize: 'smaller',
53
- iconSize: 20,
54
- fontWeight: globalTokens.font.weight.semibold,
55
- fontSize: globalTokens.font.size[100],
56
- },
57
- size32: {
58
- size: 32,
59
- badgeSize: 'smaller',
60
- iconSize: 20,
61
- fontSize: globalTokens.font.size[100],
62
- },
63
- size36: {
64
- size: 36,
65
- badgeSize: 'smaller',
66
- iconSize: 20,
67
- },
68
- size40: {
69
- size: 40,
70
- badgeSize: 'small',
71
- iconSize: 20,
72
- },
73
- size48: {
74
- size: 48,
75
- badgeSize: 'small',
76
- iconSize: 24,
77
- },
78
- size56: {
79
- size: 56,
80
- badgeSize: 'medium',
81
- iconSize: 28,
82
- fontSize: globalTokens.font.size[400],
83
- square: {
84
- borderRadius: globalTokens.corner.radius.large,
85
- },
86
- },
87
- size64: {
88
- size: 64,
89
- badgeSize: 'large',
90
- iconSize: 32,
91
- fontSize: globalTokens.font.size[500],
92
- square: {
93
- borderRadius: globalTokens.corner.radius.large,
94
- },
95
- },
96
- size72: {
97
- size: 72,
98
- badgeSize: 'large',
99
- iconSize: 32,
100
- fontSize: globalTokens.font.size[500],
101
- square: {
102
- borderRadius: globalTokens.corner.radius.large,
103
- },
104
- },
105
- size96: {
106
- size: 96,
107
- badgeSize: 'largest',
108
- iconSize: 48,
109
- fontWeight: globalTokens.font.weight.regular,
110
- fontSize: globalTokens.font.size[700],
111
- square: {
112
- borderRadius: globalTokens.corner.radius.extraLarge,
113
- },
114
- },
115
- size120: {
116
- size: 120,
117
- badgeSize: 'largest',
118
- iconSize: 48,
119
- fontWeight: globalTokens.font.weight.regular,
120
- fontSize: globalTokens.font.size[900],
121
- square: {
122
- borderRadius: globalTokens.corner.radius.extraLarge,
123
- },
124
- },
125
- neutral: {
126
- backgroundColor: t.colors.neutralBackground6,
127
- color: t.colors.neutralForeground3,
128
- iconColor: t.colors.neutralForeground3,
129
- ringColor: t.colors.transparentStroke,
130
- },
131
- brand: {
132
- backgroundColor: t.colors.brandBackgroundStatic,
133
- color: t.colors.neutralForegroundOnBrand,
134
- iconColor: t.colors.neutralForegroundOnBrand,
135
- ringColor: t.colors.transparentStroke,
136
- },
137
- darkRed: getColorProps('darkRed', t),
138
- cranberry: getColorProps('cranberry', t),
139
- red: getColorProps('red', t),
140
- pumpkin: getColorProps('pumpkin', t),
141
- peach: getColorProps('peach', t),
142
- marigold: getColorProps('marigold', t),
143
- gold: getColorProps('gold', t),
144
- brass: getColorProps('brass', t),
145
- brown: getColorProps('brown', t),
146
- forest: getColorProps('forest', t),
147
- seafoam: getColorProps('seafoam', t),
148
- darkGreen: getColorProps('darkGreen', t),
149
- lightTeal: getColorProps('lightTeal', t),
150
- teal: getColorProps('teal', t),
151
- steel: getColorProps('steel', t),
152
- blue: getColorProps('blue', t),
153
- royalBlue: getColorProps('royalBlue', t),
154
- cornflower: getColorProps('cornflower', t),
155
- navy: getColorProps('navy', t),
156
- lavender: getColorProps('lavender', t),
157
- purple: getColorProps('purple', t),
158
- grape: getColorProps('grape', t),
159
- lilac: getColorProps('lilac', t),
160
- pink: getColorProps('pink', t),
161
- magenta: getColorProps('magenta', t),
162
- plum: getColorProps('plum', t),
163
- beige: getColorProps('beige', t),
164
- mink: getColorProps('mink', t),
165
- platinum: getColorProps('platinum', t),
166
- anchor: getColorProps('anchor', t),
167
- burgundy: getColorProps('burgundy', t),
168
- hotPink: getColorProps('hotPink', t),
169
- orchid: getColorProps('orchid', t),
170
- } as JSAvatarTokens);
171
-
172
- /**
173
- * A function which returns object of props depending on color and theme.
174
- * @param color
175
- * @param theme
176
- * @returns object of props - backgroundColor, color and ringColor
177
- */
178
- function getColorProps(color: string, theme: Theme) {
179
- const themeAppearance = theme.name;
180
- switch (themeAppearance) {
181
- case 'White':
182
- case 'Colorful':
183
- default:
184
- return {
185
- backgroundColor: globalTokens.color[color].tint40,
186
- color: globalTokens.color[color].shade30,
187
- iconColor: globalTokens.color[color].shade30,
188
- ringColor: globalTokens.color[color].primary,
189
- };
190
- case 'DarkGray':
191
- case 'Black':
192
- return {
193
- backgroundColor: globalTokens.color[color].shade30,
194
- color: globalTokens.color[color].tint40,
195
- iconColor: globalTokens.color[color].tint40,
196
- ringColor: globalTokens.color[color].tint30,
197
- };
198
- case 'HighContrast':
199
- return {
200
- backgroundColor: theme.colors.neutralBackground6,
201
- color: theme.colors.neutralForeground3,
202
- iconColor: theme.colors.neutralForeground3,
203
- ringColor: theme.colors.transparentStroke,
204
- };
205
- }
206
- }
@@ -1,96 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Avatar rendering renders Avatar 1`] = `
4
- <View
5
- accessibilityLabel=""
6
- accessibilityRole="image"
7
- accessible={true}
8
- shape="circular"
9
- style={
10
- Object {
11
- "alignItems": "flex-end",
12
- "flexDirection": "row",
13
- "height": 24,
14
- "horizontalIconAlignment": "end",
15
- "justifyContent": "flex-end",
16
- "opacity": 1,
17
- "verticalIconAlignment": "end",
18
- "width": 24,
19
- }
20
- }
21
- >
22
- <View
23
- accessible={false}
24
- style={
25
- Object {
26
- "alignItems": "center",
27
- "alignSelf": "stretch",
28
- "backgroundColor": "#e6e6e6",
29
- "borderColor": "#ffffff",
30
- "borderRadius": 9999,
31
- "borderWidth": 0,
32
- "flexGrow": 1,
33
- "height": 24,
34
- "justifyContent": "center",
35
- "width": 24,
36
- }
37
- }
38
- >
39
- <RNSVGSvgView
40
- align="xMidYMid"
41
- bbHeight={16}
42
- bbWidth={14}
43
- fill="none"
44
- focusable={false}
45
- height={16}
46
- meetOrSlice={0}
47
- minX={0}
48
- minY={0}
49
- style={
50
- Array [
51
- Object {
52
- "backgroundColor": "transparent",
53
- "borderWidth": 0,
54
- },
55
- Object {
56
- "flex": 0,
57
- "height": 16,
58
- "width": 14,
59
- },
60
- ]
61
- }
62
- vbHeight={16}
63
- vbWidth={14}
64
- width={14}
65
- xml="<svg width=\\"14\\" height=\\"16\\" viewBox=\\"0 0 14 16\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\">
66
- <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\\"/>
67
- </svg>
68
- "
69
- xmlns="http://www.w3.org/2000/svg"
70
- >
71
- <RNSVGGroup
72
- fill={null}
73
- propList={
74
- Array [
75
- "fill",
76
- ]
77
- }
78
- >
79
- <RNSVGPath
80
- 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"
81
- fill={
82
- Array [
83
- 2,
84
- ]
85
- }
86
- propList={
87
- Array [
88
- "fill",
89
- ]
90
- }
91
- />
92
- </RNSVGGroup>
93
- </RNSVGSvgView>
94
- </View>
95
- </View>
96
- `;
@@ -1,16 +0,0 @@
1
- /**
2
- * A function which returns hash code for the avatar color. Web implementation
3
- *
4
- * @param str is idForColor or name
5
- * @returns hash code of the color
6
- */
7
- export const getHashCodeWeb = (str: string): number => {
8
- let hashCode = 0;
9
- for (let len: number = str.length - 1; len >= 0; len--) {
10
- const ch = str.charCodeAt(len);
11
- const shift = len % 8;
12
- hashCode ^= (ch << shift) + (ch >> (8 - shift)); // eslint-disable-line no-bitwise
13
- }
14
-
15
- return hashCode;
16
- };
package/src/titles.ts DELETED
@@ -1,108 +0,0 @@
1
- export const titles = new Set<string>([
2
- 'Mr',
3
- 'Mrs',
4
- 'Miss',
5
- 'Ms',
6
- 'Dr',
7
- 'Admiral',
8
- 'Air Comm',
9
- 'Ambassador',
10
- 'Baron',
11
- 'Baroness',
12
- 'Brig & Mrs',
13
- 'Brig Gen',
14
- 'Brigadier',
15
- 'Brother',
16
- 'Canon',
17
- 'Capt',
18
- 'Chief',
19
- 'Cllr',
20
- 'Col',
21
- 'Commander',
22
- 'Commander & Mrs',
23
- 'Consul',
24
- 'Consul General',
25
- 'Count',
26
- 'Countess',
27
- 'Countess of',
28
- 'Cpl',
29
- 'Dame',
30
- 'Deputy',
31
- 'Dr & Mrs',
32
- 'Drs',
33
- 'Duchess',
34
- 'Duke',
35
- 'Earl',
36
- 'Father',
37
- 'General',
38
- 'Gräfin',
39
- 'HE',
40
- 'HMA',
41
- 'Her Grace',
42
- 'His Excellency',
43
- 'Jr',
44
- 'Judge',
45
- 'Justice',
46
- 'Lady',
47
- 'Lic',
48
- 'Llc',
49
- 'Lord',
50
- 'Lord & Lady',
51
- 'Lt',
52
- 'Lt Col',
53
- 'Lt Cpl',
54
- 'M',
55
- 'Madam',
56
- 'Madame',
57
- 'Major',
58
- 'Major General',
59
- 'Marchioness',
60
- 'Marquis',
61
- 'Minister',
62
- 'Mme',
63
- 'Mr & Dr',
64
- 'Mr & Mrs',
65
- 'Mr & Ms',
66
- 'Prince',
67
- 'Princess',
68
- 'Professor',
69
- 'Prof',
70
- 'Prof & Dr',
71
- 'Prof & Mrs',
72
- 'Prof & Rev',
73
- 'Prof Dame',
74
- 'Prof Dr',
75
- 'Pvt',
76
- 'Rabbi',
77
- 'Rear Admiral',
78
- 'Rev',
79
- 'Rev & Mrs',
80
- 'Rev Canon',
81
- 'Rev Dr',
82
- 'Senator',
83
- 'Sgt',
84
- 'Sheriff',
85
- 'Sir',
86
- 'Sir & Lady',
87
- 'Sister',
88
- 'Sr',
89
- 'Sqr. Leader',
90
- 'The Earl of',
91
- 'The Hon',
92
- 'The Hon Dr',
93
- 'The Hon Lady',
94
- 'The Hon Lord',
95
- 'The Hon Mrs',
96
- 'The Hon Sir',
97
- 'The Honourable',
98
- 'The Rt Hon',
99
- 'The Rt Hon Dr',
100
- 'The Rt Hon Lord',
101
- 'The Rt Hon Sir',
102
- 'The Rt Hon Visc',
103
- 'Viscount',
104
- 'van',
105
- 'I',
106
- 'II',
107
- 'III',
108
- ]);