@atlaskit/avatar-group 10.1.4 → 11.0.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/components/avatar-group.js +14 -16
  3. package/dist/cjs/components/grid.compiled.css +13 -0
  4. package/dist/cjs/components/grid.js +14 -31
  5. package/dist/cjs/components/internal/components/popup-avatar-group.js +5 -7
  6. package/dist/cjs/components/more-indicator.compiled.css +15 -0
  7. package/dist/cjs/components/more-indicator.js +46 -70
  8. package/dist/cjs/components/stack.compiled.css +8 -0
  9. package/dist/cjs/components/stack.js +14 -33
  10. package/dist/es2019/components/avatar-group.js +10 -16
  11. package/dist/es2019/components/grid.compiled.css +13 -0
  12. package/dist/es2019/components/grid.js +10 -29
  13. package/dist/es2019/components/internal/components/popup-avatar-group.js +2 -7
  14. package/dist/es2019/components/more-indicator.compiled.css +15 -0
  15. package/dist/es2019/components/more-indicator.js +17 -52
  16. package/dist/es2019/components/stack.compiled.css +8 -0
  17. package/dist/es2019/components/stack.js +10 -30
  18. package/dist/esm/components/avatar-group.js +10 -16
  19. package/dist/esm/components/grid.compiled.css +13 -0
  20. package/dist/esm/components/grid.js +10 -29
  21. package/dist/esm/components/internal/components/popup-avatar-group.js +2 -7
  22. package/dist/esm/components/more-indicator.compiled.css +15 -0
  23. package/dist/esm/components/more-indicator.js +44 -68
  24. package/dist/esm/components/stack.compiled.css +8 -0
  25. package/dist/esm/components/stack.js +10 -30
  26. package/dist/types/components/avatar-group.d.ts +2 -7
  27. package/dist/types/components/internal/components/popup-avatar-group.d.ts +2 -2
  28. package/dist/types-ts4.5/components/avatar-group.d.ts +2 -7
  29. package/dist/types-ts4.5/components/internal/components/popup-avatar-group.d.ts +2 -2
  30. package/package.json +12 -4
  31. package/__perf__/default.tsx +0 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @atlaskit/avatar-group
2
2
 
3
+ ## 11.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#104933](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104933)
8
+ [`8a592509504c7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8a592509504c7) -
9
+ Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
10
+ the rest of the Atlaskit techstack, and support React 18 Streaming SSR.
11
+
12
+ Please note, in order to use this version of `@atlaskit/avatar-group`, you will need to ensure
13
+ that your bundler is configured to handle `.css` imports correctly. Most bundlers come with
14
+ built-in support for `.css` imports, so you may not need to do anything. If you are using a
15
+ different bundler, please refer to the documentation for that bundler to understand how to handle
16
+ `.css` imports.
17
+
18
+ For more information on the migration, please refer to
19
+ [RFC-73 Migrating our components to Compiled CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953).
20
+
21
+ ## 10.1.5
22
+
23
+ ### Patch Changes
24
+
25
+ - [#104081](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104081)
26
+ [`9e80fcb611337`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9e80fcb611337) -
27
+ Update dev dependencies.
28
+
3
29
  ## 10.1.4
4
30
 
5
31
  ### Patch Changes
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
@@ -9,8 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
9
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
- var _react = require("react");
13
- var _react2 = require("@emotion/react");
13
+ var _react = _interopRequireWildcard(require("react"));
14
14
  var _bindEventListener = require("bind-event-listener");
15
15
  var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
16
16
  var _keycodes = require("@atlaskit/ds-lib/keycodes");
@@ -18,7 +18,6 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
18
18
  var _useFocusEvent = _interopRequireDefault(require("@atlaskit/ds-lib/use-focus-event"));
19
19
  var _menu = require("@atlaskit/menu");
20
20
  var _popup = _interopRequireDefault(require("@atlaskit/popup"));
21
- var _constants = require("@atlaskit/theme/constants");
22
21
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
23
22
  var _avatarGroupItem = _interopRequireDefault(require("./avatar-group-item"));
24
23
  var _grid = _interopRequireDefault(require("./grid"));
@@ -28,11 +27,10 @@ var _moreIndicator = _interopRequireDefault(require("./more-indicator"));
28
27
  var _stack = _interopRequireDefault(require("./stack"));
29
28
  var _utils = require("./utils");
30
29
  var _excluded = ["aria-controls", "aria-expanded", "aria-haspopup", "onClick"];
30
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
31
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
31
32
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
32
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
33
- * @jsxRuntime classic
34
- * @jsx jsx
35
- */
33
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
36
34
  var MAX_COUNT = {
37
35
  grid: 11,
38
36
  stack: 5
@@ -41,21 +39,21 @@ function getOverrides(overrides) {
41
39
  return {
42
40
  AvatarGroupItem: _objectSpread({
43
41
  render: function render(Component, props, index) {
44
- return (0, _react2.jsx)(Component, (0, _extends2.default)({}, props, {
42
+ return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, props, {
45
43
  key: (0, _utils.composeUniqueKey)(props.avatar, index)
46
44
  }));
47
45
  }
48
46
  }, overrides && overrides.AvatarGroupItem),
49
47
  Avatar: _objectSpread({
50
48
  render: function render(Component, props, index) {
51
- return (0, _react2.jsx)(Component, (0, _extends2.default)({}, props, {
49
+ return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, props, {
52
50
  key: (0, _utils.composeUniqueKey)(props, index)
53
51
  }));
54
52
  }
55
53
  }, overrides && overrides.Avatar),
56
54
  MoreIndicator: _objectSpread({
57
55
  render: function render(Component, props) {
58
- return (0, _react2.jsx)(Component, props);
56
+ return /*#__PURE__*/_react.default.createElement(Component, props);
59
57
  }
60
58
  }, overrides && overrides.MoreIndicator)
61
59
  };
@@ -203,25 +201,25 @@ var AvatarGroup = function AvatarGroup(_ref) {
203
201
  }
204
202
  return boundariesElement === 'window' ? 'document' : 'viewport';
205
203
  }();
206
- return (0, _react2.jsx)(_popup.default, {
204
+ return /*#__PURE__*/_react.default.createElement(_popup.default, {
207
205
  isOpen: isOpen,
208
206
  onClose: onClose,
209
207
  placement: "bottom-end",
210
208
  boundary: boundary,
211
209
  rootBoundary: rootBoundary,
212
210
  shouldFlip: true,
213
- zIndex: _constants.layers.modal(),
211
+ zIndex: 510,
214
212
  shouldRenderToParent: shouldPopupRenderToParent,
215
213
  content: function content(_ref4) {
216
214
  var setInitialFocusRef = _ref4.setInitialFocusRef;
217
- return (0, _react2.jsx)(_focusManager.default, null, (0, _react2.jsx)(_popupAvatarGroup.default, {
215
+ return /*#__PURE__*/_react.default.createElement(_focusManager.default, null, /*#__PURE__*/_react.default.createElement(_popupAvatarGroup.default, {
218
216
  onClick: function onClick(e) {
219
217
  return e.stopPropagation();
220
218
  },
221
219
  minWidth: 250,
222
220
  maxHeight: 300,
223
221
  setInitialFocusRef: isTriggeredUsingKeyboard ? setInitialFocusRef : undefined
224
- }, (0, _react2.jsx)(_menu.Section, null, data.slice(max).map(function (avatar, index) {
222
+ }, /*#__PURE__*/_react.default.createElement(_menu.Section, null, data.slice(max).map(function (avatar, index) {
225
223
  return getOverrides(overrides).AvatarGroupItem.render(_avatarGroupItem.default, {
226
224
  avatar: avatar,
227
225
  onAvatarClick: onAvatarClick,
@@ -245,7 +243,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
245
243
  var total = data.length;
246
244
  var maxAvatar = total > max ? max - 1 : max;
247
245
  var Group = appearance === 'stack' ? _stack.default : _grid.default;
248
- return (0, _react2.jsx)(Group, {
246
+ return /*#__PURE__*/_react.default.createElement(Group, {
249
247
  testId: testId && "".concat(testId, "--avatar-group"),
250
248
  "aria-label": label
251
249
  }, data.slice(0, maxAvatar).map(function (avatarData, idx) {
@@ -259,7 +257,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
259
257
  } : undefined,
260
258
  stackIndex: max - idx
261
259
  }), idx);
262
- return !isTooltipDisabled && !avatarData.isDisabled ? (0, _react2.jsx)(_tooltip.default, {
260
+ return !isTooltipDisabled && !avatarData.isDisabled ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
263
261
  key: (0, _utils.composeUniqueKey)(avatarData, idx),
264
262
  content: avatarData.name,
265
263
  testId: testId && "".concat(testId, "--tooltip-").concat(idx),
@@ -0,0 +1,13 @@
1
+
2
+ ._18s8ze3t{margin:var(--ds-space-0,0)}
3
+ ._1yt4ze3t{padding:var(--ds-space-0,0)}._12l2r5cr{margin-inline-end:var(--ds-space-negative-050,-4px)}
4
+ ._19121cl4{isolation:isolate}
5
+ ._1bah1y6m{justify-content:flex-start}
6
+ ._1e0c1txw{display:flex}
7
+ ._1n261g80{flex-wrap:wrap}
8
+ ._2mzuagmp{list-style-type:none!important}
9
+ ._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
10
+ ._ahbqr5cr{margin-inline-start:var(--ds-space-negative-050,-4px)}
11
+ ._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
12
+ ._vwz4kb7n{line-height:1}
13
+ ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
@@ -1,48 +1,31 @@
1
+ /* grid.tsx generated by @compiled/babel-plugin v0.35.0 */
1
2
  "use strict";
2
3
 
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.default = void 0;
7
- var _react = require("react");
8
- var _react2 = require("@emotion/react");
9
- /**
10
- * @jsxRuntime classic
11
- * @jsx jsx
12
- */
13
-
9
+ require("./grid.compiled.css");
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var React = _react;
12
+ var _runtime = require("@compiled/react/runtime");
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
15
  var gutter = "var(--ds-space-negative-050, -4px)";
15
- var listStyles = (0, _react2.css)({
16
- display: 'flex',
17
- margin: "var(--ds-space-0, 0px)",
18
- padding: "var(--ds-space-0, 0px)",
19
- justifyContent: 'flex-start',
20
- flexWrap: 'wrap',
21
- isolation: 'isolate',
22
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
23
- lineHeight: 1,
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
25
- listStyleType: 'none !important',
26
- marginInlineEnd: gutter,
27
- marginInlineStart: gutter
28
- });
29
- var listItemStyles = (0, _react2.css)({
30
- margin: "var(--ds-space-0, 0px)",
31
- marginBlockEnd: "var(--ds-space-100, 8px)",
32
- paddingInlineEnd: "var(--ds-space-050, 4px)",
33
- paddingInlineStart: "var(--ds-space-050, 4px)"
34
- });
16
+ var listStyles = null;
17
+ var listItemStyles = null;
35
18
  var Grid = function Grid(_ref) {
36
19
  var children = _ref.children,
37
20
  testId = _ref.testId,
38
21
  label = _ref['aria-label'];
39
- return (0, _react2.jsx)("ul", {
22
+ return /*#__PURE__*/React.createElement("ul", {
40
23
  "data-testid": testId,
41
24
  "aria-label": label,
42
- css: listStyles
25
+ className: (0, _runtime.ax)(["_18s8ze3t _1yt4ze3t _1e0c1txw _1bah1y6m _1n261g80 _19121cl4 _vwz4kb7n _2mzuagmp _12l2r5cr _ahbqr5cr"])
43
26
  }, _react.Children.map(children, function (child) {
44
- return child && (0, _react2.jsx)("li", {
45
- css: listItemStyles
27
+ return child && /*#__PURE__*/React.createElement("li", {
28
+ className: (0, _runtime.ax)(["_18s8ze3t _6rthu2gc _y4ti1b66 _bozg1b66"])
46
29
  }, child);
47
30
  }));
48
31
  };
@@ -1,21 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = require("react");
11
- var _react2 = require("@emotion/react");
11
+ var _react = _interopRequireWildcard(require("react"));
12
12
  var _menu = require("@atlaskit/menu");
13
13
  var _focusManager = require("./focus-manager");
14
14
  var _excluded = ["children", "isLoading", "maxHeight", "maxWidth", "minHeight", "minWidth", "onClick", "role", "setInitialFocusRef", "spacing", "testId"];
15
- /**
16
- * @jsxRuntime classic
17
- * @jsx jsx
18
- */
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
17
  /**
20
18
  * It sets focus to the first avatar when popup is open.
21
19
  */
@@ -39,7 +37,7 @@ var PopupAvatarGroup = function PopupAvatarGroup(_ref) {
39
37
  (0, _react.useEffect)(function () {
40
38
  setInitialFocusRef === null || setInitialFocusRef === void 0 || setInitialFocusRef(menuItemRefs[0]);
41
39
  }, [menuItemRefs, setInitialFocusRef]);
42
- return (0, _react2.jsx)(_menu.MenuGroup, (0, _extends2.default)({
40
+ return /*#__PURE__*/_react.default.createElement(_menu.MenuGroup, (0, _extends2.default)({
43
41
  isLoading: isLoading,
44
42
  maxHeight: maxHeight,
45
43
  maxWidth: maxWidth,
@@ -0,0 +1,15 @@
1
+
2
+ ._16hg1kxl._16hg1kxl{background-color:var(--_rryx0a)}
3
+ ._16hglslw._16hglslw{background-color:var(--_1jkcdu5)}
4
+ ._1g4l1np6._1g4l1np6{transform:scale(.9)}
5
+ ._1w901hoq._1w901hoq{color:var(--_h5fhc4)}
6
+ ._1w90ln51._1w90ln51{color:var(--_1hfkvbo)}
7
+ ._c6d7glyw._c6d7glyw:after{display:none}
8
+ ._so1ehi7p._so1ehi7p{box-shadow:var(--_1t841jg)}
9
+ ._1fh11hoq._1fh11hoq:hover{color:var(--_h5fhc4)}
10
+ ._1fh13htb._1fh13htb:hover{color:var(--_ph2vs)}
11
+ ._u1mbaek3._u1mbaek3:hover{background-color:var(--_hz7h6s)}
12
+ ._u1mbg85j._u1mbg85j:hover{background-color:var(--_rkvepi)}._10fu1kgi._10fu1kgi:active{background-color:var(--_1axggjc)}
13
+ ._10fu1smf._10fu1smf:active{background-color:var(--_ohg1x3)}
14
+ ._1l5a17km._1l5a17km:active{color:var(--_1lrmnoy)}
15
+ ._1l5aln51._1l5aln51:active{color:var(--_1hfkvbo)}
@@ -1,3 +1,4 @@
1
+ /* more-indicator.tsx generated by @compiled/babel-plugin v0.35.0 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -6,20 +7,24 @@ Object.defineProperty(exports, "__esModule", {
6
7
  value: true
7
8
  });
8
9
  exports.default = void 0;
10
+ require("./more-indicator.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
9
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
15
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _react = require("react");
12
- var _react2 = require("@emotion/react");
13
- var _avatar = _interopRequireWildcard(require("@atlaskit/avatar"));
16
+ var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
14
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
- var _colors = require("@atlaskit/theme/colors");
16
18
  var _excluded = ["testId", "className", "ref"];
17
- /**
18
- * @jsxRuntime classic
19
- * @jsx jsx
20
- */
21
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ var B300 = '#0065FF';
22
+ var B400 = '#0052CC';
23
+ var B50 = '#DEEBFF';
24
+ var N0 = '#FFFFFF';
25
+ var N20 = '#F4F5F7';
26
+ var N30 = '#EBECF0';
27
+ var N500 = '#42526E';
23
28
  var buttonSizes = {
24
29
  small: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
25
30
  medium: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
@@ -27,50 +32,14 @@ var buttonSizes = {
27
32
  xlarge: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
28
33
  xxlarge: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
29
34
  };
30
- var buttonActiveStyles = (0, _react2.css)({
31
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
32
- '&&': {
33
- backgroundColor: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
35
- boxShadow: "0 0 0 ".concat(_avatar.BORDER_WIDTH, "px ", "var(--ds-border-selected, ".concat(_colors.B300, ")")),
36
- color: "var(--ds-text-selected, ".concat(_colors.B400, ")"),
37
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
- transform: "scale(".concat(_avatar.ACTIVE_SCALE_FACTOR, ")"),
39
- '&:hover': {
40
- backgroundColor: "var(--ds-background-selected-hovered, ".concat(_colors.N30, ")"),
41
- color: "var(--ds-text-selected, ".concat(_colors.N500, ")")
42
- },
43
- '&:active': {
44
- backgroundColor: "var(--ds-background-selected-pressed, ".concat(_colors.B50, ")"),
45
- color: "var(--ds-text-selected, ".concat(_colors.B400, ")")
46
- }
47
- }
48
- });
49
- var buttonStyles = (0, _react2.css)({
50
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
51
- '&&': {
52
- backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
53
- color: "var(--ds-text, ".concat(_colors.N500, ")"),
54
- '&:hover': {
55
- backgroundColor: "var(--ds-background-neutral-hovered, ".concat(_colors.N30, ")"),
56
- color: "var(--ds-text, ".concat(_colors.N500, ")")
57
- },
58
- '&:active': {
59
- backgroundColor: "var(--ds-background-neutral-pressed, ".concat(_colors.B50, ")"),
60
- color: "var(--ds-text, ".concat(_colors.B400, ")")
61
- },
62
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
63
- '&::after': {
64
- display: 'none'
65
- }
66
- }
67
- });
35
+ var buttonActiveStyles = null;
36
+ var buttonStyles = null;
68
37
  var MAX_DISPLAY_COUNT = 99;
69
38
  var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
70
39
  var _ref$appearance = _ref.appearance,
71
40
  appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
72
41
  _ref$borderColor = _ref.borderColor,
73
- borderColor = _ref$borderColor === void 0 ? (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(_colors.N0, ")") : _ref$borderColor,
42
+ borderColor = _ref$borderColor === void 0 ? (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(N0, ")") : _ref$borderColor,
74
43
  _ref$size = _ref.size,
75
44
  size = _ref$size === void 0 ? 'medium' : _ref$size,
76
45
  _ref$count = _ref.count,
@@ -91,7 +60,7 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
91
60
  },
92
61
  // eslint-disable-next-line react-hooks/exhaustive-deps
93
62
  [buttonProps.onClick, onClick]);
94
- return (0, _react2.jsx)(_avatar.default, {
63
+ return /*#__PURE__*/React.createElement(_avatar.default, {
95
64
  appearance: appearance,
96
65
  size: size,
97
66
  borderColor: borderColor,
@@ -102,28 +71,35 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
102
71
  className = _ref2.className,
103
72
  ref = _ref2.ref,
104
73
  props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
105
- return (
106
- // eslint-disable-next-line @atlaskit/design-system/no-html-button
107
- (0, _react2.jsx)("button", (0, _extends2.default)({
108
- type: "submit"
109
- }, buttonProps, props, {
110
- ref: ref,
111
- "data-testid": testId,
112
- "aria-controls": ariaControls,
113
- "aria-expanded": ariaExpanded,
114
- "aria-haspopup": ariaHaspopup
115
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
116
- ,
117
- style: {
118
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
119
- font: buttonSizes[size]
120
- },
121
- css: [buttonStyles, isActive && buttonActiveStyles]
122
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
123
- ,
124
- className: className
125
- }), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count)
126
- );
74
+ return /*#__PURE__*/React.createElement("button", (0, _extends2.default)({
75
+ type: "submit"
76
+ }, buttonProps, props, {
77
+ ref: ref,
78
+ "data-testid": testId,
79
+ "aria-controls": ariaControls,
80
+ "aria-expanded": ariaExpanded,
81
+ "aria-haspopup": ariaHaspopup
82
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
83
+ ,
84
+
85
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
86
+ className: (0, _runtime.ax)(["_16hglslw _1w901hoq _u1mbaek3 _1fh11hoq _10fu1kgi _1l5a17km _c6d7glyw", isActive && "_16hg1kxl _so1ehi7p _1w90ln51 _1g4l1np6 _u1mbg85j _1fh13htb _10fu1smf _1l5aln51", className]),
87
+ style: {
88
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
89
+ font: buttonSizes[size],
90
+ "--_1jkcdu5": (0, _runtime.ix)("var(--ds-background-neutral, ".concat(N20, ")")),
91
+ "--_h5fhc4": (0, _runtime.ix)("var(--ds-text, ".concat(N500, ")")),
92
+ "--_hz7h6s": (0, _runtime.ix)("var(--ds-background-neutral-hovered, ".concat(N30, ")")),
93
+ "--_1axggjc": (0, _runtime.ix)("var(--ds-background-neutral-pressed, ".concat(B50, ")")),
94
+ "--_1lrmnoy": (0, _runtime.ix)("var(--ds-text, ".concat(B400, ")")),
95
+ "--_rryx0a": (0, _runtime.ix)("var(--ds-background-selected, ".concat(B50, ")")),
96
+ "--_1t841jg": (0, _runtime.ix)("0 0 0 2px ".concat("var(--ds-border-selected, ".concat(B300, ")"))),
97
+ "--_1hfkvbo": (0, _runtime.ix)("var(--ds-text-selected, ".concat(B400, ")")),
98
+ "--_rkvepi": (0, _runtime.ix)("var(--ds-background-selected-hovered, ".concat(N30, ")")),
99
+ "--_ph2vs": (0, _runtime.ix)("var(--ds-text-selected, ".concat(N500, ")")),
100
+ "--_ohg1x3": (0, _runtime.ix)("var(--ds-background-selected-pressed, ".concat(B50, ")"))
101
+ }
102
+ }), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count);
127
103
  });
128
104
  });
129
105
  MoreIndicator.displayName = 'MoreIndicator';
@@ -0,0 +1,8 @@
1
+
2
+ ._18s8ze3t{margin:var(--ds-space-0,0)}
3
+ ._1yt4ze3t{padding:var(--ds-space-0,0)}._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
4
+ ._12l2x0bf{margin-inline-end:var(--ds-space-negative-100,-8px)}
5
+ ._19121cl4{isolation:isolate}
6
+ ._1e0c1txw{display:flex}
7
+ ._2mzuagmp{list-style-type:none!important}
8
+ ._vwz4kb7n{line-height:1}
@@ -1,49 +1,30 @@
1
+ /* stack.tsx generated by @compiled/babel-plugin v0.35.0 */
1
2
  "use strict";
2
3
 
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.default = void 0;
7
- var _react = require("react");
8
- var _react2 = require("@emotion/react");
9
- var _avatar = require("@atlaskit/avatar");
10
- var _constants = require("@atlaskit/theme/constants");
11
- /**
12
- * @jsxRuntime classic
13
- * @jsx jsx
14
- */
15
-
16
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
17
-
18
- var gutter = _avatar.BORDER_WIDTH * 2 + (0, _constants.gridSize)() / 2;
19
- var listStyles = (0, _react2.css)({
20
- display: 'flex',
21
- margin: "var(--ds-space-0, 0px)",
22
- padding: "var(--ds-space-0, 0px)",
23
- isolation: 'isolate',
24
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
25
- lineHeight: 1,
26
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
27
- listStyleType: 'none !important',
28
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
29
- marginInlineEnd: gutter
30
- });
31
- var listItemStyles = (0, _react2.css)({
32
- margin: "var(--ds-space-0, 0px)",
33
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
34
- marginInlineEnd: -gutter
35
- });
9
+ require("./stack.compiled.css");
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var React = _react;
12
+ var _runtime = require("@compiled/react/runtime");
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ var listStyles = null;
16
+ var listItemStyles = null;
36
17
  var Stack = function Stack(_ref) {
37
18
  var children = _ref.children,
38
19
  testId = _ref.testId,
39
20
  label = _ref['aria-label'];
40
- return (0, _react2.jsx)("ul", {
21
+ return /*#__PURE__*/React.createElement("ul", {
41
22
  "data-testid": testId,
42
23
  "aria-label": label,
43
- css: listStyles
24
+ className: (0, _runtime.ax)(["_18s8ze3t _1yt4ze3t _1e0c1txw _19121cl4 _vwz4kb7n _2mzuagmp _12l2u2gc"])
44
25
  }, _react.Children.map(children, function (child) {
45
- return child && (0, _react2.jsx)("li", {
46
- css: listItemStyles
26
+ return child && /*#__PURE__*/React.createElement("li", {
27
+ className: (0, _runtime.ax)(["_18s8ze3t _12l2x0bf"])
47
28
  }, child);
48
29
  }));
49
30
  };
@@ -1,10 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
- import { useCallback, useEffect, useState } from 'react';
7
- import { jsx } from '@emotion/react';
2
+ import React, { useCallback, useEffect, useState } from 'react';
8
3
  import { bind } from 'bind-event-listener';
9
4
  import Avatar from '@atlaskit/avatar';
10
5
  import { KEY_DOWN } from '@atlaskit/ds-lib/keycodes';
@@ -12,7 +7,6 @@ import noop from '@atlaskit/ds-lib/noop';
12
7
  import useFocus from '@atlaskit/ds-lib/use-focus-event';
13
8
  import { Section } from '@atlaskit/menu';
14
9
  import Popup from '@atlaskit/popup';
15
- import { layers } from '@atlaskit/theme/constants';
16
10
  import Tooltip from '@atlaskit/tooltip';
17
11
  import AvatarGroupItem from './avatar-group-item';
18
12
  import Grid from './grid';
@@ -28,19 +22,19 @@ const MAX_COUNT = {
28
22
  function getOverrides(overrides) {
29
23
  return {
30
24
  AvatarGroupItem: {
31
- render: (Component, props, index) => jsx(Component, _extends({}, props, {
25
+ render: (Component, props, index) => /*#__PURE__*/React.createElement(Component, _extends({}, props, {
32
26
  key: composeUniqueKey(props.avatar, index)
33
27
  })),
34
28
  ...(overrides && overrides.AvatarGroupItem)
35
29
  },
36
30
  Avatar: {
37
- render: (Component, props, index) => jsx(Component, _extends({}, props, {
31
+ render: (Component, props, index) => /*#__PURE__*/React.createElement(Component, _extends({}, props, {
38
32
  key: composeUniqueKey(props, index)
39
33
  })),
40
34
  ...(overrides && overrides.Avatar)
41
35
  },
42
36
  MoreIndicator: {
43
- render: (Component, props) => jsx(Component, props),
37
+ render: (Component, props) => /*#__PURE__*/React.createElement(Component, props),
44
38
  ...(overrides && overrides.MoreIndicator)
45
39
  }
46
40
  };
@@ -174,23 +168,23 @@ const AvatarGroup = ({
174
168
  }
175
169
  return boundariesElement === 'window' ? 'document' : 'viewport';
176
170
  })();
177
- return jsx(Popup, {
171
+ return /*#__PURE__*/React.createElement(Popup, {
178
172
  isOpen: isOpen,
179
173
  onClose: onClose,
180
174
  placement: "bottom-end",
181
175
  boundary: boundary,
182
176
  rootBoundary: rootBoundary,
183
177
  shouldFlip: true,
184
- zIndex: layers.modal(),
178
+ zIndex: 510,
185
179
  shouldRenderToParent: shouldPopupRenderToParent,
186
180
  content: ({
187
181
  setInitialFocusRef
188
- }) => jsx(FocusManager, null, jsx(PopupAvatarGroup, {
182
+ }) => /*#__PURE__*/React.createElement(FocusManager, null, /*#__PURE__*/React.createElement(PopupAvatarGroup, {
189
183
  onClick: e => e.stopPropagation(),
190
184
  minWidth: 250,
191
185
  maxHeight: 300,
192
186
  setInitialFocusRef: isTriggeredUsingKeyboard ? setInitialFocusRef : undefined
193
- }, jsx(Section, null, data.slice(max).map((avatar, index) => getOverrides(overrides).AvatarGroupItem.render(AvatarGroupItem, {
187
+ }, /*#__PURE__*/React.createElement(Section, null, data.slice(max).map((avatar, index) => getOverrides(overrides).AvatarGroupItem.render(AvatarGroupItem, {
194
188
  avatar,
195
189
  onAvatarClick,
196
190
  testId: testId && `${testId}--avatar-group-item-${index + max}`,
@@ -211,7 +205,7 @@ const AvatarGroup = ({
211
205
  const total = data.length;
212
206
  const maxAvatar = total > max ? max - 1 : max;
213
207
  const Group = appearance === 'stack' ? Stack : Grid;
214
- return jsx(Group, {
208
+ return /*#__PURE__*/React.createElement(Group, {
215
209
  testId: testId && `${testId}--avatar-group`,
216
210
  "aria-label": label
217
211
  }, data.slice(0, maxAvatar).map((avatarData, idx) => {
@@ -226,7 +220,7 @@ const AvatarGroup = ({
226
220
  } : undefined,
227
221
  stackIndex: max - idx
228
222
  }, idx);
229
- return !isTooltipDisabled && !avatarData.isDisabled ? jsx(Tooltip, {
223
+ return !isTooltipDisabled && !avatarData.isDisabled ? /*#__PURE__*/React.createElement(Tooltip, {
230
224
  key: composeUniqueKey(avatarData, idx),
231
225
  content: avatarData.name,
232
226
  testId: testId && `${testId}--tooltip-${idx}`,
@@ -0,0 +1,13 @@
1
+
2
+ ._18s8ze3t{margin:var(--ds-space-0,0)}
3
+ ._1yt4ze3t{padding:var(--ds-space-0,0)}._12l2r5cr{margin-inline-end:var(--ds-space-negative-050,-4px)}
4
+ ._19121cl4{isolation:isolate}
5
+ ._1bah1y6m{justify-content:flex-start}
6
+ ._1e0c1txw{display:flex}
7
+ ._1n261g80{flex-wrap:wrap}
8
+ ._2mzuagmp{list-style-type:none!important}
9
+ ._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
10
+ ._ahbqr5cr{margin-inline-start:var(--ds-space-negative-050,-4px)}
11
+ ._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
12
+ ._vwz4kb7n{line-height:1}
13
+ ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}