@atlaskit/avatar-group 9.6.1 → 9.8.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 +733 -713
- package/README.md +2 -1
- package/__perf__/default.tsx +12 -12
- package/dist/cjs/components/avatar-group.js +3 -1
- package/dist/cjs/components/grid.js +12 -7
- package/dist/cjs/components/internal/components/popup-avatar-group.js +4 -0
- package/dist/cjs/components/more-indicator.js +38 -32
- package/dist/cjs/components/stack.js +11 -5
- package/dist/es2019/components/avatar-group.js +5 -0
- package/dist/es2019/components/grid.js +12 -7
- package/dist/es2019/components/internal/components/popup-avatar-group.js +5 -0
- package/dist/es2019/components/more-indicator.js +28 -22
- package/dist/es2019/components/stack.js +11 -5
- package/dist/esm/components/avatar-group.js +5 -0
- package/dist/esm/components/grid.js +12 -7
- package/dist/esm/components/internal/components/popup-avatar-group.js +5 -0
- package/dist/esm/components/more-indicator.js +39 -32
- package/dist/esm/components/stack.js +11 -5
- package/dist/types/components/avatar-group-item.d.ts +1 -1
- package/dist/types/components/avatar-group.d.ts +7 -4
- package/dist/types/components/grid.d.ts +4 -1
- package/dist/types/components/internal/components/focus-manager.d.ts +2 -2
- package/dist/types/components/internal/components/popup-avatar-group.d.ts +1 -1
- package/dist/types/components/internal/hooks/use-register-item-with-focus-manager.d.ts +1 -1
- package/dist/types/components/internal/utiles/handle-focus.d.ts +1 -1
- package/dist/types/components/stack.d.ts +4 -1
- package/dist/types/components/types.d.ts +5 -5
- package/dist/types/components/utils.d.ts +1 -1
- package/dist/types-ts4.5/components/avatar-group-item.d.ts +1 -1
- package/dist/types-ts4.5/components/avatar-group.d.ts +7 -4
- package/dist/types-ts4.5/components/grid.d.ts +4 -1
- package/dist/types-ts4.5/components/internal/components/focus-manager.d.ts +2 -2
- package/dist/types-ts4.5/components/internal/components/popup-avatar-group.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/hooks/use-register-item-with-focus-manager.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/utiles/handle-focus.d.ts +1 -1
- package/dist/types-ts4.5/components/stack.d.ts +4 -1
- package/dist/types-ts4.5/components/types.d.ts +5 -5
- package/dist/types-ts4.5/components/utils.d.ts +1 -1
- package/package.json +96 -98
- package/report.api.md +66 -65
package/README.md
CHANGED
package/__perf__/default.tsx
CHANGED
|
@@ -3,19 +3,19 @@ import React from 'react';
|
|
|
3
3
|
import AvatarGroup from '../src';
|
|
4
4
|
|
|
5
5
|
const data = [
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
{ email: 'chaki@me.com', name: 'Chaki Caronni' },
|
|
7
|
+
{ email: 'nanop@outlook.com', name: 'Nanop Rgiersig' },
|
|
8
8
|
];
|
|
9
9
|
|
|
10
10
|
export default () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
return (
|
|
12
|
+
<AvatarGroup
|
|
13
|
+
data={data.map((d) => ({
|
|
14
|
+
email: d.email,
|
|
15
|
+
key: d.email,
|
|
16
|
+
name: d.name,
|
|
17
|
+
href: '#',
|
|
18
|
+
}))}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
21
|
};
|
|
@@ -27,7 +27,9 @@ var _moreIndicator = _interopRequireDefault(require("./more-indicator"));
|
|
|
27
27
|
var _stack = _interopRequireDefault(require("./stack"));
|
|
28
28
|
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
|
-
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; } /**
|
|
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
|
+
* @jsxRuntime classic
|
|
32
|
+
*/ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
31
33
|
var MAX_COUNT = {
|
|
32
34
|
grid: 11,
|
|
33
35
|
stack: 5
|
|
@@ -6,26 +6,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
|
+
/**
|
|
10
|
+
* @jsxRuntime classic
|
|
11
|
+
*/
|
|
9
12
|
/** @jsx jsx */
|
|
10
13
|
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
+
|
|
11
16
|
var gutter = "var(--ds-space-negative-050, -4px)";
|
|
12
17
|
var listStyles = (0, _react2.css)({
|
|
13
|
-
// removes default ul styles. Needs !important to override contextual styles in product.
|
|
14
18
|
display: 'flex',
|
|
15
19
|
margin: "var(--ds-space-0, 0px)",
|
|
16
|
-
marginRight: gutter,
|
|
17
|
-
marginLeft: gutter,
|
|
18
20
|
padding: "var(--ds-space-0, 0px)",
|
|
19
21
|
justifyContent: 'flex-start',
|
|
20
22
|
flexWrap: 'wrap',
|
|
21
23
|
lineHeight: 1,
|
|
22
|
-
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
25
|
+
listStyleType: 'none !important',
|
|
26
|
+
marginInlineEnd: gutter,
|
|
27
|
+
marginInlineStart: gutter
|
|
23
28
|
});
|
|
24
29
|
var listItemStyles = (0, _react2.css)({
|
|
25
30
|
margin: "var(--ds-space-0, 0px)",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
32
|
+
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
33
|
+
paddingInlineStart: "var(--ds-space-050, 4px)"
|
|
29
34
|
});
|
|
30
35
|
var Grid = function Grid(_ref) {
|
|
31
36
|
var children = _ref.children,
|
|
@@ -12,7 +12,11 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _menu = require("@atlaskit/menu");
|
|
13
13
|
var _focusManager = require("./focus-manager");
|
|
14
14
|
var _excluded = ["maxWidth", "minWidth", "setInitialFocusRef"];
|
|
15
|
+
/**
|
|
16
|
+
* @jsxRuntime classic
|
|
17
|
+
*/
|
|
15
18
|
/** @jsx jsx */
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
20
|
/**
|
|
17
21
|
* It sets focus to the first avatar when popup is open.
|
|
18
22
|
*/
|
|
@@ -13,28 +13,29 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _avatar = _interopRequireWildcard(require("@atlaskit/avatar"));
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
var _excluded = ["testId", "className", "ref"];
|
|
16
|
+
/**
|
|
17
|
+
* @jsxRuntime classic
|
|
18
|
+
*/
|
|
16
19
|
/** @jsx jsx */
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
21
|
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); }
|
|
18
22
|
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; }
|
|
19
|
-
var
|
|
20
|
-
xsmall:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
large: '0.75rem',
|
|
27
|
-
// 12px
|
|
28
|
-
xlarge: '1rem',
|
|
29
|
-
// 16px
|
|
30
|
-
xxlarge: '1rem' // 16px
|
|
23
|
+
var buttonSizes = {
|
|
24
|
+
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)",
|
|
25
|
+
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)",
|
|
26
|
+
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
|
+
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)",
|
|
28
|
+
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)",
|
|
29
|
+
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)"
|
|
31
30
|
};
|
|
32
31
|
var buttonActiveStyles = (0, _react2.css)({
|
|
33
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
32
|
+
// 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
|
|
34
33
|
'&&': {
|
|
35
34
|
backgroundColor: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
36
|
boxShadow: "0 0 0 ".concat(_avatar.BORDER_WIDTH, "px ", "var(--ds-border-selected, ".concat(_colors.B300, ")")),
|
|
37
37
|
color: "var(--ds-text-selected, ".concat(_colors.B400, ")"),
|
|
38
|
+
// 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
39
|
transform: "scale(".concat(_avatar.ACTIVE_SCALE_FACTOR, ")"),
|
|
39
40
|
'&:hover': {
|
|
40
41
|
backgroundColor: "var(--ds-background-selected-hovered, ".concat(_colors.N30, ")"),
|
|
@@ -47,13 +48,10 @@ var buttonActiveStyles = (0, _react2.css)({
|
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
var buttonStyles = (0, _react2.css)({
|
|
50
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
51
|
+
// 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
|
'&&': {
|
|
52
53
|
backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
|
|
53
54
|
color: "var(--ds-text, ".concat(_colors.N500, ")"),
|
|
54
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
55
|
-
fontFamily: 'inherit',
|
|
56
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
57
55
|
'&:hover': {
|
|
58
56
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(_colors.N30, ")"),
|
|
59
57
|
color: "var(--ds-text, ".concat(_colors.N500, ")")
|
|
@@ -62,7 +60,8 @@ var buttonStyles = (0, _react2.css)({
|
|
|
62
60
|
backgroundColor: "var(--ds-background-neutral-pressed, ".concat(_colors.B50, ")"),
|
|
63
61
|
color: "var(--ds-text, ".concat(_colors.B400, ")")
|
|
64
62
|
},
|
|
65
|
-
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
64
|
+
'&::after': {
|
|
66
65
|
display: 'none'
|
|
67
66
|
}
|
|
68
67
|
}
|
|
@@ -104,20 +103,27 @@ var MoreIndicator = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
104
103
|
className = _ref2.className,
|
|
105
104
|
ref = _ref2.ref,
|
|
106
105
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
107
|
-
return (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
106
|
+
return (
|
|
107
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
108
|
+
(0, _react2.jsx)("button", (0, _extends2.default)({
|
|
109
|
+
type: "submit"
|
|
110
|
+
}, buttonProps, props, {
|
|
111
|
+
ref: ref,
|
|
112
|
+
"data-testid": testId,
|
|
113
|
+
"aria-controls": ariaControls,
|
|
114
|
+
"aria-expanded": ariaExpanded,
|
|
115
|
+
"aria-haspopup": ariaHaspopup
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
117
|
+
,
|
|
118
|
+
style: {
|
|
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
|
+
);
|
|
121
127
|
});
|
|
122
128
|
});
|
|
123
129
|
MoreIndicator.displayName = 'MoreIndicator';
|
|
@@ -8,24 +8,30 @@ var _react = require("react");
|
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
9
|
var _avatar = require("@atlaskit/avatar");
|
|
10
10
|
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
+
/**
|
|
12
|
+
* @jsxRuntime classic
|
|
13
|
+
*/
|
|
11
14
|
/** @jsx jsx */
|
|
12
15
|
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
+
|
|
13
18
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
14
19
|
|
|
15
20
|
var gutter = _avatar.BORDER_WIDTH * 2 + (0, _constants.gridSize)() / 2;
|
|
16
21
|
var listStyles = (0, _react2.css)({
|
|
17
22
|
display: 'flex',
|
|
18
23
|
margin: "var(--ds-space-0, 0px)",
|
|
19
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
20
|
-
marginRight: gutter,
|
|
21
24
|
padding: "var(--ds-space-0, 0px)",
|
|
22
25
|
lineHeight: 1,
|
|
23
|
-
|
|
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
|
|
24
30
|
});
|
|
25
31
|
var listItemStyles = (0, _react2.css)({
|
|
26
32
|
margin: "var(--ds-space-0, 0px)",
|
|
27
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
28
|
-
|
|
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
|
|
29
35
|
});
|
|
30
36
|
var Stack = function Stack(_ref) {
|
|
31
37
|
var children = _ref.children,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { useCallback, useEffect, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { bind } from 'bind-event-listener';
|
|
6
11
|
import Avatar from '@atlaskit/avatar';
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { Children } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { css, jsx } from '@emotion/react';
|
|
4
9
|
const gutter = "var(--ds-space-negative-050, -4px)";
|
|
5
10
|
const listStyles = css({
|
|
6
|
-
// removes default ul styles. Needs !important to override contextual styles in product.
|
|
7
11
|
display: 'flex',
|
|
8
12
|
margin: "var(--ds-space-0, 0px)",
|
|
9
|
-
marginRight: gutter,
|
|
10
|
-
marginLeft: gutter,
|
|
11
13
|
padding: "var(--ds-space-0, 0px)",
|
|
12
14
|
justifyContent: 'flex-start',
|
|
13
15
|
flexWrap: 'wrap',
|
|
14
16
|
lineHeight: 1,
|
|
15
|
-
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
18
|
+
listStyleType: 'none !important',
|
|
19
|
+
marginInlineEnd: gutter,
|
|
20
|
+
marginInlineStart: gutter
|
|
16
21
|
});
|
|
17
22
|
const listItemStyles = css({
|
|
18
23
|
margin: "var(--ds-space-0, 0px)",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
25
|
+
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
26
|
+
paddingInlineStart: "var(--ds-space-050, 4px)"
|
|
22
27
|
});
|
|
23
28
|
const Grid = ({
|
|
24
29
|
children,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { useContext, useEffect } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { MenuGroup } from '@atlaskit/menu';
|
|
6
11
|
import { FocusManagerContext } from './focus-manager';
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { forwardRef, useCallback } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { css, jsx } from '@emotion/react';
|
|
5
10
|
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
6
11
|
import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
|
|
7
|
-
const
|
|
8
|
-
xsmall:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
large: '0.75rem',
|
|
15
|
-
// 12px
|
|
16
|
-
xlarge: '1rem',
|
|
17
|
-
// 16px
|
|
18
|
-
xxlarge: '1rem' // 16px
|
|
12
|
+
const buttonSizes = {
|
|
13
|
+
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)",
|
|
14
|
+
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
|
+
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)",
|
|
16
|
+
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)",
|
|
17
|
+
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
|
+
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
19
|
};
|
|
20
20
|
const buttonActiveStyles = css({
|
|
21
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
21
|
+
// 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
|
|
22
22
|
'&&': {
|
|
23
23
|
backgroundColor: `var(--ds-background-selected, ${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
|
|
24
25
|
boxShadow: `0 0 0 ${BORDER_WIDTH}px ${`var(--ds-border-selected, ${B300})`}`,
|
|
25
26
|
color: `var(--ds-text-selected, ${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
|
|
26
28
|
transform: `scale(${ACTIVE_SCALE_FACTOR})`,
|
|
27
29
|
'&:hover': {
|
|
28
30
|
backgroundColor: `var(--ds-background-selected-hovered, ${N30})`,
|
|
@@ -35,13 +37,10 @@ const buttonActiveStyles = css({
|
|
|
35
37
|
}
|
|
36
38
|
});
|
|
37
39
|
const buttonStyles = css({
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
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
|
|
39
41
|
'&&': {
|
|
40
42
|
backgroundColor: `var(--ds-background-neutral, ${N20})`,
|
|
41
43
|
color: `var(--ds-text, ${N500})`,
|
|
42
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
43
|
-
fontFamily: 'inherit',
|
|
44
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
45
44
|
'&:hover': {
|
|
46
45
|
backgroundColor: `var(--ds-background-neutral-hovered, ${N30})`,
|
|
47
46
|
color: `var(--ds-text, ${N500})`
|
|
@@ -50,7 +49,8 @@ const buttonStyles = css({
|
|
|
50
49
|
backgroundColor: `var(--ds-background-neutral-pressed, ${B50})`,
|
|
51
50
|
color: `var(--ds-text, ${B400})`
|
|
52
51
|
},
|
|
53
|
-
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
53
|
+
'&::after': {
|
|
54
54
|
display: 'none'
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -88,18 +88,24 @@ const MoreIndicator = /*#__PURE__*/forwardRef(({
|
|
|
88
88
|
className,
|
|
89
89
|
ref,
|
|
90
90
|
...props
|
|
91
|
-
}) =>
|
|
91
|
+
}) =>
|
|
92
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
93
|
+
jsx("button", _extends({
|
|
92
94
|
type: "submit"
|
|
93
95
|
}, buttonProps, props, {
|
|
94
96
|
ref: ref,
|
|
95
97
|
"data-testid": testId,
|
|
96
98
|
"aria-controls": ariaControls,
|
|
97
99
|
"aria-expanded": ariaExpanded,
|
|
98
|
-
"aria-haspopup": ariaHaspopup
|
|
100
|
+
"aria-haspopup": ariaHaspopup
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
102
|
+
,
|
|
99
103
|
style: {
|
|
100
|
-
|
|
104
|
+
font: buttonSizes[size]
|
|
101
105
|
},
|
|
102
|
-
css: [buttonStyles, isActive && buttonActiveStyles]
|
|
106
|
+
css: [buttonStyles, isActive && buttonActiveStyles]
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
108
|
+
,
|
|
103
109
|
className: className
|
|
104
110
|
}), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count));
|
|
105
111
|
});
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { Children } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { css, jsx } from '@emotion/react';
|
|
4
9
|
import { BORDER_WIDTH } from '@atlaskit/avatar';
|
|
5
10
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
@@ -8,16 +13,17 @@ const gutter = BORDER_WIDTH * 2 + gridSize() / 2;
|
|
|
8
13
|
const listStyles = css({
|
|
9
14
|
display: 'flex',
|
|
10
15
|
margin: "var(--ds-space-0, 0px)",
|
|
11
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
12
|
-
marginRight: gutter,
|
|
13
16
|
padding: "var(--ds-space-0, 0px)",
|
|
14
17
|
lineHeight: 1,
|
|
15
|
-
|
|
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
|
|
16
22
|
});
|
|
17
23
|
const listItemStyles = css({
|
|
18
24
|
margin: "var(--ds-space-0, 0px)",
|
|
19
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
20
|
-
|
|
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
|
|
21
27
|
});
|
|
22
28
|
const Stack = ({
|
|
23
29
|
children,
|
|
@@ -3,8 +3,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
|
+
/**
|
|
7
|
+
* @jsxRuntime classic
|
|
8
|
+
*/
|
|
6
9
|
/** @jsx jsx */
|
|
7
10
|
import { useCallback, useEffect, useState } from 'react';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
13
|
import { jsx } from '@emotion/react';
|
|
9
14
|
import { bind } from 'bind-event-listener';
|
|
10
15
|
import Avatar from '@atlaskit/avatar';
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { Children } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { css, jsx } from '@emotion/react';
|
|
4
9
|
var gutter = "var(--ds-space-negative-050, -4px)";
|
|
5
10
|
var listStyles = css({
|
|
6
|
-
// removes default ul styles. Needs !important to override contextual styles in product.
|
|
7
11
|
display: 'flex',
|
|
8
12
|
margin: "var(--ds-space-0, 0px)",
|
|
9
|
-
marginRight: gutter,
|
|
10
|
-
marginLeft: gutter,
|
|
11
13
|
padding: "var(--ds-space-0, 0px)",
|
|
12
14
|
justifyContent: 'flex-start',
|
|
13
15
|
flexWrap: 'wrap',
|
|
14
16
|
lineHeight: 1,
|
|
15
|
-
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
18
|
+
listStyleType: 'none !important',
|
|
19
|
+
marginInlineEnd: gutter,
|
|
20
|
+
marginInlineStart: gutter
|
|
16
21
|
});
|
|
17
22
|
var listItemStyles = css({
|
|
18
23
|
margin: "var(--ds-space-0, 0px)",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
25
|
+
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
26
|
+
paddingInlineStart: "var(--ds-space-050, 4px)"
|
|
22
27
|
});
|
|
23
28
|
var Grid = function Grid(_ref) {
|
|
24
29
|
var children = _ref.children,
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["maxWidth", "minWidth", "setInitialFocusRef"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
import { useContext, useEffect } from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
11
|
import { jsx } from '@emotion/react';
|
|
7
12
|
import { MenuGroup } from '@atlaskit/menu';
|
|
8
13
|
import { FocusManagerContext } from './focus-manager';
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["testId", "className", "ref"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
import { forwardRef, useCallback } from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
11
|
import { css, jsx } from '@emotion/react';
|
|
7
12
|
import Avatar, { ACTIVE_SCALE_FACTOR, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
8
13
|
import { B300, B400, B50, N0, N20, N30, N500 } from '@atlaskit/theme/colors';
|
|
9
|
-
var
|
|
10
|
-
xsmall:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
large: '0.75rem',
|
|
17
|
-
// 12px
|
|
18
|
-
xlarge: '1rem',
|
|
19
|
-
// 16px
|
|
20
|
-
xxlarge: '1rem' // 16px
|
|
14
|
+
var buttonSizes = {
|
|
15
|
+
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)",
|
|
16
|
+
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)",
|
|
17
|
+
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)",
|
|
18
|
+
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)",
|
|
19
|
+
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)",
|
|
20
|
+
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)"
|
|
21
21
|
};
|
|
22
22
|
var buttonActiveStyles = css({
|
|
23
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
23
|
+
// 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
|
|
24
24
|
'&&': {
|
|
25
25
|
backgroundColor: "var(--ds-background-selected, ".concat(B50, ")"),
|
|
26
|
+
// 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
27
|
boxShadow: "0 0 0 ".concat(BORDER_WIDTH, "px ", "var(--ds-border-selected, ".concat(B300, ")")),
|
|
27
28
|
color: "var(--ds-text-selected, ".concat(B400, ")"),
|
|
29
|
+
// 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
30
|
transform: "scale(".concat(ACTIVE_SCALE_FACTOR, ")"),
|
|
29
31
|
'&:hover': {
|
|
30
32
|
backgroundColor: "var(--ds-background-selected-hovered, ".concat(N30, ")"),
|
|
@@ -37,13 +39,10 @@ var buttonActiveStyles = css({
|
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
41
|
var buttonStyles = css({
|
|
40
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
42
|
+
// 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
43
|
'&&': {
|
|
42
44
|
backgroundColor: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
43
45
|
color: "var(--ds-text, ".concat(N500, ")"),
|
|
44
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
45
|
-
fontFamily: 'inherit',
|
|
46
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
47
46
|
'&:hover': {
|
|
48
47
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30, ")"),
|
|
49
48
|
color: "var(--ds-text, ".concat(N500, ")")
|
|
@@ -52,7 +51,8 @@ var buttonStyles = css({
|
|
|
52
51
|
backgroundColor: "var(--ds-background-neutral-pressed, ".concat(B50, ")"),
|
|
53
52
|
color: "var(--ds-text, ".concat(B400, ")")
|
|
54
53
|
},
|
|
55
|
-
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
55
|
+
'&::after': {
|
|
56
56
|
display: 'none'
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -94,20 +94,27 @@ var MoreIndicator = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
94
94
|
className = _ref2.className,
|
|
95
95
|
ref = _ref2.ref,
|
|
96
96
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
97
|
-
return
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
return (
|
|
98
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
99
|
+
jsx("button", _extends({
|
|
100
|
+
type: "submit"
|
|
101
|
+
}, buttonProps, props, {
|
|
102
|
+
ref: ref,
|
|
103
|
+
"data-testid": testId,
|
|
104
|
+
"aria-controls": ariaControls,
|
|
105
|
+
"aria-expanded": ariaExpanded,
|
|
106
|
+
"aria-haspopup": ariaHaspopup
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
108
|
+
,
|
|
109
|
+
style: {
|
|
110
|
+
font: buttonSizes[size]
|
|
111
|
+
},
|
|
112
|
+
css: [buttonStyles, isActive && buttonActiveStyles]
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
114
|
+
,
|
|
115
|
+
className: className
|
|
116
|
+
}), "+", count > MAX_DISPLAY_COUNT ? MAX_DISPLAY_COUNT : count)
|
|
117
|
+
);
|
|
111
118
|
});
|
|
112
119
|
});
|
|
113
120
|
MoreIndicator.displayName = 'MoreIndicator';
|