@atlaskit/user-picker 10.21.0 → 10.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/afm-jira/tsconfig.json +63 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/AddOptionAvatar.js +13 -7
- package/dist/cjs/components/AvatarItemOption.js +18 -12
- package/dist/cjs/components/CustomOption/main.js +5 -2
- package/dist/cjs/components/EmailOption/main.js +5 -2
- package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +18 -12
- package/dist/cjs/components/ExternalUserOption/InfoIcon.js +2 -0
- package/dist/cjs/components/ExternalUserOption/SourcesTooltipContent.js +4 -0
- package/dist/cjs/components/ExternalUserOption/main.js +16 -7
- package/dist/cjs/components/GroupOption/main.js +7 -2
- package/dist/cjs/components/Menu.js +4 -2
- package/dist/cjs/components/MultiValue.js +1 -1
- package/dist/cjs/components/PopupControl.js +2 -1
- package/dist/cjs/components/SingleValue.js +4 -0
- package/dist/cjs/components/SingleValueContainer.js +5 -2
- package/dist/cjs/components/TeamOption/main.js +6 -2
- package/dist/cjs/components/UserOption.js +6 -2
- package/dist/cjs/components/UserPicker.js +3 -1
- package/dist/cjs/components/ValueContainerWrapper.js +4 -1
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/AddOptionAvatar.js +12 -7
- package/dist/es2019/components/AvatarItemOption.js +19 -11
- package/dist/es2019/components/CustomOption/main.js +5 -1
- package/dist/es2019/components/EmailOption/main.js +5 -1
- package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +8 -1
- package/dist/es2019/components/ExternalUserOption/InfoIcon.js +1 -0
- package/dist/es2019/components/ExternalUserOption/SourcesTooltipContent.js +3 -0
- package/dist/es2019/components/ExternalUserOption/main.js +17 -6
- package/dist/es2019/components/GroupOption/main.js +8 -1
- package/dist/es2019/components/Menu.js +4 -1
- package/dist/es2019/components/MultiValue.js +1 -0
- package/dist/es2019/components/PopupControl.js +2 -0
- package/dist/es2019/components/SingleValue.js +4 -0
- package/dist/es2019/components/SingleValueContainer.js +5 -1
- package/dist/es2019/components/TeamOption/main.js +6 -1
- package/dist/es2019/components/UserOption.js +6 -1
- package/dist/es2019/components/UserPicker.js +3 -1
- package/dist/es2019/components/ValueContainerWrapper.js +4 -1
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/AddOptionAvatar.js +12 -7
- package/dist/esm/components/AvatarItemOption.js +18 -11
- package/dist/esm/components/CustomOption/main.js +5 -1
- package/dist/esm/components/EmailOption/main.js +5 -1
- package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +18 -11
- package/dist/esm/components/ExternalUserOption/InfoIcon.js +1 -0
- package/dist/esm/components/ExternalUserOption/SourcesTooltipContent.js +3 -0
- package/dist/esm/components/ExternalUserOption/main.js +17 -6
- package/dist/esm/components/GroupOption/main.js +8 -1
- package/dist/esm/components/Menu.js +4 -1
- package/dist/esm/components/MultiValue.js +1 -0
- package/dist/esm/components/PopupControl.js +2 -0
- package/dist/esm/components/SingleValue.js +4 -0
- package/dist/esm/components/SingleValueContainer.js +5 -1
- package/dist/esm/components/TeamOption/main.js +6 -1
- package/dist/esm/components/UserOption.js +6 -1
- package/dist/esm/components/UserPicker.js +3 -1
- package/dist/esm/components/ValueContainerWrapper.js +4 -1
- package/dist/types/components/styles.d.ts +1 -38
- package/dist/types-ts4.5/components/styles.d.ts +1 -38
- package/package.json +99 -99
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
/** @jsx jsx */
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Conditional wrapper for the ValueContainer in Select. Provides a workaround
|
|
@@ -16,7 +17,9 @@ var ValueContainerWrapper = function ValueContainerWrapper(_ref) {
|
|
|
16
17
|
var children = _ref.children,
|
|
17
18
|
isEnabled = _ref.isEnabled,
|
|
18
19
|
onMouseDown = _ref.onMouseDown;
|
|
19
|
-
return isEnabled ?
|
|
20
|
+
return isEnabled ?
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
22
|
+
(0, _react.jsx)("div", {
|
|
20
23
|
css: (0, _react.css)({
|
|
21
24
|
flexGrow: 1
|
|
22
25
|
}),
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
3
|
import { isCustom, isExternalUser } from './components/utils';
|
|
4
4
|
const packageName = "@atlaskit/user-picker";
|
|
5
|
-
const packageVersion = "10.21.
|
|
5
|
+
const packageVersion = "10.21.2";
|
|
6
6
|
const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
7
7
|
const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
8
8
|
const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import EmailIcon from '@atlaskit/icon/glyph/email';
|
|
3
3
|
import { N40, N500 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
const getEmailAvatarWrapperStyle = isLozenge => {
|
|
7
8
|
const padding = isLozenge ? `${"var(--ds-space-0, 0px)"}` : `${"var(--ds-space-050, 4px)"}`;
|
|
8
9
|
return css({
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
9
11
|
padding: padding,
|
|
10
12
|
backgroundColor: `var(--ds-background-neutral, ${N40})`,
|
|
11
13
|
borderRadius: '50%',
|
|
@@ -17,11 +19,14 @@ export const AddOptionAvatar = ({
|
|
|
17
19
|
isLozenge,
|
|
18
20
|
label
|
|
19
21
|
}) => {
|
|
20
|
-
return
|
|
21
|
-
css
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
return (
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
24
|
+
jsx("div", {
|
|
25
|
+
css: getEmailAvatarWrapperStyle(isLozenge)
|
|
26
|
+
}, jsx(EmailIcon, {
|
|
27
|
+
label: label,
|
|
28
|
+
size: isLozenge ? 'small' : 'medium',
|
|
29
|
+
primaryColor: `var(--ds-text-subtle, ${N500})`
|
|
30
|
+
}))
|
|
31
|
+
);
|
|
27
32
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import Lozenge from '@atlaskit/lozenge';
|
|
5
6
|
import { isLozengeText } from './utils';
|
|
@@ -16,7 +17,9 @@ const wrapper = isDisabled => css({
|
|
|
16
17
|
outline: 'none',
|
|
17
18
|
margin: 0,
|
|
18
19
|
width: '100%',
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
21
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
20
23
|
opacity: isDisabled ? "var(--ds-opacity-disabled, 0.4)" : undefined
|
|
21
24
|
});
|
|
22
25
|
const optionWrapper = css({
|
|
@@ -35,6 +38,7 @@ const getTextStyle = isSecondary => {
|
|
|
35
38
|
overflowX: 'hidden',
|
|
36
39
|
textOverflow: 'ellipsis',
|
|
37
40
|
whiteSpace: 'nowrap',
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
42
|
...secondaryCssArgs
|
|
39
43
|
});
|
|
40
44
|
};
|
|
@@ -45,6 +49,7 @@ export const textWrapper = color => css({
|
|
|
45
49
|
overflow: 'hidden',
|
|
46
50
|
textOverflow: 'ellipsis',
|
|
47
51
|
display: 'inline',
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
53
|
color
|
|
49
54
|
});
|
|
50
55
|
export const AvatarItemOption = ({
|
|
@@ -69,15 +74,18 @@ export const AvatarItemOption = ({
|
|
|
69
74
|
}
|
|
70
75
|
return lozenge;
|
|
71
76
|
};
|
|
72
|
-
return
|
|
73
|
-
css
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
return (
|
|
78
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
79
|
+
jsx("span", {
|
|
80
|
+
css: wrapper(isDisabled)
|
|
81
|
+
}, avatar, jsx("div", {
|
|
82
|
+
css: optionWrapper
|
|
83
|
+
}, jsx("div", null, jsx("div", {
|
|
84
|
+
css: getTextStyle()
|
|
85
|
+
}, primaryText), secondaryText && jsx("div", {
|
|
86
|
+
css: getTextStyle(true)
|
|
87
|
+
}, secondaryText))), lozenge && jsx("div", {
|
|
88
|
+
css: additionalInfo
|
|
89
|
+
}, renderLozenge()))
|
|
90
|
+
);
|
|
83
91
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { jsx } from '@emotion/react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
@@ -17,13 +18,16 @@ export class CustomOption extends React.PureComponent {
|
|
|
17
18
|
}
|
|
18
19
|
} = this.props;
|
|
19
20
|
return [jsx("span", {
|
|
20
|
-
key: "name"
|
|
21
|
+
key: "name"
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
23
|
+
,
|
|
21
24
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text, ${N800})`)
|
|
22
25
|
}, jsx(HighlightText, {
|
|
23
26
|
highlights: highlight && highlight.name
|
|
24
27
|
}, name))];
|
|
25
28
|
});
|
|
26
29
|
_defineProperty(this, "getBylineComponent", (isSelected, message) => jsx("span", {
|
|
30
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
27
31
|
css: textWrapper(isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`),
|
|
28
32
|
"data-testid": "user-picker-custom-secondary-text"
|
|
29
33
|
}, message));
|
|
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
5
|
import { B400, N200, N800 } from '@atlaskit/theme/colors';
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
7
|
import { jsx } from '@emotion/react';
|
|
7
8
|
import { AddOptionAvatar } from '../AddOptionAvatar';
|
|
8
9
|
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
@@ -21,12 +22,15 @@ export class EmailOption extends React.PureComponent {
|
|
|
21
22
|
}
|
|
22
23
|
} = this.props;
|
|
23
24
|
return jsx("span", {
|
|
24
|
-
key: "name"
|
|
25
|
+
key: "name"
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
27
|
+
,
|
|
25
28
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text, ${N800})`)
|
|
26
29
|
}, id);
|
|
27
30
|
});
|
|
28
31
|
_defineProperty(this, "renderSecondaryText", label => {
|
|
29
32
|
return jsx("span", {
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
30
34
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`),
|
|
31
35
|
"data-testid": "user-picker-email-secondary-text"
|
|
32
36
|
}, label);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { B400 } from '@atlaskit/theme/colors';
|
|
5
6
|
const outerWrapper = isDisabled => css({
|
|
@@ -10,7 +11,9 @@ const outerWrapper = isDisabled => css({
|
|
|
10
11
|
outline: 'none',
|
|
11
12
|
margin: 0,
|
|
12
13
|
width: '100%',
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
13
15
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
17
|
opacity: isDisabled ? "var(--ds-opacity-disabled, 0.4)" : undefined
|
|
15
18
|
});
|
|
16
19
|
const detailsWrapper = css({
|
|
@@ -36,10 +39,12 @@ const getTextStyle = isSecondary => {
|
|
|
36
39
|
maxWidth: '100%',
|
|
37
40
|
margin: 0,
|
|
38
41
|
color: `var(--ds-text-selected, ${B400})`,
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
39
43
|
...{
|
|
40
44
|
secondaryCssArgs
|
|
41
45
|
},
|
|
42
46
|
whiteSpace: 'nowrap',
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
48
|
'> span': {
|
|
44
49
|
maxWidth: 'inherit'
|
|
45
50
|
}
|
|
@@ -51,7 +56,9 @@ export const ExternalAvatarItemOption = ({
|
|
|
51
56
|
primaryText,
|
|
52
57
|
secondaryText,
|
|
53
58
|
sourcesInfoTooltip
|
|
54
|
-
}) =>
|
|
59
|
+
}) =>
|
|
60
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
61
|
+
jsx("div", {
|
|
55
62
|
css: outerWrapper(isDisabled)
|
|
56
63
|
}, avatar, jsx("div", {
|
|
57
64
|
css: detailsWrapper
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useState } from 'react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import EditorPanelIcon from '@atlaskit/icon/glyph/editor/panel';
|
|
5
6
|
import { N50, N200 } from '@atlaskit/theme/colors';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
6
|
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { AtlassianIcon, ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
|
|
7
8
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
@@ -14,6 +15,8 @@ const sourcesTooltipContainer = xcss({
|
|
|
14
15
|
paddingBottom: 'space.050',
|
|
15
16
|
paddingRight: 'space.050'
|
|
16
17
|
});
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
17
20
|
export const sourceWrapper = css({
|
|
18
21
|
paddingTop: "var(--ds-space-050, 4px)",
|
|
19
22
|
display: 'flex',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React from 'react';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { B400, N200, N800 } from '@atlaskit/theme/colors';
|
|
6
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -12,6 +13,8 @@ import { ExternalUserSourcesContainer } from '../ExternalUserSourcesContainer';
|
|
|
12
13
|
import InfoIcon from './InfoIcon';
|
|
13
14
|
import { ExternalAvatarItemOption } from './ExternalAvatarItemOption';
|
|
14
15
|
import { SourcesTooltipContent } from './SourcesTooltipContent';
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
18
|
export const imageContainer = css({
|
|
16
19
|
height: '16px',
|
|
17
20
|
width: '16px',
|
|
@@ -20,6 +23,8 @@ export const imageContainer = css({
|
|
|
20
23
|
alignItems: 'center',
|
|
21
24
|
justifyContent: 'center'
|
|
22
25
|
});
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
23
28
|
export const emailDomainWrapper = css({
|
|
24
29
|
fontWeight: 'bold'
|
|
25
30
|
});
|
|
@@ -33,7 +38,9 @@ class ExternalUserOptionImpl extends React.PureComponent {
|
|
|
33
38
|
}
|
|
34
39
|
} = this.props;
|
|
35
40
|
return jsx("span", {
|
|
36
|
-
key: "name"
|
|
41
|
+
key: "name"
|
|
42
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
43
|
+
,
|
|
37
44
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text, ${N800})`)
|
|
38
45
|
}, name);
|
|
39
46
|
});
|
|
@@ -49,6 +56,7 @@ class ExternalUserOptionImpl extends React.PureComponent {
|
|
|
49
56
|
|
|
50
57
|
// Render byline if present
|
|
51
58
|
if (byline) {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
52
60
|
return jsx("span", {
|
|
53
61
|
css: textWrapper(textColor)
|
|
54
62
|
}, byline);
|
|
@@ -58,11 +66,14 @@ class ExternalUserOptionImpl extends React.PureComponent {
|
|
|
58
66
|
if (email) {
|
|
59
67
|
const [emailUser, emailDomain] = email.split('@');
|
|
60
68
|
const emailDomainWithAt = `@${emailDomain}`;
|
|
61
|
-
return
|
|
62
|
-
css
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
return (
|
|
70
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
71
|
+
jsx("span", {
|
|
72
|
+
css: textWrapper(textColor)
|
|
73
|
+
}, emailUser, jsx("span", {
|
|
74
|
+
css: emailDomainWrapper
|
|
75
|
+
}, emailDomainWithAt))
|
|
76
|
+
);
|
|
66
77
|
}
|
|
67
78
|
});
|
|
68
79
|
_defineProperty(this, "renderAvatar", () => {
|
|
@@ -2,14 +2,18 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
6
|
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
7
8
|
import PeopleIcon from '@atlaskit/icon/glyph/people';
|
|
8
9
|
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
9
10
|
import { messages } from '../i18n';
|
|
10
11
|
import { HighlightText } from '../HighlightText';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
11
14
|
export const groupOptionIconWrapper = css({
|
|
12
15
|
padding: "var(--ds-space-025, 2px)",
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
17
|
'> span': {
|
|
14
18
|
backgroundColor: `var(--ds-background-neutral, ${N20})`,
|
|
15
19
|
borderRadius: '50%',
|
|
@@ -28,7 +32,9 @@ export class GroupOption extends React.PureComponent {
|
|
|
28
32
|
}
|
|
29
33
|
} = this.props;
|
|
30
34
|
return [jsx("span", {
|
|
31
|
-
key: "name"
|
|
35
|
+
key: "name"
|
|
36
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
37
|
+
,
|
|
32
38
|
css: textWrapper(isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text, ${N800})`)
|
|
33
39
|
}, jsx(HighlightText, {
|
|
34
40
|
highlights: highlight && highlight.name
|
|
@@ -45,6 +51,7 @@ export class GroupOption extends React.PureComponent {
|
|
|
45
51
|
isSelected
|
|
46
52
|
} = this.props;
|
|
47
53
|
return jsx("span", {
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
48
55
|
css: textWrapper(isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`),
|
|
49
56
|
"data-testid": "user-picker-group-secondary-text"
|
|
50
57
|
}, jsx(FormattedMessage, messages.groupByline));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { components } from '@atlaskit/select';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
const getFooterStyle = () => {
|
|
6
7
|
return css({
|
|
@@ -9,7 +10,9 @@ const getFooterStyle = () => {
|
|
|
9
10
|
};
|
|
10
11
|
export class Menu extends React.Component {
|
|
11
12
|
render() {
|
|
12
|
-
return jsx(components.Menu, this.props, this.props.selectProps.header, this.props.children, this.props.selectProps.footer &&
|
|
13
|
+
return jsx(components.Menu, this.props, this.props.selectProps.header, this.props.children, this.props.selectProps.footer &&
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
15
|
+
jsx("div", {
|
|
13
16
|
css: getFooterStyle()
|
|
14
17
|
}, this.props.selectProps.footer));
|
|
15
18
|
}
|
|
@@ -5,6 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
7
7
|
import { components } from '@atlaskit/select';
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { AddOptionAvatar } from './AddOptionAvatar';
|
|
10
11
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { components } from '@atlaskit/select';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { N200 } from '@atlaskit/theme/colors';
|
|
6
7
|
const spacing = 8;
|
|
@@ -16,6 +17,7 @@ const getLabelStyle = () => css({
|
|
|
16
17
|
color: `var(--ds-text-subtlest, ${N200})`,
|
|
17
18
|
fontSize: `${fontSize}px`,
|
|
18
19
|
fontWeight: 600,
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
21
|
lineHeight: `${lineHeight}`,
|
|
20
22
|
paddingBottom: "var(--ds-space-050, 4px)",
|
|
21
23
|
paddingLeft: "var(--ds-space-0, 0px)",
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { AvatarItem } from '@atlaskit/avatar';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { components } from '@atlaskit/select';
|
|
6
7
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
7
8
|
import { getAvatarUrl } from './utils';
|
|
8
9
|
const avatarItemComponent = css({
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
9
11
|
border: 'none !important',
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
10
13
|
padding: `${"var(--ds-space-0, 0px)"} !important`,
|
|
11
14
|
width: 'auto',
|
|
12
15
|
overflow: 'hidden',
|
|
13
16
|
minWidth: '100px',
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
18
|
'& > span': {
|
|
15
19
|
boxSizing: 'border-box'
|
|
16
20
|
},
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { components } from '@atlaskit/select';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
7
8
|
import { BORDER_PADDING } from './styles';
|
|
8
9
|
import ValueContainerWrapper from './ValueContainerWrapper';
|
|
9
10
|
const placeholderIconContainer = css({
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
10
12
|
paddingLeft: BORDER_PADDING,
|
|
11
13
|
lineHeight: 0,
|
|
12
14
|
gridArea: '1/1/2/2'
|
|
@@ -39,7 +41,9 @@ export class SingleValueContainer extends React.Component {
|
|
|
39
41
|
_defineProperty(this, "Wrapper", ({
|
|
40
42
|
children
|
|
41
43
|
}) => {
|
|
42
|
-
return this.onValueContainerClick ?
|
|
44
|
+
return this.onValueContainerClick ?
|
|
45
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
46
|
+
jsx("div", {
|
|
43
47
|
css: css({
|
|
44
48
|
flexGrow: 1
|
|
45
49
|
}),
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
6
|
import { jsx } from '@emotion/react';
|
|
6
7
|
import React from 'react';
|
|
7
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -20,7 +21,9 @@ export class TeamOption extends React.PureComponent {
|
|
|
20
21
|
}
|
|
21
22
|
} = this.props;
|
|
22
23
|
return [jsx("span", {
|
|
23
|
-
key: "name"
|
|
24
|
+
key: "name"
|
|
25
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
26
|
+
,
|
|
24
27
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text, ${N800})`)
|
|
25
28
|
}, jsx(HighlightText, {
|
|
26
29
|
highlights: highlight && highlight.name
|
|
@@ -63,6 +66,7 @@ export class TeamOption extends React.PureComponent {
|
|
|
63
66
|
}
|
|
64
67
|
});
|
|
65
68
|
_defineProperty(this, "getBylineComponent", (isSelected, message) => jsx("span", {
|
|
69
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
66
70
|
css: textWrapper(isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`),
|
|
67
71
|
"data-testid": "user-picker-team-secondary-text"
|
|
68
72
|
}, message));
|
|
@@ -87,6 +91,7 @@ export class TeamOption extends React.PureComponent {
|
|
|
87
91
|
return undefined;
|
|
88
92
|
}
|
|
89
93
|
return jsx("span", {
|
|
94
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
90
95
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`)
|
|
91
96
|
}, this.props.team.byline);
|
|
92
97
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { jsx } from '@emotion/react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
import { AvatarItemOption, textWrapper } from './AvatarItemOption';
|
|
@@ -19,7 +20,9 @@ export class UserOption extends React.PureComponent {
|
|
|
19
20
|
}
|
|
20
21
|
} = this.props;
|
|
21
22
|
const result = [jsx("span", {
|
|
22
|
-
key: "name"
|
|
23
|
+
key: "name"
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
|
+
,
|
|
23
26
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text, ${N800})`)
|
|
24
27
|
}, jsx(HighlightText, {
|
|
25
28
|
highlights: highlight && highlight.name
|
|
@@ -28,6 +31,7 @@ export class UserOption extends React.PureComponent {
|
|
|
28
31
|
result.push(jsx(React.Fragment, {
|
|
29
32
|
key: "publicName"
|
|
30
33
|
}, ' ', jsx("span", {
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
31
35
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`)
|
|
32
36
|
}, "(", jsx(HighlightText, {
|
|
33
37
|
highlights: highlight && highlight.publicName
|
|
@@ -36,6 +40,7 @@ export class UserOption extends React.PureComponent {
|
|
|
36
40
|
return result;
|
|
37
41
|
});
|
|
38
42
|
_defineProperty(this, "renderSecondaryText", () => this.props.user.byline ? jsx("span", {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
39
44
|
css: textWrapper(this.props.isSelected ? `var(--ds-text-selected, ${B400})` : `var(--ds-text-subtlest, ${N200})`)
|
|
40
45
|
}, this.props.user.byline) : undefined);
|
|
41
46
|
_defineProperty(this, "renderAvatar", () => {
|
|
@@ -68,7 +68,9 @@ export class UserPickerWithoutAnalytics extends React.Component {
|
|
|
68
68
|
fetchUserSource: loadUserSource
|
|
69
69
|
}, /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
70
70
|
width: width,
|
|
71
|
-
SelectComponent: SelectComponent
|
|
71
|
+
SelectComponent: SelectComponent
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
73
|
+
,
|
|
72
74
|
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles),
|
|
73
75
|
components: getComponents(isMulti, anchor),
|
|
74
76
|
pickerProps: pickerProps
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -11,7 +12,9 @@ const ValueContainerWrapper = ({
|
|
|
11
12
|
isEnabled,
|
|
12
13
|
onMouseDown
|
|
13
14
|
}) => {
|
|
14
|
-
return isEnabled ?
|
|
15
|
+
return isEnabled ?
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
17
|
+
jsx("div", {
|
|
15
18
|
css: css({
|
|
16
19
|
flexGrow: 1
|
|
17
20
|
}),
|
package/dist/esm/analytics.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
|
5
5
|
import { v4 as uuidv4 } from 'uuid';
|
|
6
6
|
import { isCustom, isExternalUser } from './components/utils';
|
|
7
7
|
var packageName = "@atlaskit/user-picker";
|
|
8
|
-
var packageVersion = "10.21.
|
|
8
|
+
var packageVersion = "10.21.2";
|
|
9
9
|
var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
10
10
|
var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
11
11
|
var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import EmailIcon from '@atlaskit/icon/glyph/email';
|
|
3
3
|
import { N40, N500 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge) {
|
|
7
8
|
var padding = isLozenge ? "var(--ds-space-0, 0px)" : "var(--ds-space-050, 4px)";
|
|
8
9
|
return css({
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
9
11
|
padding: padding,
|
|
10
12
|
backgroundColor: "var(--ds-background-neutral, ".concat(N40, ")"),
|
|
11
13
|
borderRadius: '50%',
|
|
@@ -16,11 +18,14 @@ var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge)
|
|
|
16
18
|
export var AddOptionAvatar = function AddOptionAvatar(_ref) {
|
|
17
19
|
var isLozenge = _ref.isLozenge,
|
|
18
20
|
label = _ref.label;
|
|
19
|
-
return
|
|
20
|
-
css
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
return (
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
23
|
+
jsx("div", {
|
|
24
|
+
css: getEmailAvatarWrapperStyle(isLozenge)
|
|
25
|
+
}, jsx(EmailIcon, {
|
|
26
|
+
label: label,
|
|
27
|
+
size: isLozenge ? 'small' : 'medium',
|
|
28
|
+
primaryColor: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
29
|
+
}))
|
|
30
|
+
);
|
|
26
31
|
};
|