@atlaskit/avatar-group 9.7.0 → 9.9.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 +22 -0
- package/dist/cjs/components/avatar-group.js +1 -1
- package/dist/cjs/components/grid.js +2 -0
- package/dist/cjs/components/internal/components/popup-avatar-group.js +1 -0
- package/dist/cjs/components/more-indicator.js +32 -35
- package/dist/cjs/components/stack.js +2 -0
- package/dist/es2019/components/avatar-group.js +2 -0
- package/dist/es2019/components/grid.js +2 -0
- package/dist/es2019/components/internal/components/popup-avatar-group.js +2 -0
- package/dist/es2019/components/more-indicator.js +16 -19
- package/dist/es2019/components/stack.js +2 -0
- package/dist/esm/components/avatar-group.js +2 -0
- package/dist/esm/components/grid.js +2 -0
- package/dist/esm/components/internal/components/popup-avatar-group.js +2 -0
- package/dist/esm/components/more-indicator.js +33 -35
- package/dist/esm/components/stack.js +2 -0
- package/package.json +15 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/avatar-group
|
|
2
2
|
|
|
3
|
+
## 9.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#116644](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116644)
|
|
8
|
+
[`40234970169dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40234970169dc) -
|
|
9
|
+
[ux] DSP-19190 We are testing a new visual appearance behind a feature flag. If successful it will
|
|
10
|
+
be released at a later date.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 9.8.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#113372](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113372)
|
|
21
|
+
[`4b4faf5caa25a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4b4faf5caa25a) -
|
|
22
|
+
[ux] The font size and font weight of avatar group more button is brought in line with design
|
|
23
|
+
system guidelines.
|
|
24
|
+
|
|
3
25
|
## 9.7.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -29,7 +29,7 @@ var _utils = require("./utils");
|
|
|
29
29
|
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; }
|
|
30
30
|
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; } /**
|
|
31
31
|
* @jsxRuntime classic
|
|
32
|
-
*/ /** @jsx jsx */
|
|
32
|
+
*/ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
33
33
|
var MAX_COUNT = {
|
|
34
34
|
grid: 11,
|
|
35
35
|
stack: 5
|
|
@@ -11,6 +11,8 @@ var _react2 = require("@emotion/react");
|
|
|
11
11
|
*/
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
+
|
|
14
16
|
var gutter = "var(--ds-space-negative-050, -4px)";
|
|
15
17
|
var listStyles = (0, _react2.css)({
|
|
16
18
|
display: 'flex',
|
|
@@ -16,6 +16,7 @@ var _excluded = ["maxWidth", "minWidth", "setInitialFocusRef"];
|
|
|
16
16
|
* @jsxRuntime classic
|
|
17
17
|
*/
|
|
18
18
|
/** @jsx jsx */
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
20
|
/**
|
|
20
21
|
* It sets focus to the first avatar when popup is open.
|
|
21
22
|
*/
|
|
@@ -11,26 +11,23 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _avatar = _interopRequireWildcard(require("@atlaskit/avatar"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
16
|
var _excluded = ["testId", "className", "ref"];
|
|
16
17
|
/**
|
|
17
18
|
* @jsxRuntime classic
|
|
18
19
|
*/
|
|
19
20
|
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
22
|
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); }
|
|
21
23
|
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 && Object.prototype.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; }
|
|
22
|
-
var
|
|
23
|
-
xsmall:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
large: '0.75rem',
|
|
30
|
-
// 12px
|
|
31
|
-
xlarge: '1rem',
|
|
32
|
-
// 16px
|
|
33
|
-
xxlarge: '1rem' // 16px
|
|
24
|
+
var buttonSizes = {
|
|
25
|
+
xsmall: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
26
|
+
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)",
|
|
27
|
+
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)",
|
|
28
|
+
large: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
29
|
+
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)",
|
|
30
|
+
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)"
|
|
34
31
|
};
|
|
35
32
|
var buttonActiveStyles = (0, _react2.css)({
|
|
36
33
|
// 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
|
|
@@ -56,9 +53,6 @@ var buttonStyles = (0, _react2.css)({
|
|
|
56
53
|
'&&': {
|
|
57
54
|
backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
|
|
58
55
|
color: "var(--ds-text, ".concat(_colors.N500, ")"),
|
|
59
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
60
|
-
fontFamily: 'inherit',
|
|
61
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
62
56
|
'&:hover': {
|
|
63
57
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(_colors.N30, ")"),
|
|
64
58
|
color: "var(--ds-text, ".concat(_colors.N500, ")")
|
|
@@ -68,7 +62,7 @@ var buttonStyles = (0, _react2.css)({
|
|
|
68
62
|
color: "var(--ds-text, ".concat(_colors.B400, ")")
|
|
69
63
|
},
|
|
70
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
71
|
-
'
|
|
65
|
+
'&::after': {
|
|
72
66
|
display: 'none'
|
|
73
67
|
}
|
|
74
68
|
}
|
|
@@ -78,7 +72,7 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
78
72
|
var _ref$appearance = _ref.appearance,
|
|
79
73
|
appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
|
|
80
74
|
_ref$borderColor = _ref.borderColor,
|
|
81
|
-
borderColor = _ref$borderColor === void 0 ? "var(--ds-border-inverse, ".concat(_colors.N0, ")") : _ref$borderColor,
|
|
75
|
+
borderColor = _ref$borderColor === void 0 ? (0, _platformFeatureFlags.fg)('platform.design-system-team.component-visual-refresh_t8zbo') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(_colors.N0, ")") : _ref$borderColor,
|
|
82
76
|
_ref$size = _ref.size,
|
|
83
77
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
84
78
|
_ref$count = _ref.count,
|
|
@@ -110,24 +104,27 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
110
104
|
className = _ref2.className,
|
|
111
105
|
ref = _ref2.ref,
|
|
112
106
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
113
|
-
return (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
107
|
+
return (
|
|
108
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
109
|
+
(0, _react2.jsx)("button", (0, _extends2.default)({
|
|
110
|
+
type: "submit"
|
|
111
|
+
}, buttonProps, props, {
|
|
112
|
+
ref: ref,
|
|
113
|
+
"data-testid": testId,
|
|
114
|
+
"aria-controls": ariaControls,
|
|
115
|
+
"aria-expanded": ariaExpanded,
|
|
116
|
+
"aria-haspopup": ariaHaspopup
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
118
|
+
,
|
|
119
|
+
style: {
|
|
120
|
+
font: buttonSizes[size]
|
|
121
|
+
},
|
|
122
|
+
css: [buttonStyles, isActive && buttonActiveStyles]
|
|
123
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
124
|
+
,
|
|
125
|
+
className: className
|
|
126
|
+
}), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count)
|
|
127
|
+
);
|
|
131
128
|
});
|
|
132
129
|
});
|
|
133
130
|
MoreIndicator.displayName = 'MoreIndicator';
|
|
@@ -13,6 +13,8 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
13
13
|
*/
|
|
14
14
|
/** @jsx jsx */
|
|
15
15
|
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
+
|
|
16
18
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
17
19
|
|
|
18
20
|
var gutter = _avatar.BORDER_WIDTH * 2 + (0, _constants.gridSize)() / 2;
|
|
@@ -4,6 +4,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
*/
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { useCallback, useEffect, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
9
|
import { jsx } from '@emotion/react';
|
|
8
10
|
import { bind } from 'bind-event-listener';
|
|
9
11
|
import Avatar from '@atlaskit/avatar';
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { Children } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { css, jsx } from '@emotion/react';
|
|
7
9
|
const gutter = "var(--ds-space-negative-050, -4px)";
|
|
8
10
|
const listStyles = css({
|
|
@@ -4,6 +4,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
*/
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { useContext, useEffect } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
9
|
import { jsx } from '@emotion/react';
|
|
8
10
|
import { MenuGroup } from '@atlaskit/menu';
|
|
9
11
|
import { FocusManagerContext } from './focus-manager';
|
|
@@ -4,21 +4,19 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
*/
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { forwardRef, useCallback } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
9
|
import { css, jsx } from '@emotion/react';
|
|
8
10
|
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
12
|
import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
|
|
10
|
-
const
|
|
11
|
-
xsmall:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
large: '0.75rem',
|
|
18
|
-
// 12px
|
|
19
|
-
xlarge: '1rem',
|
|
20
|
-
// 16px
|
|
21
|
-
xxlarge: '1rem' // 16px
|
|
13
|
+
const buttonSizes = {
|
|
14
|
+
xsmall: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
15
|
+
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)",
|
|
16
|
+
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)",
|
|
17
|
+
large: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
18
|
+
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)",
|
|
19
|
+
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)"
|
|
22
20
|
};
|
|
23
21
|
const buttonActiveStyles = css({
|
|
24
22
|
// 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
|
|
@@ -44,9 +42,6 @@ const buttonStyles = css({
|
|
|
44
42
|
'&&': {
|
|
45
43
|
backgroundColor: `var(--ds-background-neutral, ${N20})`,
|
|
46
44
|
color: `var(--ds-text, ${N500})`,
|
|
47
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
48
|
-
fontFamily: 'inherit',
|
|
49
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
50
45
|
'&:hover': {
|
|
51
46
|
backgroundColor: `var(--ds-background-neutral-hovered, ${N30})`,
|
|
52
47
|
color: `var(--ds-text, ${N500})`
|
|
@@ -56,7 +51,7 @@ const buttonStyles = css({
|
|
|
56
51
|
color: `var(--ds-text, ${B400})`
|
|
57
52
|
},
|
|
58
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
59
|
-
'
|
|
54
|
+
'&::after': {
|
|
60
55
|
display: 'none'
|
|
61
56
|
}
|
|
62
57
|
}
|
|
@@ -64,7 +59,7 @@ const buttonStyles = css({
|
|
|
64
59
|
const MAX_DISPLAY_COUNT = 99;
|
|
65
60
|
const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
66
61
|
appearance = 'circle',
|
|
67
|
-
borderColor = `var(--ds-border-inverse, ${N0})`,
|
|
62
|
+
borderColor = fg('platform.design-system-team.component-visual-refresh_t8zbo') ? "var(--ds-surface, #FFFFFF)" : `var(--ds-border-inverse, ${N0})`,
|
|
68
63
|
size = 'medium',
|
|
69
64
|
count = 0,
|
|
70
65
|
testId,
|
|
@@ -94,7 +89,9 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
|
94
89
|
className,
|
|
95
90
|
ref,
|
|
96
91
|
...props
|
|
97
|
-
}) =>
|
|
92
|
+
}) =>
|
|
93
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
94
|
+
jsx("button", _extends({
|
|
98
95
|
type: "submit"
|
|
99
96
|
}, buttonProps, props, {
|
|
100
97
|
ref: ref,
|
|
@@ -105,7 +102,7 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
|
105
102
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
106
103
|
,
|
|
107
104
|
style: {
|
|
108
|
-
|
|
105
|
+
font: buttonSizes[size]
|
|
109
106
|
},
|
|
110
107
|
css: [buttonStyles, isActive && buttonActiveStyles]
|
|
111
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { Children } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import { BORDER_WIDTH } from '@atlaskit/avatar';
|
|
8
10
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
@@ -8,6 +8,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
*/
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
import { useCallback, useEffect, useState } from 'react';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
13
|
import { jsx } from '@emotion/react';
|
|
12
14
|
import { bind } from 'bind-event-listener';
|
|
13
15
|
import Avatar from '@atlaskit/avatar';
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { Children } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { css, jsx } from '@emotion/react';
|
|
7
9
|
var gutter = "var(--ds-space-negative-050, -4px)";
|
|
8
10
|
var listStyles = css({
|
|
@@ -6,6 +6,8 @@ var _excluded = ["maxWidth", "minWidth", "setInitialFocusRef"];
|
|
|
6
6
|
*/
|
|
7
7
|
/** @jsx jsx */
|
|
8
8
|
import { useContext, useEffect } from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
11
|
import { jsx } from '@emotion/react';
|
|
10
12
|
import { MenuGroup } from '@atlaskit/menu';
|
|
11
13
|
import { FocusManagerContext } from './focus-manager';
|
|
@@ -6,21 +6,19 @@ var _excluded = ["testId", "className", "ref"];
|
|
|
6
6
|
*/
|
|
7
7
|
/** @jsx jsx */
|
|
8
8
|
import { forwardRef, useCallback } from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
11
|
import { css, jsx } from '@emotion/react';
|
|
10
12
|
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
14
|
import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
|
|
12
|
-
var
|
|
13
|
-
xsmall:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
large: '0.75rem',
|
|
20
|
-
// 12px
|
|
21
|
-
xlarge: '1rem',
|
|
22
|
-
// 16px
|
|
23
|
-
xxlarge: '1rem' // 16px
|
|
15
|
+
var buttonSizes = {
|
|
16
|
+
xsmall: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
17
|
+
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)",
|
|
18
|
+
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)",
|
|
19
|
+
large: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
20
|
+
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)",
|
|
21
|
+
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)"
|
|
24
22
|
};
|
|
25
23
|
var buttonActiveStyles = css({
|
|
26
24
|
// 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
|
|
@@ -46,9 +44,6 @@ var buttonStyles = css({
|
|
|
46
44
|
'&&': {
|
|
47
45
|
backgroundColor: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
48
46
|
color: "var(--ds-text, ".concat(N500, ")"),
|
|
49
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
50
|
-
fontFamily: 'inherit',
|
|
51
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
52
47
|
'&:hover': {
|
|
53
48
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30, ")"),
|
|
54
49
|
color: "var(--ds-text, ".concat(N500, ")")
|
|
@@ -58,7 +53,7 @@ var buttonStyles = css({
|
|
|
58
53
|
color: "var(--ds-text, ".concat(B400, ")")
|
|
59
54
|
},
|
|
60
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
61
|
-
'
|
|
56
|
+
'&::after': {
|
|
62
57
|
display: 'none'
|
|
63
58
|
}
|
|
64
59
|
}
|
|
@@ -68,7 +63,7 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
68
63
|
var _ref$appearance = _ref.appearance,
|
|
69
64
|
appearance = _ref$appearance === void 0 ? 'circle' : _ref$appearance,
|
|
70
65
|
_ref$borderColor = _ref.borderColor,
|
|
71
|
-
borderColor = _ref$borderColor === void 0 ? "var(--ds-border-inverse, ".concat(N0, ")") : _ref$borderColor,
|
|
66
|
+
borderColor = _ref$borderColor === void 0 ? fg('platform.design-system-team.component-visual-refresh_t8zbo') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-border-inverse, ".concat(N0, ")") : _ref$borderColor,
|
|
72
67
|
_ref$size = _ref.size,
|
|
73
68
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
74
69
|
_ref$count = _ref.count,
|
|
@@ -100,24 +95,27 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
100
95
|
className = _ref2.className,
|
|
101
96
|
ref = _ref2.ref,
|
|
102
97
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
98
|
+
return (
|
|
99
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
100
|
+
jsx("button", _extends({
|
|
101
|
+
type: "submit"
|
|
102
|
+
}, buttonProps, props, {
|
|
103
|
+
ref: ref,
|
|
104
|
+
"data-testid": testId,
|
|
105
|
+
"aria-controls": ariaControls,
|
|
106
|
+
"aria-expanded": ariaExpanded,
|
|
107
|
+
"aria-haspopup": ariaHaspopup
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
109
|
+
,
|
|
110
|
+
style: {
|
|
111
|
+
font: buttonSizes[size]
|
|
112
|
+
},
|
|
113
|
+
css: [buttonStyles, isActive && buttonActiveStyles]
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
115
|
+
,
|
|
116
|
+
className: className
|
|
117
|
+
}), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count)
|
|
118
|
+
);
|
|
121
119
|
});
|
|
122
120
|
});
|
|
123
121
|
MoreIndicator.displayName = 'MoreIndicator';
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { Children } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import { BORDER_WIDTH } from '@atlaskit/avatar';
|
|
8
10
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/avatar-group",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.9.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/"
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
"runReact18": true
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/avatar": "^21.
|
|
30
|
+
"@atlaskit/avatar": "^21.11.0",
|
|
31
31
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
32
|
-
"@atlaskit/menu": "^2.
|
|
33
|
-
"@atlaskit/
|
|
34
|
-
"@atlaskit/
|
|
35
|
-
"@atlaskit/
|
|
36
|
-
"@atlaskit/
|
|
32
|
+
"@atlaskit/menu": "^2.6.0",
|
|
33
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
34
|
+
"@atlaskit/popup": "^1.20.0",
|
|
35
|
+
"@atlaskit/theme": "^12.11.0",
|
|
36
|
+
"@atlaskit/tokens": "^1.53.0",
|
|
37
|
+
"@atlaskit/tooltip": "^18.5.0",
|
|
37
38
|
"@babel/runtime": "^7.0.0",
|
|
38
39
|
"@emotion/react": "^11.7.1",
|
|
39
40
|
"bind-event-listener": "^3.0.0"
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"@af/visual-regression": "*",
|
|
48
49
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
49
50
|
"@atlaskit/ssr": "*",
|
|
50
|
-
"@atlaskit/toggle": "^13.
|
|
51
|
+
"@atlaskit/toggle": "^13.2.0",
|
|
51
52
|
"@atlaskit/visual-regression": "*",
|
|
52
53
|
"@emotion/styled": "^11.0.0",
|
|
53
54
|
"@testing-library/react": "^12.1.5",
|
|
@@ -93,5 +94,10 @@
|
|
|
93
94
|
"af:exports": {
|
|
94
95
|
".": "./src/index.tsx"
|
|
95
96
|
},
|
|
96
|
-
"homepage": "https://atlassian.design/components/avatar-group/"
|
|
97
|
+
"homepage": "https://atlassian.design/components/avatar-group/",
|
|
98
|
+
"platform-feature-flags": {
|
|
99
|
+
"platform.design-system-team.component-visual-refresh_t8zbo": {
|
|
100
|
+
"type": "boolean"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
97
103
|
}
|