@atlaskit/avatar 21.3.8 → 21.4.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.
- package/CHANGELOG.md +61 -48
- package/dist/cjs/Avatar.js +8 -7
- package/dist/cjs/AvatarImage.js +5 -8
- package/dist/cjs/AvatarItem.js +3 -4
- package/dist/cjs/IconWrapper.js +1 -2
- package/dist/cjs/Presence.js +3 -5
- package/dist/cjs/Skeleton.js +3 -4
- package/dist/cjs/Status.js +3 -5
- package/dist/cjs/Text.js +1 -2
- package/dist/cjs/constants.js +8 -15
- package/dist/cjs/utilities.js +4 -7
- package/dist/es2019/Avatar.js +4 -3
- package/dist/esm/Avatar.js +7 -5
- package/dist/esm/AvatarImage.js +2 -2
- package/dist/esm/AvatarItem.js +2 -2
- package/dist/esm/Skeleton.js +2 -2
- package/dist/types/Avatar.d.ts +5 -0
- package/dist/types-ts4.5/Avatar.d.ts +5 -0
- package/package.json +3 -3
- package/report.api.md +3 -0
- package/tmp/api-report-tmp.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,58 +1,71 @@
|
|
|
1
1
|
# @atlaskit/avatar
|
|
2
2
|
|
|
3
|
+
## 21.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#40977](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40977) [`994a98df01b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/994a98df01b) - Introduce `as` prop for customising the wrapping element
|
|
8
|
+
|
|
9
|
+
## 21.3.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162) [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 21.3.8
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
6
19
|
|
|
7
|
-
- [`7a3cbead067`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7a3cbead067) - Default content for label
|
|
20
|
+
- [#38336](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38336) [`7a3cbead067`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7a3cbead067) - Default content for label
|
|
8
21
|
|
|
9
22
|
## 21.3.7
|
|
10
23
|
|
|
11
24
|
### Patch Changes
|
|
12
25
|
|
|
13
|
-
- [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
|
|
26
|
+
- [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754) [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
|
|
14
27
|
|
|
15
28
|
## 21.3.6
|
|
16
29
|
|
|
17
30
|
### Patch Changes
|
|
18
31
|
|
|
19
|
-
- [`599bfe90ee3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/599bfe90ee3) - Internal change to use shape tokens. There is no expected visual change.
|
|
32
|
+
- [#35441](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35441) [`599bfe90ee3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/599bfe90ee3) - Internal change to use shape tokens. There is no expected visual change.
|
|
20
33
|
|
|
21
34
|
## 21.3.5
|
|
22
35
|
|
|
23
36
|
### Patch Changes
|
|
24
37
|
|
|
25
|
-
- [`342bd17ba74`](https://bitbucket.org/atlassian/atlassian-frontend/commits/342bd17ba74) - Fix presence and status props being expanded to all strings instead of the allowed values.
|
|
38
|
+
- [#36027](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36027) [`342bd17ba74`](https://bitbucket.org/atlassian/atlassian-frontend/commits/342bd17ba74) - Fix presence and status props being expanded to all strings instead of the allowed values.
|
|
26
39
|
|
|
27
40
|
## 21.3.4
|
|
28
41
|
|
|
29
42
|
### Patch Changes
|
|
30
43
|
|
|
31
|
-
- [`abf69e9a4f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/abf69e9a4f6) - Removes usage of deprecated theme mixins in favor of static token / color usage.
|
|
44
|
+
- [#34811](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34811) [`abf69e9a4f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/abf69e9a4f6) - Removes usage of deprecated theme mixins in favor of static token / color usage.
|
|
32
45
|
|
|
33
46
|
## 21.3.3
|
|
34
47
|
|
|
35
48
|
### Patch Changes
|
|
36
49
|
|
|
37
|
-
- [`e2d375fa634`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2d375fa634) - Refactor how some internal styles are applied; no functional changes.
|
|
50
|
+
- [#34804](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34804) [`e2d375fa634`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2d375fa634) - Refactor how some internal styles are applied; no functional changes.
|
|
38
51
|
|
|
39
52
|
## 21.3.2
|
|
40
53
|
|
|
41
54
|
### Patch Changes
|
|
42
55
|
|
|
43
|
-
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
56
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
44
57
|
|
|
45
58
|
## 21.3.1
|
|
46
59
|
|
|
47
60
|
### Patch Changes
|
|
48
61
|
|
|
49
|
-
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
62
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
50
63
|
|
|
51
64
|
## 21.3.0
|
|
52
65
|
|
|
53
66
|
### Minor Changes
|
|
54
67
|
|
|
55
|
-
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
68
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
56
69
|
|
|
57
70
|
### Patch Changes
|
|
58
71
|
|
|
@@ -62,13 +75,13 @@
|
|
|
62
75
|
|
|
63
76
|
### Patch Changes
|
|
64
77
|
|
|
65
|
-
- [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
|
|
78
|
+
- [#32211](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32211) [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
|
|
66
79
|
|
|
67
80
|
## 21.2.0
|
|
68
81
|
|
|
69
82
|
### Minor Changes
|
|
70
83
|
|
|
71
|
-
- [`51928bbe70c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/51928bbe70c) - [ux] Removes status/presence indicator images from the accessibility tree for the Avatar component.
|
|
84
|
+
- [#30248](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30248) [`51928bbe70c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/51928bbe70c) - [ux] Removes status/presence indicator images from the accessibility tree for the Avatar component.
|
|
72
85
|
|
|
73
86
|
### Patch Changes
|
|
74
87
|
|
|
@@ -79,7 +92,7 @@
|
|
|
79
92
|
|
|
80
93
|
### Patch Changes
|
|
81
94
|
|
|
82
|
-
- [`5aab9bfc96c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5aab9bfc96c) - Replace gridSize in spacing values with corresponding spacing tokens
|
|
95
|
+
- [#30134](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30134) [`5aab9bfc96c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5aab9bfc96c) - Replace gridSize in spacing values with corresponding spacing tokens
|
|
83
96
|
|
|
84
97
|
## 21.1.9
|
|
85
98
|
|
|
@@ -97,13 +110,13 @@
|
|
|
97
110
|
|
|
98
111
|
### Patch Changes
|
|
99
112
|
|
|
100
|
-
- [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change.
|
|
113
|
+
- [#29390](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29390) [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change.
|
|
101
114
|
|
|
102
115
|
## 21.1.6
|
|
103
116
|
|
|
104
117
|
### Patch Changes
|
|
105
118
|
|
|
106
|
-
- [`4ee60bafc6d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ee60bafc6d) - ED-16603: Remove tooltips from VR tests and make them opt in. To opt-in, add `allowedSideEffects` when loading the page.
|
|
119
|
+
- [#29227](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29227) [`4ee60bafc6d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ee60bafc6d) - ED-16603: Remove tooltips from VR tests and make them opt in. To opt-in, add `allowedSideEffects` when loading the page.
|
|
107
120
|
|
|
108
121
|
## 21.1.5
|
|
109
122
|
|
|
@@ -127,19 +140,19 @@
|
|
|
127
140
|
|
|
128
141
|
### Patch Changes
|
|
129
142
|
|
|
130
|
-
- [`47f0e63c935`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f0e63c935) - Internal changes to apply spacing tokens. This should be a no-op change.
|
|
143
|
+
- [#26699](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26699) [`47f0e63c935`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f0e63c935) - Internal changes to apply spacing tokens. This should be a no-op change.
|
|
131
144
|
|
|
132
145
|
## 21.1.1
|
|
133
146
|
|
|
134
147
|
### Patch Changes
|
|
135
148
|
|
|
136
|
-
- [`bc989043572`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc989043572) - Internal changes to apply spacing tokens. This should be a no-op change.
|
|
149
|
+
- [#26488](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26488) [`bc989043572`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc989043572) - Internal changes to apply spacing tokens. This should be a no-op change.
|
|
137
150
|
|
|
138
151
|
## 21.1.0
|
|
139
152
|
|
|
140
153
|
### Minor Changes
|
|
141
154
|
|
|
142
|
-
- [`c1d012d6d20`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c1d012d6d20) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behaviour change.
|
|
155
|
+
- [#24710](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24710) [`c1d012d6d20`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c1d012d6d20) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behaviour change.
|
|
143
156
|
|
|
144
157
|
### Patch Changes
|
|
145
158
|
|
|
@@ -149,25 +162,25 @@
|
|
|
149
162
|
|
|
150
163
|
### Patch Changes
|
|
151
164
|
|
|
152
|
-
- [`f9cd9e55e43`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9cd9e55e43) - Update to disabled tokens which slightly affects the opacity in disabled states
|
|
165
|
+
- [#24968](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24968) [`f9cd9e55e43`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9cd9e55e43) - Update to disabled tokens which slightly affects the opacity in disabled states
|
|
153
166
|
|
|
154
167
|
## 21.0.2
|
|
155
168
|
|
|
156
169
|
### Patch Changes
|
|
157
170
|
|
|
158
|
-
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
171
|
+
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
159
172
|
|
|
160
173
|
## 21.0.1
|
|
161
174
|
|
|
162
175
|
### Patch Changes
|
|
163
176
|
|
|
164
|
-
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
177
|
+
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
165
178
|
|
|
166
179
|
## 21.0.0
|
|
167
180
|
|
|
168
181
|
### Major Changes
|
|
169
182
|
|
|
170
|
-
- [`92bb02bc46b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/92bb02bc46b) - [ux] There are **no code changes required** to consume this major, but you should be aware that internal changes have been made to how `@atlaskit/avatar` loads images.
|
|
183
|
+
- [#21570](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/21570) [`92bb02bc46b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/92bb02bc46b) - [ux] There are **no code changes required** to consume this major, but you should be aware that internal changes have been made to how `@atlaskit/avatar` loads images.
|
|
171
184
|
|
|
172
185
|
Before, the image loading behaviour was written in JS. Now, it leans on a standard HTML `img` tag if you provide a `src` prop, allowing it to rely on the browser to optimise the loading. These changes should result in faster image loading and an improved server-side rendering story.
|
|
173
186
|
|
|
@@ -187,7 +200,7 @@
|
|
|
187
200
|
|
|
188
201
|
### Patch Changes
|
|
189
202
|
|
|
190
|
-
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
203
|
+
- [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
191
204
|
|
|
192
205
|
## 20.5.8
|
|
193
206
|
|
|
@@ -211,7 +224,7 @@
|
|
|
211
224
|
|
|
212
225
|
### Patch Changes
|
|
213
226
|
|
|
214
|
-
- [`58884c2f6c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58884c2f6c1) - Internal code change turning on a new linting rule.
|
|
227
|
+
- [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`58884c2f6c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58884c2f6c1) - Internal code change turning on a new linting rule.
|
|
215
228
|
|
|
216
229
|
## 20.5.4
|
|
217
230
|
|
|
@@ -230,7 +243,7 @@
|
|
|
230
243
|
|
|
231
244
|
### Patch Changes
|
|
232
245
|
|
|
233
|
-
- [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
246
|
+
- [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998) [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
234
247
|
- Updated dependencies
|
|
235
248
|
|
|
236
249
|
## 20.5.1
|
|
@@ -243,7 +256,7 @@
|
|
|
243
256
|
|
|
244
257
|
### Minor Changes
|
|
245
258
|
|
|
246
|
-
- [`cf853e39278`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cf853e39278) - [ux] Fix avatar focus ring in windows high contrast mode
|
|
259
|
+
- [#14319](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/14319) [`cf853e39278`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cf853e39278) - [ux] Fix avatar focus ring in windows high contrast mode
|
|
247
260
|
|
|
248
261
|
### Patch Changes
|
|
249
262
|
|
|
@@ -259,7 +272,7 @@
|
|
|
259
272
|
|
|
260
273
|
### Patch Changes
|
|
261
274
|
|
|
262
|
-
- [`0a759df738f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0a759df738f) - When Avatar is not interactive and no `name` prop is provided, `role` and an empty `aria-label` attributes are not rendered anymore. Screen readers consider these images as decorative now and doesn't announce them as "Unlabeled image".
|
|
275
|
+
- [#13864](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13864) [`0a759df738f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0a759df738f) - When Avatar is not interactive and no `name` prop is provided, `role` and an empty `aria-label` attributes are not rendered anymore. Screen readers consider these images as decorative now and doesn't announce them as "Unlabeled image".
|
|
263
276
|
- [`016d19b8038`](https://bitbucket.org/atlassian/atlassian-frontend/commits/016d19b8038) - [ux] When avatars are disabled they no longer will appear as interactive.
|
|
264
277
|
- Updated dependencies
|
|
265
278
|
|
|
@@ -267,7 +280,7 @@
|
|
|
267
280
|
|
|
268
281
|
### Minor Changes
|
|
269
282
|
|
|
270
|
-
- [`cb101fd1d29`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb101fd1d29) - [ux] Colors are now sourced through tokens.
|
|
283
|
+
- [#13302](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13302) [`cb101fd1d29`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb101fd1d29) - [ux] Colors are now sourced through tokens.
|
|
271
284
|
|
|
272
285
|
### Patch Changes
|
|
273
286
|
|
|
@@ -277,26 +290,26 @@
|
|
|
277
290
|
|
|
278
291
|
### Patch Changes
|
|
279
292
|
|
|
280
|
-
- [`0d0ecc6e790`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0d0ecc6e790) - Corrects eslint supressions.
|
|
293
|
+
- [#12837](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12837) [`0d0ecc6e790`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0d0ecc6e790) - Corrects eslint supressions.
|
|
281
294
|
- Updated dependencies
|
|
282
295
|
|
|
283
296
|
## 20.3.2
|
|
284
297
|
|
|
285
298
|
### Patch Changes
|
|
286
299
|
|
|
287
|
-
- [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
|
|
300
|
+
- [#12880](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12880) [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
|
|
288
301
|
|
|
289
302
|
## 20.3.1
|
|
290
303
|
|
|
291
304
|
### Patch Changes
|
|
292
305
|
|
|
293
|
-
- [`34992526ab4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/34992526ab4) - Removes duplicate dependency (@atlaskit/tooltip) from dependency array.
|
|
306
|
+
- [#11649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11649) [`34992526ab4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/34992526ab4) - Removes duplicate dependency (@atlaskit/tooltip) from dependency array.
|
|
294
307
|
|
|
295
308
|
## 20.3.0
|
|
296
309
|
|
|
297
310
|
### Minor Changes
|
|
298
311
|
|
|
299
|
-
- [`8f84c89cad5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f84c89cad5) - [ux] The styles of overflow button of avatar group has been aligned with default button styles. Also, contrast issue of the button has been fixed.
|
|
312
|
+
- [#11113](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11113) [`8f84c89cad5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f84c89cad5) - [ux] The styles of overflow button of avatar group has been aligned with default button styles. Also, contrast issue of the button has been fixed.
|
|
300
313
|
|
|
301
314
|
### Patch Changes
|
|
302
315
|
|
|
@@ -315,20 +328,20 @@
|
|
|
315
328
|
|
|
316
329
|
### Patch Changes
|
|
317
330
|
|
|
318
|
-
- [`79c23df6340`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c23df6340) - Use injected package name and version for analytics instead of version.json.
|
|
331
|
+
- [#8644](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8644) [`79c23df6340`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c23df6340) - Use injected package name and version for analytics instead of version.json.
|
|
319
332
|
- Updated dependencies
|
|
320
333
|
|
|
321
334
|
## 20.2.1
|
|
322
335
|
|
|
323
336
|
### Patch Changes
|
|
324
337
|
|
|
325
|
-
- [`e177a840b13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e177a840b13) - Fix flickering of cached avatar images on mount
|
|
338
|
+
- [#8710](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8710) [`e177a840b13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e177a840b13) - Fix flickering of cached avatar images on mount
|
|
326
339
|
|
|
327
340
|
## 20.2.0
|
|
328
341
|
|
|
329
342
|
### Minor Changes
|
|
330
343
|
|
|
331
|
-
- [`1a8fcbf9878`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1a8fcbf9878) - [ux] Avatar and AvatarItem now accept a label prop which allows the components to be accessible when viewed in a screen reader. The isDisabled prop now correctly generates the appropriate markup (was a span, now a disabled button) for screen reader users.
|
|
344
|
+
- [#8178](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8178) [`1a8fcbf9878`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1a8fcbf9878) - [ux] Avatar and AvatarItem now accept a label prop which allows the components to be accessible when viewed in a screen reader. The isDisabled prop now correctly generates the appropriate markup (was a span, now a disabled button) for screen reader users.
|
|
332
345
|
|
|
333
346
|
### Patch Changes
|
|
334
347
|
|
|
@@ -339,13 +352,13 @@
|
|
|
339
352
|
|
|
340
353
|
### Patch Changes
|
|
341
354
|
|
|
342
|
-
- [`fe59fc62a58`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fe59fc62a58) - Increased the contrast for the fallback icon of the Avatar package so that it passes WCAG AA contrast requirements.
|
|
355
|
+
- [#7762](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/7762) [`fe59fc62a58`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fe59fc62a58) - Increased the contrast for the fallback icon of the Avatar package so that it passes WCAG AA contrast requirements.
|
|
343
356
|
|
|
344
357
|
## 20.1.0
|
|
345
358
|
|
|
346
359
|
### Minor Changes
|
|
347
360
|
|
|
348
|
-
- [`4f9e6e2db5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f9e6e2db5) - These packages now have defined entry points -- this means that you cannot access internal files in the packages that are not meant to be public. Sub-components in these packages have been explicitly defined, aiding tree-shaking and reducing bundle size.
|
|
361
|
+
- [#7170](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/7170) [`4f9e6e2db5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f9e6e2db5) - These packages now have defined entry points -- this means that you cannot access internal files in the packages that are not meant to be public. Sub-components in these packages have been explicitly defined, aiding tree-shaking and reducing bundle size.
|
|
349
362
|
|
|
350
363
|
### Patch Changes
|
|
351
364
|
|
|
@@ -355,19 +368,19 @@
|
|
|
355
368
|
|
|
356
369
|
### Patch Changes
|
|
357
370
|
|
|
358
|
-
- [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
|
|
371
|
+
- [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857) [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
|
|
359
372
|
|
|
360
373
|
## 20.0.7
|
|
361
374
|
|
|
362
375
|
### Patch Changes
|
|
363
376
|
|
|
364
|
-
- [`5c1b4d64ef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c1b4d64ef) - [ux] There were two browser specific issues in avatar component. 1- Misalignment in firefox (Interactive button avatar is incorrectly aligned) — To fix this we added font-size and font-family to button element. 2- Hover issue in safari (On hover avatar was showing rectangular background) — To fix this we have added border radius to avatar on hover.
|
|
377
|
+
- [#6228](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/6228) [`5c1b4d64ef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c1b4d64ef) - [ux] There were two browser specific issues in avatar component. 1- Misalignment in firefox (Interactive button avatar is incorrectly aligned) — To fix this we added font-size and font-family to button element. 2- Hover issue in safari (On hover avatar was showing rectangular background) — To fix this we have added border radius to avatar on hover.
|
|
365
378
|
|
|
366
379
|
## 20.0.6
|
|
367
380
|
|
|
368
381
|
### Patch Changes
|
|
369
382
|
|
|
370
|
-
- [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
|
|
383
|
+
- [#5497](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5497) [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
|
|
371
384
|
This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started
|
|
372
385
|
Also add `typescript` to `devDependencies` to denote version that the package was built with.
|
|
373
386
|
|
|
@@ -387,7 +400,7 @@
|
|
|
387
400
|
|
|
388
401
|
### Patch Changes
|
|
389
402
|
|
|
390
|
-
- [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
|
|
403
|
+
- [#3885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3885) [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
|
|
391
404
|
|
|
392
405
|
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade
|
|
393
406
|
to prevent duplicates of tslib being bundled.
|
|
@@ -396,19 +409,19 @@
|
|
|
396
409
|
|
|
397
410
|
### Patch Changes
|
|
398
411
|
|
|
399
|
-
- [`954cc87b62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/954cc87b62) - The readme and package information has been updated to point to the new design system website.
|
|
412
|
+
- [#3293](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3293) [`954cc87b62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/954cc87b62) - The readme and package information has been updated to point to the new design system website.
|
|
400
413
|
|
|
401
414
|
## 20.0.1
|
|
402
415
|
|
|
403
416
|
### Patch Changes
|
|
404
417
|
|
|
405
|
-
- [`dfd7418707`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dfd7418707) - Added types for function parameters in the Presence, Status and Skeleton avatar sub-components. Without these types we were unable to generate prop tables in the documentation site using `extract-react-types`.
|
|
418
|
+
- [#4044](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4044) [`dfd7418707`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dfd7418707) - Added types for function parameters in the Presence, Status and Skeleton avatar sub-components. Without these types we were unable to generate prop tables in the documentation site using `extract-react-types`.
|
|
406
419
|
|
|
407
420
|
## 20.0.0
|
|
408
421
|
|
|
409
422
|
### Major Changes
|
|
410
423
|
|
|
411
|
-
- [`cde426961a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cde426961a) - Changes to Avatar in this release are intended to provide users with more flexible and performant customization options.
|
|
424
|
+
- [#3428](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3428) [`cde426961a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cde426961a) - Changes to Avatar in this release are intended to provide users with more flexible and performant customization options.
|
|
412
425
|
|
|
413
426
|
Previously Avatars could only be customized like so:
|
|
414
427
|
|
|
@@ -443,7 +456,7 @@
|
|
|
443
456
|
`npx @atlaskit/codemod-cli --parser [PARSER] --extensions [FILE_EXTENSIONS] [TARGET_PATH]`
|
|
444
457
|
|
|
445
458
|
Or run `npx @atlaskit/codemod-cli -h` for more details on usage.
|
|
446
|
-
For Atlassians, refer to [this doc](https://
|
|
459
|
+
For Atlassians, refer to [this doc](https://hello.atlassian.net/wiki/spaces/AF/pages/2627171992/Codemods) for more details on the codemod CLI.
|
|
447
460
|
|
|
448
461
|
**Change summary:**
|
|
449
462
|
|
|
@@ -464,7 +477,7 @@
|
|
|
464
477
|
|
|
465
478
|
### Major Changes
|
|
466
479
|
|
|
467
|
-
- [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
|
|
480
|
+
- [#3335](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3335) [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
|
|
468
481
|
For more information see: https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/39534
|
|
469
482
|
|
|
470
483
|
### Patch Changes
|
|
@@ -475,20 +488,20 @@
|
|
|
475
488
|
|
|
476
489
|
### Patch Changes
|
|
477
490
|
|
|
478
|
-
- [`1c401b41d6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1c401b41d6) - Codemod updated to target the correct avatarItem prop name
|
|
491
|
+
- [#2443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/2443) [`1c401b41d6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1c401b41d6) - Codemod updated to target the correct avatarItem prop name
|
|
479
492
|
- [`e3cb6026bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e3cb6026bc) - Updates the v18 codemod to ensure it doesnt format files that are not relevant
|
|
480
493
|
|
|
481
494
|
## 18.0.1
|
|
482
495
|
|
|
483
496
|
### Patch Changes
|
|
484
497
|
|
|
485
|
-
- [`54a9514fcf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a9514fcf) - Build and supporting files will no longer be published to npm
|
|
498
|
+
- [#2866](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/2866) [`54a9514fcf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a9514fcf) - Build and supporting files will no longer be published to npm
|
|
486
499
|
|
|
487
500
|
## 18.0.0
|
|
488
501
|
|
|
489
502
|
### Major Changes
|
|
490
503
|
|
|
491
|
-
- [`b1fa2d6d1c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1fa2d6d1c) - Avatar has been refactored to improve performance and be compliant with the lite-mode specification.
|
|
504
|
+
- [#2137](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/2137) [`b1fa2d6d1c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1fa2d6d1c) - Avatar has been refactored to improve performance and be compliant with the lite-mode specification.
|
|
492
505
|
Since there are significant prop and API changes, we will be providing a codemod to help consumers upgrade their components.
|
|
493
506
|
|
|
494
507
|
To run the codemod:
|
package/dist/cjs/Avatar.js
CHANGED
|
@@ -19,10 +19,10 @@ var _utilities = require("./utilities");
|
|
|
19
19
|
var _templateObject;
|
|
20
20
|
/** @jsx jsx */
|
|
21
21
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
22
|
-
function ownKeys(
|
|
23
|
-
function _objectSpread(
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
24
|
var packageName = "@atlaskit/avatar";
|
|
25
|
-
var packageVersion = "21.
|
|
25
|
+
var packageVersion = "21.4.0";
|
|
26
26
|
|
|
27
27
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
28
28
|
|
|
@@ -67,7 +67,9 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
|
67
67
|
stackIndex = _ref2.stackIndex,
|
|
68
68
|
status = _ref2.status,
|
|
69
69
|
target = _ref2.target,
|
|
70
|
-
testId = _ref2.testId
|
|
70
|
+
testId = _ref2.testId,
|
|
71
|
+
_ref2$as = _ref2.as,
|
|
72
|
+
AvatarContainer = _ref2$as === void 0 ? 'div' : _ref2$as;
|
|
71
73
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
72
74
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
73
75
|
var customPresenceNode = /*#__PURE__*/(0, _react.isValidElement)(presence) ? presence : null;
|
|
@@ -141,7 +143,7 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
|
141
143
|
}
|
|
142
144
|
return "".concat(name || '', " ").concat(isStatus && !customStatusNode ? "(".concat(status, ")") : '', " ").concat(isPresence && !customPresenceNode ? "(".concat(presence, ")") : '');
|
|
143
145
|
};
|
|
144
|
-
return (0, _react2.jsx)(
|
|
146
|
+
return (0, _react2.jsx)(AvatarContainer, {
|
|
145
147
|
"data-testid": testId,
|
|
146
148
|
style: {
|
|
147
149
|
display: 'inline-block',
|
|
@@ -188,5 +190,4 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
|
188
190
|
}, customStatusNode));
|
|
189
191
|
});
|
|
190
192
|
Avatar.displayName = 'Avatar';
|
|
191
|
-
var _default = Avatar;
|
|
192
|
-
exports.default = _default;
|
|
193
|
+
var _default = exports.default = Avatar;
|
package/dist/cjs/AvatarImage.js
CHANGED
|
@@ -13,12 +13,10 @@ var _person = _interopRequireDefault(require("@atlaskit/icon/glyph/person"));
|
|
|
13
13
|
var _ship = _interopRequireDefault(require("@atlaskit/icon/glyph/ship"));
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
var _constants = require("./constants");
|
|
16
|
-
function ownKeys(
|
|
17
|
-
function _objectSpread(
|
|
18
|
-
var ICON_BACKGROUND = "var(--ds-icon-inverse, ".concat(_colors.N0, ")");
|
|
19
|
-
exports.
|
|
20
|
-
var ICON_COLOR = "var(--ds-icon-subtle, ".concat(_colors.N90, ")");
|
|
21
|
-
exports.ICON_COLOR = ICON_COLOR;
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */ // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
18
|
+
var ICON_BACKGROUND = exports.ICON_BACKGROUND = "var(--ds-icon-inverse, ".concat(_colors.N0, ")");
|
|
19
|
+
var ICON_COLOR = exports.ICON_COLOR = "var(--ds-icon-subtle, ".concat(_colors.N90, ")");
|
|
22
20
|
var avatarDefaultIconStyles = (0, _react2.css)({
|
|
23
21
|
display: 'block',
|
|
24
22
|
width: '100%',
|
|
@@ -94,5 +92,4 @@ var AvatarImage = function AvatarImage(_ref3) {
|
|
|
94
92
|
}
|
|
95
93
|
});
|
|
96
94
|
};
|
|
97
|
-
var _default = AvatarImage;
|
|
98
|
-
exports.default = _default;
|
|
95
|
+
var _default = exports.default = AvatarImage;
|
package/dist/cjs/AvatarItem.js
CHANGED
|
@@ -17,8 +17,8 @@ var _utilities = require("./utilities");
|
|
|
17
17
|
var _templateObject;
|
|
18
18
|
/** @jsx jsx */
|
|
19
19
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
20
|
-
function ownKeys(
|
|
21
|
-
function _objectSpread(
|
|
20
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
22
|
var avatarItemStyles = (0, _react2.css)({
|
|
23
23
|
minWidth: 0,
|
|
24
24
|
maxWidth: '100%',
|
|
@@ -102,5 +102,4 @@ var AvatarItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
AvatarItem.displayName = 'AvatarItem';
|
|
105
|
-
var _default = AvatarItem;
|
|
106
|
-
exports.default = _default;
|
|
105
|
+
var _default = exports.default = AvatarItem;
|
package/dist/cjs/IconWrapper.js
CHANGED
package/dist/cjs/Presence.js
CHANGED
|
@@ -78,14 +78,13 @@ var AvatarPresence = function AvatarPresence(_ref) {
|
|
|
78
78
|
xmlns: "http://www.w3.org/2000/svg"
|
|
79
79
|
}, getPresence(presence)) : children);
|
|
80
80
|
};
|
|
81
|
-
var _default = AvatarPresence;
|
|
82
|
-
exports.default = _default;
|
|
81
|
+
var _default = exports.default = AvatarPresence;
|
|
83
82
|
/**
|
|
84
83
|
* __Presence wrapper__
|
|
85
84
|
*
|
|
86
85
|
* A presence wrapper is used internally to position presence ontop of the avatar.
|
|
87
86
|
*/
|
|
88
|
-
var PresenceWrapper = function PresenceWrapper(_ref2) {
|
|
87
|
+
var PresenceWrapper = exports.PresenceWrapper = function PresenceWrapper(_ref2) {
|
|
89
88
|
var size = _ref2.size,
|
|
90
89
|
appearance = _ref2.appearance,
|
|
91
90
|
children = _ref2.children,
|
|
@@ -108,5 +107,4 @@ var PresenceWrapper = function PresenceWrapper(_ref2) {
|
|
|
108
107
|
borderColor: borderColor,
|
|
109
108
|
presence: !children ? presence : undefined
|
|
110
109
|
}, children));
|
|
111
|
-
};
|
|
112
|
-
exports.PresenceWrapper = PresenceWrapper;
|
|
110
|
+
};
|
package/dist/cjs/Skeleton.js
CHANGED
|
@@ -9,8 +9,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _constants = require("./constants");
|
|
12
|
-
function ownKeys(
|
|
13
|
-
function _objectSpread(
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */ // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
14
14
|
var skeletonStyles = (0, _react.css)({
|
|
15
15
|
display: 'inline-block',
|
|
16
16
|
backgroundColor: "var(".concat(_constants.CSS_VAR_AVATAR_BGCOLOR, ")"),
|
|
@@ -64,5 +64,4 @@ var Skeleton = function Skeleton(_ref5) {
|
|
|
64
64
|
style: (0, _defineProperty2.default)({}, _constants.CSS_VAR_AVATAR_BGCOLOR, color !== null && color !== void 0 ? color : 'currentColor')
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
-
var _default = Skeleton;
|
|
68
|
-
exports.default = _default;
|
|
67
|
+
var _default = exports.default = Skeleton;
|
package/dist/cjs/Status.js
CHANGED
|
@@ -76,14 +76,13 @@ var AvatarStatus = function AvatarStatus(_ref) {
|
|
|
76
76
|
xmlns: "http://www.w3.org/2000/svg"
|
|
77
77
|
}, getStatus(status)) : children);
|
|
78
78
|
};
|
|
79
|
-
var _default = AvatarStatus;
|
|
80
|
-
exports.default = _default;
|
|
79
|
+
var _default = exports.default = AvatarStatus;
|
|
81
80
|
/**
|
|
82
81
|
* Status wrapper**
|
|
83
82
|
*
|
|
84
83
|
* A status wrapper is used internally to position status ontop of the avatar.
|
|
85
84
|
*/
|
|
86
|
-
var StatusWrapper = function StatusWrapper(_ref2) {
|
|
85
|
+
var StatusWrapper = exports.StatusWrapper = function StatusWrapper(_ref2) {
|
|
87
86
|
var size = _ref2.size,
|
|
88
87
|
status = _ref2.status,
|
|
89
88
|
appearance = _ref2.appearance,
|
|
@@ -105,5 +104,4 @@ var StatusWrapper = function StatusWrapper(_ref2) {
|
|
|
105
104
|
borderColor: borderColor,
|
|
106
105
|
status: !children ? status : undefined
|
|
107
106
|
}, children));
|
|
108
|
-
};
|
|
109
|
-
exports.StatusWrapper = StatusWrapper;
|
|
107
|
+
};
|
package/dist/cjs/Text.js
CHANGED
package/dist/cjs/constants.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.ICON_SIZES = exports.ICON_OFFSET = exports.CSS_VAR_AVATAR_BGCOLOR = expo
|
|
|
7
7
|
var _constants = require("@atlaskit/theme/constants");
|
|
8
8
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match, @atlaskit/design-system/no-deprecated-imports
|
|
9
9
|
|
|
10
|
-
var AVATAR_SIZES = {
|
|
10
|
+
var AVATAR_SIZES = exports.AVATAR_SIZES = {
|
|
11
11
|
xsmall: (0, _constants.gridSize)() * 2,
|
|
12
12
|
small: (0, _constants.gridSize)() * 3,
|
|
13
13
|
medium: (0, _constants.gridSize)() * 4,
|
|
@@ -17,8 +17,7 @@ var AVATAR_SIZES = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
// border radius only applies to "square" avatars
|
|
20
|
-
exports.
|
|
21
|
-
var AVATAR_RADIUS = {
|
|
20
|
+
var AVATAR_RADIUS = exports.AVATAR_RADIUS = {
|
|
22
21
|
xsmall: 2,
|
|
23
22
|
small: 2,
|
|
24
23
|
medium: 3,
|
|
@@ -26,24 +25,18 @@ var AVATAR_RADIUS = {
|
|
|
26
25
|
xlarge: 6,
|
|
27
26
|
xxlarge: 12
|
|
28
27
|
};
|
|
29
|
-
exports.
|
|
30
|
-
var
|
|
31
|
-
exports.
|
|
32
|
-
var
|
|
33
|
-
exports.ACTIVE_SCALE_FACTOR = ACTIVE_SCALE_FACTOR;
|
|
34
|
-
var CSS_VAR_AVATAR_BGCOLOR = '--avatar-background-color';
|
|
35
|
-
exports.CSS_VAR_AVATAR_BGCOLOR = CSS_VAR_AVATAR_BGCOLOR;
|
|
36
|
-
var ICON_SIZES = {
|
|
28
|
+
var BORDER_WIDTH = exports.BORDER_WIDTH = 2;
|
|
29
|
+
var ACTIVE_SCALE_FACTOR = exports.ACTIVE_SCALE_FACTOR = 0.9;
|
|
30
|
+
var CSS_VAR_AVATAR_BGCOLOR = exports.CSS_VAR_AVATAR_BGCOLOR = '--avatar-background-color';
|
|
31
|
+
var ICON_SIZES = exports.ICON_SIZES = {
|
|
37
32
|
small: 12,
|
|
38
33
|
medium: 14,
|
|
39
34
|
large: 15,
|
|
40
35
|
xlarge: 18
|
|
41
36
|
};
|
|
42
|
-
exports.
|
|
43
|
-
var ICON_OFFSET = {
|
|
37
|
+
var ICON_OFFSET = exports.ICON_OFFSET = {
|
|
44
38
|
small: 0,
|
|
45
39
|
medium: 0,
|
|
46
40
|
large: 1,
|
|
47
41
|
xlarge: 7
|
|
48
|
-
};
|
|
49
|
-
exports.ICON_OFFSET = ICON_OFFSET;
|
|
42
|
+
};
|
package/dist/cjs/utilities.js
CHANGED
|
@@ -6,22 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getLinkProps = exports.getCustomElement = exports.getButtonProps = void 0;
|
|
7
7
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
8
8
|
|
|
9
|
-
var getLinkProps = function getLinkProps(href, target) {
|
|
9
|
+
var getLinkProps = exports.getLinkProps = function getLinkProps(href, target) {
|
|
10
10
|
return {
|
|
11
11
|
href: href,
|
|
12
12
|
rel: target === '_blank' ? 'noopener noreferrer' : null,
|
|
13
13
|
target: target
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
exports.
|
|
17
|
-
var getButtonProps = function getButtonProps(onClick) {
|
|
16
|
+
var getButtonProps = exports.getButtonProps = function getButtonProps(onClick) {
|
|
18
17
|
return {
|
|
19
18
|
type: 'button',
|
|
20
19
|
onClick: onClick
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
|
-
exports.
|
|
24
|
-
var getCustomElement = function getCustomElement(isDisabled, href, onClick) {
|
|
22
|
+
var getCustomElement = exports.getCustomElement = function getCustomElement(isDisabled, href, onClick) {
|
|
25
23
|
if (href && !isDisabled) {
|
|
26
24
|
return 'a';
|
|
27
25
|
}
|
|
@@ -29,5 +27,4 @@ var getCustomElement = function getCustomElement(isDisabled, href, onClick) {
|
|
|
29
27
|
return 'button';
|
|
30
28
|
}
|
|
31
29
|
return 'span';
|
|
32
|
-
};
|
|
33
|
-
exports.getCustomElement = getCustomElement;
|
|
30
|
+
};
|
package/dist/es2019/Avatar.js
CHANGED
|
@@ -10,7 +10,7 @@ import { PresenceWrapper } from './Presence';
|
|
|
10
10
|
import { StatusWrapper } from './Status';
|
|
11
11
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
12
12
|
const packageName = "@atlaskit/avatar";
|
|
13
|
-
const packageVersion = "21.
|
|
13
|
+
const packageVersion = "21.4.0";
|
|
14
14
|
|
|
15
15
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
16
16
|
|
|
@@ -140,7 +140,8 @@ const Avatar = /*#__PURE__*/forwardRef(({
|
|
|
140
140
|
stackIndex,
|
|
141
141
|
status,
|
|
142
142
|
target,
|
|
143
|
-
testId
|
|
143
|
+
testId,
|
|
144
|
+
as: AvatarContainer = 'div'
|
|
144
145
|
}, ref) => {
|
|
145
146
|
const {
|
|
146
147
|
createAnalyticsEvent
|
|
@@ -218,7 +219,7 @@ const Avatar = /*#__PURE__*/forwardRef(({
|
|
|
218
219
|
}
|
|
219
220
|
return `${name || ''} ${isStatus && !customStatusNode ? `(${status})` : ''} ${isPresence && !customPresenceNode ? `(${presence})` : ''}`;
|
|
220
221
|
};
|
|
221
|
-
return jsx(
|
|
222
|
+
return jsx(AvatarContainer, {
|
|
222
223
|
"data-testid": testId,
|
|
223
224
|
style: {
|
|
224
225
|
display: 'inline-block',
|
package/dist/esm/Avatar.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
/** @jsx jsx */
|
|
7
7
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
8
8
|
import { createElement, forwardRef, isValidElement, useCallback, useEffect, useRef } from 'react';
|
|
@@ -15,7 +15,7 @@ import { PresenceWrapper } from './Presence';
|
|
|
15
15
|
import { StatusWrapper } from './Status';
|
|
16
16
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
17
17
|
var packageName = "@atlaskit/avatar";
|
|
18
|
-
var packageVersion = "21.
|
|
18
|
+
var packageVersion = "21.4.0";
|
|
19
19
|
|
|
20
20
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
21
21
|
|
|
@@ -60,7 +60,9 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
60
60
|
stackIndex = _ref2.stackIndex,
|
|
61
61
|
status = _ref2.status,
|
|
62
62
|
target = _ref2.target,
|
|
63
|
-
testId = _ref2.testId
|
|
63
|
+
testId = _ref2.testId,
|
|
64
|
+
_ref2$as = _ref2.as,
|
|
65
|
+
AvatarContainer = _ref2$as === void 0 ? 'div' : _ref2$as;
|
|
64
66
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
65
67
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
66
68
|
var customPresenceNode = /*#__PURE__*/isValidElement(presence) ? presence : null;
|
|
@@ -134,7 +136,7 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
134
136
|
}
|
|
135
137
|
return "".concat(name || '', " ").concat(isStatus && !customStatusNode ? "(".concat(status, ")") : '', " ").concat(isPresence && !customPresenceNode ? "(".concat(presence, ")") : '');
|
|
136
138
|
};
|
|
137
|
-
return jsx(
|
|
139
|
+
return jsx(AvatarContainer, {
|
|
138
140
|
"data-testid": testId,
|
|
139
141
|
style: {
|
|
140
142
|
display: 'inline-block',
|
package/dist/esm/AvatarImage.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
7
7
|
import { useEffect, useState } from 'react';
|
package/dist/esm/AvatarItem.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
/** @jsx jsx */
|
|
7
7
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
8
8
|
import { createElement, forwardRef, Fragment } from 'react';
|
package/dist/esm/Skeleton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
7
7
|
|
package/dist/types/Avatar.d.ts
CHANGED
|
@@ -92,6 +92,11 @@ export interface AvatarPropTypes {
|
|
|
92
92
|
* Analytics context meta data
|
|
93
93
|
*/
|
|
94
94
|
analyticsContext?: Record<string, any>;
|
|
95
|
+
/**
|
|
96
|
+
* Replace the wrapping element. This accepts the name of a html tag which will
|
|
97
|
+
* be used to wrap the element.
|
|
98
|
+
*/
|
|
99
|
+
as?: keyof JSX.IntrinsicElements | React.ComponentType<React.AllHTMLAttributes<HTMLElement>>;
|
|
95
100
|
}
|
|
96
101
|
/**
|
|
97
102
|
* __Avatar__
|
|
@@ -92,6 +92,11 @@ export interface AvatarPropTypes {
|
|
|
92
92
|
* Analytics context meta data
|
|
93
93
|
*/
|
|
94
94
|
analyticsContext?: Record<string, any>;
|
|
95
|
+
/**
|
|
96
|
+
* Replace the wrapping element. This accepts the name of a html tag which will
|
|
97
|
+
* be used to wrap the element.
|
|
98
|
+
*/
|
|
99
|
+
as?: keyof JSX.IntrinsicElements | React.ComponentType<React.AllHTMLAttributes<HTMLElement>>;
|
|
95
100
|
}
|
|
96
101
|
/**
|
|
97
102
|
* __Avatar__
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/avatar",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.4.0",
|
|
4
4
|
"description": "An avatar is a visual representation of a user or entity.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
44
44
|
"@atlaskit/icon": "^21.12.0",
|
|
45
|
-
"@atlaskit/theme": "^12.
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
45
|
+
"@atlaskit/theme": "^12.6.0",
|
|
46
|
+
"@atlaskit/tokens": "^1.25.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1",
|
|
49
49
|
"@emotion/serialize": "^1.1.0"
|
package/report.api.md
CHANGED
|
@@ -74,6 +74,9 @@ export interface AvatarItemProps {
|
|
|
74
74
|
export interface AvatarPropTypes {
|
|
75
75
|
analyticsContext?: Record<string, any>;
|
|
76
76
|
appearance?: AppearanceType;
|
|
77
|
+
as?:
|
|
78
|
+
| React.ComponentType<React.AllHTMLAttributes<HTMLElement>>
|
|
79
|
+
| keyof JSX.IntrinsicElements;
|
|
77
80
|
borderColor?: string;
|
|
78
81
|
children?: (props: CustomAvatarProps) => ReactNode;
|
|
79
82
|
href?: string;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export interface AvatarItemProps {
|
|
|
56
56
|
export interface AvatarPropTypes {
|
|
57
57
|
analyticsContext?: Record<string, any>;
|
|
58
58
|
appearance?: AppearanceType;
|
|
59
|
+
as?: React.ComponentType<React.AllHTMLAttributes<HTMLElement>> | keyof JSX.IntrinsicElements;
|
|
59
60
|
borderColor?: string;
|
|
60
61
|
children?: (props: CustomAvatarProps) => ReactNode;
|
|
61
62
|
href?: string;
|