@atlaskit/avatar-group 10.1.5 → 11.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 +30 -0
- package/dist/cjs/components/avatar-group.js +14 -16
- package/dist/cjs/components/grid.compiled.css +13 -0
- package/dist/cjs/components/grid.js +14 -31
- package/dist/cjs/components/internal/components/popup-avatar-group.js +5 -7
- package/dist/cjs/components/more-indicator.compiled.css +15 -0
- package/dist/cjs/components/more-indicator.js +46 -70
- package/dist/cjs/components/stack.compiled.css +8 -0
- package/dist/cjs/components/stack.js +14 -33
- package/dist/es2019/components/avatar-group.js +10 -16
- package/dist/es2019/components/grid.compiled.css +13 -0
- package/dist/es2019/components/grid.js +10 -29
- package/dist/es2019/components/internal/components/popup-avatar-group.js +2 -7
- package/dist/es2019/components/more-indicator.compiled.css +15 -0
- package/dist/es2019/components/more-indicator.js +17 -52
- package/dist/es2019/components/stack.compiled.css +8 -0
- package/dist/es2019/components/stack.js +10 -30
- package/dist/esm/components/avatar-group.js +10 -16
- package/dist/esm/components/grid.compiled.css +13 -0
- package/dist/esm/components/grid.js +10 -29
- package/dist/esm/components/internal/components/popup-avatar-group.js +2 -7
- package/dist/esm/components/more-indicator.compiled.css +15 -0
- package/dist/esm/components/more-indicator.js +44 -68
- package/dist/esm/components/stack.compiled.css +8 -0
- package/dist/esm/components/stack.js +10 -30
- package/dist/types/components/avatar-group.d.ts +2 -7
- package/dist/types/components/internal/components/popup-avatar-group.d.ts +2 -2
- package/dist/types-ts4.5/components/avatar-group.d.ts +2 -7
- package/dist/types-ts4.5/components/internal/components/popup-avatar-group.d.ts +2 -2
- package/package.json +19 -19
|
@@ -1,40 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* grid.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
|
+
import "./grid.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Children } from 'react';
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
6
|
const gutter = "var(--ds-space-negative-050, -4px)";
|
|
8
|
-
const listStyles =
|
|
9
|
-
|
|
10
|
-
margin: "var(--ds-space-0, 0px)",
|
|
11
|
-
padding: "var(--ds-space-0, 0px)",
|
|
12
|
-
justifyContent: 'flex-start',
|
|
13
|
-
flexWrap: 'wrap',
|
|
14
|
-
isolation: 'isolate',
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
16
|
-
lineHeight: 1,
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
18
|
-
listStyleType: 'none !important',
|
|
19
|
-
marginInlineEnd: gutter,
|
|
20
|
-
marginInlineStart: gutter
|
|
21
|
-
});
|
|
22
|
-
const listItemStyles = css({
|
|
23
|
-
margin: "var(--ds-space-0, 0px)",
|
|
24
|
-
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
25
|
-
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
26
|
-
paddingInlineStart: "var(--ds-space-050, 4px)"
|
|
27
|
-
});
|
|
7
|
+
const listStyles = null;
|
|
8
|
+
const listItemStyles = null;
|
|
28
9
|
const Grid = ({
|
|
29
10
|
children,
|
|
30
11
|
testId,
|
|
31
12
|
'aria-label': label
|
|
32
|
-
}) =>
|
|
13
|
+
}) => /*#__PURE__*/React.createElement("ul", {
|
|
33
14
|
"data-testid": testId,
|
|
34
15
|
"aria-label": label,
|
|
35
|
-
|
|
36
|
-
}, Children.map(children, child => child &&
|
|
37
|
-
|
|
16
|
+
className: ax(["_18s8ze3t _1yt4ze3t _1e0c1txw _1bah1y6m _1n261g80 _19121cl4 _vwz4kb7n _2mzuagmp _12l2r5cr _ahbqr5cr"])
|
|
17
|
+
}, Children.map(children, child => child && /*#__PURE__*/React.createElement("li", {
|
|
18
|
+
className: ax(["_18s8ze3t _6rthu2gc _y4ti1b66 _bozg1b66"])
|
|
38
19
|
}, child)));
|
|
39
20
|
|
|
40
21
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import { useContext, useEffect } from 'react';
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
2
|
+
import React, { useContext, useEffect } from 'react';
|
|
8
3
|
import { MenuGroup } from '@atlaskit/menu';
|
|
9
4
|
import { FocusManagerContext } from './focus-manager';
|
|
10
5
|
|
|
@@ -31,7 +26,7 @@ const PopupAvatarGroup = ({
|
|
|
31
26
|
useEffect(() => {
|
|
32
27
|
setInitialFocusRef === null || setInitialFocusRef === void 0 ? void 0 : setInitialFocusRef(menuItemRefs[0]);
|
|
33
28
|
}, [menuItemRefs, setInitialFocusRef]);
|
|
34
|
-
return
|
|
29
|
+
return /*#__PURE__*/React.createElement(MenuGroup, _extends({
|
|
35
30
|
isLoading: isLoading,
|
|
36
31
|
maxHeight: maxHeight,
|
|
37
32
|
maxWidth: maxWidth,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
._16hg1s4m._16hg1s4m{background-color:var(--ds-background-neutral,#f4f5f7)}
|
|
3
|
+
._16hg29zg._16hg29zg{background-color:var(--ds-background-selected,#deebff)}
|
|
4
|
+
._1g4l1np6._1g4l1np6{transform:scale(.9)}
|
|
5
|
+
._1w9010s3._1w9010s3{color:var(--ds-text,#42526e)}
|
|
6
|
+
._1w901ldt._1w901ldt{color:var(--ds-text-selected,#0052cc)}
|
|
7
|
+
._c6d7glyw._c6d7glyw:after{display:none}
|
|
8
|
+
._so1e1gmm._so1e1gmm{box-shadow:0 0 0 2px var(--ds-border-selected,#0065ff)}
|
|
9
|
+
._1fh110s3._1fh110s3:hover{color:var(--ds-text,#42526e)}
|
|
10
|
+
._1fh11pwi._1fh11pwi:hover{color:var(--ds-text-selected,#42526e)}
|
|
11
|
+
._u1mb1gf2._u1mb1gf2:hover{background-color:var(--ds-background-selected-hovered,#ebecf0)}
|
|
12
|
+
._u1mbyucn._u1mbyucn:hover{background-color:var(--ds-background-neutral-hovered,#ebecf0)}._10fu18al._10fu18al:active{background-color:var(--ds-background-neutral-pressed,#deebff)}
|
|
13
|
+
._10fu1elt._10fu1elt:active{background-color:var(--ds-background-selected-pressed,#deebff)}
|
|
14
|
+
._1l5a1ldt._1l5a1ldt:active{color:var(--ds-text-selected,#0052cc)}
|
|
15
|
+
._1l5a1x4z._1l5a1x4z:active{color:var(--ds-text,#0052cc)}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
/* more-indicator.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
3
|
+
import "./more-indicator.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { forwardRef, useCallback } from 'react';
|
|
7
|
-
import
|
|
8
|
-
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
7
|
+
import Avatar from '@atlaskit/avatar';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
|
|
9
|
+
const B300 = '#0065FF';
|
|
10
|
+
const B400 = '#0052CC';
|
|
11
|
+
const B50 = '#DEEBFF';
|
|
12
|
+
const N0 = '#FFFFFF';
|
|
13
|
+
const N20 = '#F4F5F7';
|
|
14
|
+
const N30 = '#EBECF0';
|
|
15
|
+
const N500 = '#42526E';
|
|
11
16
|
const buttonSizes = {
|
|
12
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)",
|
|
13
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)",
|
|
@@ -15,44 +20,8 @@ const buttonSizes = {
|
|
|
15
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)",
|
|
16
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)"
|
|
17
22
|
};
|
|
18
|
-
const buttonActiveStyles =
|
|
19
|
-
|
|
20
|
-
'&&': {
|
|
21
|
-
backgroundColor: `var(--ds-background-selected, ${B50})`,
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
|
-
boxShadow: `0 0 0 ${BORDER_WIDTH}px ${`var(--ds-border-selected, ${B300})`}`,
|
|
24
|
-
color: `var(--ds-text-selected, ${B400})`,
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
26
|
-
transform: `scale(${ACTIVE_SCALE_FACTOR})`,
|
|
27
|
-
'&:hover': {
|
|
28
|
-
backgroundColor: `var(--ds-background-selected-hovered, ${N30})`,
|
|
29
|
-
color: `var(--ds-text-selected, ${N500})`
|
|
30
|
-
},
|
|
31
|
-
'&:active': {
|
|
32
|
-
backgroundColor: `var(--ds-background-selected-pressed, ${B50})`,
|
|
33
|
-
color: `var(--ds-text-selected, ${B400})`
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const buttonStyles = css({
|
|
38
|
-
// 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
|
|
39
|
-
'&&': {
|
|
40
|
-
backgroundColor: `var(--ds-background-neutral, ${N20})`,
|
|
41
|
-
color: `var(--ds-text, ${N500})`,
|
|
42
|
-
'&:hover': {
|
|
43
|
-
backgroundColor: `var(--ds-background-neutral-hovered, ${N30})`,
|
|
44
|
-
color: `var(--ds-text, ${N500})`
|
|
45
|
-
},
|
|
46
|
-
'&:active': {
|
|
47
|
-
backgroundColor: `var(--ds-background-neutral-pressed, ${B50})`,
|
|
48
|
-
color: `var(--ds-text, ${B400})`
|
|
49
|
-
},
|
|
50
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
51
|
-
'&::after': {
|
|
52
|
-
display: 'none'
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
23
|
+
const buttonActiveStyles = null;
|
|
24
|
+
const buttonStyles = null;
|
|
56
25
|
const MAX_DISPLAY_COUNT = 99;
|
|
57
26
|
const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
58
27
|
appearance = 'circle',
|
|
@@ -76,7 +45,7 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
|
76
45
|
},
|
|
77
46
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
47
|
[buttonProps.onClick, onClick]);
|
|
79
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement(Avatar, {
|
|
80
49
|
appearance: appearance,
|
|
81
50
|
size: size,
|
|
82
51
|
borderColor: borderColor,
|
|
@@ -87,9 +56,7 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
|
87
56
|
className,
|
|
88
57
|
ref,
|
|
89
58
|
...props
|
|
90
|
-
}) =>
|
|
91
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
92
|
-
jsx("button", _extends({
|
|
59
|
+
}) => /*#__PURE__*/React.createElement("button", _extends({
|
|
93
60
|
type: "submit"
|
|
94
61
|
}, buttonProps, props, {
|
|
95
62
|
ref: ref,
|
|
@@ -103,10 +70,8 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
|
103
70
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
104
71
|
font: buttonSizes[size]
|
|
105
72
|
},
|
|
106
|
-
css: [buttonStyles, isActive && buttonActiveStyles]
|
|
107
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
108
|
-
,
|
|
109
|
-
className: className
|
|
74
|
+
className: ax(["_16hg1s4m _1w9010s3 _u1mbyucn _1fh110s3 _10fu18al _1l5a1x4z _c6d7glyw", isActive && "_16hg29zg _so1e1gmm _1w901ldt _1g4l1np6 _u1mb1gf2 _1fh11pwi _10fu1elt _1l5a1ldt", className])
|
|
110
75
|
}), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count));
|
|
111
76
|
});
|
|
112
77
|
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,40 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* stack.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
|
+
import "./stack.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Children } from 'react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
9
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
|
-
const gutter = BORDER_WIDTH * 2 + gridSize() / 2;
|
|
11
|
-
const listStyles = css({
|
|
12
|
-
display: 'flex',
|
|
13
|
-
margin: "var(--ds-space-0, 0px)",
|
|
14
|
-
padding: "var(--ds-space-0, 0px)",
|
|
15
|
-
isolation: 'isolate',
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
17
|
-
lineHeight: 1,
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
19
|
-
listStyleType: 'none !important',
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
|
-
marginInlineEnd: gutter
|
|
22
|
-
});
|
|
23
|
-
const listItemStyles = css({
|
|
24
|
-
margin: "var(--ds-space-0, 0px)",
|
|
25
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
26
|
-
marginInlineEnd: -gutter
|
|
27
|
-
});
|
|
6
|
+
const listStyles = null;
|
|
7
|
+
const listItemStyles = null;
|
|
28
8
|
const Stack = ({
|
|
29
9
|
children,
|
|
30
10
|
testId,
|
|
31
11
|
'aria-label': label
|
|
32
|
-
}) =>
|
|
12
|
+
}) => /*#__PURE__*/React.createElement("ul", {
|
|
33
13
|
"data-testid": testId,
|
|
34
14
|
"aria-label": label,
|
|
35
|
-
|
|
36
|
-
}, Children.map(children, child => child &&
|
|
37
|
-
|
|
15
|
+
className: ax(["_18s8ze3t _1yt4ze3t _1e0c1txw _19121cl4 _vwz4kb7n _2mzuagmp _12l2u2gc"])
|
|
16
|
+
}, Children.map(children, child => child && /*#__PURE__*/React.createElement("li", {
|
|
17
|
+
className: ax(["_18s8ze3t _12l2x0bf"])
|
|
38
18
|
}, child)));
|
|
39
19
|
|
|
40
20
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
@@ -5,12 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
var _excluded = ["aria-controls", "aria-expanded", "aria-haspopup", "onClick"];
|
|
6
6
|
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; }
|
|
7
7
|
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) { _defineProperty(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; }
|
|
8
|
-
|
|
9
|
-
* @jsxRuntime classic
|
|
10
|
-
* @jsx jsx
|
|
11
|
-
*/
|
|
12
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
13
|
-
import { jsx } from '@emotion/react';
|
|
8
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
14
9
|
import { bind } from 'bind-event-listener';
|
|
15
10
|
import Avatar from '@atlaskit/avatar';
|
|
16
11
|
import { KEY_DOWN } from '@atlaskit/ds-lib/keycodes';
|
|
@@ -18,7 +13,6 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
18
13
|
import useFocus from '@atlaskit/ds-lib/use-focus-event';
|
|
19
14
|
import { Section } from '@atlaskit/menu';
|
|
20
15
|
import Popup from '@atlaskit/popup';
|
|
21
|
-
import { layers } from '@atlaskit/theme/constants';
|
|
22
16
|
import Tooltip from '@atlaskit/tooltip';
|
|
23
17
|
import AvatarGroupItem from './avatar-group-item';
|
|
24
18
|
import Grid from './grid';
|
|
@@ -35,21 +29,21 @@ function getOverrides(overrides) {
|
|
|
35
29
|
return {
|
|
36
30
|
AvatarGroupItem: _objectSpread({
|
|
37
31
|
render: function render(Component, props, index) {
|
|
38
|
-
return
|
|
32
|
+
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
39
33
|
key: composeUniqueKey(props.avatar, index)
|
|
40
34
|
}));
|
|
41
35
|
}
|
|
42
36
|
}, overrides && overrides.AvatarGroupItem),
|
|
43
37
|
Avatar: _objectSpread({
|
|
44
38
|
render: function render(Component, props, index) {
|
|
45
|
-
return
|
|
39
|
+
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
46
40
|
key: composeUniqueKey(props, index)
|
|
47
41
|
}));
|
|
48
42
|
}
|
|
49
43
|
}, overrides && overrides.Avatar),
|
|
50
44
|
MoreIndicator: _objectSpread({
|
|
51
45
|
render: function render(Component, props) {
|
|
52
|
-
return
|
|
46
|
+
return /*#__PURE__*/React.createElement(Component, props);
|
|
53
47
|
}
|
|
54
48
|
}, overrides && overrides.MoreIndicator)
|
|
55
49
|
};
|
|
@@ -197,25 +191,25 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
197
191
|
}
|
|
198
192
|
return boundariesElement === 'window' ? 'document' : 'viewport';
|
|
199
193
|
}();
|
|
200
|
-
return
|
|
194
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
201
195
|
isOpen: isOpen,
|
|
202
196
|
onClose: onClose,
|
|
203
197
|
placement: "bottom-end",
|
|
204
198
|
boundary: boundary,
|
|
205
199
|
rootBoundary: rootBoundary,
|
|
206
200
|
shouldFlip: true,
|
|
207
|
-
zIndex:
|
|
201
|
+
zIndex: 510,
|
|
208
202
|
shouldRenderToParent: shouldPopupRenderToParent,
|
|
209
203
|
content: function content(_ref4) {
|
|
210
204
|
var setInitialFocusRef = _ref4.setInitialFocusRef;
|
|
211
|
-
return
|
|
205
|
+
return /*#__PURE__*/React.createElement(FocusManager, null, /*#__PURE__*/React.createElement(PopupAvatarGroup, {
|
|
212
206
|
onClick: function onClick(e) {
|
|
213
207
|
return e.stopPropagation();
|
|
214
208
|
},
|
|
215
209
|
minWidth: 250,
|
|
216
210
|
maxHeight: 300,
|
|
217
211
|
setInitialFocusRef: isTriggeredUsingKeyboard ? setInitialFocusRef : undefined
|
|
218
|
-
},
|
|
212
|
+
}, /*#__PURE__*/React.createElement(Section, null, data.slice(max).map(function (avatar, index) {
|
|
219
213
|
return getOverrides(overrides).AvatarGroupItem.render(AvatarGroupItem, {
|
|
220
214
|
avatar: avatar,
|
|
221
215
|
onAvatarClick: onAvatarClick,
|
|
@@ -239,7 +233,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
239
233
|
var total = data.length;
|
|
240
234
|
var maxAvatar = total > max ? max - 1 : max;
|
|
241
235
|
var Group = appearance === 'stack' ? Stack : Grid;
|
|
242
|
-
return
|
|
236
|
+
return /*#__PURE__*/React.createElement(Group, {
|
|
243
237
|
testId: testId && "".concat(testId, "--avatar-group"),
|
|
244
238
|
"aria-label": label
|
|
245
239
|
}, data.slice(0, maxAvatar).map(function (avatarData, idx) {
|
|
@@ -253,7 +247,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
253
247
|
} : undefined,
|
|
254
248
|
stackIndex: max - idx
|
|
255
249
|
}), idx);
|
|
256
|
-
return !isTooltipDisabled && !avatarData.isDisabled ?
|
|
250
|
+
return !isTooltipDisabled && !avatarData.isDisabled ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
257
251
|
key: composeUniqueKey(avatarData, idx),
|
|
258
252
|
content: avatarData.name,
|
|
259
253
|
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,41 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* grid.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
|
+
import "./grid.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Children } from 'react';
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
6
|
var gutter = "var(--ds-space-negative-050, -4px)";
|
|
8
|
-
var listStyles =
|
|
9
|
-
|
|
10
|
-
margin: "var(--ds-space-0, 0px)",
|
|
11
|
-
padding: "var(--ds-space-0, 0px)",
|
|
12
|
-
justifyContent: 'flex-start',
|
|
13
|
-
flexWrap: 'wrap',
|
|
14
|
-
isolation: 'isolate',
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
16
|
-
lineHeight: 1,
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
18
|
-
listStyleType: 'none !important',
|
|
19
|
-
marginInlineEnd: gutter,
|
|
20
|
-
marginInlineStart: gutter
|
|
21
|
-
});
|
|
22
|
-
var listItemStyles = css({
|
|
23
|
-
margin: "var(--ds-space-0, 0px)",
|
|
24
|
-
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
25
|
-
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
26
|
-
paddingInlineStart: "var(--ds-space-050, 4px)"
|
|
27
|
-
});
|
|
7
|
+
var listStyles = null;
|
|
8
|
+
var listItemStyles = null;
|
|
28
9
|
var Grid = function Grid(_ref) {
|
|
29
10
|
var children = _ref.children,
|
|
30
11
|
testId = _ref.testId,
|
|
31
12
|
label = _ref['aria-label'];
|
|
32
|
-
return
|
|
13
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
33
14
|
"data-testid": testId,
|
|
34
15
|
"aria-label": label,
|
|
35
|
-
|
|
16
|
+
className: ax(["_18s8ze3t _1yt4ze3t _1e0c1txw _1bah1y6m _1n261g80 _19121cl4 _vwz4kb7n _2mzuagmp _12l2r5cr _ahbqr5cr"])
|
|
36
17
|
}, Children.map(children, function (child) {
|
|
37
|
-
return child &&
|
|
38
|
-
|
|
18
|
+
return child && /*#__PURE__*/React.createElement("li", {
|
|
19
|
+
className: ax(["_18s8ze3t _6rthu2gc _y4ti1b66 _bozg1b66"])
|
|
39
20
|
}, child);
|
|
40
21
|
}));
|
|
41
22
|
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "isLoading", "maxHeight", "maxWidth", "minHeight", "minWidth", "onClick", "role", "setInitialFocusRef", "spacing", "testId"];
|
|
4
|
-
|
|
5
|
-
* @jsxRuntime classic
|
|
6
|
-
* @jsx jsx
|
|
7
|
-
*/
|
|
8
|
-
import { useContext, useEffect } from 'react';
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
4
|
+
import React, { useContext, useEffect } from 'react';
|
|
10
5
|
import { MenuGroup } from '@atlaskit/menu';
|
|
11
6
|
import { FocusManagerContext } from './focus-manager';
|
|
12
7
|
|
|
@@ -33,7 +28,7 @@ var PopupAvatarGroup = function PopupAvatarGroup(_ref) {
|
|
|
33
28
|
useEffect(function () {
|
|
34
29
|
setInitialFocusRef === null || setInitialFocusRef === void 0 || setInitialFocusRef(menuItemRefs[0]);
|
|
35
30
|
}, [menuItemRefs, setInitialFocusRef]);
|
|
36
|
-
return
|
|
31
|
+
return /*#__PURE__*/React.createElement(MenuGroup, _extends({
|
|
37
32
|
isLoading: isLoading,
|
|
38
33
|
maxHeight: maxHeight,
|
|
39
34
|
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,15 +1,20 @@
|
|
|
1
|
+
/* more-indicator.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["testId", "className", "ref"];
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
5
|
+
import "./more-indicator.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { forwardRef, useCallback } from 'react';
|
|
9
|
-
import
|
|
10
|
-
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
9
|
+
import Avatar from '@atlaskit/avatar';
|
|
11
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
|
|
11
|
+
var B300 = '#0065FF';
|
|
12
|
+
var B400 = '#0052CC';
|
|
13
|
+
var B50 = '#DEEBFF';
|
|
14
|
+
var N0 = '#FFFFFF';
|
|
15
|
+
var N20 = '#F4F5F7';
|
|
16
|
+
var N30 = '#EBECF0';
|
|
17
|
+
var N500 = '#42526E';
|
|
13
18
|
var buttonSizes = {
|
|
14
19
|
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)",
|
|
15
20
|
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,44 +22,8 @@ var buttonSizes = {
|
|
|
17
22
|
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)",
|
|
18
23
|
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)"
|
|
19
24
|
};
|
|
20
|
-
var buttonActiveStyles =
|
|
21
|
-
|
|
22
|
-
'&&': {
|
|
23
|
-
backgroundColor: "var(--ds-background-selected, ".concat(B50, ")"),
|
|
24
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
|
-
boxShadow: "0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-selected, ".concat(B300, ")")),
|
|
26
|
-
color: "var(--ds-text-selected, ".concat(B400, ")"),
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
-
transform: "scale(".concat(ACTIVE_SCALE_FACTOR, ")"),
|
|
29
|
-
'&:hover': {
|
|
30
|
-
backgroundColor: "var(--ds-background-selected-hovered, ".concat(N30, ")"),
|
|
31
|
-
color: "var(--ds-text-selected, ".concat(N500, ")")
|
|
32
|
-
},
|
|
33
|
-
'&:active': {
|
|
34
|
-
backgroundColor: "var(--ds-background-selected-pressed, ".concat(B50, ")"),
|
|
35
|
-
color: "var(--ds-text-selected, ".concat(B400, ")")
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
var buttonStyles = css({
|
|
40
|
-
// 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
|
|
41
|
-
'&&': {
|
|
42
|
-
backgroundColor: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
43
|
-
color: "var(--ds-text, ".concat(N500, ")"),
|
|
44
|
-
'&:hover': {
|
|
45
|
-
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30, ")"),
|
|
46
|
-
color: "var(--ds-text, ".concat(N500, ")")
|
|
47
|
-
},
|
|
48
|
-
'&:active': {
|
|
49
|
-
backgroundColor: "var(--ds-background-neutral-pressed, ".concat(B50, ")"),
|
|
50
|
-
color: "var(--ds-text, ".concat(B400, ")")
|
|
51
|
-
},
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
53
|
-
'&::after': {
|
|
54
|
-
display: 'none'
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
});
|
|
25
|
+
var buttonActiveStyles = null;
|
|
26
|
+
var buttonStyles = null;
|
|
58
27
|
var MAX_DISPLAY_COUNT = 99;
|
|
59
28
|
var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
60
29
|
var _ref$appearance = _ref.appearance,
|
|
@@ -81,7 +50,7 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
81
50
|
},
|
|
82
51
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
52
|
[buttonProps.onClick, onClick]);
|
|
84
|
-
return
|
|
53
|
+
return /*#__PURE__*/React.createElement(Avatar, {
|
|
85
54
|
appearance: appearance,
|
|
86
55
|
size: size,
|
|
87
56
|
borderColor: borderColor,
|
|
@@ -92,28 +61,35 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
92
61
|
className = _ref2.className,
|
|
93
62
|
ref = _ref2.ref,
|
|
94
63
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
95
|
-
return (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
64
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
65
|
+
type: "submit"
|
|
66
|
+
}, buttonProps, props, {
|
|
67
|
+
ref: ref,
|
|
68
|
+
"data-testid": testId,
|
|
69
|
+
"aria-controls": ariaControls,
|
|
70
|
+
"aria-expanded": ariaExpanded,
|
|
71
|
+
"aria-haspopup": ariaHaspopup
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
73
|
+
,
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
76
|
+
className: ax(["_16hglslw _1w901hoq _u1mbaek3 _1fh11hoq _10fu1kgi _1l5a17km _c6d7glyw", isActive && "_16hg1kxl _so1ehi7p _1w90ln51 _1g4l1np6 _u1mbg85j _1fh13htb _10fu1smf _1l5aln51", className]),
|
|
77
|
+
style: {
|
|
78
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
79
|
+
font: buttonSizes[size],
|
|
80
|
+
"--_1jkcdu5": ix("var(--ds-background-neutral, ".concat(N20, ")")),
|
|
81
|
+
"--_h5fhc4": ix("var(--ds-text, ".concat(N500, ")")),
|
|
82
|
+
"--_hz7h6s": ix("var(--ds-background-neutral-hovered, ".concat(N30, ")")),
|
|
83
|
+
"--_1axggjc": ix("var(--ds-background-neutral-pressed, ".concat(B50, ")")),
|
|
84
|
+
"--_1lrmnoy": ix("var(--ds-text, ".concat(B400, ")")),
|
|
85
|
+
"--_rryx0a": ix("var(--ds-background-selected, ".concat(B50, ")")),
|
|
86
|
+
"--_1t841jg": ix("0 0 0 2px ".concat("var(--ds-border-selected, ".concat(B300, ")"))),
|
|
87
|
+
"--_1hfkvbo": ix("var(--ds-text-selected, ".concat(B400, ")")),
|
|
88
|
+
"--_rkvepi": ix("var(--ds-background-selected-hovered, ".concat(N30, ")")),
|
|
89
|
+
"--_ph2vs": ix("var(--ds-text-selected, ".concat(N500, ")")),
|
|
90
|
+
"--_ohg1x3": ix("var(--ds-background-selected-pressed, ".concat(B50, ")"))
|
|
91
|
+
}
|
|
92
|
+
}), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count);
|
|
117
93
|
});
|
|
118
94
|
});
|
|
119
95
|
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}
|