@atlaskit/avatar 21.0.2 → 21.1.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/avatar
2
2
 
3
+ ## 21.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c1d012d6d20`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c1d012d6d20) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behaviour change.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 21.0.3
14
+
15
+ ### Patch Changes
16
+
17
+ - [`f9cd9e55e43`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9cd9e55e43) - Update to disabled tokens which slightly affects the opacity in disabled states
18
+
3
19
  ## 21.0.2
4
20
 
5
21
  ### Patch Changes
@@ -15,7 +15,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
15
15
 
16
16
  var _react = require("react");
17
17
 
18
- var _core = require("@emotion/core");
18
+ var _react2 = require("@emotion/react");
19
19
 
20
20
  var _analyticsNext = require("@atlaskit/analytics-next");
21
21
 
@@ -38,7 +38,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
38
38
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
39
 
40
40
  var packageName = "@atlaskit/avatar";
41
- var packageVersion = "21.0.2";
41
+ var packageVersion = "21.1.0";
42
42
 
43
43
  var getStyles = function getStyles(css, _ref) {
44
44
  var size = _ref.size,
@@ -50,7 +50,7 @@ var getStyles = function getStyles(css, _ref) {
50
50
  isInteractive = _ref.isInteractive,
51
51
  isDisabled = _ref.isDisabled;
52
52
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
53
- css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), _constants.BORDER_WIDTH, borderColor, _constants.BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(_constants.BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(_colors.B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(_constants.ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: 0.7;\n pointer-events: none;\n background-color: ".concat("var(--ds-surface, ".concat(_colors.N0, ")"), ";\n }\n "))
53
+ css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), _constants.BORDER_WIDTH, borderColor, _constants.BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(_constants.BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(_colors.B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(_colors.N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(_constants.ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: ".concat("var(--ds-opacity-disabled, 0.7)", ";\n pointer-events: none;\n background-color: ", "var(--ds-surface, ".concat(_colors.N0, ")"), ";\n }\n "))
54
54
  );
55
55
  };
56
56
  /**
@@ -154,7 +154,7 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
154
154
  });
155
155
  };
156
156
 
157
- return (0, _core.jsx)("div", {
157
+ return (0, _react2.jsx)("div", {
158
158
  "data-testid": testId,
159
159
  style: {
160
160
  display: 'inline-block',
@@ -162,7 +162,7 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
162
162
  outline: 0,
163
163
  zIndex: stackIndex
164
164
  }
165
- }, (0, _core.jsx)(_core.ClassNames, null, function (_ref3) {
165
+ }, (0, _react2.jsx)(_react2.ClassNames, null, function (_ref3) {
166
166
  var css = _ref3.css;
167
167
 
168
168
  var props = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
@@ -178,7 +178,7 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
178
178
  }, componentProps()), testId && getTestId(testId, children)), (onClick || href) && {
179
179
  'aria-label': label
180
180
  }), {}, {
181
- children: (0, _core.jsx)(_AvatarImage.default, {
181
+ children: (0, _react2.jsx)(_AvatarImage.default, {
182
182
  alt: name,
183
183
  appearance: appearance,
184
184
  size: size,
@@ -189,12 +189,12 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
189
189
  });
190
190
 
191
191
  return children ? children(props) : /*#__PURE__*/(0, _react.createElement)((0, _utilities.getCustomElement)(isDisabled, href, onClick), props);
192
- }), isValidIconSize && presence && !status && (0, _core.jsx)(_Presence.PresenceWrapper, {
192
+ }), isValidIconSize && presence && !status && (0, _react2.jsx)(_Presence.PresenceWrapper, {
193
193
  appearance: appearance,
194
194
  size: size,
195
195
  presence: !customPresenceNode && presence,
196
196
  testId: testId
197
- }, customPresenceNode), isValidIconSize && status && (0, _core.jsx)(_Status.StatusWrapper, {
197
+ }, customPresenceNode), isValidIconSize && status && (0, _react2.jsx)(_Status.StatusWrapper, {
198
198
  appearance: appearance,
199
199
  size: size,
200
200
  borderColor: borderColor,
@@ -11,7 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
 
12
12
  var _react = require("react");
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _person = _interopRequireDefault(require("@atlaskit/icon/glyph/person"));
17
17
 
@@ -27,13 +27,13 @@ var ICON_BACKGROUND = "var(--ds-icon-inverse, ".concat((0, _colors.background)()
27
27
  exports.ICON_BACKGROUND = ICON_BACKGROUND;
28
28
  var ICON_COLOR = "var(--ds-icon-subtle, ".concat(_colors.N90, ")");
29
29
  exports.ICON_COLOR = ICON_COLOR;
30
- var avatarDefaultIconStyles = (0, _core.css)({
30
+ var avatarDefaultIconStyles = (0, _react2.css)({
31
31
  display: 'block',
32
32
  width: '100%',
33
33
  height: '100%',
34
34
  backgroundColor: ICON_COLOR
35
35
  });
36
- var avatarImageStyles = (0, _core.css)({
36
+ var avatarImageStyles = (0, _react2.css)({
37
37
  display: 'flex',
38
38
  width: '100%',
39
39
  height: '100%',
@@ -65,7 +65,7 @@ var AvatarImage = function AvatarImage(_ref) {
65
65
  }, [src]);
66
66
 
67
67
  if (!src || hasImageErrored) {
68
- return (0, _core.jsx)("span", {
68
+ return (0, _react2.jsx)("span", {
69
69
  css: [avatarDefaultIconStyles, // TODO: These dynamic SVG styles can't be set in 'style'. On a refactor, use a css custom property to pass down the size
70
70
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
71
71
  {
@@ -74,12 +74,12 @@ var AvatarImage = function AvatarImage(_ref) {
74
74
  height: "".concat(_constants.AVATAR_SIZES[size], "px")
75
75
  }
76
76
  }]
77
- }, appearance === 'circle' ? (0, _core.jsx)(_person.default, {
77
+ }, appearance === 'circle' ? (0, _react2.jsx)(_person.default, {
78
78
  label: alt,
79
79
  primaryColor: ICON_BACKGROUND,
80
80
  secondaryColor: ICON_COLOR,
81
81
  testId: testId && "".concat(testId, "--person")
82
- }) : (0, _core.jsx)(_ship.default, {
82
+ }) : (0, _react2.jsx)(_ship.default, {
83
83
  label: alt,
84
84
  primaryColor: ICON_BACKGROUND,
85
85
  secondaryColor: ICON_COLOR,
@@ -87,7 +87,7 @@ var AvatarImage = function AvatarImage(_ref) {
87
87
  }));
88
88
  }
89
89
 
90
- return (0, _core.jsx)("img", {
90
+ return (0, _react2.jsx)("img", {
91
91
  src: src,
92
92
  alt: alt,
93
93
  "data-testid": testId && "".concat(testId, "--image"),
@@ -13,7 +13,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
 
@@ -31,7 +31,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
31
31
 
32
32
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
33
33
 
34
- var avatarItemStyles = (0, _core.css)({
34
+ var avatarItemStyles = (0, _react2.css)({
35
35
  minWidth: 0,
36
36
  maxWidth: '100%',
37
37
  paddingLeft: "".concat((0, _constants.gridSize)(), "px"),
@@ -44,7 +44,7 @@ var getStyles = function getStyles(css, _ref) {
44
44
  isInteractive = _ref.isInteractive,
45
45
  isDisabled = _ref.isDisabled;
46
46
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
47
- css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, (0, _constants.borderRadius)(), _constants2.BORDER_WIDTH, (0, _constants.gridSize)() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat((0, _colors.backgroundHover)(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(_colors.B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat((0, _colors.backgroundActive)(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n ")
47
+ css(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, (0, _constants.borderRadius)(), _constants2.BORDER_WIDTH, (0, _constants.gridSize)() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat((0, _colors.backgroundHover)(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(_colors.B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat((0, _colors.backgroundActive)(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: ".concat("var(--ds-opacity-disabled, 0.5)", ";\n pointer-events: none;\n "))
48
48
  );
49
49
  };
50
50
  /**
@@ -93,7 +93,7 @@ var AvatarItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
93
93
  });
94
94
  };
95
95
 
96
- return (0, _core.jsx)(_core.ClassNames, null, function (_ref3) {
96
+ return (0, _react2.jsx)(_react2.ClassNames, null, function (_ref3) {
97
97
  var css = _ref3.css;
98
98
 
99
99
  var props = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
@@ -106,11 +106,11 @@ var AvatarItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
106
106
  }, componentProps()), testId && getTestId(testId, children)), (onClick || href) && {
107
107
  'aria-label': label
108
108
  }), {}, {
109
- children: (0, _core.jsx)(_react.Fragment, null, avatar, (0, _core.jsx)("div", {
109
+ children: (0, _react2.jsx)(_react.Fragment, null, avatar, (0, _react2.jsx)("div", {
110
110
  css: avatarItemStyles
111
- }, (0, _core.jsx)(_Text.default, {
111
+ }, (0, _react2.jsx)(_Text.default, {
112
112
  shouldTruncate: !isTruncationDisabled
113
- }, primaryText), (0, _core.jsx)(_Text.default, {
113
+ }, primaryText), (0, _react2.jsx)(_Text.default, {
114
114
  isSecondary: true,
115
115
  shouldTruncate: !isTruncationDisabled
116
116
  }, secondaryText)))
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
 
@@ -13,7 +13,7 @@ var _constants = require("./constants");
13
13
 
14
14
  /** @jsx jsx */
15
15
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
16
- var iconWrapperStyles = (0, _core.css)({
16
+ var iconWrapperStyles = (0, _react.css)({
17
17
  display: 'flex',
18
18
  boxSizing: 'border-box',
19
19
  width: '100%',
@@ -33,7 +33,7 @@ var IconWrapper = function IconWrapper(_ref) {
33
33
  var _ref$bgColor = _ref.bgColor,
34
34
  bgColor = _ref$bgColor === void 0 ? "var(--ds-surface-overlay, ".concat((0, _colors.background)(), ")") : _ref$bgColor,
35
35
  children = _ref.children;
36
- return (0, _core.jsx)("span", {
36
+ return (0, _react.jsx)("span", {
37
37
  css: iconWrapperStyles,
38
38
  style: {
39
39
  border: "".concat(_constants.BORDER_WIDTH, "px solid ").concat(bgColor),
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _constants = require("./constants");
11
11
 
@@ -20,15 +20,15 @@ var getStyles = function getStyles(_ref) {
20
20
  color = _ref$color === void 0 ? 'currentColor' : _ref$color,
21
21
  _ref$weight = _ref.weight,
22
22
  weight = _ref$weight === void 0 ? 'normal' : _ref$weight;
23
- return {
23
+ return (0, _react.css)({
24
+ display: 'inline-block',
24
25
  width: "".concat(_constants.AVATAR_SIZES[size], "px"),
25
26
  height: "".concat(_constants.AVATAR_SIZES[size], "px"),
26
- display: 'inline-block',
27
- borderRadius: "".concat(appearance === 'square' ? "".concat(_constants.AVATAR_RADIUS[size], "px") : '50%'),
28
27
  backgroundColor: color,
29
28
  border: "".concat(_constants.BORDER_WIDTH, "px solid transparent"),
29
+ borderRadius: "".concat(appearance === 'square' ? "".concat(_constants.AVATAR_RADIUS[size], "px") : '50%'),
30
30
  opacity: "".concat(weight === 'strong' ? 0.3 : 0.15)
31
- };
31
+ });
32
32
  };
33
33
  /**
34
34
  * __Skeleton__
@@ -45,7 +45,7 @@ var Skeleton = function Skeleton(_ref2) {
45
45
  appearance = _ref2.appearance,
46
46
  color = _ref2.color,
47
47
  weight = _ref2.weight;
48
- return (0, _core.jsx)("div", {
48
+ return (0, _react.jsx)("div", {
49
49
  // TODO: Refactor styles to follow css prop rules
50
50
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
51
51
  css: getStyles({
package/dist/cjs/Text.js CHANGED
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react = require("@emotion/react");
13
13
 
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
 
@@ -18,7 +18,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
18
18
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
19
 
20
20
  var getStyles = function getStyles(isSecondary, shouldTruncate) {
21
- return _objectSpread(_objectSpread({
21
+ return (0, _react.css)(_objectSpread(_objectSpread({
22
22
  display: 'block',
23
23
  margin: 0,
24
24
  color: "var(--ds-text, ".concat(_colors.N900, ")")
@@ -29,7 +29,7 @@ var getStyles = function getStyles(isSecondary, shouldTruncate) {
29
29
  }), isSecondary && {
30
30
  color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
31
31
  fontSize: '0.85em'
32
- });
32
+ }));
33
33
  };
34
34
  /**
35
35
  * __Text__
@@ -44,7 +44,7 @@ var Text = function Text(_ref) {
44
44
  shouldTruncate = _ref.shouldTruncate;
45
45
  return (// TODO: Refactor styles to follow css prop rules
46
46
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
47
- (0, _core.jsx)("span", {
47
+ (0, _react.jsx)("span", {
48
48
  css: getStyles(isSecondary, shouldTruncate)
49
49
  }, children)
50
50
  );
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.2",
3
+ "version": "21.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
3
  import { createElement, forwardRef, useCallback, useEffect, useRef } from 'react';
4
- import { ClassNames, jsx } from '@emotion/core';
4
+ import { ClassNames, jsx } from '@emotion/react';
5
5
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
6
6
  import { B300, N0, N70A } from '@atlaskit/theme/colors';
7
7
  import AvatarImage from './AvatarImage';
@@ -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.0.2";
13
+ const packageVersion = "21.1.0";
14
14
 
15
15
  const getStyles = (css, {
16
16
  size,
@@ -108,7 +108,7 @@ css`
108
108
  cursor: not-allowed;
109
109
 
110
110
  &::after {
111
- opacity: 0.7;
111
+ opacity: ${"var(--ds-opacity-disabled, 0.7)"};
112
112
  pointer-events: none;
113
113
  background-color: ${`var(--ds-surface, ${N0})`};
114
114
  }
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
3
  import { useEffect, useState } from 'react';
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import PersonIcon from '@atlaskit/icon/glyph/person';
6
6
  import ShipIcon from '@atlaskit/icon/glyph/ship';
7
7
  import { background, N90 } from '@atlaskit/theme/colors';
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
3
  import { createElement, forwardRef, Fragment } from 'react';
4
- import { ClassNames, css, jsx } from '@emotion/core';
4
+ import { ClassNames, css, jsx } from '@emotion/react';
5
5
  import { B200, backgroundActive, backgroundHover } from '@atlaskit/theme/colors';
6
6
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
7
7
  import { BORDER_WIDTH } from './constants';
@@ -58,7 +58,7 @@ css`
58
58
 
59
59
  ${isDisabled && `
60
60
  cursor: not-allowed;
61
- opacity: 0.5;
61
+ opacity: ${"var(--ds-opacity-disabled, 0.5)"};
62
62
  pointer-events: none;
63
63
  `}
64
64
  `;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { background } from '@atlaskit/theme/colors';
5
5
  import { BORDER_WIDTH } from './constants';
6
6
  const iconWrapperStyles = css({
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
- import { jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { AVATAR_RADIUS, AVATAR_SIZES, BORDER_WIDTH } from './constants';
5
5
 
6
6
  const getStyles = ({
@@ -8,13 +8,13 @@ const getStyles = ({
8
8
  appearance = 'circle',
9
9
  color = 'currentColor',
10
10
  weight = 'normal'
11
- }) => ({
11
+ }) => css({
12
+ display: 'inline-block',
12
13
  width: `${AVATAR_SIZES[size]}px`,
13
14
  height: `${AVATAR_SIZES[size]}px`,
14
- display: 'inline-block',
15
- borderRadius: `${appearance === 'square' ? `${AVATAR_RADIUS[size]}px` : '50%'}`,
16
15
  backgroundColor: color,
17
16
  border: `${BORDER_WIDTH}px solid transparent`,
17
+ borderRadius: `${appearance === 'square' ? `${AVATAR_RADIUS[size]}px` : '50%'}`,
18
18
  opacity: `${weight === 'strong' ? 0.3 : 0.15}`
19
19
  });
20
20
  /**
@@ -1,9 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
- import { jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { N200, N900 } from '@atlaskit/theme/colors';
5
5
 
6
- const getStyles = (isSecondary, shouldTruncate) => ({
6
+ const getStyles = (isSecondary, shouldTruncate) => css({
7
7
  display: 'block',
8
8
  margin: 0,
9
9
  color: `var(--ds-text, ${N900})`,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.2",
3
+ "version": "21.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -11,7 +11,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
11
11
  /** @jsx jsx */
12
12
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
13
13
  import { createElement, forwardRef, useCallback, useEffect, useRef } from 'react';
14
- import { ClassNames, jsx } from '@emotion/core';
14
+ import { ClassNames, jsx } from '@emotion/react';
15
15
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
16
16
  import { B300, N0, N70A } from '@atlaskit/theme/colors';
17
17
  import AvatarImage from './AvatarImage';
@@ -20,7 +20,7 @@ import { PresenceWrapper } from './Presence';
20
20
  import { StatusWrapper } from './Status';
21
21
  import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
22
22
  var packageName = "@atlaskit/avatar";
23
- var packageVersion = "21.0.2";
23
+ var packageVersion = "21.1.0";
24
24
 
25
25
  var getStyles = function getStyles(css, _ref) {
26
26
  var size = _ref.size,
@@ -32,7 +32,7 @@ var getStyles = function getStyles(css, _ref) {
32
32
  isInteractive = _ref.isInteractive,
33
33
  isDisabled = _ref.isDisabled;
34
34
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
35
- css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), BORDER_WIDTH, borderColor, BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: 0.7;\n pointer-events: none;\n background-color: ".concat("var(--ds-surface, ".concat(N0, ")"), ";\n }\n "))
35
+ css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n align-items: stretch;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: content-box;\n cursor: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n outline: none;\n overflow: hidden;\n position: static;\n transform: translateZ(0);\n transition: transform 200ms, opacity 200ms;\n box-shadow: 0 0 0 ", "px ", ";\n border: none;\n margin: ", "px;\n padding: 0;\n\n /* Added font-size and font-family styles to fix alignment issue in firefox for interactive button avatar */\n font-size: inherit;\n font-family: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n\n &::after {\n background-color: transparent;\n bottom: 0px;\n\n /* Added border-radius style to fix hover issue in safari */\n border-radius: ", ";\n content: ' ';\n left: 0px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n right: 0px;\n top: 0px;\n transition: opacity 200ms;\n width: 100%;\n }\n\n ", "\n\n ", "\n\n ", "\n "])), size, size, borderColor, appearance === 'circle' ? '50%' : "".concat(radius, "px"), BORDER_WIDTH, borderColor, BORDER_WIDTH, appearance === 'circle' ? '50%' : "".concat(radius, "px"), stackIndex && "position: relative;", isInteractive && "\n cursor: pointer;\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-focused, ".concat(B300, ")"), "\n }\n\n :hover {\n &::after {\n background-color: ", "var(--ds-interaction-hovered, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n &::after {\n background-color: ", "var(--ds-interaction-pressed, ".concat(N70A, ")"), ";\n opacity: 1;\n }\n }\n\n :active {\n transform: scale(").concat(ACTIVE_SCALE_FACTOR, ");\n }\n\n @media screen and (forced-colors: active) {\n &:focus-visible {\n outline: 1px solid\n }\n }\n "), isDisabled && "\n cursor: not-allowed;\n\n &::after {\n opacity: ".concat("var(--ds-opacity-disabled, 0.7)", ";\n pointer-events: none;\n background-color: ", "var(--ds-surface, ".concat(N0, ")"), ";\n }\n "))
36
36
  );
37
37
  };
38
38
  /**
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  /** @jsx jsx */
4
4
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
5
5
  import { useEffect, useState } from 'react';
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import PersonIcon from '@atlaskit/icon/glyph/person';
8
8
  import ShipIcon from '@atlaskit/icon/glyph/ship';
9
9
  import { background, N90 } from '@atlaskit/theme/colors';
@@ -10,7 +10,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
10
10
  /** @jsx jsx */
11
11
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
12
12
  import { createElement, forwardRef, Fragment } from 'react';
13
- import { ClassNames, css, jsx } from '@emotion/core';
13
+ import { ClassNames, css, jsx } from '@emotion/react';
14
14
  import { B200, backgroundActive, backgroundHover } from '@atlaskit/theme/colors';
15
15
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
16
16
  import { BORDER_WIDTH } from './constants';
@@ -29,7 +29,7 @@ var getStyles = function getStyles(css, _ref) {
29
29
  isInteractive = _ref.isInteractive,
30
30
  isDisabled = _ref.isDisabled;
31
31
  return (//eslint-disable-next-line @repo/internal/react/no-css-string-literals
32
- css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, borderRadius(), BORDER_WIDTH, gridSize() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(backgroundHover(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat(backgroundActive(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n ")
32
+ css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n border-radius: ", "px;\n border: ", "px solid transparent;\n box-sizing: border-box;\n color: inherit;\n display: flex;\n font-size: inherit;\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n outline: none;\n margin: 0;\n padding: ", "px;\n text-align: left;\n text-decoration: none;\n width: 100%;\n\n ", "\n\n ", "\n "])), backgroundColor, borderRadius(), BORDER_WIDTH, gridSize() / 2, isInteractive && "\n :hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(backgroundHover(), ")"), ";\n cursor: pointer;\n text-decoration: none;\n }\n\n :focus {\n outline: none;\n border-color: ", "var(--ds-border-focused, ".concat(B200, ")"), ";\n }\n\n :active {\n background-color: ", "var(--ds-background-neutral-subtle-pressed, ".concat(backgroundActive(), ")"), ";\n }\n "), isDisabled && "\n cursor: not-allowed;\n opacity: ".concat("var(--ds-opacity-disabled, 0.5)", ";\n pointer-events: none;\n "))
33
33
  );
34
34
  };
35
35
  /**
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { background } from '@atlaskit/theme/colors';
5
5
  import { BORDER_WIDTH } from './constants';
6
6
  var iconWrapperStyles = css({
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
- import { jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { AVATAR_RADIUS, AVATAR_SIZES, BORDER_WIDTH } from './constants';
5
5
 
6
6
  var getStyles = function getStyles(_ref) {
@@ -12,15 +12,15 @@ var getStyles = function getStyles(_ref) {
12
12
  color = _ref$color === void 0 ? 'currentColor' : _ref$color,
13
13
  _ref$weight = _ref.weight,
14
14
  weight = _ref$weight === void 0 ? 'normal' : _ref$weight;
15
- return {
15
+ return css({
16
+ display: 'inline-block',
16
17
  width: "".concat(AVATAR_SIZES[size], "px"),
17
18
  height: "".concat(AVATAR_SIZES[size], "px"),
18
- display: 'inline-block',
19
- borderRadius: "".concat(appearance === 'square' ? "".concat(AVATAR_RADIUS[size], "px") : '50%'),
20
19
  backgroundColor: color,
21
20
  border: "".concat(BORDER_WIDTH, "px solid transparent"),
21
+ borderRadius: "".concat(appearance === 'square' ? "".concat(AVATAR_RADIUS[size], "px") : '50%'),
22
22
  opacity: "".concat(weight === 'strong' ? 0.3 : 0.15)
23
- };
23
+ });
24
24
  };
25
25
  /**
26
26
  * __Skeleton__
package/dist/esm/Text.js CHANGED
@@ -6,11 +6,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
6
 
7
7
  /** @jsx jsx */
8
8
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
9
- import { jsx } from '@emotion/core';
9
+ import { css, jsx } from '@emotion/react';
10
10
  import { N200, N900 } from '@atlaskit/theme/colors';
11
11
 
12
12
  var getStyles = function getStyles(isSecondary, shouldTruncate) {
13
- return _objectSpread(_objectSpread({
13
+ return css(_objectSpread(_objectSpread({
14
14
  display: 'block',
15
15
  margin: 0,
16
16
  color: "var(--ds-text, ".concat(N900, ")")
@@ -21,7 +21,7 @@ var getStyles = function getStyles(isSecondary, shouldTruncate) {
21
21
  }), isSecondary && {
22
22
  color: "var(--ds-text-subtlest, ".concat(N200, ")"),
23
23
  fontSize: '0.85em'
24
- });
24
+ }));
25
25
  };
26
26
  /**
27
27
  * __Text__
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.2",
3
+ "version": "21.1.0",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar",
3
- "version": "21.0.2",
3
+ "version": "21.1.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/"
@@ -40,11 +40,12 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@atlaskit/analytics-next": "^8.0.0",
43
- "@atlaskit/icon": "^21.10.0",
43
+ "@atlaskit/icon": "^21.11.0",
44
44
  "@atlaskit/theme": "^12.2.0",
45
45
  "@atlaskit/tokens": "^0.10.0",
46
46
  "@babel/runtime": "^7.0.0",
47
- "@emotion/core": "^10.0.9"
47
+ "@emotion/react": "^11.7.1",
48
+ "@emotion/serialize": "^1.1.0"
48
49
  },
49
50
  "peerDependencies": {
50
51
  "react": "^16.8.0"
@@ -54,11 +55,11 @@
54
55
  "@atlaskit/docs": "*",
55
56
  "@atlaskit/ds-lib": "^2.1.1",
56
57
  "@atlaskit/field-base": "^15.0.0",
57
- "@atlaskit/icon": "^21.10.0",
58
- "@atlaskit/section-message": "^6.2.0",
58
+ "@atlaskit/icon": "^21.11.0",
59
+ "@atlaskit/section-message": "^6.3.0",
59
60
  "@atlaskit/ssr": "*",
60
61
  "@atlaskit/toggle": "^12.5.0",
61
- "@atlaskit/tooltip": "^17.5.0",
62
+ "@atlaskit/tooltip": "^17.6.0",
62
63
  "@atlaskit/visual-regression": "*",
63
64
  "@atlaskit/webdriver-runner": "*",
64
65
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
package/report.api.md CHANGED
@@ -1,6 +1,8 @@
1
- ## API Report File for "@atlaskit/avatar"
1
+ ## API Report File for "@atlaskit/avatar".
2
2
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
4
6
 
5
7
  ```ts
6
8
  /// <reference types="react" />