@atlaskit/user-picker 8.8.5 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/analytics.js +1 -84
  3. package/dist/cjs/components/AddOptionAvatar.js +16 -12
  4. package/dist/cjs/components/AvatarItemOption.js +56 -32
  5. package/dist/cjs/components/EmailOption/main.js +9 -7
  6. package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +62 -21
  7. package/dist/cjs/components/ExternalUserOption/InfoIcon.js +9 -15
  8. package/dist/cjs/components/ExternalUserOption/SourcesTooltipContent.js +29 -23
  9. package/dist/cjs/components/ExternalUserOption/main.js +28 -24
  10. package/dist/cjs/components/GroupOption/main.js +23 -19
  11. package/dist/cjs/components/MultiValue.js +18 -16
  12. package/dist/cjs/components/PopupControl.js +20 -21
  13. package/dist/cjs/components/SingleValue.js +25 -11
  14. package/dist/cjs/components/SingleValueContainer.js +9 -8
  15. package/dist/cjs/components/TeamOption/main.js +13 -11
  16. package/dist/cjs/components/UserOption.js +13 -11
  17. package/dist/cjs/components/i18n.js +1 -1
  18. package/dist/cjs/index.js +0 -26
  19. package/dist/cjs/version.json +1 -1
  20. package/dist/es2019/analytics.js +0 -62
  21. package/dist/es2019/components/AddOptionAvatar.js +16 -11
  22. package/dist/es2019/components/AvatarItemOption.js +47 -42
  23. package/dist/es2019/components/EmailOption/main.js +11 -8
  24. package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +56 -41
  25. package/dist/es2019/components/ExternalUserOption/InfoIcon.js +9 -7
  26. package/dist/es2019/components/ExternalUserOption/SourcesTooltipContent.js +27 -21
  27. package/dist/es2019/components/ExternalUserOption/main.js +28 -24
  28. package/dist/es2019/components/GroupOption/main.js +22 -19
  29. package/dist/es2019/components/MultiValue.js +19 -13
  30. package/dist/es2019/components/PopupControl.js +21 -18
  31. package/dist/es2019/components/SingleValue.js +25 -22
  32. package/dist/es2019/components/SingleValueContainer.js +11 -7
  33. package/dist/es2019/components/TeamOption/main.js +15 -12
  34. package/dist/es2019/components/UserOption.js +15 -12
  35. package/dist/es2019/components/i18n.js +1 -1
  36. package/dist/es2019/index.js +0 -1
  37. package/dist/es2019/version.json +1 -1
  38. package/dist/esm/analytics.js +0 -66
  39. package/dist/esm/components/AddOptionAvatar.js +17 -11
  40. package/dist/esm/components/AvatarItemOption.js +56 -27
  41. package/dist/esm/components/EmailOption/main.js +10 -8
  42. package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +65 -18
  43. package/dist/esm/components/ExternalUserOption/InfoIcon.js +9 -8
  44. package/dist/esm/components/ExternalUserOption/SourcesTooltipContent.js +27 -18
  45. package/dist/esm/components/ExternalUserOption/main.js +27 -18
  46. package/dist/esm/components/GroupOption/main.js +22 -15
  47. package/dist/esm/components/MultiValue.js +19 -13
  48. package/dist/esm/components/PopupControl.js +21 -11
  49. package/dist/esm/components/SingleValue.js +26 -9
  50. package/dist/esm/components/SingleValueContainer.js +10 -7
  51. package/dist/esm/components/TeamOption/main.js +14 -12
  52. package/dist/esm/components/UserOption.js +14 -12
  53. package/dist/esm/components/i18n.js +1 -1
  54. package/dist/esm/index.js +0 -1
  55. package/dist/esm/version.json +1 -1
  56. package/dist/types/analytics.d.ts +0 -10
  57. package/dist/types/components/AvatarItemOption.d.ts +3 -2
  58. package/dist/types/components/BaseUserPicker.d.ts +1 -1
  59. package/dist/types/components/EmailOption/main.d.ts +1 -0
  60. package/dist/types/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +1 -0
  61. package/dist/types/components/ExternalUserOption/SourcesTooltipContent.d.ts +3 -2
  62. package/dist/types/components/ExternalUserOption/main.d.ts +3 -2
  63. package/dist/types/components/GroupOption/main.d.ts +2 -1
  64. package/dist/types/components/MultiValue.d.ts +1 -0
  65. package/dist/types/components/PopupControl.d.ts +1 -0
  66. package/dist/types/components/PopupUserPicker.d.ts +1 -1
  67. package/dist/types/components/SingleValueContainer.d.ts +1 -0
  68. package/dist/types/components/UserPicker.d.ts +1 -1
  69. package/dist/types/index.d.ts +0 -2
  70. package/docs/1-smart-user-picker.tsx +1 -1
  71. package/package.json +4 -3
  72. package/dist/cjs/components/smart-user-picker/components/index.js +0 -602
  73. package/dist/cjs/components/smart-user-picker/config/index.js +0 -50
  74. package/dist/cjs/components/smart-user-picker/index.js +0 -41
  75. package/dist/cjs/components/smart-user-picker/service/UsersClient.js +0 -85
  76. package/dist/cjs/components/smart-user-picker/service/index.js +0 -15
  77. package/dist/cjs/components/smart-user-picker/service/recommendationClient.js +0 -75
  78. package/dist/cjs/components/smart-user-picker/service/users-transformer.js +0 -98
  79. package/dist/es2019/components/smart-user-picker/components/index.js +0 -398
  80. package/dist/es2019/components/smart-user-picker/config/index.js +0 -37
  81. package/dist/es2019/components/smart-user-picker/index.js +0 -7
  82. package/dist/es2019/components/smart-user-picker/service/UsersClient.js +0 -65
  83. package/dist/es2019/components/smart-user-picker/service/index.js +0 -1
  84. package/dist/es2019/components/smart-user-picker/service/recommendationClient.js +0 -56
  85. package/dist/es2019/components/smart-user-picker/service/users-transformer.js +0 -77
  86. package/dist/esm/components/smart-user-picker/components/index.js +0 -582
  87. package/dist/esm/components/smart-user-picker/config/index.js +0 -38
  88. package/dist/esm/components/smart-user-picker/index.js +0 -7
  89. package/dist/esm/components/smart-user-picker/service/UsersClient.js +0 -79
  90. package/dist/esm/components/smart-user-picker/service/index.js +0 -1
  91. package/dist/esm/components/smart-user-picker/service/recommendationClient.js +0 -64
  92. package/dist/esm/components/smart-user-picker/service/users-transformer.js +0 -87
  93. package/dist/types/components/smart-user-picker/components/index.d.ts +0 -196
  94. package/dist/types/components/smart-user-picker/config/index.d.ts +0 -17
  95. package/dist/types/components/smart-user-picker/index.d.ts +0 -8
  96. package/dist/types/components/smart-user-picker/service/UsersClient.d.ts +0 -14
  97. package/dist/types/components/smart-user-picker/service/index.d.ts +0 -1
  98. package/dist/types/components/smart-user-picker/service/recommendationClient.d.ts +0 -23
  99. package/dist/types/components/smart-user-picker/service/users-transformer.d.ts +0 -25
@@ -1,26 +1,28 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ /** @jsx jsx */
2
4
  import React from 'react';
3
- import styled from 'styled-components';
5
+ import { css, jsx } from '@emotion/core';
4
6
  import { B400, N200, N800 } from '@atlaskit/theme/colors';
5
7
  import { token } from '@atlaskit/tokens';
6
8
  import Tooltip from '@atlaskit/tooltip';
7
- import { TextWrapper } from '../AvatarItemOption';
9
+ import { textWrapper } from '../AvatarItemOption';
8
10
  import { SizeableAvatar } from '../SizeableAvatar';
9
11
  import { ExternalUserSourcesContainer } from '../ExternalUserSourcesContainer';
10
12
  import InfoIcon from './InfoIcon';
11
13
  import { ExternalAvatarItemOption } from './ExternalAvatarItemOption';
12
14
  import { SourcesTooltipContent } from './SourcesTooltipContent';
13
- export const ImageContainer = styled.span`
14
- height: 16px;
15
- width: 16px;
16
- padding-right: 4px;
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- `;
21
- export const EmailDomainWrapper = styled.span`
22
- font-weight: bold;
23
- `;
15
+ export const imageContainer = css({
16
+ height: '16px',
17
+ width: '16px',
18
+ paddingRight: '4px',
19
+ display: 'flex',
20
+ alignItems: 'center',
21
+ justifyContent: 'center'
22
+ });
23
+ export const emailDomainWrapper = css({
24
+ fontWeight: 'bold'
25
+ });
24
26
  export class ExternalUserOption extends React.PureComponent {
25
27
  constructor(...args) {
26
28
  super(...args);
@@ -31,9 +33,9 @@ export class ExternalUserOption extends React.PureComponent {
31
33
  name
32
34
  }
33
35
  } = this.props;
34
- return /*#__PURE__*/React.createElement(TextWrapper, {
36
+ return jsx("span", {
35
37
  key: "name",
36
- color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text', N800)
38
+ css: textWrapper(this.props.isSelected ? token('color.text.selected', B400) : token('color.text', N800))
37
39
  }, name);
38
40
  });
39
41
 
@@ -48,9 +50,11 @@ export class ExternalUserOption extends React.PureComponent {
48
50
 
49
51
  const [emailUser, emailDomain] = email.split('@');
50
52
  const emailDomainWithAt = `@${emailDomain}`;
51
- return /*#__PURE__*/React.createElement(TextWrapper, {
52
- color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200)
53
- }, emailUser, /*#__PURE__*/React.createElement(EmailDomainWrapper, null, emailDomainWithAt));
53
+ return jsx("span", {
54
+ css: textWrapper(this.props.isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200))
55
+ }, emailUser, jsx("span", {
56
+ css: emailDomainWrapper
57
+ }, emailDomainWithAt));
54
58
  });
55
59
 
56
60
  _defineProperty(this, "renderAvatar", () => {
@@ -61,7 +65,7 @@ export class ExternalUserOption extends React.PureComponent {
61
65
  },
62
66
  status
63
67
  } = this.props;
64
- return /*#__PURE__*/React.createElement(SizeableAvatar, {
68
+ return jsx(SizeableAvatar, {
65
69
  appearance: "big",
66
70
  src: avatarUrl,
67
71
  presence: status,
@@ -69,14 +73,14 @@ export class ExternalUserOption extends React.PureComponent {
69
73
  });
70
74
  });
71
75
 
72
- _defineProperty(this, "getSourcesInfoTooltip", () => this.props.user.isExternal ? /*#__PURE__*/React.createElement(Tooltip, {
76
+ _defineProperty(this, "getSourcesInfoTooltip", () => this.props.user.isExternal ? jsx(Tooltip, {
73
77
  content: this.formattedTooltipContent(),
74
78
  position: 'right-start'
75
- }, /*#__PURE__*/React.createElement(InfoIcon, null)) : undefined);
79
+ }, jsx(InfoIcon, null)) : undefined);
76
80
  }
77
81
 
78
82
  render() {
79
- return /*#__PURE__*/React.createElement(ExternalAvatarItemOption, {
83
+ return jsx(ExternalAvatarItemOption, {
80
84
  avatar: this.renderAvatar(),
81
85
  primaryText: this.getPrimaryText(),
82
86
  secondaryText: this.renderSecondaryText(),
@@ -92,11 +96,11 @@ export class ExternalUserOption extends React.PureComponent {
92
96
  sources
93
97
  }
94
98
  } = this.props;
95
- return /*#__PURE__*/React.createElement(ExternalUserSourcesContainer, {
99
+ return jsx(ExternalUserSourcesContainer, {
96
100
  accountId: id,
97
101
  shouldFetchSources: Boolean(requiresSourceHydration),
98
102
  initialSources: sources
99
- }, sourceData => /*#__PURE__*/React.createElement(SourcesTooltipContent, sourceData));
103
+ }, sourceData => jsx(SourcesTooltipContent, sourceData));
100
104
  }
101
105
 
102
106
  }
@@ -1,22 +1,23 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ /** @jsx jsx */
2
4
  import React from 'react';
3
5
  import { FormattedMessage } from 'react-intl-next';
4
- import styled from 'styled-components';
6
+ import { css, jsx } from '@emotion/core';
5
7
  import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
6
8
  import { token } from '@atlaskit/tokens';
7
9
  import PeopleIcon from '@atlaskit/icon/glyph/people';
8
- import { AvatarItemOption, TextWrapper } from '.././AvatarItemOption';
10
+ import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
9
11
  import { messages } from '.././i18n';
10
- import { HighlightText } from '.././HighlightText';
11
- export const GroupOptionIconWrapper = styled.span`
12
- padding: 2px;
13
-
14
- > span {
15
- background-color: ${token('color.background.neutral', N20)};
16
- border-radius: 50%;
17
- padding: 4px;
12
+ import { HighlightText } from '../HighlightText';
13
+ export const groupOptionIconWrapper = css({
14
+ padding: '2px',
15
+ '> span': {
16
+ backgroundColor: token('color.background.neutral', N20),
17
+ borderRadius: '50%',
18
+ padding: '4px'
18
19
  }
19
- `;
20
+ });
20
21
  export class GroupOption extends React.PureComponent {
21
22
  constructor(...args) {
22
23
  super(...args);
@@ -29,15 +30,17 @@ export class GroupOption extends React.PureComponent {
29
30
  highlight
30
31
  }
31
32
  } = this.props;
32
- return [/*#__PURE__*/React.createElement(TextWrapper, {
33
+ return [jsx("span", {
33
34
  key: "name",
34
- color: isSelected ? token('color.text.selected', B400) : token('color.text', N800)
35
- }, /*#__PURE__*/React.createElement(HighlightText, {
35
+ css: textWrapper(isSelected ? token('color.text.selected', B400) : token('color.text', N800))
36
+ }, jsx(HighlightText, {
36
37
  highlights: highlight && highlight.name
37
38
  }, name))];
38
39
  });
39
40
 
40
- _defineProperty(this, "renderAvatar", () => /*#__PURE__*/React.createElement(GroupOptionIconWrapper, null, /*#__PURE__*/React.createElement(PeopleIcon, {
41
+ _defineProperty(this, "renderAvatar", () => jsx("span", {
42
+ css: groupOptionIconWrapper
43
+ }, jsx(PeopleIcon, {
41
44
  label: "group-icon",
42
45
  size: "medium"
43
46
  })));
@@ -46,9 +49,9 @@ export class GroupOption extends React.PureComponent {
46
49
  const {
47
50
  isSelected
48
51
  } = this.props;
49
- return /*#__PURE__*/React.createElement(TextWrapper, {
50
- color: isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200)
51
- }, /*#__PURE__*/React.createElement(FormattedMessage, messages.groupByline));
52
+ return jsx("span", {
53
+ css: textWrapper(isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200))
54
+ }, jsx(FormattedMessage, messages.groupByline));
52
55
  });
53
56
 
54
57
  _defineProperty(this, "getLozengeProps", () => typeof this.props.group.lozenge === 'string' ? {
@@ -57,7 +60,7 @@ export class GroupOption extends React.PureComponent {
57
60
  }
58
61
 
59
62
  render() {
60
- return /*#__PURE__*/React.createElement(AvatarItemOption, {
63
+ return jsx(AvatarItemOption, {
61
64
  avatar: this.renderAvatar(),
62
65
  secondaryText: this.renderByline(),
63
66
  primaryText: this.getPrimaryText(),
@@ -1,9 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+
4
+ /** @jsx jsx */
3
5
  import React from 'react';
4
6
  import { FormattedMessage } from 'react-intl-next';
5
7
  import { components } from '@atlaskit/select';
6
- import styled from 'styled-components';
8
+ import { css, jsx } from '@emotion/core';
7
9
  import { AddOptionAvatar } from './AddOptionAvatar';
8
10
  import { SizeableAvatar } from './SizeableAvatar';
9
11
  import { messages } from './i18n';
@@ -26,12 +28,12 @@ export const scrollToValue = (valueContainer, control) => {
26
28
  valueContainer.scrollIntoView(false);
27
29
  }
28
30
  };
29
- const GroupTagContainer = styled.div`
30
- padding-left: 2px;
31
- `;
32
- const NameWrapper = styled.span`
33
- padding-left: 5px;
34
- `;
31
+ const groupTagContainer = css({
32
+ paddingLeft: '2px'
33
+ });
34
+ const nameWrapper = css({
35
+ paddingLeft: '5px'
36
+ });
35
37
  export class MultiValue extends React.Component {
36
38
  constructor(props) {
37
39
  super(props);
@@ -46,23 +48,25 @@ export class MultiValue extends React.Component {
46
48
  } = this.props;
47
49
 
48
50
  if (isEmail(data)) {
49
- return selectProps.emailLabel ? /*#__PURE__*/React.createElement(AddOptionAvatar, {
51
+ return selectProps.emailLabel ? jsx(AddOptionAvatar, {
50
52
  isLozenge: true,
51
53
  label: selectProps.emailLabel
52
- }) : /*#__PURE__*/React.createElement(FormattedMessage, messages.addEmail, label => /*#__PURE__*/React.createElement(AddOptionAvatar, {
54
+ }) : jsx(FormattedMessage, messages.addEmail, label => jsx(AddOptionAvatar, {
53
55
  isLozenge: true,
54
56
  label: label
55
57
  }));
56
58
  }
57
59
 
58
60
  if (isGroup(data)) {
59
- return /*#__PURE__*/React.createElement(GroupTagContainer, null, /*#__PURE__*/React.createElement(PeopleIcon, {
61
+ return jsx("div", {
62
+ css: groupTagContainer
63
+ }, jsx(PeopleIcon, {
60
64
  label: "group-icon",
61
65
  size: "small"
62
66
  }));
63
67
  }
64
68
 
65
- return /*#__PURE__*/React.createElement(SizeableAvatar, {
69
+ return jsx(SizeableAvatar, {
66
70
  appearance: "multi",
67
71
  src: getAvatarUrl(data),
68
72
  name: label
@@ -110,12 +114,14 @@ export class MultiValue extends React.Component {
110
114
  innerProps,
111
115
  ...rest
112
116
  } = this.props;
113
- return /*#__PURE__*/React.createElement(components.MultiValue, _extends({}, rest, {
117
+ return jsx(components.MultiValue, _extends({}, rest, {
114
118
  innerProps: {
115
119
  ref: this.containerRef
116
120
  },
117
121
  cropWithEllipsis: false
118
- }), this.getElemBefore(), " ", /*#__PURE__*/React.createElement(NameWrapper, null, children));
122
+ }), this.getElemBefore(), " ", jsx("div", {
123
+ css: nameWrapper
124
+ }, children));
119
125
  }
120
126
 
121
127
  }
@@ -1,42 +1,41 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
2
3
  import { themed } from '@atlaskit/theme/components';
3
4
  import { token } from '@atlaskit/tokens';
4
5
  import { gridSize } from '@atlaskit/theme/constants';
5
6
  import { components } from '@atlaskit/select';
6
- import styled, { css } from 'styled-components';
7
+ import { css, jsx } from '@emotion/core';
7
8
  import { N200, DN90 } from '@atlaskit/theme/colors';
8
9
  const spacing = gridSize();
9
10
  const fontSize = 12;
10
11
  const innerHeight = spacing * 2; // 16px
11
12
 
12
13
  const lineHeight = innerHeight / fontSize;
13
- const ControlWrapper = styled.div`
14
- display: flex;
15
- flex-direction: column;
16
- padding: 0px ${spacing}px ${spacing}px;
17
- `;
14
+ const controlWrapper = css({
15
+ display: 'flex',
16
+ flexDirection: 'column',
17
+ padding: `0px ${spacing}px ${spacing}px`
18
+ });
18
19
  const getColor = themed({
19
20
  light: token('color.text.subtlest', N200),
20
21
  dark: token('color.text.subtlest', DN90)
21
22
  });
22
23
 
23
- const getPadding = () => {
24
+ const getLabelStyle = () => {
24
25
  const right = 0;
25
26
  const bottom = spacing / 2;
26
27
  const left = 0;
27
28
  const top = spacing * 2.5;
28
- return css`
29
- padding: ${top}px ${right}px ${bottom}px ${left}px;
30
- `;
29
+ const color = getColor();
30
+ return css({
31
+ color,
32
+ fontSize: `${fontSize}px`,
33
+ fontWeight: 600,
34
+ lineHeight: `${lineHeight}`,
35
+ padding: `${top}px ${right}px ${bottom}px ${left}px`
36
+ });
31
37
  };
32
38
 
33
- const Label = styled.div`
34
- color: ${props => getColor(props)};
35
- font-size: ${fontSize}px;
36
- font-weight: 600;
37
- line-height: ${lineHeight};
38
- ${getPadding}
39
- `;
40
39
  export class PopupControl extends React.PureComponent {
41
40
  render() {
42
41
  const {
@@ -44,7 +43,11 @@ export class PopupControl extends React.PureComponent {
44
43
  popupTitle
45
44
  }
46
45
  } = this.props;
47
- return /*#__PURE__*/React.createElement(ControlWrapper, null, /*#__PURE__*/React.createElement(Label, null, popupTitle), /*#__PURE__*/React.createElement(components.Control, this.props));
46
+ return jsx("div", {
47
+ css: controlWrapper
48
+ }, jsx("div", {
49
+ css: getLabelStyle()
50
+ }, popupTitle), jsx(components.Control, this.props));
48
51
  }
49
52
 
50
53
  }
@@ -1,27 +1,28 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+
3
+ /** @jsx jsx */
1
4
  import { AvatarItem } from '@atlaskit/avatar';
2
- import React from 'react';
3
- import styled from 'styled-components';
5
+ import { css, jsx } from '@emotion/core';
4
6
  import { SizeableAvatar } from './SizeableAvatar';
5
7
  import { getAvatarUrl } from './utils';
6
- const AvatarItemComponent = styled.div`
7
- border: none !important;
8
- padding: 0 !important;
9
- width: auto;
10
- overflow: hidden;
11
- /* IE 11 needs this prop explicitly to flex items */
12
- flex: 1 1 auto;
13
- min-width: 100px;
8
+ const avatarItemComponent = css({
9
+ border: 'none !important',
10
+ padding: '0 !important',
11
+ width: 'auto',
12
+ overflow: 'hidden',
14
13
 
15
- & > span {
16
- box-sizing: border-box;
17
- }
18
-
19
- &:hover {
20
- width: auto;
21
- padding: 0;
22
- border: none;
14
+ /* IE 11 needs this prop explicitly to flex items */
15
+ flex: '1 1 auto',
16
+ minWidth: '100px',
17
+ '& > span': {
18
+ boxSizing: 'border-box'
19
+ },
20
+ '&:hover': {
21
+ width: 'auto',
22
+ padding: 0,
23
+ border: 'none'
23
24
  }
24
- `;
25
+ });
25
26
  export const SingleValue = props => {
26
27
  const {
27
28
  data: {
@@ -33,9 +34,9 @@ export const SingleValue = props => {
33
34
  isFocused
34
35
  }
35
36
  } = props;
36
- return !isFocused ? /*#__PURE__*/React.createElement(AvatarItem, {
37
+ return !isFocused ? jsx(AvatarItem, {
37
38
  backgroundColor: "transparent",
38
- avatar: /*#__PURE__*/React.createElement(SizeableAvatar, {
39
+ avatar: jsx(SizeableAvatar, {
39
40
  src: getAvatarUrl(data),
40
41
  appearance: appearance,
41
42
  name: label
@@ -44,5 +45,7 @@ export const SingleValue = props => {
44
45
  }, ({
45
46
  ref,
46
47
  ...props
47
- }) => /*#__PURE__*/React.createElement(AvatarItemComponent, props)) : null;
48
+ }) => jsx("div", _extends({
49
+ css: avatarItemComponent
50
+ }, props))) : null;
48
51
  };
@@ -1,13 +1,15 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ /** @jsx jsx */
2
4
  import React from 'react';
3
- import styled from 'styled-components';
5
+ import { css, jsx } from '@emotion/core';
4
6
  import { components } from '@atlaskit/select';
5
7
  import { SizeableAvatar } from './SizeableAvatar';
6
8
  import { BORDER_PADDING } from './styles';
7
- const PlaceholderIconContainer = styled.div`
8
- padding-left: ${BORDER_PADDING}px;
9
- line-height: 0;
10
- `;
9
+ const placeholderIconContainer = css({
10
+ paddingLeft: `${BORDER_PADDING}px`,
11
+ lineHeight: 0
12
+ });
11
13
 
12
14
  const showUserAvatar = (inputValue, value) => value && value.data && inputValue === value.label;
13
15
 
@@ -27,7 +29,7 @@ export class SingleValueContainer extends React.Component {
27
29
  } = this.props;
28
30
 
29
31
  if (isFocused || !hasValue) {
30
- return /*#__PURE__*/React.createElement(SizeableAvatar, {
32
+ return jsx(SizeableAvatar, {
31
33
  appearance: appearance,
32
34
  src: showUserAvatar(inputValue, value) ? value.data.avatarUrl : undefined
33
35
  });
@@ -42,7 +44,9 @@ export class SingleValueContainer extends React.Component {
42
44
  children,
43
45
  ...valueContainerProps
44
46
  } = this.props;
45
- return /*#__PURE__*/React.createElement(components.ValueContainer, valueContainerProps, /*#__PURE__*/React.createElement(PlaceholderIconContainer, null, this.renderAvatar()), children);
47
+ return jsx(components.ValueContainer, valueContainerProps, jsx("div", {
48
+ css: placeholderIconContainer
49
+ }, this.renderAvatar()), children);
46
50
  }
47
51
 
48
52
  }
@@ -1,10 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+
4
+ /** @jsx jsx */
3
5
  import { B400, N800, N200 } from '@atlaskit/theme/colors';
4
6
  import { token } from '@atlaskit/tokens';
7
+ import { jsx } from '@emotion/core';
5
8
  import React from 'react';
6
9
  import { FormattedMessage } from 'react-intl-next';
7
- import { AvatarItemOption, TextWrapper } from '.././AvatarItemOption';
10
+ import { AvatarItemOption, textWrapper } from '.././AvatarItemOption';
8
11
  import { HighlightText } from '.././HighlightText';
9
12
  import { messages } from '.././i18n';
10
13
  import { SizeableAvatar } from '.././SizeableAvatar';
@@ -19,10 +22,10 @@ export class TeamOption extends React.PureComponent {
19
22
  highlight
20
23
  }
21
24
  } = this.props;
22
- return [/*#__PURE__*/React.createElement(TextWrapper, {
25
+ return [jsx("span", {
23
26
  key: "name",
24
- color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text', N800)
25
- }, /*#__PURE__*/React.createElement(HighlightText, {
27
+ css: textWrapper(this.props.isSelected ? token('color.text.selected', B400) : token('color.text', N800))
28
+ }, jsx(HighlightText, {
26
29
  highlights: highlight && highlight.name
27
30
  }, name))];
28
31
  });
@@ -41,9 +44,9 @@ export class TeamOption extends React.PureComponent {
41
44
  } else {
42
45
  if (includesYou === true) {
43
46
  if (memberCount > 50) {
44
- return this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, messages.plus50MembersWithYou));
47
+ return this.getBylineComponent(isSelected, jsx(FormattedMessage, messages.plus50MembersWithYou));
45
48
  } else {
46
- return this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.memberCountWithYou, {
49
+ return this.getBylineComponent(isSelected, jsx(FormattedMessage, _extends({}, messages.memberCountWithYou, {
47
50
  values: {
48
51
  count: memberCount
49
52
  }
@@ -51,9 +54,9 @@ export class TeamOption extends React.PureComponent {
51
54
  }
52
55
  } else {
53
56
  if (memberCount > 50) {
54
- return this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, messages.plus50MembersWithoutYou));
57
+ return this.getBylineComponent(isSelected, jsx(FormattedMessage, messages.plus50MembersWithoutYou));
55
58
  } else {
56
- return this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.memberCountWithoutYou, {
59
+ return this.getBylineComponent(isSelected, jsx(FormattedMessage, _extends({}, messages.memberCountWithoutYou, {
57
60
  values: {
58
61
  count: memberCount
59
62
  }
@@ -63,8 +66,8 @@ export class TeamOption extends React.PureComponent {
63
66
  }
64
67
  });
65
68
 
66
- _defineProperty(this, "getBylineComponent", (isSelected, message) => /*#__PURE__*/React.createElement(TextWrapper, {
67
- color: isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200)
69
+ _defineProperty(this, "getBylineComponent", (isSelected, message) => jsx("span", {
70
+ css: textWrapper(isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200))
68
71
  }, message));
69
72
 
70
73
  _defineProperty(this, "renderAvatar", () => {
@@ -74,7 +77,7 @@ export class TeamOption extends React.PureComponent {
74
77
  name
75
78
  }
76
79
  } = this.props;
77
- return /*#__PURE__*/React.createElement(SizeableAvatar, {
80
+ return jsx(SizeableAvatar, {
78
81
  appearance: "big",
79
82
  src: avatarUrl,
80
83
  name: name
@@ -87,7 +90,7 @@ export class TeamOption extends React.PureComponent {
87
90
  }
88
91
 
89
92
  render() {
90
- return /*#__PURE__*/React.createElement(AvatarItemOption, {
93
+ return jsx(AvatarItemOption, {
91
94
  avatar: this.renderAvatar(),
92
95
  secondaryText: this.renderByline(),
93
96
  primaryText: this.getPrimaryText(),
@@ -1,8 +1,11 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ /** @jsx jsx */
2
4
  import { B400, N800, N200 } from '@atlaskit/theme/colors';
3
5
  import { token } from '@atlaskit/tokens';
6
+ import { jsx } from '@emotion/core';
4
7
  import React from 'react';
5
- import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
8
+ import { AvatarItemOption, textWrapper } from './AvatarItemOption';
6
9
  import { HighlightText } from './HighlightText';
7
10
  import { SizeableAvatar } from './SizeableAvatar';
8
11
  import { hasValue } from './utils';
@@ -18,19 +21,19 @@ export class UserOption extends React.PureComponent {
18
21
  highlight
19
22
  }
20
23
  } = this.props;
21
- const result = [/*#__PURE__*/React.createElement(TextWrapper, {
24
+ const result = [jsx("span", {
22
25
  key: "name",
23
- color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text', N800)
24
- }, /*#__PURE__*/React.createElement(HighlightText, {
26
+ css: textWrapper(this.props.isSelected ? token('color.text.selected', B400) : token('color.text', N800))
27
+ }, jsx(HighlightText, {
25
28
  highlights: highlight && highlight.name
26
29
  }, name))];
27
30
 
28
31
  if (hasValue(publicName) && name.trim() !== publicName.trim()) {
29
- result.push( /*#__PURE__*/React.createElement(React.Fragment, {
32
+ result.push(jsx(React.Fragment, {
30
33
  key: "publicName"
31
- }, ' ', /*#__PURE__*/React.createElement(TextWrapper, {
32
- color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200)
33
- }, "(", /*#__PURE__*/React.createElement(HighlightText, {
34
+ }, ' ', jsx("span", {
35
+ css: textWrapper(this.props.isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200))
36
+ }, "(", jsx(HighlightText, {
34
37
  highlights: highlight && highlight.publicName
35
38
  }, publicName), ")")));
36
39
  }
@@ -38,8 +41,8 @@ export class UserOption extends React.PureComponent {
38
41
  return result;
39
42
  });
40
43
 
41
- _defineProperty(this, "renderSecondaryText", () => this.props.user.byline ? /*#__PURE__*/React.createElement(TextWrapper, {
42
- color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200)
44
+ _defineProperty(this, "renderSecondaryText", () => this.props.user.byline ? jsx("span", {
45
+ css: textWrapper(this.props.isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200))
43
46
  }, this.props.user.byline) : undefined);
44
47
 
45
48
  _defineProperty(this, "renderAvatar", () => {
@@ -50,7 +53,7 @@ export class UserOption extends React.PureComponent {
50
53
  },
51
54
  status
52
55
  } = this.props;
53
- return /*#__PURE__*/React.createElement(SizeableAvatar, {
56
+ return jsx(SizeableAvatar, {
54
57
  appearance: "big",
55
58
  src: avatarUrl,
56
59
  presence: status,
@@ -64,7 +67,7 @@ export class UserOption extends React.PureComponent {
64
67
  }
65
68
 
66
69
  render() {
67
- return /*#__PURE__*/React.createElement(AvatarItemOption, {
70
+ return jsx(AvatarItemOption, {
68
71
  avatar: this.renderAvatar(),
69
72
  primaryText: this.getPrimaryText(),
70
73
  secondaryText: this.renderSecondaryText(),
@@ -62,7 +62,7 @@ export const messages = defineMessages({
62
62
  },
63
63
  externalUserSourcesHeading: {
64
64
  id: 'fabric.elements.user-picker.external.sourced.from',
65
- defaultMessage: 'Also found in:',
65
+ defaultMessage: 'Found in:',
66
66
  description: 'From where the external user is coming'
67
67
  },
68
68
  externalUserSourcesError: {
@@ -1,6 +1,5 @@
1
1
  export { isValidEmail } from './components/emailValidation';
2
2
  export { UserPicker as default } from './components/UserPicker';
3
- export { getUserRecommendations, hydrateDefaultValues, SmartUserPicker, setSmartUserPickerEnv } from './components/smart-user-picker/index';
4
3
  export { PopupUserPicker } from './components/PopupUserPicker';
5
4
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
6
5
  export { // Constants
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "8.8.5",
3
+ "version": "9.0.1",
4
4
  "sideEffects": false
5
5
  }