@atlaskit/avatar-group 9.8.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 +23 -0
- package/dist/cjs/components/avatar-group.js +3 -2
- package/dist/cjs/components/grid.js +1 -1
- package/dist/cjs/components/internal/components/popup-avatar-group.js +1 -1
- package/dist/cjs/components/more-indicator.js +3 -2
- package/dist/cjs/components/stack.js +1 -1
- package/dist/es2019/components/avatar-group.js +2 -2
- package/dist/es2019/components/grid.js +1 -1
- package/dist/es2019/components/internal/components/popup-avatar-group.js +1 -1
- package/dist/es2019/components/more-indicator.js +3 -2
- package/dist/es2019/components/stack.js +1 -1
- package/dist/esm/components/avatar-group.js +2 -2
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/internal/components/popup-avatar-group.js +1 -1
- package/dist/esm/components/more-indicator.js +3 -2
- package/dist/esm/components/stack.js +1 -1
- package/dist/types/components/avatar-group.d.ts +1 -1
- package/dist/types/components/grid.d.ts +1 -1
- package/dist/types/components/stack.d.ts +1 -1
- package/dist/types-ts4.5/components/avatar-group.d.ts +1 -1
- package/dist/types-ts4.5/components/grid.d.ts +1 -1
- package/dist/types-ts4.5/components/stack.d.ts +1 -1
- package/package.json +13 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
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
|
+
|
|
13
|
+
## 9.9.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#116644](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116644)
|
|
18
|
+
[`40234970169dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40234970169dc) -
|
|
19
|
+
[ux] DSP-19190 We are testing a new visual appearance behind a feature flag. If successful it will
|
|
20
|
+
be released at a later date.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 9.8.0
|
|
4
27
|
|
|
5
28
|
### 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
|
-
|
|
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);
|
|
@@ -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.
|
|
@@ -11,12 +11,13 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _avatar = _interopRequireWildcard(require("@atlaskit/avatar"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
16
|
var _excluded = ["testId", "className", "ref"];
|
|
16
17
|
/**
|
|
17
18
|
* @jsxRuntime classic
|
|
19
|
+
* @jsx jsx
|
|
18
20
|
*/
|
|
19
|
-
/** @jsx jsx */
|
|
20
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
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); }
|
|
22
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; }
|
|
@@ -71,7 +72,7 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
71
72
|
var _ref$appearance = _ref.appearance,
|
|
72
73
|
appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
|
|
73
74
|
_ref$borderColor = _ref.borderColor,
|
|
74
|
-
borderColor = _ref$borderColor === void 0 ? "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,
|
|
75
76
|
_ref$size = _ref.size,
|
|
76
77
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
77
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,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,13 +1,14 @@
|
|
|
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
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
|
|
12
13
|
const buttonSizes = {
|
|
13
14
|
xsmall: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
@@ -58,7 +59,7 @@ const buttonStyles = css({
|
|
|
58
59
|
const MAX_DISPLAY_COUNT = 99;
|
|
59
60
|
const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
60
61
|
appearance = 'circle',
|
|
61
|
-
borderColor = `var(--ds-border-inverse, ${N0})`,
|
|
62
|
+
borderColor = fg('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : `var(--ds-border-inverse, ${N0})`,
|
|
62
63
|
size = 'medium',
|
|
63
64
|
count = 0,
|
|
64
65
|
testId,
|
|
@@ -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);
|
|
@@ -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,13 +3,14 @@ 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
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
|
|
14
15
|
var buttonSizes = {
|
|
15
16
|
xsmall: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
@@ -62,7 +63,7 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
62
63
|
var _ref$appearance = _ref.appearance,
|
|
63
64
|
appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
|
|
64
65
|
_ref$borderColor = _ref.borderColor,
|
|
65
|
-
borderColor = _ref$borderColor === void 0 ? "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,
|
|
66
67
|
_ref$size = _ref.size,
|
|
67
68
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
68
69
|
_ref$count = _ref.count,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/avatar-group",
|
|
3
|
-
"version": "9.
|
|
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/"
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
"runReact18": true
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/avatar": "^21.
|
|
30
|
+
"@atlaskit/avatar": "^21.11.0",
|
|
31
31
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
32
|
-
"@atlaskit/menu": "^2.
|
|
33
|
-
"@atlaskit/
|
|
32
|
+
"@atlaskit/menu": "^2.8.0",
|
|
33
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
34
|
+
"@atlaskit/popup": "^1.20.0",
|
|
34
35
|
"@atlaskit/theme": "^12.11.0",
|
|
35
|
-
"@atlaskit/tokens": "^1.
|
|
36
|
+
"@atlaskit/tokens": "^1.56.0",
|
|
36
37
|
"@atlaskit/tooltip": "^18.5.0",
|
|
37
38
|
"@babel/runtime": "^7.0.0",
|
|
38
39
|
"@emotion/react": "^11.7.1",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"@testing-library/user-event": "^14.4.3",
|
|
55
56
|
"lodash": "^4.17.21",
|
|
56
57
|
"react-dom": "^16.8.0",
|
|
58
|
+
"react-test-renderer": "^16.8.0",
|
|
57
59
|
"typescript": "~5.4.2",
|
|
58
60
|
"wait-for-expect": "^1.2.0"
|
|
59
61
|
},
|
|
@@ -93,5 +95,10 @@
|
|
|
93
95
|
"af:exports": {
|
|
94
96
|
".": "./src/index.tsx"
|
|
95
97
|
},
|
|
96
|
-
"homepage": "https://atlassian.design/components/avatar-group/"
|
|
98
|
+
"homepage": "https://atlassian.design/components/avatar-group/",
|
|
99
|
+
"platform-feature-flags": {
|
|
100
|
+
"platform-component-visual-refresh": {
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
97
104
|
}
|