@atlaskit/avatar-group 9.9.0 → 9.9.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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/avatar-group
2
2
 
3
+ ## 9.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#122942](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/122942)
8
+ [`99084c446171e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/99084c446171e) -
9
+ Fixes bug where the border color for avatars in the `data` prop were not being passed through. Now
10
+ the `borderColor` prop from an avatar in the `data` prop will pass through. Preference is given to
11
+ the `borderColor` prop from avatar group, if both are present.
12
+
3
13
  ## 9.9.0
4
14
 
5
15
  ### Minor Changes
@@ -29,7 +29,8 @@ var _utils = require("./utils");
29
29
  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; }
30
30
  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; } /**
31
31
  * @jsxRuntime classic
32
- */ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
32
+ * @jsx jsx
33
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
33
34
  var MAX_COUNT = {
34
35
  grid: 11,
35
36
  stack: 5
@@ -235,7 +236,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
235
236
  var callback = avatarData.onClick || onAvatarClick;
236
237
  var finalAvatar = getOverrides(overrides).Avatar.render(avatar, _objectSpread(_objectSpread({}, avatarData), {}, {
237
238
  size: size,
238
- borderColor: borderColor,
239
+ borderColor: borderColor || avatarData.borderColor,
239
240
  testId: testId && "".concat(testId, "--avatar-").concat(idx),
240
241
  onClick: callback ? function (event, analyticsEvent) {
241
242
  callback(event, analyticsEvent, idx);
@@ -8,8 +8,8 @@ var _react = require("react");
8
8
  var _react2 = require("@emotion/react");
9
9
  /**
10
10
  * @jsxRuntime classic
11
+ * @jsx jsx
11
12
  */
12
- /** @jsx jsx */
13
13
 
14
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
15
 
@@ -14,8 +14,8 @@ var _focusManager = require("./focus-manager");
14
14
  var _excluded = ["maxWidth", "minWidth", "setInitialFocusRef"];
15
15
  /**
16
16
  * @jsxRuntime classic
17
+ * @jsx jsx
17
18
  */
18
- /** @jsx jsx */
19
19
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
20
20
  /**
21
21
  * It sets focus to the first avatar when popup is open.
@@ -16,8 +16,8 @@ var _colors = require("@atlaskit/theme/colors");
16
16
  var _excluded = ["testId", "className", "ref"];
17
17
  /**
18
18
  * @jsxRuntime classic
19
+ * @jsx jsx
19
20
  */
20
- /** @jsx jsx */
21
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -72,7 +72,7 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
72
72
  var _ref$appearance = _ref.appearance,
73
73
  appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
74
74
  _ref$borderColor = _ref.borderColor,
75
- borderColor = _ref$borderColor === void 0 ? (0, _platformFeatureFlags.fg)('platform.design-system-team.component-visual-refresh_t8zbo') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(_colors.N0, ")") : _ref$borderColor,
75
+ borderColor = _ref$borderColor === void 0 ? (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(_colors.N0, ")") : _ref$borderColor,
76
76
  _ref$size = _ref.size,
77
77
  size = _ref$size === void 0 ? 'medium' : _ref$size,
78
78
  _ref$count = _ref.count,
@@ -10,8 +10,8 @@ var _avatar = require("@atlaskit/avatar");
10
10
  var _constants = require("@atlaskit/theme/constants");
11
11
  /**
12
12
  * @jsxRuntime classic
13
+ * @jsx jsx
13
14
  */
14
- /** @jsx jsx */
15
15
 
16
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
17
 
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /**
3
3
  * @jsxRuntime classic
4
+ * @jsx jsx
4
5
  */
5
- /** @jsx jsx */
6
6
  import { useCallback, useEffect, useState } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -206,7 +206,7 @@ const AvatarGroup = ({
206
206
  const finalAvatar = getOverrides(overrides).Avatar.render(avatar, {
207
207
  ...avatarData,
208
208
  size,
209
- borderColor,
209
+ borderColor: borderColor || avatarData.borderColor,
210
210
  testId: testId && `${testId}--avatar-${idx}`,
211
211
  onClick: callback ? (event, analyticsEvent) => {
212
212
  callback(event, analyticsEvent, idx);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { Children } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /**
3
3
  * @jsxRuntime classic
4
+ * @jsx jsx
4
5
  */
5
- /** @jsx jsx */
6
6
  import { useContext, useEffect } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /**
3
3
  * @jsxRuntime classic
4
+ * @jsx jsx
4
5
  */
5
- /** @jsx jsx */
6
6
  import { forwardRef, useCallback } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -59,7 +59,7 @@ const buttonStyles = css({
59
59
  const MAX_DISPLAY_COUNT = 99;
60
60
  const MoreIndicator = /*#__PURE__*/forwardRef(({
61
61
  appearance = 'circle',
62
- borderColor = fg('platform.design-system-team.component-visual-refresh_t8zbo') ? "var(--ds-surface, #FFFFFF)" : `var(--ds-border-inverse, ${N0})`,
62
+ borderColor = fg('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : `var(--ds-border-inverse, ${N0})`,
63
63
  size = 'medium',
64
64
  count = 0,
65
65
  testId,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { Children } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -5,8 +5,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
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
  /**
7
7
  * @jsxRuntime classic
8
+ * @jsx jsx
8
9
  */
9
- /** @jsx jsx */
10
10
  import { useCallback, useEffect, useState } from 'react';
11
11
 
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -232,7 +232,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
232
232
  var callback = avatarData.onClick || onAvatarClick;
233
233
  var finalAvatar = getOverrides(overrides).Avatar.render(avatar, _objectSpread(_objectSpread({}, avatarData), {}, {
234
234
  size: size,
235
- borderColor: borderColor,
235
+ borderColor: borderColor || avatarData.borderColor,
236
236
  testId: testId && "".concat(testId, "--avatar-").concat(idx),
237
237
  onClick: callback ? function (event, analyticsEvent) {
238
238
  callback(event, analyticsEvent, idx);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { Children } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["maxWidth", "minWidth", "setInitialFocusRef"];
4
4
  /**
5
5
  * @jsxRuntime classic
6
+ * @jsx jsx
6
7
  */
7
- /** @jsx jsx */
8
8
  import { useContext, useEffect } from 'react';
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["testId", "className", "ref"];
4
4
  /**
5
5
  * @jsxRuntime classic
6
+ * @jsx jsx
6
7
  */
7
- /** @jsx jsx */
8
8
  import { forwardRef, useCallback } from 'react';
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -63,7 +63,7 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
63
63
  var _ref$appearance = _ref.appearance,
64
64
  appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
65
65
  _ref$borderColor = _ref.borderColor,
66
- borderColor = _ref$borderColor === void 0 ? fg('platform.design-system-team.component-visual-refresh_t8zbo') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(N0, ")") : _ref$borderColor,
66
+ borderColor = _ref$borderColor === void 0 ? fg('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(N0, ")") : _ref$borderColor,
67
67
  _ref$size = _ref.size,
68
68
  size = _ref$size === void 0 ? 'medium' : _ref$size,
69
69
  _ref$count = _ref.count,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { Children } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { type ElementType, type MouseEventHandler } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import Avatar, { type SizeType } from '@atlaskit/avatar';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { type FC, type ReactNode } from 'react';
6
6
  declare const Grid: FC<{
7
7
  children: ReactNode;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { type FC, type ReactNode } from 'react';
6
6
  declare const Stack: FC<{
7
7
  children: ReactNode;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { type ElementType, type MouseEventHandler } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import Avatar, { type SizeType } from '@atlaskit/avatar';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { type FC, type ReactNode } from 'react';
6
6
  declare const Grid: FC<{
7
7
  children: ReactNode;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @jsxRuntime classic
3
+ * @jsx jsx
3
4
  */
4
- /** @jsx jsx */
5
5
  import { type FC, type ReactNode } from 'react';
6
6
  declare const Stack: FC<{
7
7
  children: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.9.0",
3
+ "version": "9.9.1",
4
4
  "description": "An avatar group displays a number of avatars grouped together in a stack or grid.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,11 +29,11 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/avatar": "^21.11.0",
31
31
  "@atlaskit/ds-lib": "^2.3.0",
32
- "@atlaskit/menu": "^2.6.0",
32
+ "@atlaskit/menu": "^2.8.0",
33
33
  "@atlaskit/platform-feature-flags": "^0.3.0",
34
34
  "@atlaskit/popup": "^1.20.0",
35
35
  "@atlaskit/theme": "^12.11.0",
36
- "@atlaskit/tokens": "^1.53.0",
36
+ "@atlaskit/tokens": "^1.56.0",
37
37
  "@atlaskit/tooltip": "^18.5.0",
38
38
  "@babel/runtime": "^7.0.0",
39
39
  "@emotion/react": "^11.7.1",
@@ -55,6 +55,7 @@
55
55
  "@testing-library/user-event": "^14.4.3",
56
56
  "lodash": "^4.17.21",
57
57
  "react-dom": "^16.8.0",
58
+ "react-test-renderer": "^16.8.0",
58
59
  "typescript": "~5.4.2",
59
60
  "wait-for-expect": "^1.2.0"
60
61
  },
@@ -96,7 +97,7 @@
96
97
  },
97
98
  "homepage": "https://atlassian.design/components/avatar-group/",
98
99
  "platform-feature-flags": {
99
- "platform.design-system-team.component-visual-refresh_t8zbo": {
100
+ "platform-component-visual-refresh": {
100
101
  "type": "boolean"
101
102
  }
102
103
  }