@atlaskit/avatar-group 9.0.4 → 9.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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/avatar-group
2
2
 
3
+ ## 9.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`110fb3a5f19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/110fb3a5f19) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behaviour change.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 9.0.4
4
14
 
5
15
  ### Patch Changes
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
 
16
16
  var _react = require("react");
17
17
 
18
- var _core = require("@emotion/core");
18
+ var _react2 = require("@emotion/react");
19
19
 
20
20
  var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
21
21
 
@@ -50,14 +50,14 @@ function getOverrides(overrides) {
50
50
  return {
51
51
  AvatarGroupItem: _objectSpread({
52
52
  render: function render(Component, props, index) {
53
- return (0, _core.jsx)(Component, (0, _extends2.default)({}, props, {
53
+ return (0, _react2.jsx)(Component, (0, _extends2.default)({}, props, {
54
54
  key: (0, _utils.composeUniqueKey)(props.avatar, index)
55
55
  }));
56
56
  }
57
57
  }, overrides && overrides.AvatarGroupItem),
58
58
  Avatar: _objectSpread({
59
59
  render: function render(Component, props, index) {
60
- return (0, _core.jsx)(Component, (0, _extends2.default)({}, props, {
60
+ return (0, _react2.jsx)(Component, (0, _extends2.default)({}, props, {
61
61
  key: (0, _utils.composeUniqueKey)(props, index)
62
62
  }));
63
63
  }
@@ -111,7 +111,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
111
111
  }
112
112
 
113
113
  var renderMoreButton = function renderMoreButton(props) {
114
- return (0, _core.jsx)(_moreIndicator.default, (0, _extends2.default)({
114
+ return (0, _react2.jsx)(_moreIndicator.default, (0, _extends2.default)({
115
115
  buttonProps: showMoreButtonProps,
116
116
  borderColor: borderColor,
117
117
  count: total - max,
@@ -139,7 +139,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
139
139
  return boundariesElement === 'window' ? 'document' : 'viewport';
140
140
  }();
141
141
 
142
- return (0, _core.jsx)(_popup.default, {
142
+ return (0, _react2.jsx)(_popup.default, {
143
143
  isOpen: isOpen,
144
144
  onClose: onClose,
145
145
  placement: "bottom-end",
@@ -148,13 +148,13 @@ var AvatarGroup = function AvatarGroup(_ref) {
148
148
  shouldFlip: true,
149
149
  zIndex: _constants.layers.modal(),
150
150
  content: function content() {
151
- return (0, _core.jsx)(_menu.PopupMenuGroup, {
151
+ return (0, _react2.jsx)(_menu.PopupMenuGroup, {
152
152
  onClick: function onClick(e) {
153
153
  return e.stopPropagation();
154
154
  },
155
155
  minWidth: 250,
156
156
  maxHeight: 300
157
- }, (0, _core.jsx)(_menu.Section, null, data.slice(max).map(function (avatar, index) {
157
+ }, (0, _react2.jsx)(_menu.Section, null, data.slice(max).map(function (avatar, index) {
158
158
  return getOverrides(overrides).AvatarGroupItem.render(_avatarGroupItem.default, {
159
159
  avatar: avatar,
160
160
  onAvatarClick: onAvatarClick,
@@ -180,7 +180,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
180
180
  var total = data.length;
181
181
  var maxAvatar = total > max ? max - 1 : max;
182
182
  var Group = appearance === 'stack' ? _stack.default : _grid.default;
183
- return (0, _core.jsx)(Group, {
183
+ return (0, _react2.jsx)(Group, {
184
184
  testId: testId && "".concat(testId, "--avatar-group"),
185
185
  "aria-label": label
186
186
  }, data.slice(0, maxAvatar).map(function (avatarData, idx) {
@@ -194,7 +194,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
194
194
  } : undefined,
195
195
  stackIndex: max - idx
196
196
  }), idx);
197
- return !isTooltipDisabled && !avatarData.isDisabled ? (0, _core.jsx)(_tooltip.default, {
197
+ return !isTooltipDisabled && !avatarData.isDisabled ? (0, _react2.jsx)(_tooltip.default, {
198
198
  key: (0, _utils.composeUniqueKey)(avatarData, idx),
199
199
  content: avatarData.name,
200
200
  testId: testId && "".concat(testId, "--tooltip-").concat(idx)
@@ -7,14 +7,14 @@ exports.default = void 0;
7
7
 
8
8
  var _react = require("react");
9
9
 
10
- var _core = require("@emotion/core");
10
+ var _react2 = require("@emotion/react");
11
11
 
12
12
  var _constants = require("@atlaskit/theme/constants");
13
13
 
14
14
  /** @jsx jsx */
15
15
  var gridSize = (0, _constants.gridSize)();
16
16
  var gutter = gridSize / 2;
17
- var listStyles = (0, _core.css)({
17
+ var listStyles = (0, _react2.css)({
18
18
  // removes default ul styles. Needs !important to override contextual styles in product.
19
19
  display: 'flex',
20
20
  margin: 0,
@@ -26,7 +26,7 @@ var listStyles = (0, _core.css)({
26
26
  lineHeight: 1,
27
27
  listStyleType: 'none !important'
28
28
  });
29
- var listItemStyles = (0, _core.css)({
29
+ var listItemStyles = (0, _react2.css)({
30
30
  margin: 0,
31
31
  marginBottom: gridSize,
32
32
  paddingRight: gutter,
@@ -37,12 +37,12 @@ var Grid = function Grid(_ref) {
37
37
  var children = _ref.children,
38
38
  testId = _ref.testId,
39
39
  label = _ref['aria-label'];
40
- return (0, _core.jsx)("ul", {
40
+ return (0, _react2.jsx)("ul", {
41
41
  "data-testid": testId,
42
42
  "aria-label": label,
43
43
  css: listStyles
44
44
  }, _react.Children.map(children, function (child) {
45
- return child && (0, _core.jsx)("li", {
45
+ return child && (0, _react2.jsx)("li", {
46
46
  css: listItemStyles
47
47
  }, child);
48
48
  }));
@@ -15,7 +15,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
15
15
 
16
16
  var _react = require("react");
17
17
 
18
- var _core = require("@emotion/core");
18
+ var _react2 = require("@emotion/react");
19
19
 
20
20
  var _avatar = _interopRequireWildcard(require("@atlaskit/avatar"));
21
21
 
@@ -35,7 +35,7 @@ var FONT_SIZE = {
35
35
  xlarge: '16px',
36
36
  xxlarge: '16px'
37
37
  };
38
- var buttonActiveStyles = (0, _core.css)({
38
+ var buttonActiveStyles = (0, _react2.css)({
39
39
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
40
40
  '&&': {
41
41
  backgroundColor: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
@@ -52,7 +52,7 @@ var buttonActiveStyles = (0, _core.css)({
52
52
  }
53
53
  }
54
54
  });
55
- var buttonStyles = (0, _core.css)({
55
+ var buttonStyles = (0, _react2.css)({
56
56
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
57
57
  '&&': {
58
58
  backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
@@ -98,7 +98,7 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
98
98
  onClick(event, analyticsEvent);
99
99
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
100
100
  [buttonProps.onClick, onClick]);
101
- return (0, _core.jsx)(_avatar.default, {
101
+ return (0, _react2.jsx)(_avatar.default, {
102
102
  appearance: appearance,
103
103
  size: size,
104
104
  borderColor: borderColor,
@@ -109,7 +109,7 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
109
109
  className = _ref2.className,
110
110
  ref = _ref2.ref,
111
111
  props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
112
- return (0, _core.jsx)("button", (0, _extends2.default)({
112
+ return (0, _react2.jsx)("button", (0, _extends2.default)({
113
113
  type: "submit"
114
114
  }, buttonProps, props, {
115
115
  ref: ref,
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _react = require("react");
9
9
 
10
- var _core = require("@emotion/core");
10
+ var _react2 = require("@emotion/react");
11
11
 
12
12
  var _avatar = require("@atlaskit/avatar");
13
13
 
@@ -15,7 +15,7 @@ var _constants = require("@atlaskit/theme/constants");
15
15
 
16
16
  /** @jsx jsx */
17
17
  var gutter = _avatar.BORDER_WIDTH * 2 + (0, _constants.gridSize)() / 2;
18
- var listStyles = (0, _core.css)({
18
+ var listStyles = (0, _react2.css)({
19
19
  display: 'flex',
20
20
  margin: 0,
21
21
  marginRight: gutter,
@@ -23,7 +23,7 @@ var listStyles = (0, _core.css)({
23
23
  lineHeight: 1,
24
24
  listStyleType: 'none !important'
25
25
  });
26
- var listItemStyles = (0, _core.css)({
26
+ var listItemStyles = (0, _react2.css)({
27
27
  margin: 0,
28
28
  marginRight: -gutter
29
29
  });
@@ -32,12 +32,12 @@ var Stack = function Stack(_ref) {
32
32
  var children = _ref.children,
33
33
  testId = _ref.testId,
34
34
  label = _ref['aria-label'];
35
- return (0, _core.jsx)("ul", {
35
+ return (0, _react2.jsx)("ul", {
36
36
  "data-testid": testId,
37
37
  "aria-label": label,
38
38
  css: listStyles
39
39
  }, _react.Children.map(children, function (child) {
40
- return child && (0, _core.jsx)("li", {
40
+ return child && (0, _react2.jsx)("li", {
41
41
  css: listItemStyles
42
42
  }, child);
43
43
  }));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.0.4",
3
+ "version": "9.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { useCallback, useState } from 'react';
5
- import { jsx } from '@emotion/core';
5
+ import { jsx } from '@emotion/react';
6
6
  import Avatar from '@atlaskit/avatar';
7
7
  import { PopupMenuGroup, Section } from '@atlaskit/menu';
8
8
  import Popup from '@atlaskit/popup';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { Children } from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  const gridSize = getGridSize();
6
6
  const gutter = gridSize / 2;
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { forwardRef, useCallback } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
7
7
  import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
8
8
  const FONT_SIZE = {
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { Children } from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { BORDER_WIDTH } from '@atlaskit/avatar';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
6
  const gutter = BORDER_WIDTH * 2 + gridSize() / 2;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.0.4",
3
+ "version": "9.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -8,7 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
8
8
 
9
9
  /** @jsx jsx */
10
10
  import { useCallback, useState } from 'react';
11
- import { jsx } from '@emotion/core';
11
+ import { jsx } from '@emotion/react';
12
12
  import Avatar from '@atlaskit/avatar';
13
13
  import { PopupMenuGroup, Section } from '@atlaskit/menu';
14
14
  import Popup from '@atlaskit/popup';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { Children } from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  var gridSize = getGridSize();
6
6
  var gutter = gridSize / 2;
@@ -4,7 +4,7 @@ var _excluded = ["testId", "className", "ref"];
4
4
 
5
5
  /** @jsx jsx */
6
6
  import { forwardRef, useCallback } from 'react';
7
- import { css, jsx } from '@emotion/core';
7
+ import { css, jsx } from '@emotion/react';
8
8
  import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
9
9
  import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
10
10
  var FONT_SIZE = {
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { Children } from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { BORDER_WIDTH } from '@atlaskit/avatar';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
6
  var gutter = BORDER_WIDTH * 2 + gridSize() / 2;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.0.4",
3
+ "version": "9.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ElementType, MouseEventHandler } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import { SizeType } from '@atlaskit/avatar';
4
5
  import { AvatarGroupOverrides, AvatarProps, onAvatarClickHandler } from './types';
5
6
  export interface AvatarGroupProps {
@@ -98,5 +99,5 @@ export interface AvatarGroupProps {
98
99
  * - [Code](https://atlassian.design/components/avatar-group/code)
99
100
  * - [Usage](https://atlassian.design/components/avatar-group/usage)
100
101
  */
101
- declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, }: AvatarGroupProps) => JSX.Element;
102
+ declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, }: AvatarGroupProps) => jsx.JSX.Element;
102
103
  export default AvatarGroup;
@@ -1,5 +1,4 @@
1
1
  import type { ElementType, ReactNode } from 'react';
2
- import type { Interpolation } from '@emotion/core';
3
2
  import type { AnalyticsEvent } from '@atlaskit/analytics-next';
4
3
  import type { AvatarPropTypes } from '@atlaskit/avatar';
5
4
  import type { AvatarGroupItemProps } from './avatar-group-item';
@@ -20,4 +19,3 @@ export interface AvatarGroupOverrides {
20
19
  };
21
20
  }
22
21
  export declare type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
23
- export declare type CssCallback = (template: TemplateStringsArray, ...args: Array<Interpolation>) => string;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ElementType, MouseEventHandler } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import { SizeType } from '@atlaskit/avatar';
4
5
  import { AvatarGroupOverrides, AvatarProps, onAvatarClickHandler } from './types';
5
6
  export interface AvatarGroupProps {
@@ -98,5 +99,5 @@ export interface AvatarGroupProps {
98
99
  * - [Code](https://atlassian.design/components/avatar-group/code)
99
100
  * - [Usage](https://atlassian.design/components/avatar-group/usage)
100
101
  */
101
- declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, }: AvatarGroupProps) => JSX.Element;
102
+ declare const AvatarGroup: ({ appearance, avatar, borderColor, boundariesElement, data, isTooltipDisabled, maxCount, onAvatarClick, onMoreClick, overrides, showMoreButtonProps, size, testId, label, }: AvatarGroupProps) => jsx.JSX.Element;
102
103
  export default AvatarGroup;
@@ -1,5 +1,4 @@
1
1
  import type { ElementType, ReactNode } from 'react';
2
- import type { Interpolation } from '@emotion/core';
3
2
  import type { AnalyticsEvent } from '@atlaskit/analytics-next';
4
3
  import type { AvatarPropTypes } from '@atlaskit/avatar';
5
4
  import type { AvatarGroupItemProps } from './avatar-group-item';
@@ -20,4 +19,3 @@ export interface AvatarGroupOverrides {
20
19
  };
21
20
  }
22
21
  export declare type onAvatarClickHandler = (event: React.MouseEvent, analyticsEvent: AnalyticsEvent | undefined, index: number) => void;
23
- export declare type CssCallback = (template: TemplateStringsArray, ...args: Array<Interpolation>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.0.4",
3
+ "version": "9.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/"
@@ -33,14 +33,14 @@
33
33
  ".": "./src/index.tsx"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/avatar": "^21.0.0",
36
+ "@atlaskit/avatar": "^21.1.0",
37
37
  "@atlaskit/menu": "^1.3.0",
38
- "@atlaskit/popup": "^1.4.0",
38
+ "@atlaskit/popup": "^1.5.0",
39
39
  "@atlaskit/theme": "^12.2.0",
40
40
  "@atlaskit/tokens": "^0.10.0",
41
- "@atlaskit/tooltip": "^17.5.0",
41
+ "@atlaskit/tooltip": "^17.6.0",
42
42
  "@babel/runtime": "^7.0.0",
43
- "@emotion/core": "^10.0.9"
43
+ "@emotion/react": "^11.7.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": "^16.8.0"
@@ -48,13 +48,13 @@
48
48
  "devDependencies": {
49
49
  "@atlaskit/analytics-next": "^8.2.0",
50
50
  "@atlaskit/button": "^16.3.0",
51
- "@atlaskit/code": "^14.3.0",
51
+ "@atlaskit/code": "^14.4.0",
52
52
  "@atlaskit/docs": "*",
53
53
  "@atlaskit/ds-lib": "^2.1.1",
54
- "@atlaskit/form": "^8.4.5",
55
- "@atlaskit/icon": "^21.10.0",
56
- "@atlaskit/modal-dialog": "^12.3.0",
57
- "@atlaskit/section-message": "^6.2.0",
54
+ "@atlaskit/form": "^8.6.0",
55
+ "@atlaskit/icon": "^21.11.0",
56
+ "@atlaskit/modal-dialog": "^12.4.0",
57
+ "@atlaskit/section-message": "^6.3.0",
58
58
  "@atlaskit/ssr": "*",
59
59
  "@atlaskit/toggle": "^12.5.0",
60
60
  "@atlaskit/visual-regression": "*",
package/report.api.md CHANGED
@@ -1,11 +1,14 @@
1
- ## API Report File for "@atlaskit/avatar-group"
1
+ ## API Report File for "@atlaskit/avatar-group".
2
2
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
4
6
 
5
7
  ```ts
6
8
  import type { AnalyticsEvent } from '@atlaskit/analytics-next';
7
9
  import type { AvatarPropTypes } from '@atlaskit/avatar';
8
10
  import { ElementType } from 'react';
11
+ import { jsx } from '@emotion/react';
9
12
  import { MouseEventHandler } from 'react';
10
13
  import type { ReactNode } from 'react';
11
14
  import { SizeType } from '@atlaskit/avatar';
@@ -34,7 +37,7 @@ declare const AvatarGroup: ({
34
37
  size,
35
38
  testId,
36
39
  label,
37
- }: AvatarGroupProps) => JSX.Element;
40
+ }: AvatarGroupProps) => jsx.JSX.Element;
38
41
  export default AvatarGroup;
39
42
 
40
43
  declare interface AvatarGroupItemProps {