@atlaskit/avatar-group 9.3.6 → 9.4.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,18 @@
1
1
  # @atlaskit/avatar-group
2
2
 
3
+ ## 9.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
8
+ - Updated dependencies
9
+
10
+ ## 9.4.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`da7b6be2540`](https://bitbucket.org/atlassian/atlassian-frontend/commits/da7b6be2540) - Fixed keyboard support for the interactive element. Changed span to button for avatar-group
15
+
3
16
  ## 9.3.6
4
17
 
5
18
  ### Patch Changes
@@ -29,8 +29,13 @@ var AvatarGroupItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
29
29
  var CustomComponent = function CustomComponent(_ref) {
30
30
  var children = _ref.children,
31
31
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
32
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
33
- return /*#__PURE__*/_react.default.createElement("span", props, children);
32
+ return (
33
+ /*#__PURE__*/
34
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
35
+ _react.default.createElement("button", (0, _extends2.default)({
36
+ type: "button"
37
+ }, props), children)
38
+ );
34
39
  };
35
40
  var AvatarIcon = /*#__PURE__*/_react.default.createElement(_avatar.default, (0, _extends2.default)({}, rest, {
36
41
  testId: testId && "".concat(testId, "--avatar"),
@@ -25,7 +25,7 @@ var FONT_SIZE = {
25
25
  xxlarge: '16px'
26
26
  };
27
27
  var buttonActiveStyles = (0, _react2.css)({
28
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
28
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
29
29
  '&&': {
30
30
  backgroundColor: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
31
31
  boxShadow: "0 0 0 ".concat(_avatar.BORDER_WIDTH, "px ", "var(--ds-border-selected, ".concat(_colors.B300, ")")),
@@ -42,7 +42,7 @@ var buttonActiveStyles = (0, _react2.css)({
42
42
  }
43
43
  });
44
44
  var buttonStyles = (0, _react2.css)({
45
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
45
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
46
46
  '&&': {
47
47
  backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
48
48
  color: "var(--ds-text, ".concat(_colors.N500, ")"),
@@ -21,8 +21,13 @@ const AvatarGroupItem = /*#__PURE__*/forwardRef((props, ref) => {
21
21
  children,
22
22
  ...props
23
23
  }) => {
24
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
25
- return /*#__PURE__*/React.createElement("span", props, children);
24
+ return (
25
+ /*#__PURE__*/
26
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
27
+ React.createElement("button", _extends({
28
+ type: "button"
29
+ }, props), children)
30
+ );
26
31
  };
27
32
  const AvatarIcon = /*#__PURE__*/React.createElement(Avatar, _extends({}, rest, {
28
33
  testId: testId && `${testId}--avatar`,
@@ -13,7 +13,7 @@ const FONT_SIZE = {
13
13
  xxlarge: '16px'
14
14
  };
15
15
  const buttonActiveStyles = css({
16
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
16
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
17
17
  '&&': {
18
18
  backgroundColor: `var(--ds-background-selected, ${B50})`,
19
19
  boxShadow: `0 0 0 ${BORDER_WIDTH}px ${`var(--ds-border-selected, ${B300})`}`,
@@ -30,7 +30,7 @@ const buttonActiveStyles = css({
30
30
  }
31
31
  });
32
32
  const buttonStyles = css({
33
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
33
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
34
34
  '&&': {
35
35
  backgroundColor: `var(--ds-background-neutral, ${N20})`,
36
36
  color: `var(--ds-text, ${N500})`,
@@ -19,8 +19,13 @@ var AvatarGroupItem = /*#__PURE__*/forwardRef(function (props, ref) {
19
19
  var CustomComponent = function CustomComponent(_ref) {
20
20
  var children = _ref.children,
21
21
  props = _objectWithoutProperties(_ref, _excluded2);
22
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
23
- return /*#__PURE__*/React.createElement("span", props, children);
22
+ return (
23
+ /*#__PURE__*/
24
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
25
+ React.createElement("button", _extends({
26
+ type: "button"
27
+ }, props), children)
28
+ );
24
29
  };
25
30
  var AvatarIcon = /*#__PURE__*/React.createElement(Avatar, _extends({}, rest, {
26
31
  testId: testId && "".concat(testId, "--avatar"),
@@ -15,7 +15,7 @@ var FONT_SIZE = {
15
15
  xxlarge: '16px'
16
16
  };
17
17
  var buttonActiveStyles = css({
18
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
18
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
19
19
  '&&': {
20
20
  backgroundColor: "var(--ds-background-selected, ".concat(B50, ")"),
21
21
  boxShadow: "0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-selected, ".concat(B300, ")")),
@@ -32,7 +32,7 @@ var buttonActiveStyles = css({
32
32
  }
33
33
  });
34
34
  var buttonStyles = css({
35
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
35
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
36
36
  '&&': {
37
37
  backgroundColor: "var(--ds-background-neutral, ".concat(N20, ")"),
38
38
  color: "var(--ds-text, ".concat(N500, ")"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.3.6",
3
+ "version": "9.4.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/"
@@ -26,9 +26,9 @@
26
26
  "@atlaskit/avatar": "^21.3.0",
27
27
  "@atlaskit/ds-lib": "^2.1.0",
28
28
  "@atlaskit/menu": "^1.9.0",
29
- "@atlaskit/popup": "^1.8.0",
29
+ "@atlaskit/popup": "^1.9.0",
30
30
  "@atlaskit/theme": "^12.5.0",
31
- "@atlaskit/tokens": "^1.12.0",
31
+ "@atlaskit/tokens": "^1.15.0",
32
32
  "@atlaskit/tooltip": "^17.8.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@emotion/react": "^11.7.1",
@@ -48,6 +48,7 @@
48
48
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
49
49
  "@emotion/styled": "^11.0.0",
50
50
  "@testing-library/react": "^12.1.5",
51
+ "@testing-library/user-event": "^14.4.3",
51
52
  "lodash": "^4.17.21",
52
53
  "react-dom": "^16.8.0",
53
54
  "typescript": "~4.9.5",
@@ -0,0 +1,78 @@
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 type { AvatarPropTypes } from '@atlaskit/avatar';
9
+ import { ElementType } from 'react';
10
+ import { jsx } from '@emotion/react';
11
+ import { MouseEventHandler } from 'react';
12
+ import { PositionType } from '@atlaskit/tooltip';
13
+ import type { ReactNode } from 'react';
14
+ import { SizeType } from '@atlaskit/avatar';
15
+
16
+ // @public
17
+ const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, tooltipPosition, }: AvatarGroupProps) => jsx.JSX.Element;
18
+ export default AvatarGroup;
19
+
20
+ // @public (undocumented)
21
+ interface AvatarGroupItemProps {
22
+ // (undocumented)
23
+ avatar: AvatarProps;
24
+ // (undocumented)
25
+ index: number;
26
+ // (undocumented)
27
+ isActive?: boolean;
28
+ // (undocumented)
29
+ isHover?: boolean;
30
+ // (undocumented)
31
+ onAvatarClick?: onAvatarClickHandler;
32
+ // (undocumented)
33
+ testId?: string;
34
+ }
35
+
36
+ // @public (undocumented)
37
+ interface AvatarGroupOverrides {
38
+ // (undocumented)
39
+ Avatar?: {
40
+ render?: (Component: ElementType<AvatarProps>, props: AvatarProps, index: number) => ReactNode;
41
+ };
42
+ // (undocumented)
43
+ AvatarGroupItem?: {
44
+ render?: (Component: ElementType<AvatarGroupItemProps>, props: AvatarGroupItemProps, index: number) => ReactNode;
45
+ };
46
+ }
47
+
48
+ // @public (undocumented)
49
+ export interface AvatarGroupProps {
50
+ appearance?: 'grid' | 'stack';
51
+ avatar?: ElementType<AvatarProps>;
52
+ borderColor?: string;
53
+ boundariesElement?: 'scrollParent' | 'viewport' | 'window';
54
+ data: Array<AvatarProps>;
55
+ isTooltipDisabled?: boolean;
56
+ label?: string;
57
+ maxCount?: number;
58
+ onAvatarClick?: onAvatarClickHandler;
59
+ onMoreClick?: MouseEventHandler;
60
+ overrides?: AvatarGroupOverrides;
61
+ showMoreButtonProps?: Partial<React.HTMLAttributes<HTMLElement>>;
62
+ size?: SizeType;
63
+ testId?: string;
64
+ tooltipPosition?: Extract<PositionType, 'bottom' | 'top'>;
65
+ }
66
+
67
+ // @public (undocumented)
68
+ export type AvatarProps = AvatarPropTypes & {
69
+ name: string;
70
+ key?: number | string;
71
+ };
72
+
73
+ // @public (undocumented)
74
+ type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
75
+
76
+ // (No @packageDocumentation comment for this package)
77
+
78
+ ```
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/avatar-group",
3
- "version": "9.3.6",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/avatar-group",
3
- "version": "9.3.6",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/avatar-group",
3
- "version": "9.3.6",
4
- "sideEffects": false
5
- }