@atlaskit/avatar-group 9.2.0 → 9.2.2

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.
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  /** @jsx jsx */
4
3
  import { useCallback, useState } from 'react';
5
4
  import { jsx } from '@emotion/react';
@@ -17,7 +16,6 @@ const MAX_COUNT = {
17
16
  grid: 11,
18
17
  stack: 5
19
18
  };
20
-
21
19
  function getOverrides(overrides) {
22
20
  return {
23
21
  AvatarGroupItem: {
@@ -34,6 +32,7 @@ function getOverrides(overrides) {
34
32
  }
35
33
  };
36
34
  }
35
+
37
36
  /**
38
37
  * __Avatar group__
39
38
  *
@@ -43,8 +42,6 @@ function getOverrides(overrides) {
43
42
  * - [Code](https://atlassian.design/components/avatar-group/code)
44
43
  * - [Usage](https://atlassian.design/components/avatar-group/usage)
45
44
  */
46
-
47
-
48
45
  const AvatarGroup = ({
49
46
  appearance = 'stack',
50
47
  avatar = Avatar,
@@ -64,12 +61,10 @@ const AvatarGroup = ({
64
61
  }) => {
65
62
  const [isOpen, setIsOpen] = useState(false);
66
63
  const onClose = useCallback(() => setIsOpen(false), []);
67
-
68
64
  function renderMoreDropdown(max, total) {
69
65
  if (total <= max) {
70
66
  return null;
71
67
  }
72
-
73
68
  const renderMoreButton = props => jsx(MoreIndicator, _extends({
74
69
  buttonProps: showMoreButtonProps,
75
70
  borderColor: borderColor,
@@ -77,26 +72,23 @@ const AvatarGroup = ({
77
72
  size: size,
78
73
  testId: testId && `${testId}--overflow-menu--trigger`,
79
74
  isActive: isOpen
80
- }, props)); // bail if the consumer wants to handle onClick
81
-
75
+ }, props));
82
76
 
77
+ // bail if the consumer wants to handle onClick
83
78
  if (typeof onMoreClick === 'function') {
84
79
  return renderMoreButton({
85
80
  onClick: onMoreClick
86
81
  });
87
- } // split boundariesElement into `boundary` and `rootBoundary` props for Popup
88
-
82
+ }
89
83
 
84
+ // split boundariesElement into `boundary` and `rootBoundary` props for Popup
90
85
  const boundary = boundariesElement === 'scrollParent' ? 'clippingParents' : undefined;
91
-
92
86
  const rootBoundary = (() => {
93
87
  if (boundariesElement === 'scrollParent') {
94
88
  return undefined;
95
89
  }
96
-
97
90
  return boundariesElement === 'window' ? 'document' : 'viewport';
98
91
  })();
99
-
100
92
  return jsx(Popup, {
101
93
  isOpen: isOpen,
102
94
  onClose: onClose,
@@ -114,16 +106,17 @@ const AvatarGroup = ({
114
106
  onAvatarClick,
115
107
  testId: testId && `${testId}--avatar-group-item-${index + max}`,
116
108
  index: index + max
117
- }, // This index holds the true index,
109
+ },
110
+ // This index holds the true index,
118
111
  // adding up the index of non-overflowed avatars and overflowed avatars.
119
112
  index + max)))),
120
- trigger: triggerProps => renderMoreButton({ ...triggerProps,
113
+ trigger: triggerProps => renderMoreButton({
114
+ ...triggerProps,
121
115
  onClick: () => setIsOpen(!isOpen)
122
116
  }),
123
117
  testId: testId && `${testId}--overflow-menu`
124
118
  });
125
119
  }
126
-
127
120
  const max = maxCount === undefined || maxCount === 0 ? MAX_COUNT[appearance] : maxCount;
128
121
  const total = data.length;
129
122
  const maxAvatar = total > max ? max - 1 : max;
@@ -133,7 +126,8 @@ const AvatarGroup = ({
133
126
  "aria-label": label
134
127
  }, data.slice(0, maxAvatar).map((avatarData, idx) => {
135
128
  const callback = avatarData.onClick || onAvatarClick;
136
- const finalAvatar = getOverrides(overrides).Avatar.render(avatar, { ...avatarData,
129
+ const finalAvatar = getOverrides(overrides).Avatar.render(avatar, {
130
+ ...avatarData,
137
131
  size,
138
132
  borderColor,
139
133
  testId: testId && `${testId}--avatar-${idx}`,
@@ -150,5 +144,4 @@ const AvatarGroup = ({
150
144
  }, finalAvatar) : finalAvatar;
151
145
  }), renderMoreDropdown(+maxAvatar, total));
152
146
  };
153
-
154
147
  export default AvatarGroup;
@@ -7,28 +7,21 @@ const gutter = gridSize / 2;
7
7
  const listStyles = css({
8
8
  // removes default ul styles. Needs !important to override contextual styles in product.
9
9
  display: 'flex',
10
- // TODO Delete this comment after verifying spacing token -> previous value `0`
11
- margin: "var(--ds-scale-0, 0px)",
10
+ margin: "var(--ds-space-0, 0px)",
12
11
  marginRight: -gutter,
13
12
  marginLeft: -gutter,
14
- // TODO Delete this comment after verifying spacing token -> previous value `0`
15
- padding: "var(--ds-scale-0, 0px)",
13
+ padding: "var(--ds-space-0, 0px)",
16
14
  justifyContent: 'flex-start',
17
15
  flexWrap: 'wrap',
18
16
  lineHeight: 1,
19
17
  listStyleType: 'none !important'
20
18
  });
21
19
  const listItemStyles = css({
22
- // TODO Delete this comment after verifying spacing token -> previous value `0`
23
- margin: "var(--ds-scale-0, 0px)",
24
- // TODO Delete this comment after verifying spacing token -> previous value `gridSize`
25
- marginBottom: "var(--ds-scale-100, 8px)",
26
- // TODO Delete this comment after verifying spacing token -> previous value `gutter`
27
- paddingRight: "var(--ds-scale-050, 4px)",
28
- // TODO Delete this comment after verifying spacing token -> previous value `gutter`
29
- paddingLeft: "var(--ds-scale-050, 4px)"
20
+ margin: "var(--ds-space-0, 0px)",
21
+ marginBottom: "var(--ds-space-100, 8px)",
22
+ paddingRight: "var(--ds-space-050, 4px)",
23
+ paddingLeft: "var(--ds-space-050, 4px)"
30
24
  });
31
-
32
25
  const Grid = ({
33
26
  children,
34
27
  testId,
@@ -39,7 +32,7 @@ const Grid = ({
39
32
  css: listStyles
40
33
  }, Children.map(children, child => child && jsx("li", {
41
34
  css: listItemStyles
42
- }, child))); // eslint-disable-next-line @repo/internal/react/require-jsdoc
43
-
35
+ }, child)));
44
36
 
37
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
45
38
  export default Grid;
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  /** @jsx jsx */
4
3
  import { forwardRef, useCallback } from 'react';
5
4
  import { css, jsx } from '@emotion/react';
@@ -35,8 +34,9 @@ const buttonStyles = css({
35
34
  '&&': {
36
35
  backgroundColor: `var(--ds-background-neutral, ${N20})`,
37
36
  color: `var(--ds-text, ${N500})`,
37
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
38
38
  fontFamily: 'inherit',
39
- fontWeight: 500,
39
+ fontWeight: "var(--ds-font-weight-medium, 500)",
40
40
  '&:hover': {
41
41
  backgroundColor: `var(--ds-background-neutral-hovered, ${N30})`,
42
42
  color: `var(--ds-text, ${N500})`
@@ -68,9 +68,9 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
68
68
  if (buttonProps.onClick) {
69
69
  buttonProps.onClick(event);
70
70
  }
71
-
72
71
  onClick(event, analyticsEvent);
73
- }, // eslint-disable-next-line react-hooks/exhaustive-deps
72
+ },
73
+ // eslint-disable-next-line react-hooks/exhaustive-deps
74
74
  [buttonProps.onClick, onClick]);
75
75
  return jsx(Avatar, {
76
76
  appearance: appearance,
@@ -98,6 +98,7 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
98
98
  className: className
99
99
  }), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count));
100
100
  });
101
- MoreIndicator.displayName = 'MoreIndicator'; // eslint-disable-next-line @repo/internal/react/require-jsdoc
101
+ MoreIndicator.displayName = 'MoreIndicator';
102
102
 
103
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
103
104
  export default MoreIndicator;
@@ -6,20 +6,16 @@ import { gridSize } from '@atlaskit/theme/constants';
6
6
  const gutter = BORDER_WIDTH * 2 + gridSize() / 2;
7
7
  const listStyles = css({
8
8
  display: 'flex',
9
- // TODO Delete this comment after verifying spacing token -> previous value `0`
10
- margin: "var(--ds-scale-0, 0px)",
9
+ margin: "var(--ds-space-0, 0px)",
11
10
  marginRight: gutter,
12
- // TODO Delete this comment after verifying spacing token -> previous value `0`
13
- padding: "var(--ds-scale-0, 0px)",
11
+ padding: "var(--ds-space-0, 0px)",
14
12
  lineHeight: 1,
15
13
  listStyleType: 'none !important'
16
14
  });
17
15
  const listItemStyles = css({
18
- // TODO Delete this comment after verifying spacing token -> previous value `0`
19
- margin: "var(--ds-scale-0, 0px)",
16
+ margin: "var(--ds-space-0, 0px)",
20
17
  marginRight: -gutter
21
18
  });
22
-
23
19
  const Stack = ({
24
20
  children,
25
21
  testId,
@@ -30,7 +26,7 @@ const Stack = ({
30
26
  css: listStyles
31
27
  }, Children.map(children, child => child && jsx("li", {
32
28
  css: listItemStyles
33
- }, child))); // eslint-disable-next-line @repo/internal/react/require-jsdoc
34
-
29
+ }, child)));
35
30
 
31
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
36
32
  export default Stack;
@@ -2,6 +2,5 @@ export const composeUniqueKey = (props, index) => {
2
2
  if (props.key) {
3
3
  return props.key;
4
4
  }
5
-
6
5
  return index;
7
6
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.2.0",
3
+ "version": "9.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,38 +1,33 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["href", "onClick"],
4
- _excluded2 = ["children"];
4
+ _excluded2 = ["children"];
5
5
  import React from 'react';
6
6
  import Avatar from '@atlaskit/avatar';
7
7
  import { ButtonItem, CustomItem, LinkItem } from '@atlaskit/menu';
8
-
9
8
  var AvatarGroupItem = function AvatarGroupItem(_ref) {
10
9
  var avatar = _ref.avatar,
11
- onAvatarClick = _ref.onAvatarClick,
12
- testId = _ref.testId,
13
- index = _ref.index;
14
-
10
+ onAvatarClick = _ref.onAvatarClick,
11
+ testId = _ref.testId,
12
+ index = _ref.index;
15
13
  var href = avatar.href,
16
- onClick = avatar.onClick,
17
- rest = _objectWithoutProperties(avatar, _excluded);
18
-
14
+ onClick = avatar.onClick,
15
+ rest = _objectWithoutProperties(avatar, _excluded);
19
16
  var CustomComponent = function CustomComponent(_ref2) {
20
17
  var children = _ref2.children,
21
- props = _objectWithoutProperties(_ref2, _excluded2);
22
-
18
+ props = _objectWithoutProperties(_ref2, _excluded2);
23
19
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
24
20
  return /*#__PURE__*/React.createElement("span", props, children);
25
21
  };
26
-
27
22
  var AvatarIcon = /*#__PURE__*/React.createElement(Avatar, _extends({}, rest, {
28
23
  testId: testId && "".concat(testId, "--avatar"),
29
24
  borderColor: "transparent",
30
25
  size: "small",
31
26
  name: ""
32
- })); // onClick handler provided with avatar data takes precedence, same as with the normal avatar item
27
+ }));
33
28
 
29
+ // onClick handler provided with avatar data takes precedence, same as with the normal avatar item
34
30
  var callback = onClick || onAvatarClick;
35
-
36
31
  if (href) {
37
32
  return /*#__PURE__*/React.createElement(LinkItem, {
38
33
  href: href,
@@ -45,7 +40,6 @@ var AvatarGroupItem = function AvatarGroupItem(_ref) {
45
40
  }
46
41
  }, avatar.name);
47
42
  }
48
-
49
43
  if (typeof callback === 'function') {
50
44
  return /*#__PURE__*/React.createElement(ButtonItem, {
51
45
  onClick: function onClick(event) {
@@ -55,13 +49,12 @@ var AvatarGroupItem = function AvatarGroupItem(_ref) {
55
49
  testId: testId
56
50
  }, avatar.name);
57
51
  }
58
-
59
52
  return /*#__PURE__*/React.createElement(CustomItem, {
60
53
  iconBefore: AvatarIcon,
61
54
  component: CustomComponent,
62
55
  testId: testId
63
56
  }, avatar.name);
64
- }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
65
-
57
+ };
66
58
 
59
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
67
60
  export default AvatarGroupItem;
@@ -1,11 +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
-
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
-
7
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
-
9
6
  /** @jsx jsx */
10
7
  import { useCallback, useState } from 'react';
11
8
  import { jsx } from '@emotion/react';
@@ -23,7 +20,6 @@ var MAX_COUNT = {
23
20
  grid: 11,
24
21
  stack: 5
25
22
  };
26
-
27
23
  function getOverrides(overrides) {
28
24
  return {
29
25
  AvatarGroupItem: _objectSpread({
@@ -42,6 +38,7 @@ function getOverrides(overrides) {
42
38
  }, overrides && overrides.Avatar)
43
39
  };
44
40
  }
41
+
45
42
  /**
46
43
  * __Avatar group__
47
44
  *
@@ -51,45 +48,39 @@ function getOverrides(overrides) {
51
48
  * - [Code](https://atlassian.design/components/avatar-group/code)
52
49
  * - [Usage](https://atlassian.design/components/avatar-group/usage)
53
50
  */
54
-
55
-
56
51
  var AvatarGroup = function AvatarGroup(_ref) {
57
52
  var _ref$appearance = _ref.appearance,
58
- appearance = _ref$appearance === void 0 ? 'stack' : _ref$appearance,
59
- _ref$avatar = _ref.avatar,
60
- avatar = _ref$avatar === void 0 ? Avatar : _ref$avatar,
61
- borderColor = _ref.borderColor,
62
- boundariesElement = _ref.boundariesElement,
63
- data = _ref.data,
64
- isTooltipDisabled = _ref.isTooltipDisabled,
65
- maxCount = _ref.maxCount,
66
- onAvatarClick = _ref.onAvatarClick,
67
- onMoreClick = _ref.onMoreClick,
68
- overrides = _ref.overrides,
69
- _ref$showMoreButtonPr = _ref.showMoreButtonProps,
70
- showMoreButtonProps = _ref$showMoreButtonPr === void 0 ? {} : _ref$showMoreButtonPr,
71
- _ref$size = _ref.size,
72
- size = _ref$size === void 0 ? 'medium' : _ref$size,
73
- testId = _ref.testId,
74
- _ref$label = _ref.label,
75
- label = _ref$label === void 0 ? 'avatar group' : _ref$label,
76
- _ref$tooltipPosition = _ref.tooltipPosition,
77
- tooltipPosition = _ref$tooltipPosition === void 0 ? 'bottom' : _ref$tooltipPosition;
78
-
53
+ appearance = _ref$appearance === void 0 ? 'stack' : _ref$appearance,
54
+ _ref$avatar = _ref.avatar,
55
+ avatar = _ref$avatar === void 0 ? Avatar : _ref$avatar,
56
+ borderColor = _ref.borderColor,
57
+ boundariesElement = _ref.boundariesElement,
58
+ data = _ref.data,
59
+ isTooltipDisabled = _ref.isTooltipDisabled,
60
+ maxCount = _ref.maxCount,
61
+ onAvatarClick = _ref.onAvatarClick,
62
+ onMoreClick = _ref.onMoreClick,
63
+ overrides = _ref.overrides,
64
+ _ref$showMoreButtonPr = _ref.showMoreButtonProps,
65
+ showMoreButtonProps = _ref$showMoreButtonPr === void 0 ? {} : _ref$showMoreButtonPr,
66
+ _ref$size = _ref.size,
67
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
68
+ testId = _ref.testId,
69
+ _ref$label = _ref.label,
70
+ label = _ref$label === void 0 ? 'avatar group' : _ref$label,
71
+ _ref$tooltipPosition = _ref.tooltipPosition,
72
+ tooltipPosition = _ref$tooltipPosition === void 0 ? 'bottom' : _ref$tooltipPosition;
79
73
  var _useState = useState(false),
80
- _useState2 = _slicedToArray(_useState, 2),
81
- isOpen = _useState2[0],
82
- setIsOpen = _useState2[1];
83
-
74
+ _useState2 = _slicedToArray(_useState, 2),
75
+ isOpen = _useState2[0],
76
+ setIsOpen = _useState2[1];
84
77
  var onClose = useCallback(function () {
85
78
  return setIsOpen(false);
86
79
  }, []);
87
-
88
80
  function renderMoreDropdown(max, total) {
89
81
  if (total <= max) {
90
82
  return null;
91
83
  }
92
-
93
84
  var renderMoreButton = function renderMoreButton(props) {
94
85
  return jsx(MoreIndicator, _extends({
95
86
  buttonProps: showMoreButtonProps,
@@ -99,26 +90,23 @@ var AvatarGroup = function AvatarGroup(_ref) {
99
90
  testId: testId && "".concat(testId, "--overflow-menu--trigger"),
100
91
  isActive: isOpen
101
92
  }, props));
102
- }; // bail if the consumer wants to handle onClick
103
-
93
+ };
104
94
 
95
+ // bail if the consumer wants to handle onClick
105
96
  if (typeof onMoreClick === 'function') {
106
97
  return renderMoreButton({
107
98
  onClick: onMoreClick
108
99
  });
109
- } // split boundariesElement into `boundary` and `rootBoundary` props for Popup
110
-
100
+ }
111
101
 
102
+ // split boundariesElement into `boundary` and `rootBoundary` props for Popup
112
103
  var boundary = boundariesElement === 'scrollParent' ? 'clippingParents' : undefined;
113
-
114
104
  var rootBoundary = function () {
115
105
  if (boundariesElement === 'scrollParent') {
116
106
  return undefined;
117
107
  }
118
-
119
108
  return boundariesElement === 'window' ? 'document' : 'viewport';
120
109
  }();
121
-
122
110
  return jsx(Popup, {
123
111
  isOpen: isOpen,
124
112
  onClose: onClose,
@@ -140,7 +128,8 @@ var AvatarGroup = function AvatarGroup(_ref) {
140
128
  onAvatarClick: onAvatarClick,
141
129
  testId: testId && "".concat(testId, "--avatar-group-item-").concat(index + max),
142
130
  index: index + max
143
- }, // This index holds the true index,
131
+ },
132
+ // This index holds the true index,
144
133
  // adding up the index of non-overflowed avatars and overflowed avatars.
145
134
  index + max);
146
135
  })));
@@ -155,7 +144,6 @@ var AvatarGroup = function AvatarGroup(_ref) {
155
144
  testId: testId && "".concat(testId, "--overflow-menu")
156
145
  });
157
146
  }
158
-
159
147
  var max = maxCount === undefined || maxCount === 0 ? MAX_COUNT[appearance] : maxCount;
160
148
  var total = data.length;
161
149
  var maxAvatar = total > max ? max - 1 : max;
@@ -182,5 +170,4 @@ var AvatarGroup = function AvatarGroup(_ref) {
182
170
  }, finalAvatar) : finalAvatar;
183
171
  }), renderMoreDropdown(+maxAvatar, total));
184
172
  };
185
-
186
173
  export default AvatarGroup;
@@ -7,32 +7,25 @@ var gutter = gridSize / 2;
7
7
  var listStyles = css({
8
8
  // removes default ul styles. Needs !important to override contextual styles in product.
9
9
  display: 'flex',
10
- // TODO Delete this comment after verifying spacing token -> previous value `0`
11
- margin: "var(--ds-scale-0, 0px)",
10
+ margin: "var(--ds-space-0, 0px)",
12
11
  marginRight: -gutter,
13
12
  marginLeft: -gutter,
14
- // TODO Delete this comment after verifying spacing token -> previous value `0`
15
- padding: "var(--ds-scale-0, 0px)",
13
+ padding: "var(--ds-space-0, 0px)",
16
14
  justifyContent: 'flex-start',
17
15
  flexWrap: 'wrap',
18
16
  lineHeight: 1,
19
17
  listStyleType: 'none !important'
20
18
  });
21
19
  var listItemStyles = css({
22
- // TODO Delete this comment after verifying spacing token -> previous value `0`
23
- margin: "var(--ds-scale-0, 0px)",
24
- // TODO Delete this comment after verifying spacing token -> previous value `gridSize`
25
- marginBottom: "var(--ds-scale-100, 8px)",
26
- // TODO Delete this comment after verifying spacing token -> previous value `gutter`
27
- paddingRight: "var(--ds-scale-050, 4px)",
28
- // TODO Delete this comment after verifying spacing token -> previous value `gutter`
29
- paddingLeft: "var(--ds-scale-050, 4px)"
20
+ margin: "var(--ds-space-0, 0px)",
21
+ marginBottom: "var(--ds-space-100, 8px)",
22
+ paddingRight: "var(--ds-space-050, 4px)",
23
+ paddingLeft: "var(--ds-space-050, 4px)"
30
24
  });
31
-
32
25
  var Grid = function Grid(_ref) {
33
26
  var children = _ref.children,
34
- testId = _ref.testId,
35
- label = _ref['aria-label'];
27
+ testId = _ref.testId,
28
+ label = _ref['aria-label'];
36
29
  return jsx("ul", {
37
30
  "data-testid": testId,
38
31
  "aria-label": label,
@@ -42,7 +35,7 @@ var Grid = function Grid(_ref) {
42
35
  css: listItemStyles
43
36
  }, child);
44
37
  }));
45
- }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
46
-
38
+ };
47
39
 
40
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
48
41
  export default Grid;
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["testId", "className", "ref"];
4
-
5
4
  /** @jsx jsx */
6
5
  import { forwardRef, useCallback } from 'react';
7
6
  import { css, jsx } from '@emotion/react';
@@ -37,8 +36,9 @@ var buttonStyles = css({
37
36
  '&&': {
38
37
  backgroundColor: "var(--ds-background-neutral, ".concat(N20, ")"),
39
38
  color: "var(--ds-text, ".concat(N500, ")"),
39
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
40
40
  fontFamily: 'inherit',
41
- fontWeight: 500,
41
+ fontWeight: "var(--ds-font-weight-medium, 500)",
42
42
  '&:hover': {
43
43
  backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30, ")"),
44
44
  color: "var(--ds-text, ".concat(N500, ")")
@@ -55,28 +55,28 @@ var buttonStyles = css({
55
55
  var MAX_DISPLAY_COUNT = 99;
56
56
  var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
57
57
  var _ref$appearance = _ref.appearance,
58
- appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
59
- _ref$borderColor = _ref.borderColor,
60
- borderColor = _ref$borderColor === void 0 ? "var(--ds-border-inverse, ".concat(N0, ")") : _ref$borderColor,
61
- _ref$size = _ref.size,
62
- size = _ref$size === void 0 ? 'medium' : _ref$size,
63
- _ref$count = _ref.count,
64
- count = _ref$count === void 0 ? 0 : _ref$count,
65
- testId = _ref.testId,
66
- onClick = _ref.onClick,
67
- ariaControls = _ref['aria-controls'],
68
- ariaExpanded = _ref['aria-expanded'],
69
- ariaHaspopup = _ref['aria-haspopup'],
70
- _ref$buttonProps = _ref.buttonProps,
71
- buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
72
- isActive = _ref.isActive;
58
+ appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
59
+ _ref$borderColor = _ref.borderColor,
60
+ borderColor = _ref$borderColor === void 0 ? "var(--ds-border-inverse, ".concat(N0, ")") : _ref$borderColor,
61
+ _ref$size = _ref.size,
62
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
63
+ _ref$count = _ref.count,
64
+ count = _ref$count === void 0 ? 0 : _ref$count,
65
+ testId = _ref.testId,
66
+ onClick = _ref.onClick,
67
+ ariaControls = _ref['aria-controls'],
68
+ ariaExpanded = _ref['aria-expanded'],
69
+ ariaHaspopup = _ref['aria-haspopup'],
70
+ _ref$buttonProps = _ref.buttonProps,
71
+ buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
72
+ isActive = _ref.isActive;
73
73
  var onClickHander = useCallback(function (event, analyticsEvent) {
74
74
  if (buttonProps.onClick) {
75
75
  buttonProps.onClick(event);
76
76
  }
77
-
78
77
  onClick(event, analyticsEvent);
79
- }, // eslint-disable-next-line react-hooks/exhaustive-deps
78
+ },
79
+ // eslint-disable-next-line react-hooks/exhaustive-deps
80
80
  [buttonProps.onClick, onClick]);
81
81
  return jsx(Avatar, {
82
82
  appearance: appearance,
@@ -86,10 +86,9 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
86
86
  onClick: onClickHander
87
87
  }, function (_ref2) {
88
88
  var _ = _ref2.testId,
89
- className = _ref2.className,
90
- ref = _ref2.ref,
91
- props = _objectWithoutProperties(_ref2, _excluded);
92
-
89
+ className = _ref2.className,
90
+ ref = _ref2.ref,
91
+ props = _objectWithoutProperties(_ref2, _excluded);
93
92
  return jsx("button", _extends({
94
93
  type: "submit"
95
94
  }, buttonProps, props, {
@@ -106,6 +105,7 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
106
105
  }), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count);
107
106
  });
108
107
  });
109
- MoreIndicator.displayName = 'MoreIndicator'; // eslint-disable-next-line @repo/internal/react/require-jsdoc
108
+ MoreIndicator.displayName = 'MoreIndicator';
110
109
 
110
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
111
111
  export default MoreIndicator;
@@ -6,24 +6,20 @@ import { gridSize } from '@atlaskit/theme/constants';
6
6
  var gutter = BORDER_WIDTH * 2 + gridSize() / 2;
7
7
  var listStyles = css({
8
8
  display: 'flex',
9
- // TODO Delete this comment after verifying spacing token -> previous value `0`
10
- margin: "var(--ds-scale-0, 0px)",
9
+ margin: "var(--ds-space-0, 0px)",
11
10
  marginRight: gutter,
12
- // TODO Delete this comment after verifying spacing token -> previous value `0`
13
- padding: "var(--ds-scale-0, 0px)",
11
+ padding: "var(--ds-space-0, 0px)",
14
12
  lineHeight: 1,
15
13
  listStyleType: 'none !important'
16
14
  });
17
15
  var listItemStyles = css({
18
- // TODO Delete this comment after verifying spacing token -> previous value `0`
19
- margin: "var(--ds-scale-0, 0px)",
16
+ margin: "var(--ds-space-0, 0px)",
20
17
  marginRight: -gutter
21
18
  });
22
-
23
19
  var Stack = function Stack(_ref) {
24
20
  var children = _ref.children,
25
- testId = _ref.testId,
26
- label = _ref['aria-label'];
21
+ testId = _ref.testId,
22
+ label = _ref['aria-label'];
27
23
  return jsx("ul", {
28
24
  "data-testid": testId,
29
25
  "aria-label": label,
@@ -33,7 +29,7 @@ var Stack = function Stack(_ref) {
33
29
  css: listItemStyles
34
30
  }, child);
35
31
  }));
36
- }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
37
-
32
+ };
38
33
 
34
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
39
35
  export default Stack;
@@ -2,6 +2,5 @@ export var composeUniqueKey = function composeUniqueKey(props, index) {
2
2
  if (props.key) {
3
3
  return props.key;
4
4
  }
5
-
6
5
  return index;
7
6
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.2.0",
3
+ "version": "9.2.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/avatar-group",
3
- "version": "9.2.0",
3
+ "version": "9.2.2",
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/"