@atlaskit/avatar-group 9.4.5 → 9.5.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 +12 -0
- package/dist/cjs/components/avatar-group.js +4 -1
- package/dist/es2019/components/avatar-group.js +3 -1
- package/dist/esm/components/avatar-group.js +4 -1
- package/dist/types/components/avatar-group.d.ts +5 -1
- package/dist/types-ts4.5/components/avatar-group.d.ts +5 -1
- package/package.json +4 -3
- package/tmp/api-report-tmp.d.ts +0 -80
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/avatar-group
|
|
2
2
|
|
|
3
|
+
## 9.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#61786](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61786) [`937861329875`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/937861329875) - Added the `shouldPopupRenderToParent` prop which determines if `shouldRenderToParent` is applied to the avatar group's popup.
|
|
8
|
+
|
|
9
|
+
## 9.4.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 9.4.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -81,7 +81,9 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
81
81
|
_ref$label = _ref.label,
|
|
82
82
|
label = _ref$label === void 0 ? 'avatar group' : _ref$label,
|
|
83
83
|
_ref$tooltipPosition = _ref.tooltipPosition,
|
|
84
|
-
tooltipPosition = _ref$tooltipPosition === void 0 ? 'bottom' : _ref$tooltipPosition
|
|
84
|
+
tooltipPosition = _ref$tooltipPosition === void 0 ? 'bottom' : _ref$tooltipPosition,
|
|
85
|
+
_ref$shouldPopupRende = _ref.shouldPopupRenderToParent,
|
|
86
|
+
shouldPopupRenderToParent = _ref$shouldPopupRende === void 0 ? false : _ref$shouldPopupRende;
|
|
85
87
|
var _useState = (0, _react.useState)(false),
|
|
86
88
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
87
89
|
isTriggeredUsingKeyboard = _useState2[0],
|
|
@@ -189,6 +191,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
189
191
|
rootBoundary: rootBoundary,
|
|
190
192
|
shouldFlip: true,
|
|
191
193
|
zIndex: _constants.layers.modal(),
|
|
194
|
+
shouldRenderToParent: shouldPopupRenderToParent,
|
|
192
195
|
content: function content(_ref2) {
|
|
193
196
|
var setInitialFocusRef = _ref2.setInitialFocusRef;
|
|
194
197
|
return (0, _react2.jsx)(_focusManager.default, null, (0, _react2.jsx)(_popupAvatarGroup.default, {
|
|
@@ -63,7 +63,8 @@ const AvatarGroup = ({
|
|
|
63
63
|
size = 'medium',
|
|
64
64
|
testId,
|
|
65
65
|
label = 'avatar group',
|
|
66
|
-
tooltipPosition = 'bottom'
|
|
66
|
+
tooltipPosition = 'bottom',
|
|
67
|
+
shouldPopupRenderToParent = false
|
|
67
68
|
}) => {
|
|
68
69
|
const [isTriggeredUsingKeyboard, setTriggeredUsingKeyboard] = useState(false);
|
|
69
70
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -163,6 +164,7 @@ const AvatarGroup = ({
|
|
|
163
164
|
rootBoundary: rootBoundary,
|
|
164
165
|
shouldFlip: true,
|
|
165
166
|
zIndex: layers.modal(),
|
|
167
|
+
shouldRenderToParent: shouldPopupRenderToParent,
|
|
166
168
|
content: ({
|
|
167
169
|
setInitialFocusRef
|
|
168
170
|
}) => jsx(FocusManager, null, jsx(PopupAvatarGroup, {
|
|
@@ -75,7 +75,9 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
75
75
|
_ref$label = _ref.label,
|
|
76
76
|
label = _ref$label === void 0 ? 'avatar group' : _ref$label,
|
|
77
77
|
_ref$tooltipPosition = _ref.tooltipPosition,
|
|
78
|
-
tooltipPosition = _ref$tooltipPosition === void 0 ? 'bottom' : _ref$tooltipPosition
|
|
78
|
+
tooltipPosition = _ref$tooltipPosition === void 0 ? 'bottom' : _ref$tooltipPosition,
|
|
79
|
+
_ref$shouldPopupRende = _ref.shouldPopupRenderToParent,
|
|
80
|
+
shouldPopupRenderToParent = _ref$shouldPopupRende === void 0 ? false : _ref$shouldPopupRende;
|
|
79
81
|
var _useState = useState(false),
|
|
80
82
|
_useState2 = _slicedToArray(_useState, 2),
|
|
81
83
|
isTriggeredUsingKeyboard = _useState2[0],
|
|
@@ -183,6 +185,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
183
185
|
rootBoundary: rootBoundary,
|
|
184
186
|
shouldFlip: true,
|
|
185
187
|
zIndex: layers.modal(),
|
|
188
|
+
shouldRenderToParent: shouldPopupRenderToParent,
|
|
186
189
|
content: function content(_ref2) {
|
|
187
190
|
var setInitialFocusRef = _ref2.setInitialFocusRef;
|
|
188
191
|
return jsx(FocusManager, null, jsx(PopupAvatarGroup, {
|
|
@@ -96,6 +96,10 @@ export interface AvatarGroupProps {
|
|
|
96
96
|
* When there are several AvatarGroups on the page you should use a unique label to let users distinguish different lists.
|
|
97
97
|
*/
|
|
98
98
|
label?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Determines whether the 'show more' popup has `shouldRenderToParent` applied.
|
|
101
|
+
*/
|
|
102
|
+
shouldPopupRenderToParent?: boolean;
|
|
99
103
|
}
|
|
100
104
|
/**
|
|
101
105
|
* __Avatar group__
|
|
@@ -106,5 +110,5 @@ export interface AvatarGroupProps {
|
|
|
106
110
|
* - [Code](https://atlassian.design/components/avatar-group/code)
|
|
107
111
|
* - [Usage](https://atlassian.design/components/avatar-group/usage)
|
|
108
112
|
*/
|
|
109
|
-
declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, tooltipPosition, }: AvatarGroupProps) => jsx.JSX.Element;
|
|
113
|
+
declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, tooltipPosition, shouldPopupRenderToParent, }: AvatarGroupProps) => jsx.JSX.Element;
|
|
110
114
|
export default AvatarGroup;
|
|
@@ -96,6 +96,10 @@ export interface AvatarGroupProps {
|
|
|
96
96
|
* When there are several AvatarGroups on the page you should use a unique label to let users distinguish different lists.
|
|
97
97
|
*/
|
|
98
98
|
label?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Determines whether the 'show more' popup has `shouldRenderToParent` applied.
|
|
101
|
+
*/
|
|
102
|
+
shouldPopupRenderToParent?: boolean;
|
|
99
103
|
}
|
|
100
104
|
/**
|
|
101
105
|
* __Avatar group__
|
|
@@ -106,5 +110,5 @@ export interface AvatarGroupProps {
|
|
|
106
110
|
* - [Code](https://atlassian.design/components/avatar-group/code)
|
|
107
111
|
* - [Usage](https://atlassian.design/components/avatar-group/usage)
|
|
108
112
|
*/
|
|
109
|
-
declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, tooltipPosition, }: AvatarGroupProps) => jsx.JSX.Element;
|
|
113
|
+
declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, tooltipPosition, shouldPopupRenderToParent, }: AvatarGroupProps) => jsx.JSX.Element;
|
|
110
114
|
export default AvatarGroup;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/avatar-group",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
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/"
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@atlaskit/menu": "^2.1.0",
|
|
32
32
|
"@atlaskit/popup": "^1.11.0",
|
|
33
33
|
"@atlaskit/theme": "^12.6.0",
|
|
34
|
-
"@atlaskit/tokens": "^1.
|
|
35
|
-
"@atlaskit/tooltip": "^
|
|
34
|
+
"@atlaskit/tokens": "^1.30.0",
|
|
35
|
+
"@atlaskit/tooltip": "^18.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@emotion/react": "^11.7.1",
|
|
38
38
|
"bind-event-listener": "^2.1.1"
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@af/accessibility-testing": "*",
|
|
45
|
+
"@af/integration-testing": "*",
|
|
45
46
|
"@af/visual-regression": "*",
|
|
46
47
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
47
48
|
"@atlaskit/ssr": "*",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/avatar-group"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import type { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
|
-
import Avatar from '@atlaskit/avatar';
|
|
9
|
-
import { AvatarPropTypes } from '@atlaskit/avatar';
|
|
10
|
-
import { default as default_2 } from '@atlaskit/avatar';
|
|
11
|
-
import { ElementType } from 'react';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
|
-
import { MouseEventHandler } from 'react';
|
|
14
|
-
import { PositionType } from '@atlaskit/tooltip';
|
|
15
|
-
import type { ReactNode } from 'react';
|
|
16
|
-
import { SizeType } from '@atlaskit/avatar';
|
|
17
|
-
|
|
18
|
-
// @public
|
|
19
|
-
const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, tooltipPosition, }: AvatarGroupProps) => jsx.JSX.Element;
|
|
20
|
-
export default AvatarGroup;
|
|
21
|
-
|
|
22
|
-
// @public (undocumented)
|
|
23
|
-
interface AvatarGroupItemProps {
|
|
24
|
-
// (undocumented)
|
|
25
|
-
avatar: AvatarProps;
|
|
26
|
-
// (undocumented)
|
|
27
|
-
index: number;
|
|
28
|
-
// (undocumented)
|
|
29
|
-
isActive?: boolean;
|
|
30
|
-
// (undocumented)
|
|
31
|
-
isHover?: boolean;
|
|
32
|
-
// (undocumented)
|
|
33
|
-
onAvatarClick?: onAvatarClickHandler;
|
|
34
|
-
// (undocumented)
|
|
35
|
-
testId?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// @public (undocumented)
|
|
39
|
-
interface AvatarGroupOverrides {
|
|
40
|
-
// (undocumented)
|
|
41
|
-
Avatar?: {
|
|
42
|
-
render?: (Component: ElementType<AvatarProps> | typeof default_2, props: AvatarProps, index: number) => ReactNode;
|
|
43
|
-
};
|
|
44
|
-
// (undocumented)
|
|
45
|
-
AvatarGroupItem?: {
|
|
46
|
-
render?: (Component: ElementType<AvatarGroupItemProps>, props: AvatarGroupItemProps, index: number) => ReactNode;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// @public (undocumented)
|
|
51
|
-
export interface AvatarGroupProps {
|
|
52
|
-
appearance?: 'grid' | 'stack';
|
|
53
|
-
avatar?: ElementType<AvatarProps> | typeof Avatar;
|
|
54
|
-
borderColor?: string;
|
|
55
|
-
boundariesElement?: 'scrollParent' | 'viewport' | 'window';
|
|
56
|
-
data: Array<AvatarProps>;
|
|
57
|
-
isTooltipDisabled?: boolean;
|
|
58
|
-
label?: string;
|
|
59
|
-
maxCount?: number;
|
|
60
|
-
onAvatarClick?: onAvatarClickHandler;
|
|
61
|
-
onMoreClick?: MouseEventHandler;
|
|
62
|
-
overrides?: AvatarGroupOverrides;
|
|
63
|
-
showMoreButtonProps?: Partial<React.HTMLAttributes<HTMLElement>>;
|
|
64
|
-
size?: SizeType;
|
|
65
|
-
testId?: string;
|
|
66
|
-
tooltipPosition?: Extract<PositionType, 'bottom' | 'top'>;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// @public (undocumented)
|
|
70
|
-
export type AvatarProps = AvatarPropTypes & {
|
|
71
|
-
name: string;
|
|
72
|
-
key?: number | string;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// @public (undocumented)
|
|
76
|
-
type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
|
|
77
|
-
|
|
78
|
-
// (No @packageDocumentation comment for this package)
|
|
79
|
-
|
|
80
|
-
```
|