@atlaskit/avatar-group 9.4.1 → 9.4.3
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 +12 -0
- package/dist/cjs/components/avatar-group.js +2 -2
- package/dist/cjs/components/grid.js +3 -9
- package/dist/es2019/components/grid.js +3 -9
- package/dist/esm/components/avatar-group.js +2 -2
- package/dist/esm/components/grid.js +3 -9
- package/dist/types/components/avatar-group.d.ts +2 -2
- package/dist/types/components/types.d.ts +2 -2
- package/dist/types-ts4.5/components/avatar-group.d.ts +2 -2
- package/dist/types-ts4.5/components/types.d.ts +2 -2
- package/package.json +4 -4
- package/report.api.md +5 -3
- package/tmp/api-report-tmp.d.ts +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/avatar-group
|
|
2
2
|
|
|
3
|
+
## 9.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
|
|
8
|
+
|
|
9
|
+
## 9.4.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`3c114ea4257`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3c114ea4257) - Update type definitions to conform to inherited changes from `@types/react@16.14.15`.
|
|
14
|
+
|
|
3
15
|
## 9.4.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -26,8 +26,8 @@ var _popupAvatarGroup = _interopRequireDefault(require("./internal/components/po
|
|
|
26
26
|
var _moreIndicator = _interopRequireDefault(require("./more-indicator"));
|
|
27
27
|
var _stack = _interopRequireDefault(require("./stack"));
|
|
28
28
|
var _utils = require("./utils");
|
|
29
|
-
function ownKeys(
|
|
30
|
-
function _objectSpread(
|
|
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
|
+
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 */
|
|
31
31
|
var MAX_COUNT = {
|
|
32
32
|
grid: 11,
|
|
33
33
|
stack: 5
|
|
@@ -6,21 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
10
9
|
/** @jsx jsx */
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var gridSize = (0, _constants.gridSize)();
|
|
15
|
-
var gutter = gridSize / 2;
|
|
11
|
+
var gutter = "var(--ds-space-negative-050, -4px)";
|
|
16
12
|
var listStyles = (0, _react2.css)({
|
|
17
13
|
// removes default ul styles. Needs !important to override contextual styles in product.
|
|
18
14
|
display: 'flex',
|
|
19
15
|
margin: "var(--ds-space-0, 0px)",
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
23
|
-
marginLeft: -gutter,
|
|
16
|
+
marginRight: gutter,
|
|
17
|
+
marginLeft: gutter,
|
|
24
18
|
padding: "var(--ds-space-0, 0px)",
|
|
25
19
|
justifyContent: 'flex-start',
|
|
26
20
|
flexWrap: 'wrap',
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Children } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
6
|
-
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
7
|
-
const gridSize = getGridSize();
|
|
8
|
-
const gutter = gridSize / 2;
|
|
4
|
+
const gutter = "var(--ds-space-negative-050, -4px)";
|
|
9
5
|
const listStyles = css({
|
|
10
6
|
// removes default ul styles. Needs !important to override contextual styles in product.
|
|
11
7
|
display: 'flex',
|
|
12
8
|
margin: "var(--ds-space-0, 0px)",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
|
-
marginLeft: -gutter,
|
|
9
|
+
marginRight: gutter,
|
|
10
|
+
marginLeft: gutter,
|
|
17
11
|
padding: "var(--ds-space-0, 0px)",
|
|
18
12
|
justifyContent: 'flex-start',
|
|
19
13
|
flexWrap: 'wrap',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
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
|
import { useCallback, useEffect, useState } from 'react';
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Children } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
6
|
-
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
7
|
-
var gridSize = getGridSize();
|
|
8
|
-
var gutter = gridSize / 2;
|
|
4
|
+
var gutter = "var(--ds-space-negative-050, -4px)";
|
|
9
5
|
var listStyles = css({
|
|
10
6
|
// removes default ul styles. Needs !important to override contextual styles in product.
|
|
11
7
|
display: 'flex',
|
|
12
8
|
margin: "var(--ds-space-0, 0px)",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
|
-
marginLeft: -gutter,
|
|
9
|
+
marginRight: gutter,
|
|
10
|
+
marginLeft: gutter,
|
|
17
11
|
padding: "var(--ds-space-0, 0px)",
|
|
18
12
|
justifyContent: 'flex-start',
|
|
19
13
|
flexWrap: 'wrap',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ElementType, MouseEventHandler } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { SizeType } from '@atlaskit/avatar';
|
|
4
|
+
import Avatar, { SizeType } from '@atlaskit/avatar';
|
|
5
5
|
import { PositionType } from '@atlaskit/tooltip';
|
|
6
6
|
import { AvatarGroupOverrides, AvatarProps, onAvatarClickHandler } from './types';
|
|
7
7
|
export interface AvatarGroupProps {
|
|
@@ -15,7 +15,7 @@ export interface AvatarGroupProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* Component used to render each avatar
|
|
17
17
|
*/
|
|
18
|
-
avatar?: ElementType<AvatarProps>;
|
|
18
|
+
avatar?: typeof Avatar | ElementType<AvatarProps>;
|
|
19
19
|
/**
|
|
20
20
|
* The maximum number of avatars allowed in the list.
|
|
21
21
|
* Defaults to 5 when displayed as a stack,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ElementType, ReactNode } from 'react';
|
|
2
2
|
import type { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
import type
|
|
3
|
+
import { default as Avatar, type AvatarPropTypes } from '@atlaskit/avatar';
|
|
4
4
|
import { MenuGroupProps } from '@atlaskit/menu';
|
|
5
5
|
import { ContentProps } from '@atlaskit/popup';
|
|
6
6
|
import type { AvatarGroupItemProps } from './avatar-group-item';
|
|
@@ -16,7 +16,7 @@ export interface AvatarGroupOverrides {
|
|
|
16
16
|
render?: (Component: ElementType<AvatarGroupItemProps>, props: AvatarGroupItemProps, index: number) => ReactNode;
|
|
17
17
|
};
|
|
18
18
|
Avatar?: {
|
|
19
|
-
render?: (Component: ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
|
|
19
|
+
render?: (Component: typeof Avatar | ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ElementType, MouseEventHandler } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { SizeType } from '@atlaskit/avatar';
|
|
4
|
+
import Avatar, { SizeType } from '@atlaskit/avatar';
|
|
5
5
|
import { PositionType } from '@atlaskit/tooltip';
|
|
6
6
|
import { AvatarGroupOverrides, AvatarProps, onAvatarClickHandler } from './types';
|
|
7
7
|
export interface AvatarGroupProps {
|
|
@@ -15,7 +15,7 @@ export interface AvatarGroupProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* Component used to render each avatar
|
|
17
17
|
*/
|
|
18
|
-
avatar?: ElementType<AvatarProps>;
|
|
18
|
+
avatar?: typeof Avatar | ElementType<AvatarProps>;
|
|
19
19
|
/**
|
|
20
20
|
* The maximum number of avatars allowed in the list.
|
|
21
21
|
* Defaults to 5 when displayed as a stack,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ElementType, ReactNode } from 'react';
|
|
2
2
|
import type { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
import type
|
|
3
|
+
import { default as Avatar, type AvatarPropTypes } from '@atlaskit/avatar';
|
|
4
4
|
import { MenuGroupProps } from '@atlaskit/menu';
|
|
5
5
|
import { ContentProps } from '@atlaskit/popup';
|
|
6
6
|
import type { AvatarGroupItemProps } from './avatar-group-item';
|
|
@@ -16,7 +16,7 @@ export interface AvatarGroupOverrides {
|
|
|
16
16
|
render?: (Component: ElementType<AvatarGroupItemProps>, props: AvatarGroupItemProps, index: number) => ReactNode;
|
|
17
17
|
};
|
|
18
18
|
Avatar?: {
|
|
19
|
-
render?: (Component: ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
|
|
19
|
+
render?: (Component: typeof Avatar | ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/avatar-group",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
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/"
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/avatar": "^21.3.0",
|
|
27
27
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
28
|
-
"@atlaskit/menu": "^1.
|
|
28
|
+
"@atlaskit/menu": "^1.10.0",
|
|
29
29
|
"@atlaskit/popup": "^1.9.0",
|
|
30
|
-
"@atlaskit/theme": "^12.
|
|
31
|
-
"@atlaskit/tokens": "^1.
|
|
30
|
+
"@atlaskit/theme": "^12.6.0",
|
|
31
|
+
"@atlaskit/tokens": "^1.21.0",
|
|
32
32
|
"@atlaskit/tooltip": "^17.8.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@emotion/react": "^11.7.1",
|
package/report.api.md
CHANGED
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
import type { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
19
|
-
import
|
|
19
|
+
import Avatar from '@atlaskit/avatar';
|
|
20
|
+
import { AvatarPropTypes } from '@atlaskit/avatar';
|
|
21
|
+
import { default as default_2 } from '@atlaskit/avatar';
|
|
20
22
|
import { ElementType } from 'react';
|
|
21
23
|
import { jsx } from '@emotion/react';
|
|
22
24
|
import { MouseEventHandler } from 'react';
|
|
@@ -65,7 +67,7 @@ interface AvatarGroupOverrides {
|
|
|
65
67
|
// (undocumented)
|
|
66
68
|
Avatar?: {
|
|
67
69
|
render?: (
|
|
68
|
-
Component: ElementType<AvatarProps
|
|
70
|
+
Component: ElementType<AvatarProps> | typeof default_2,
|
|
69
71
|
props: AvatarProps,
|
|
70
72
|
index: number,
|
|
71
73
|
) => ReactNode;
|
|
@@ -83,7 +85,7 @@ interface AvatarGroupOverrides {
|
|
|
83
85
|
// @public (undocumented)
|
|
84
86
|
export interface AvatarGroupProps {
|
|
85
87
|
appearance?: 'grid' | 'stack';
|
|
86
|
-
avatar?: ElementType<AvatarProps
|
|
88
|
+
avatar?: ElementType<AvatarProps> | typeof Avatar;
|
|
87
89
|
borderColor?: string;
|
|
88
90
|
boundariesElement?: 'scrollParent' | 'viewport' | 'window';
|
|
89
91
|
data: Array<AvatarProps>;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
7
|
import type { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
|
-
import
|
|
8
|
+
import Avatar from '@atlaskit/avatar';
|
|
9
|
+
import { AvatarPropTypes } from '@atlaskit/avatar';
|
|
10
|
+
import { default as default_2 } from '@atlaskit/avatar';
|
|
9
11
|
import { ElementType } from 'react';
|
|
10
12
|
import { jsx } from '@emotion/react';
|
|
11
13
|
import { MouseEventHandler } from 'react';
|
|
@@ -37,7 +39,7 @@ interface AvatarGroupItemProps {
|
|
|
37
39
|
interface AvatarGroupOverrides {
|
|
38
40
|
// (undocumented)
|
|
39
41
|
Avatar?: {
|
|
40
|
-
render?: (Component: ElementType<AvatarProps
|
|
42
|
+
render?: (Component: ElementType<AvatarProps> | typeof default_2, props: AvatarProps, index: number) => ReactNode;
|
|
41
43
|
};
|
|
42
44
|
// (undocumented)
|
|
43
45
|
AvatarGroupItem?: {
|
|
@@ -48,7 +50,7 @@ interface AvatarGroupOverrides {
|
|
|
48
50
|
// @public (undocumented)
|
|
49
51
|
export interface AvatarGroupProps {
|
|
50
52
|
appearance?: 'grid' | 'stack';
|
|
51
|
-
avatar?: ElementType<AvatarProps
|
|
53
|
+
avatar?: ElementType<AvatarProps> | typeof Avatar;
|
|
52
54
|
borderColor?: string;
|
|
53
55
|
boundariesElement?: 'scrollParent' | 'viewport' | 'window';
|
|
54
56
|
data: Array<AvatarProps>;
|