@atlaskit/avatar-group 10.0.4 → 10.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 +8 -0
- package/dist/cjs/components/avatar-group.js +12 -9
- package/dist/es2019/components/avatar-group.js +12 -9
- package/dist/esm/components/avatar-group.js +12 -9
- package/dist/types/components/types.d.ts +4 -0
- package/dist/types-ts4.5/components/types.d.ts +4 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/avatar-group
|
|
2
2
|
|
|
3
|
+
## 10.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#174545](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/174545)
|
|
8
|
+
[`102616f7c8d08`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/102616f7c8d08) -
|
|
9
|
+
[ux] Add override for MoreIndicator
|
|
10
|
+
|
|
3
11
|
## 10.0.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -52,7 +52,12 @@ function getOverrides(overrides) {
|
|
|
52
52
|
key: (0, _utils.composeUniqueKey)(props, index)
|
|
53
53
|
}));
|
|
54
54
|
}
|
|
55
|
-
}, overrides && overrides.Avatar)
|
|
55
|
+
}, overrides && overrides.Avatar),
|
|
56
|
+
MoreIndicator: _objectSpread({
|
|
57
|
+
render: function render(Component, props) {
|
|
58
|
+
return (0, _react2.jsx)(Component, props);
|
|
59
|
+
}
|
|
60
|
+
}, overrides && overrides.MoreIndicator)
|
|
56
61
|
};
|
|
57
62
|
}
|
|
58
63
|
|
|
@@ -169,20 +174,18 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
169
174
|
ariaHasPopup = _ref3['aria-haspopup'],
|
|
170
175
|
onClick = _ref3.onClick,
|
|
171
176
|
props = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
|
|
172
|
-
return (
|
|
177
|
+
return getOverrides(overrides).MoreIndicator.render(_moreIndicator.default, _objectSpread({
|
|
173
178
|
buttonProps: showMoreButtonProps,
|
|
174
179
|
borderColor: borderColor,
|
|
175
180
|
count: total - max,
|
|
176
181
|
size: size,
|
|
177
182
|
testId: testId && "".concat(testId, "--overflow-menu--trigger"),
|
|
178
|
-
isActive: isOpen
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"aria-expanded": ariaExpanded,
|
|
183
|
-
"aria-haspopup": ariaHasPopup,
|
|
183
|
+
isActive: isOpen,
|
|
184
|
+
'aria-controls': ariaControls,
|
|
185
|
+
'aria-expanded': ariaExpanded,
|
|
186
|
+
'aria-haspopup': ariaHasPopup,
|
|
184
187
|
onClick: onClick
|
|
185
|
-
}));
|
|
188
|
+
}, props));
|
|
186
189
|
};
|
|
187
190
|
|
|
188
191
|
// bail if the consumer wants to handle onClick
|
|
@@ -38,6 +38,10 @@ function getOverrides(overrides) {
|
|
|
38
38
|
key: composeUniqueKey(props, index)
|
|
39
39
|
})),
|
|
40
40
|
...(overrides && overrides.Avatar)
|
|
41
|
+
},
|
|
42
|
+
MoreIndicator: {
|
|
43
|
+
render: (Component, props) => jsx(Component, props),
|
|
44
|
+
...(overrides && overrides.MoreIndicator)
|
|
41
45
|
}
|
|
42
46
|
};
|
|
43
47
|
}
|
|
@@ -141,20 +145,19 @@ const AvatarGroup = ({
|
|
|
141
145
|
'aria-haspopup': ariaHasPopup,
|
|
142
146
|
onClick,
|
|
143
147
|
...props
|
|
144
|
-
}) =>
|
|
148
|
+
}) => getOverrides(overrides).MoreIndicator.render(MoreIndicator, {
|
|
145
149
|
buttonProps: showMoreButtonProps,
|
|
146
150
|
borderColor: borderColor,
|
|
147
151
|
count: total - max,
|
|
148
152
|
size: size,
|
|
149
153
|
testId: testId && `${testId}--overflow-menu--trigger`,
|
|
150
|
-
isActive: isOpen
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}));
|
|
154
|
+
isActive: isOpen,
|
|
155
|
+
'aria-controls': ariaControls,
|
|
156
|
+
'aria-expanded': ariaExpanded,
|
|
157
|
+
'aria-haspopup': ariaHasPopup,
|
|
158
|
+
onClick,
|
|
159
|
+
...props
|
|
160
|
+
});
|
|
158
161
|
|
|
159
162
|
// bail if the consumer wants to handle onClick
|
|
160
163
|
if (typeof onMoreClick === 'function') {
|
|
@@ -46,7 +46,12 @@ function getOverrides(overrides) {
|
|
|
46
46
|
key: composeUniqueKey(props, index)
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
|
-
}, overrides && overrides.Avatar)
|
|
49
|
+
}, overrides && overrides.Avatar),
|
|
50
|
+
MoreIndicator: _objectSpread({
|
|
51
|
+
render: function render(Component, props) {
|
|
52
|
+
return jsx(Component, props);
|
|
53
|
+
}
|
|
54
|
+
}, overrides && overrides.MoreIndicator)
|
|
50
55
|
};
|
|
51
56
|
}
|
|
52
57
|
|
|
@@ -163,20 +168,18 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
163
168
|
ariaHasPopup = _ref3['aria-haspopup'],
|
|
164
169
|
onClick = _ref3.onClick,
|
|
165
170
|
props = _objectWithoutProperties(_ref3, _excluded);
|
|
166
|
-
return
|
|
171
|
+
return getOverrides(overrides).MoreIndicator.render(MoreIndicator, _objectSpread({
|
|
167
172
|
buttonProps: showMoreButtonProps,
|
|
168
173
|
borderColor: borderColor,
|
|
169
174
|
count: total - max,
|
|
170
175
|
size: size,
|
|
171
176
|
testId: testId && "".concat(testId, "--overflow-menu--trigger"),
|
|
172
|
-
isActive: isOpen
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"aria-expanded": ariaExpanded,
|
|
177
|
-
"aria-haspopup": ariaHasPopup,
|
|
177
|
+
isActive: isOpen,
|
|
178
|
+
'aria-controls': ariaControls,
|
|
179
|
+
'aria-expanded': ariaExpanded,
|
|
180
|
+
'aria-haspopup': ariaHasPopup,
|
|
178
181
|
onClick: onClick
|
|
179
|
-
}));
|
|
182
|
+
}, props));
|
|
180
183
|
};
|
|
181
184
|
|
|
182
185
|
// bail if the consumer wants to handle onClick
|
|
@@ -4,6 +4,7 @@ import { type default as Avatar, type AvatarPropTypes, type SizeType } from '@at
|
|
|
4
4
|
import { type MenuGroupProps } from '@atlaskit/menu';
|
|
5
5
|
import { type ContentProps } from '@atlaskit/popup';
|
|
6
6
|
import type { AvatarGroupItemProps } from './avatar-group-item';
|
|
7
|
+
import { type MoreIndicatorProps } from './more-indicator';
|
|
7
8
|
export type DeepRequired<T> = {
|
|
8
9
|
[P in keyof T]-?: Required<T[P]>;
|
|
9
10
|
};
|
|
@@ -18,6 +19,9 @@ export interface AvatarGroupOverrides {
|
|
|
18
19
|
Avatar?: {
|
|
19
20
|
render?: (Component: typeof Avatar | ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
|
|
20
21
|
};
|
|
22
|
+
MoreIndicator?: {
|
|
23
|
+
render?: (Component: ForwardRefExoticComponent<MoreIndicatorProps & RefAttributes<HTMLButtonElement>>, props: MoreIndicatorProps) => ReactNode;
|
|
24
|
+
};
|
|
21
25
|
}
|
|
22
26
|
export type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
|
|
23
27
|
export type FocusableElement = HTMLAnchorElement | HTMLButtonElement;
|
|
@@ -4,6 +4,7 @@ import { type default as Avatar, type AvatarPropTypes, type SizeType } from '@at
|
|
|
4
4
|
import { type MenuGroupProps } from '@atlaskit/menu';
|
|
5
5
|
import { type ContentProps } from '@atlaskit/popup';
|
|
6
6
|
import type { AvatarGroupItemProps } from './avatar-group-item';
|
|
7
|
+
import { type MoreIndicatorProps } from './more-indicator';
|
|
7
8
|
export type DeepRequired<T> = {
|
|
8
9
|
[P in keyof T]-?: Required<T[P]>;
|
|
9
10
|
};
|
|
@@ -18,6 +19,9 @@ export interface AvatarGroupOverrides {
|
|
|
18
19
|
Avatar?: {
|
|
19
20
|
render?: (Component: typeof Avatar | ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
|
|
20
21
|
};
|
|
22
|
+
MoreIndicator?: {
|
|
23
|
+
render?: (Component: ForwardRefExoticComponent<MoreIndicatorProps & RefAttributes<HTMLButtonElement>>, props: MoreIndicatorProps) => ReactNode;
|
|
24
|
+
};
|
|
21
25
|
}
|
|
22
26
|
export type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
|
|
23
27
|
export type FocusableElement = HTMLAnchorElement | HTMLButtonElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/avatar-group",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.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/"
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"team": "Design System Team",
|
|
21
21
|
"website": {
|
|
22
22
|
"name": "Avatar group",
|
|
23
|
-
"category": "
|
|
23
|
+
"category": "Images and icons"
|
|
24
24
|
},
|
|
25
25
|
"runReact18": true
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@atlaskit/avatar": "^21.17.0",
|
|
29
|
-
"@atlaskit/ds-lib": "^3.
|
|
29
|
+
"@atlaskit/ds-lib": "^3.3.0",
|
|
30
30
|
"@atlaskit/menu": "^2.13.0",
|
|
31
31
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
32
|
-
"@atlaskit/popup": "^1.
|
|
32
|
+
"@atlaskit/popup": "^1.30.0",
|
|
33
33
|
"@atlaskit/theme": "^14.0.0",
|
|
34
|
-
"@atlaskit/tokens": "^2.
|
|
34
|
+
"@atlaskit/tokens": "^2.4.0",
|
|
35
35
|
"@atlaskit/tooltip": "^18.9.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@emotion/react": "^11.7.1",
|