@atlaskit/avatar 21.16.1 → 21.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/Avatar.js +1 -1
- package/dist/cjs/AvatarImage.js +13 -12
- package/dist/es2019/Avatar.js +1 -1
- package/dist/es2019/AvatarImage.js +10 -9
- package/dist/esm/Avatar.js +1 -1
- package/dist/esm/AvatarImage.js +10 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/avatar
|
|
2
2
|
|
|
3
|
+
## 21.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#157335](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157335)
|
|
8
|
+
[`51a41686c7949`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/51a41686c7949) -
|
|
9
|
+
Fixes lineheight issue for xxxsmall avatars which was throwing off the positioning of the fallback
|
|
10
|
+
icon
|
|
11
|
+
|
|
12
|
+
## 21.17.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#157307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157307)
|
|
17
|
+
[`a1e80ec0a5e4a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1e80ec0a5e4a) -
|
|
18
|
+
Enable new icons behind a feature flag.
|
|
19
|
+
|
|
3
20
|
## 21.16.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/Avatar.js
CHANGED
|
@@ -30,7 +30,7 @@ var _templateObject;
|
|
|
30
30
|
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; }
|
|
31
31
|
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; }
|
|
32
32
|
var packageName = "@atlaskit/avatar";
|
|
33
|
-
var packageVersion = "21.
|
|
33
|
+
var packageVersion = "21.17.1";
|
|
34
34
|
var getTestId = function getTestId(testId, children) {
|
|
35
35
|
return !children ? {
|
|
36
36
|
'data-testid': "".concat(testId, "--inner")
|
package/dist/cjs/AvatarImage.js
CHANGED
|
@@ -9,10 +9,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var _person = _interopRequireDefault(require("@atlaskit/icon/core/person"));
|
|
12
|
+
var _person = _interopRequireDefault(require("@atlaskit/icon/core/migration/person"));
|
|
13
|
+
var _releaseShip = _interopRequireDefault(require("@atlaskit/icon/core/migration/release--ship"));
|
|
14
|
+
var _person2 = _interopRequireDefault(require("@atlaskit/icon/core/person"));
|
|
13
15
|
var _release = _interopRequireDefault(require("@atlaskit/icon/core/release"));
|
|
14
|
-
var _person2 = _interopRequireDefault(require("@atlaskit/icon/glyph/person"));
|
|
15
|
-
var _ship = _interopRequireDefault(require("@atlaskit/icon/glyph/ship"));
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _colors = require("@atlaskit/theme/colors");
|
|
18
18
|
var _constants = require("./constants");
|
|
@@ -39,6 +39,7 @@ var nestedAvatarStyles = Object.entries(_constants.AVATAR_SIZES).reduce(function
|
|
|
39
39
|
key = _ref2[0],
|
|
40
40
|
size = _ref2[1];
|
|
41
41
|
return _objectSpread(_objectSpread({}, styles), {}, (0, _defineProperty2.default)({}, key, (0, _react2.css)({
|
|
42
|
+
lineHeight: 0,
|
|
42
43
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
44
|
'& svg': {
|
|
44
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -81,28 +82,28 @@ var AvatarImage = function AvatarImage(_ref3) {
|
|
|
81
82
|
if (!src || hasImageErrored) {
|
|
82
83
|
return (0, _react2.jsx)("span", {
|
|
83
84
|
css: [(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? avatarDefaultIconVisualRefreshStyles : avatarDefaultIconStyles, nestedAvatarStyles[size]]
|
|
84
|
-
}, appearance === 'circle' ? (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _react2.jsx)(
|
|
85
|
+
}, appearance === 'circle' ? (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _react2.jsx)(_person2.default, {
|
|
85
86
|
label: alt,
|
|
86
87
|
color: "var(--ds-icon-subtle, #626F86)",
|
|
87
88
|
testId: testId && "".concat(testId, "--person"),
|
|
88
89
|
spacing: "spacious"
|
|
89
|
-
}) : (0, _react2.jsx)(
|
|
90
|
+
}) : (0, _react2.jsx)(_person.default, {
|
|
90
91
|
label: alt,
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
color: "var(--ds-icon-inverse, ".concat(_colors.N0, ")"),
|
|
93
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, ".concat(_colors.N90, ")"),
|
|
93
94
|
testId: testId && "".concat(testId, "--person"),
|
|
94
|
-
"
|
|
95
|
+
spacing: "spacious"
|
|
95
96
|
}) : (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _react2.jsx)(_release.default, {
|
|
96
97
|
label: alt,
|
|
97
98
|
color: "var(--ds-icon-subtle, #626F86)",
|
|
98
99
|
testId: testId && "".concat(testId, "--ship"),
|
|
99
100
|
spacing: "spacious"
|
|
100
|
-
}) : (0, _react2.jsx)(
|
|
101
|
+
}) : (0, _react2.jsx)(_releaseShip.default, {
|
|
101
102
|
label: alt,
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
color: "var(--ds-icon-inverse, ".concat(_colors.N0, ")"),
|
|
104
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, ".concat(_colors.N90, ")"),
|
|
104
105
|
testId: testId && "".concat(testId, "--ship"),
|
|
105
|
-
"
|
|
106
|
+
spacing: "spacious"
|
|
106
107
|
}));
|
|
107
108
|
}
|
|
108
109
|
return (0, _react2.jsx)("img", {
|
package/dist/es2019/Avatar.js
CHANGED
|
@@ -19,7 +19,7 @@ import { PresenceWrapper } from './Presence';
|
|
|
19
19
|
import { StatusWrapper } from './Status';
|
|
20
20
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
21
21
|
const packageName = "@atlaskit/avatar";
|
|
22
|
-
const packageVersion = "21.
|
|
22
|
+
const packageVersion = "21.17.1";
|
|
23
23
|
const getTestId = (testId, children) => !children ? {
|
|
24
24
|
'data-testid': `${testId}--inner`
|
|
25
25
|
} : {
|
|
@@ -7,10 +7,10 @@ import { useEffect, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
+
import PersonIconLegacy from '@atlaskit/icon/core/migration/person';
|
|
11
|
+
import ReleaseIconMigration from '@atlaskit/icon/core/migration/release--ship';
|
|
10
12
|
import PersonIcon from '@atlaskit/icon/core/person';
|
|
11
13
|
import ReleaseIcon from '@atlaskit/icon/core/release';
|
|
12
|
-
import PersonIconLegacy from '@atlaskit/icon/glyph/person';
|
|
13
|
-
import ShipIcon from '@atlaskit/icon/glyph/ship';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { N0, N90 } from '@atlaskit/theme/colors';
|
|
16
16
|
import { AVATAR_RADIUS, AVATAR_SIZES } from './constants';
|
|
@@ -30,6 +30,7 @@ const nestedAvatarStyles = Object.entries(AVATAR_SIZES).reduce((styles, [key, si
|
|
|
30
30
|
return {
|
|
31
31
|
...styles,
|
|
32
32
|
[key]: css({
|
|
33
|
+
lineHeight: 0,
|
|
33
34
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
35
|
'& svg': {
|
|
35
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -77,21 +78,21 @@ const AvatarImage = ({
|
|
|
77
78
|
spacing: "spacious"
|
|
78
79
|
}) : jsx(PersonIconLegacy, {
|
|
79
80
|
label: alt,
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
color: `var(--ds-icon-inverse, ${N0})`,
|
|
82
|
+
LEGACY_secondaryColor: `var(--ds-icon-subtle, ${N90})`,
|
|
82
83
|
testId: testId && `${testId}--person`,
|
|
83
|
-
"
|
|
84
|
+
spacing: "spacious"
|
|
84
85
|
}) : fg('platform-component-visual-refresh') ? jsx(ReleaseIcon, {
|
|
85
86
|
label: alt,
|
|
86
87
|
color: "var(--ds-icon-subtle, #626F86)",
|
|
87
88
|
testId: testId && `${testId}--ship`,
|
|
88
89
|
spacing: "spacious"
|
|
89
|
-
}) : jsx(
|
|
90
|
+
}) : jsx(ReleaseIconMigration, {
|
|
90
91
|
label: alt,
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
color: `var(--ds-icon-inverse, ${N0})`,
|
|
93
|
+
LEGACY_secondaryColor: `var(--ds-icon-subtle, ${N90})`,
|
|
93
94
|
testId: testId && `${testId}--ship`,
|
|
94
|
-
"
|
|
95
|
+
spacing: "spacious"
|
|
95
96
|
}));
|
|
96
97
|
}
|
|
97
98
|
return jsx("img", {
|
package/dist/esm/Avatar.js
CHANGED
|
@@ -24,7 +24,7 @@ import { PresenceWrapper } from './Presence';
|
|
|
24
24
|
import { StatusWrapper } from './Status';
|
|
25
25
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
26
26
|
var packageName = "@atlaskit/avatar";
|
|
27
|
-
var packageVersion = "21.
|
|
27
|
+
var packageVersion = "21.17.1";
|
|
28
28
|
var getTestId = function getTestId(testId, children) {
|
|
29
29
|
return !children ? {
|
|
30
30
|
'data-testid': "".concat(testId, "--inner")
|
package/dist/esm/AvatarImage.js
CHANGED
|
@@ -11,10 +11,10 @@ import { useEffect, useState } from 'react';
|
|
|
11
11
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
|
+
import PersonIconLegacy from '@atlaskit/icon/core/migration/person';
|
|
15
|
+
import ReleaseIconMigration from '@atlaskit/icon/core/migration/release--ship';
|
|
14
16
|
import PersonIcon from '@atlaskit/icon/core/person';
|
|
15
17
|
import ReleaseIcon from '@atlaskit/icon/core/release';
|
|
16
|
-
import PersonIconLegacy from '@atlaskit/icon/glyph/person';
|
|
17
|
-
import ShipIcon from '@atlaskit/icon/glyph/ship';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
19
|
import { N0, N90 } from '@atlaskit/theme/colors';
|
|
20
20
|
import { AVATAR_RADIUS, AVATAR_SIZES } from './constants';
|
|
@@ -35,6 +35,7 @@ var nestedAvatarStyles = Object.entries(AVATAR_SIZES).reduce(function (styles, _
|
|
|
35
35
|
key = _ref2[0],
|
|
36
36
|
size = _ref2[1];
|
|
37
37
|
return _objectSpread(_objectSpread({}, styles), {}, _defineProperty({}, key, css({
|
|
38
|
+
lineHeight: 0,
|
|
38
39
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
39
40
|
'& svg': {
|
|
40
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -84,21 +85,21 @@ var AvatarImage = function AvatarImage(_ref3) {
|
|
|
84
85
|
spacing: "spacious"
|
|
85
86
|
}) : jsx(PersonIconLegacy, {
|
|
86
87
|
label: alt,
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
color: "var(--ds-icon-inverse, ".concat(N0, ")"),
|
|
89
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, ".concat(N90, ")"),
|
|
89
90
|
testId: testId && "".concat(testId, "--person"),
|
|
90
|
-
"
|
|
91
|
+
spacing: "spacious"
|
|
91
92
|
}) : fg('platform-component-visual-refresh') ? jsx(ReleaseIcon, {
|
|
92
93
|
label: alt,
|
|
93
94
|
color: "var(--ds-icon-subtle, #626F86)",
|
|
94
95
|
testId: testId && "".concat(testId, "--ship"),
|
|
95
96
|
spacing: "spacious"
|
|
96
|
-
}) : jsx(
|
|
97
|
+
}) : jsx(ReleaseIconMigration, {
|
|
97
98
|
label: alt,
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
color: "var(--ds-icon-inverse, ".concat(N0, ")"),
|
|
100
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, ".concat(N90, ")"),
|
|
100
101
|
testId: testId && "".concat(testId, "--ship"),
|
|
101
|
-
"
|
|
102
|
+
spacing: "spacious"
|
|
102
103
|
}));
|
|
103
104
|
}
|
|
104
105
|
return jsx("img", {
|