@atlaskit/user-picker 7.16.4 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/cjs/analytics.js +1 -1
  3. package/dist/cjs/components/AddOptionAvatar.js +5 -3
  4. package/dist/cjs/components/AvatarItemOption.js +5 -3
  5. package/dist/cjs/components/BaseUserPicker.js +3 -3
  6. package/dist/cjs/components/EmailOption.js +6 -4
  7. package/dist/cjs/components/ExternalUserOption.js +9 -7
  8. package/dist/cjs/components/GroupOption.js +8 -6
  9. package/dist/cjs/components/MessagesIntlProvider.js +4 -3
  10. package/dist/cjs/components/MultiValue.js +3 -3
  11. package/dist/cjs/components/MultiValueContainer.js +5 -3
  12. package/dist/cjs/components/PopupControl.js +40 -7
  13. package/dist/cjs/components/PopupUserPicker.js +1 -1
  14. package/dist/cjs/components/TeamOption.js +9 -7
  15. package/dist/cjs/components/UserOption.js +5 -3
  16. package/dist/cjs/components/UserPicker.js +1 -1
  17. package/dist/cjs/components/assets/github.js +3 -1
  18. package/dist/cjs/components/assets/google.js +6 -4
  19. package/dist/cjs/components/assets/microsoft.js +7 -5
  20. package/dist/cjs/components/assets/slack.js +11 -9
  21. package/dist/cjs/components/i18n.js +2 -2
  22. package/dist/cjs/components/smart-user-picker/components/index.js +3 -3
  23. package/dist/cjs/components/smart-user-picker/config/index.js +1 -1
  24. package/dist/cjs/components/smart-user-picker/index.js +4 -4
  25. package/dist/cjs/components/styles.js +11 -15
  26. package/dist/cjs/components/utils.js +1 -1
  27. package/dist/cjs/i18n/fi.js +2 -0
  28. package/dist/cjs/i18n/fr.js +3 -1
  29. package/dist/cjs/i18n/index.js +22 -22
  30. package/dist/cjs/i18n/uk.js +2 -0
  31. package/dist/cjs/i18n/zh_TW.js +2 -0
  32. package/dist/cjs/index.js +28 -28
  33. package/dist/cjs/types.js +1 -1
  34. package/dist/cjs/version.json +1 -1
  35. package/dist/es2019/components/AddOptionAvatar.js +3 -3
  36. package/dist/es2019/components/AvatarItemOption.js +3 -2
  37. package/dist/es2019/components/BaseUserPicker.js +1 -1
  38. package/dist/es2019/components/EmailOption.js +4 -3
  39. package/dist/es2019/components/ExternalUserOption.js +5 -4
  40. package/dist/es2019/components/GroupOption.js +5 -4
  41. package/dist/es2019/components/MessagesIntlProvider.js +2 -1
  42. package/dist/es2019/components/MultiValue.js +1 -1
  43. package/dist/es2019/components/MultiValueContainer.js +7 -4
  44. package/dist/es2019/components/PopupControl.js +34 -6
  45. package/dist/es2019/components/TeamOption.js +4 -3
  46. package/dist/es2019/components/UserOption.js +4 -3
  47. package/dist/es2019/components/assets/github.js +2 -1
  48. package/dist/es2019/components/assets/google.js +5 -4
  49. package/dist/es2019/components/assets/microsoft.js +6 -5
  50. package/dist/es2019/components/assets/slack.js +10 -9
  51. package/dist/es2019/components/i18n.js +1 -1
  52. package/dist/es2019/components/smart-user-picker/components/index.js +1 -1
  53. package/dist/es2019/components/styles.js +9 -8
  54. package/dist/es2019/i18n/fi.js +2 -0
  55. package/dist/es2019/i18n/fr.js +3 -1
  56. package/dist/es2019/i18n/index.js +10 -10
  57. package/dist/es2019/i18n/uk.js +2 -0
  58. package/dist/es2019/i18n/zh_TW.js +2 -0
  59. package/dist/es2019/version.json +1 -1
  60. package/dist/esm/components/AddOptionAvatar.js +4 -3
  61. package/dist/esm/components/AvatarItemOption.js +3 -2
  62. package/dist/esm/components/BaseUserPicker.js +1 -1
  63. package/dist/esm/components/EmailOption.js +4 -3
  64. package/dist/esm/components/ExternalUserOption.js +5 -4
  65. package/dist/esm/components/GroupOption.js +5 -4
  66. package/dist/esm/components/MessagesIntlProvider.js +2 -1
  67. package/dist/esm/components/MultiValue.js +1 -1
  68. package/dist/esm/components/MultiValueContainer.js +3 -2
  69. package/dist/esm/components/PopupControl.js +29 -7
  70. package/dist/esm/components/TeamOption.js +4 -3
  71. package/dist/esm/components/UserOption.js +4 -3
  72. package/dist/esm/components/assets/github.js +2 -1
  73. package/dist/esm/components/assets/google.js +5 -4
  74. package/dist/esm/components/assets/microsoft.js +6 -5
  75. package/dist/esm/components/assets/slack.js +10 -9
  76. package/dist/esm/components/i18n.js +1 -1
  77. package/dist/esm/components/smart-user-picker/components/index.js +1 -1
  78. package/dist/esm/components/styles.js +9 -8
  79. package/dist/esm/i18n/fi.js +2 -0
  80. package/dist/esm/i18n/fr.js +3 -1
  81. package/dist/esm/i18n/index.js +10 -10
  82. package/dist/esm/i18n/uk.js +2 -0
  83. package/dist/esm/i18n/zh_TW.js +2 -0
  84. package/dist/esm/version.json +1 -1
  85. package/dist/types/components/BaseUserPicker.d.ts +1 -1
  86. package/dist/types/components/MessagesIntlProvider.d.ts +4 -4
  87. package/dist/types/components/PopupUserPicker.d.ts +1 -1
  88. package/dist/types/components/SingleValue.d.ts +1 -0
  89. package/dist/types/components/UserPicker.d.ts +1 -1
  90. package/dist/types/components/smart-user-picker/service/recommendationClient.d.ts +2 -2
  91. package/dist/types/components/smart-user-picker/service/users-transformer.d.ts +3 -3
  92. package/dist/types/i18n/fi.d.ts +2 -0
  93. package/dist/types/i18n/fr.d.ts +2 -0
  94. package/dist/types/i18n/index.d.ts +10 -10
  95. package/dist/types/i18n/uk.d.ts +2 -0
  96. package/dist/types/i18n/zh_TW.d.ts +2 -0
  97. package/package.json +12 -7
@@ -1,7 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
- import { FormattedMessage } from 'react-intl';
3
+ import { FormattedMessage } from 'react-intl-next';
4
4
  import { B400, N200, N800 } from '@atlaskit/theme/colors';
5
+ import { token } from '@atlaskit/tokens';
5
6
  import { AddOptionAvatar } from './AddOptionAvatar';
6
7
  import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
7
8
  import { messages } from './i18n';
@@ -24,13 +25,13 @@ export class EmailOption extends React.PureComponent {
24
25
  } = this.props;
25
26
  return /*#__PURE__*/React.createElement(TextWrapper, {
26
27
  key: "name",
27
- color: this.props.isSelected ? B400 : N800
28
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.highEmphasis', N800)
28
29
  }, id);
29
30
  });
30
31
 
31
32
  _defineProperty(this, "renderSecondaryText", label => {
32
33
  return /*#__PURE__*/React.createElement(TextWrapper, {
33
- color: this.props.isSelected ? B400 : N200
34
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.lowEmphasis', N200)
34
35
  }, label);
35
36
  });
36
37
 
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { B400, N200, N800 } from '@atlaskit/theme/colors';
3
+ import { token } from '@atlaskit/tokens';
3
4
  import React from 'react';
4
5
  import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
5
6
  import { SizeableAvatar } from './SizeableAvatar';
@@ -10,7 +11,7 @@ import { SlackIcon } from './assets/slack';
10
11
  import { GoogleIcon } from './assets/google';
11
12
  import { MicrosoftIcon } from './assets/microsoft';
12
13
  import { GitHubIcon } from './assets/github';
13
- import { FormattedMessage } from 'react-intl';
14
+ import { FormattedMessage } from 'react-intl-next';
14
15
  import { messages } from './i18n';
15
16
  export const ImageContainer = styled.span`
16
17
  height: 12px;
@@ -57,7 +58,7 @@ export class ExternalUserOption extends React.PureComponent {
57
58
  } = this.props;
58
59
  return /*#__PURE__*/React.createElement(TextWrapper, {
59
60
  key: "name",
60
- color: this.props.isSelected ? B400 : N800
61
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.highEmphasis', N800)
61
62
  }, name);
62
63
  });
63
64
 
@@ -73,7 +74,7 @@ export class ExternalUserOption extends React.PureComponent {
73
74
  const [emailUser, emailDomain] = email.split('@');
74
75
  const emailDomainWithAt = `@${emailDomain}`;
75
76
  return /*#__PURE__*/React.createElement(TextWrapper, {
76
- color: this.props.isSelected ? B400 : N200
77
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.lowEmphasis', N200)
77
78
  }, emailUser, /*#__PURE__*/React.createElement(EmailDomainWrapper, null, emailDomainWithAt));
78
79
  });
79
80
 
@@ -102,7 +103,7 @@ export class ExternalUserOption extends React.PureComponent {
102
103
  }, /*#__PURE__*/React.createElement(EditorPanelIcon, {
103
104
  label: "",
104
105
  size: "large",
105
- primaryColor: N200
106
+ primaryColor: token('color.text.lowEmphasis', N200)
106
107
  })) : undefined;
107
108
  });
108
109
  }
@@ -1,8 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
- import { FormattedMessage } from 'react-intl';
3
+ import { FormattedMessage } from 'react-intl-next';
4
4
  import styled from 'styled-components';
5
5
  import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
6
+ import { token } from '@atlaskit/tokens';
6
7
  import PeopleIcon from '@atlaskit/icon/glyph/people';
7
8
  import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
8
9
  import { messages } from './i18n';
@@ -11,7 +12,7 @@ export const GroupOptionIconWrapper = styled.span`
11
12
  padding: 2px;
12
13
 
13
14
  > span {
14
- background-color: ${N20};
15
+ background-color: ${token('color.background.subtleNeutral.resting', N20)};
15
16
  border-radius: 50%;
16
17
  padding: 4px;
17
18
  }
@@ -30,7 +31,7 @@ export class GroupOption extends React.PureComponent {
30
31
  } = this.props;
31
32
  return [/*#__PURE__*/React.createElement(TextWrapper, {
32
33
  key: "name",
33
- color: isSelected ? B400 : N800
34
+ color: isSelected ? token('color.text.selected', B400) : token('color.text.highEmphasis', N800)
34
35
  }, /*#__PURE__*/React.createElement(HighlightText, {
35
36
  highlights: highlight && highlight.name
36
37
  }, name))];
@@ -46,7 +47,7 @@ export class GroupOption extends React.PureComponent {
46
47
  isSelected
47
48
  } = this.props;
48
49
  return /*#__PURE__*/React.createElement(TextWrapper, {
49
- color: isSelected ? B400 : N200
50
+ color: isSelected ? token('color.text.selected', B400) : token('color.text.lowEmphasis', N200)
50
51
  }, /*#__PURE__*/React.createElement(FormattedMessage, messages.groupByline));
51
52
  });
52
53
 
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { IntlProvider, injectIntl } from 'react-intl';
2
+ import { IntlProvider, injectIntl } from 'react-intl-next';
3
3
  import { getMessagesForLocale } from '../util/i18n-util';
4
4
  const EMPTY = {};
5
5
 
@@ -35,6 +35,7 @@ const MessagesIntlProvider = props => {
35
35
  };
36
36
  }, [intl.messages, messages]);
37
37
  return /*#__PURE__*/React.createElement(IntlProvider, {
38
+ locale: intl.locale,
38
39
  messages: mergedMessages
39
40
  }, children);
40
41
  };
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
- import { FormattedMessage } from 'react-intl';
4
+ import { FormattedMessage } from 'react-intl-next';
5
5
  import { components } from '@atlaskit/select';
6
6
  import styled from 'styled-components';
7
7
  import { AddOptionAvatar } from './AddOptionAvatar';
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { components } from '@atlaskit/select';
3
3
  import React from 'react';
4
4
  import ReactDOM from 'react-dom';
5
- import { FormattedMessage } from 'react-intl';
5
+ import { FormattedMessage } from 'react-intl-next';
6
6
  import { messages } from './i18n';
7
7
  import { isChildInput } from './utils';
8
8
  export class MultiValueContainer extends React.PureComponent {
@@ -47,9 +47,12 @@ export class MultiValueContainer extends React.PureComponent {
47
47
  return value && value.length > 0;
48
48
  });
49
49
 
50
- _defineProperty(this, "addPlaceholder", placeholder => React.Children.map(this.props.children, child => isChildInput(child) && this.showPlaceholder() ? /*#__PURE__*/React.cloneElement(child, {
51
- placeholder
52
- }) : child));
50
+ _defineProperty(this, "addPlaceholder", placeholder => {
51
+ const children = React.Children.map(this.props.children, child => isChildInput(child) && this.showPlaceholder() ? /*#__PURE__*/React.cloneElement(child, {
52
+ placeholder
53
+ }) : child);
54
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
55
+ });
53
56
 
54
57
  _defineProperty(this, "renderChildren", () => {
55
58
  const {
@@ -1,11 +1,41 @@
1
1
  import React from 'react';
2
- import { Label } from '@atlaskit/field-base';
2
+ import { themed } from '@atlaskit/theme/components';
3
+ import { token } from '@atlaskit/tokens';
4
+ import { gridSize } from '@atlaskit/theme/constants';
3
5
  import { components } from '@atlaskit/select';
4
- import styled from 'styled-components';
6
+ import styled, { css } from 'styled-components';
7
+ import { N200, DN90 } from '@atlaskit/theme/colors';
8
+ const spacing = gridSize();
9
+ const fontSize = 12;
10
+ const innerHeight = spacing * 2; // 16px
11
+
12
+ const lineHeight = innerHeight / fontSize;
5
13
  const ControlWrapper = styled.div`
6
14
  display: flex;
7
15
  flex-direction: column;
8
- padding: 0px 8px 8px;
16
+ padding: 0px ${spacing}px ${spacing}px;
17
+ `;
18
+ const getColor = themed({
19
+ light: token('color.text.lowEmphasis', N200),
20
+ dark: token('color.text.lowEmphasis', DN90)
21
+ });
22
+
23
+ const getPadding = () => {
24
+ const right = 0;
25
+ const bottom = spacing / 2;
26
+ const left = 0;
27
+ const top = spacing * 2.5;
28
+ return css`
29
+ padding: ${top}px ${right}px ${bottom}px ${left}px;
30
+ `;
31
+ };
32
+
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}
9
39
  `;
10
40
  export class PopupControl extends React.PureComponent {
11
41
  render() {
@@ -14,9 +44,7 @@ export class PopupControl extends React.PureComponent {
14
44
  popupTitle
15
45
  }
16
46
  } = this.props;
17
- return /*#__PURE__*/React.createElement(ControlWrapper, null, /*#__PURE__*/React.createElement(Label, {
18
- label: popupTitle
19
- }), /*#__PURE__*/React.createElement(components.Control, this.props));
47
+ return /*#__PURE__*/React.createElement(ControlWrapper, null, /*#__PURE__*/React.createElement(Label, null, popupTitle), /*#__PURE__*/React.createElement(components.Control, this.props));
20
48
  }
21
49
 
22
50
  }
@@ -1,8 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import { B400, N800, N200 } from '@atlaskit/theme/colors';
4
+ import { token } from '@atlaskit/tokens';
4
5
  import React from 'react';
5
- import { FormattedMessage } from 'react-intl';
6
+ import { FormattedMessage } from 'react-intl-next';
6
7
  import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
7
8
  import { HighlightText } from './HighlightText';
8
9
  import { messages } from './i18n';
@@ -20,7 +21,7 @@ export class TeamOption extends React.PureComponent {
20
21
  } = this.props;
21
22
  return [/*#__PURE__*/React.createElement(TextWrapper, {
22
23
  key: "name",
23
- color: this.props.isSelected ? B400 : N800
24
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.highEmphasis', N800)
24
25
  }, /*#__PURE__*/React.createElement(HighlightText, {
25
26
  highlights: highlight && highlight.name
26
27
  }, name))];
@@ -63,7 +64,7 @@ export class TeamOption extends React.PureComponent {
63
64
  });
64
65
 
65
66
  _defineProperty(this, "getBylineComponent", (isSelected, message) => /*#__PURE__*/React.createElement(TextWrapper, {
66
- color: isSelected ? B400 : N200
67
+ color: isSelected ? token('color.text.selected', B400) : token('color.text.lowEmphasis', N200)
67
68
  }, message));
68
69
 
69
70
  _defineProperty(this, "renderAvatar", () => {
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { B400, N800, N200 } from '@atlaskit/theme/colors';
3
+ import { token } from '@atlaskit/tokens';
3
4
  import React from 'react';
4
5
  import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
5
6
  import { HighlightText } from './HighlightText';
@@ -19,7 +20,7 @@ export class UserOption extends React.PureComponent {
19
20
  } = this.props;
20
21
  const result = [/*#__PURE__*/React.createElement(TextWrapper, {
21
22
  key: "name",
22
- color: this.props.isSelected ? B400 : N800
23
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.highEmphasis', N800)
23
24
  }, /*#__PURE__*/React.createElement(HighlightText, {
24
25
  highlights: highlight && highlight.name
25
26
  }, name))];
@@ -28,7 +29,7 @@ export class UserOption extends React.PureComponent {
28
29
  result.push( /*#__PURE__*/React.createElement(React.Fragment, {
29
30
  key: "publicName"
30
31
  }, ' ', /*#__PURE__*/React.createElement(TextWrapper, {
31
- color: this.props.isSelected ? B400 : N200
32
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.lowEmphasis', N200)
32
33
  }, "(", /*#__PURE__*/React.createElement(HighlightText, {
33
34
  highlights: highlight && highlight.publicName
34
35
  }, publicName), ")")));
@@ -38,7 +39,7 @@ export class UserOption extends React.PureComponent {
38
39
  });
39
40
 
40
41
  _defineProperty(this, "renderSecondaryText", () => this.props.user.byline ? /*#__PURE__*/React.createElement(TextWrapper, {
41
- color: this.props.isSelected ? B400 : N200
42
+ color: this.props.isSelected ? token('color.text.selected', B400) : token('color.text.lowEmphasis', N200)
42
43
  }, this.props.user.byline) : undefined);
43
44
 
44
45
  _defineProperty(this, "renderAvatar", () => {
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
+ import { token } from '@atlaskit/tokens';
3
4
  export function GitHubIcon(props) {
4
5
  return /*#__PURE__*/React.createElement("svg", _extends({
5
6
  width: "12",
@@ -11,6 +12,6 @@ export function GitHubIcon(props) {
11
12
  fillRule: "evenodd",
12
13
  clipRule: "evenodd",
13
14
  d: "M11.9778 0C5.3635 0 0 5.45261 0 12.179C0 17.5601 3.432 22.1253 8.19114 23.7357C8.78975 23.8484 9.00952 23.4715 9.00952 23.1498C9.00952 22.8594 8.99841 21.9 8.99326 20.8823C5.66103 21.6191 4.95789 19.4454 4.95789 19.4454C4.41303 18.0376 3.62796 17.6633 3.62796 17.6633C2.54122 16.9074 3.70988 16.923 3.70988 16.923C4.91266 17.0089 5.54598 18.178 5.54598 18.178C6.61428 20.0399 8.34803 19.5016 9.03154 19.1904C9.13904 18.4033 9.44945 17.866 9.792 17.5619C7.13157 17.2539 4.33487 16.2096 4.33487 11.5429C4.33487 10.2133 4.80278 9.12682 5.56899 8.27391C5.44463 7.96716 5.03464 6.72844 5.68502 5.05087C5.68502 5.05087 6.69084 4.72354 8.97976 6.29927C9.9352 6.02942 10.9599 5.89409 11.9778 5.88945C12.9957 5.89409 14.0212 6.02942 14.9784 6.29927C17.2645 4.72354 18.269 5.05087 18.269 5.05087C18.9209 6.72844 18.5107 7.96716 18.3864 8.27391C19.1544 9.12682 19.6191 10.2133 19.6191 11.5429C19.6191 16.2207 16.8171 17.2507 14.1499 17.5522C14.5795 17.9301 14.9623 18.6713 14.9623 19.8076C14.9623 21.4371 14.9484 22.7487 14.9484 23.1498C14.9484 23.4739 15.164 23.8537 15.7712 23.7341C20.5277 22.1219 23.9554 17.5582 23.9554 12.179C23.9554 5.45261 18.5927 0 11.9778 0Z",
14
- fill: "white"
15
+ fill: token('color.text.onBold', 'white')
15
16
  }));
16
17
  }
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
+ import { token } from '@atlaskit/tokens';
3
4
  export function GoogleIcon(props) {
4
5
  return /*#__PURE__*/React.createElement("svg", _extends({
5
6
  width: "12",
@@ -11,21 +12,21 @@ export function GoogleIcon(props) {
11
12
  fillRule: "evenodd",
12
13
  clipRule: "evenodd",
13
14
  d: "M8.32062 3.21332L10.014 1.55999C8.97396 0.593331 7.62063 0 6.00062 0C3.65396 0 1.62729 1.34666 0.640625 3.30665L2.58062 4.81331C3.06729 3.36665 4.41396 2.31999 6.00062 2.31999C7.12729 2.31999 7.88729 2.80665 8.32062 3.21332Z",
14
- fill: "white"
15
+ fill: token('color.text.onBold', 'white')
15
16
  }), /*#__PURE__*/React.createElement("path", {
16
17
  fillRule: "evenodd",
17
18
  clipRule: "evenodd",
18
19
  d: "M11.76 6.13291C11.76 5.63958 11.72 5.27958 11.6333 4.90625H6V7.13291H9.30667C9.24 7.68624 8.88 8.51957 8.08 9.07957L9.97333 10.5462C11.1067 9.49956 11.76 7.95957 11.76 6.13291V6.13291V6.13291Z",
19
- fill: "white"
20
+ fill: token('color.text.onBold', 'white')
20
21
  }), /*#__PURE__*/React.createElement("path", {
21
22
  fillRule: "evenodd",
22
23
  clipRule: "evenodd",
23
24
  d: "M2.58667 7.18662C2.46 6.81329 2.38667 6.41329 2.38667 5.99996C2.38667 5.58663 2.46 5.18663 2.58 4.8133L0.64 3.30664C0.233333 4.11997 0 5.0333 0 5.99996C0 6.96662 0.233333 7.87995 0.64 8.69328L2.58667 7.18662V7.18662Z",
24
- fill: "white"
25
+ fill: token('color.text.onBold', 'white')
25
26
  }), /*#__PURE__*/React.createElement("path", {
26
27
  fillRule: "evenodd",
27
28
  clipRule: "evenodd",
28
29
  d: "M6.00079 12.0008C7.62079 12.0008 8.98079 11.4675 9.97413 10.5475L8.08079 9.08083C7.57413 9.43416 6.89413 9.68082 6.00079 9.68082C4.41413 9.68082 3.06746 8.63416 2.58746 7.1875L0.647461 8.69416C1.63413 10.6542 3.65413 12.0008 6.00079 12.0008V12.0008V12.0008Z",
29
- fill: "white"
30
+ fill: token('color.text.onBold', 'white')
30
31
  }));
31
32
  }
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
+ import { token } from '@atlaskit/tokens';
3
4
  export function MicrosoftIcon(props) {
4
5
  return /*#__PURE__*/React.createElement("svg", _extends({
5
6
  width: "12",
@@ -11,21 +12,21 @@ export function MicrosoftIcon(props) {
11
12
  clipPath: "url(#clip0)"
12
13
  }, /*#__PURE__*/React.createElement("path", {
13
14
  d: "M0 0H5.70233V5.7023H0V0Z",
14
- fill: "white"
15
+ fill: token('color.text.onBold', 'white')
15
16
  }), /*#__PURE__*/React.createElement("path", {
16
17
  d: "M6.29785 0H12.0002V5.7023H6.29785V0Z",
17
- fill: "white"
18
+ fill: token('color.text.onBold', 'white')
18
19
  }), /*#__PURE__*/React.createElement("path", {
19
20
  d: "M0 6.29688H5.70233V11.9992H0V6.29688Z",
20
- fill: "white"
21
+ fill: token('color.text.onBold', 'white')
21
22
  }), /*#__PURE__*/React.createElement("path", {
22
23
  d: "M6.29785 6.29688H12.0002V11.9992H6.29785V6.29688Z",
23
- fill: "white"
24
+ fill: token('color.text.onBold', 'white')
24
25
  })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
25
26
  id: "clip0"
26
27
  }, /*#__PURE__*/React.createElement("rect", {
27
28
  width: "12",
28
29
  height: "11.9999",
29
- fill: "white"
30
+ fill: token('color.text.onBold', 'white')
30
31
  }))));
31
32
  }
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
+ import { token } from '@atlaskit/tokens';
3
4
  export function SlackIcon(props) {
4
5
  return /*#__PURE__*/React.createElement("svg", _extends({
5
6
  width: "12",
@@ -11,33 +12,33 @@ export function SlackIcon(props) {
11
12
  clipPath: "url(#clip0)"
12
13
  }, /*#__PURE__*/React.createElement("path", {
13
14
  d: "M2.51653 7.5688C2.51653 8.26133 1.9508 8.82706 1.25826 8.82706C0.565731 8.82706 0 8.26133 0 7.5688C0 6.87627 0.565731 6.31055 1.25826 6.31055H2.51653V7.5688Z",
14
- fill: "white"
15
+ fill: token('color.text.onBold', 'white')
15
16
  }), /*#__PURE__*/React.createElement("path", {
16
17
  d: "M3.15039 7.5688C3.15039 6.87627 3.71612 6.31055 4.40865 6.31055C5.10119 6.31055 5.66692 6.87627 5.66692 7.5688V10.7193C5.66692 11.4119 5.10119 11.9776 4.40865 11.9776C3.71612 11.9776 3.15039 11.4119 3.15039 10.7193V7.5688Z",
17
- fill: "white"
18
+ fill: token('color.text.onBold', 'white')
18
19
  }), /*#__PURE__*/React.createElement("path", {
19
20
  d: "M4.40865 2.51651C3.71612 2.51651 3.15039 1.95079 3.15039 1.25826C3.15039 0.565728 3.71612 0 4.40865 0C5.10119 0 5.66692 0.565728 5.66692 1.25826V2.51651H4.40865Z",
20
- fill: "white"
21
+ fill: token('color.text.onBold', 'white')
21
22
  }), /*#__PURE__*/React.createElement("path", {
22
23
  d: "M4.4088 3.15039C5.10133 3.15039 5.66706 3.71612 5.66706 4.40865C5.66706 5.10118 5.10133 5.6669 4.4088 5.6669H1.25826C0.565731 5.6669 0 5.10118 0 4.40865C0 3.71612 0.565731 3.15039 1.25826 3.15039H4.4088Z",
23
- fill: "white"
24
+ fill: token('color.text.onBold', 'white')
24
25
  }), /*#__PURE__*/React.createElement("path", {
25
26
  d: "M9.46094 4.40865C9.46094 3.71612 10.0267 3.15039 10.7192 3.15039C11.4117 3.15039 11.9775 3.71612 11.9775 4.40865C11.9775 5.10118 11.4117 5.6669 10.7192 5.6669H9.46094V4.40865Z",
26
- fill: "white"
27
+ fill: token('color.text.onBold', 'white')
27
28
  }), /*#__PURE__*/React.createElement("path", {
28
29
  d: "M8.8261 4.40878C8.8261 5.10131 8.26036 5.66704 7.56783 5.66704C6.8753 5.66704 6.30957 5.10131 6.30957 4.40878V1.25826C6.30957 0.565728 6.8753 0 7.56783 0C8.26036 0 8.8261 0.565728 8.8261 1.25826V4.40878Z",
29
- fill: "white"
30
+ fill: token('color.text.onBold', 'white')
30
31
  }), /*#__PURE__*/React.createElement("path", {
31
32
  d: "M7.56881 9.46094C8.26134 9.46094 8.82707 10.0267 8.82707 10.7192C8.82707 11.4117 8.26134 11.9775 7.56881 11.9775C6.87628 11.9775 6.31055 11.4117 6.31055 10.7192V9.46094H7.56881Z",
32
- fill: "white"
33
+ fill: token('color.text.onBold', 'white')
33
34
  }), /*#__PURE__*/React.createElement("path", {
34
35
  d: "M7.56881 8.82706C6.87628 8.82706 6.31055 8.26133 6.31055 7.5688C6.31055 6.87627 6.87628 6.31055 7.56881 6.31055H10.7193C11.4119 6.31055 11.9776 6.87627 11.9776 7.5688C11.9776 8.26133 11.4119 8.82706 10.7193 8.82706H7.56881Z",
35
- fill: "white"
36
+ fill: token('color.text.onBold', 'white')
36
37
  })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
37
38
  id: "clip0"
38
39
  }, /*#__PURE__*/React.createElement("rect", {
39
40
  width: "12",
40
41
  height: "11.9999",
41
- fill: "white"
42
+ fill: token('color.text.onBold', 'white')
42
43
  }))));
43
44
  }
@@ -1,4 +1,4 @@
1
- import { defineMessages } from 'react-intl';
1
+ import { defineMessages } from 'react-intl-next';
2
2
  export const messages = defineMessages({
3
3
  placeholder: {
4
4
  id: 'fabric.elements.user-picker.placeholder',
@@ -5,7 +5,7 @@ import debounce from 'lodash/debounce';
5
5
  import uuidV4 from 'uuid/v4';
6
6
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
7
7
  import memoizeOne from 'memoize-one';
8
- import { injectIntl } from 'react-intl';
8
+ import { injectIntl } from 'react-intl-next';
9
9
  import { requestUsersEvent, filterUsersEvent, preparedUsersLoadedEvent, successfulRequestUsersEvent, failedRequestUsersEvent, mountedWithPrefetchEvent, createAndFireEventInElementsChannel } from '../../../analytics';
10
10
  import { UserType } from '../../../types';
11
11
  import { UserPicker } from '../../UserPicker';
@@ -1,5 +1,6 @@
1
1
  import { AVATAR_SIZES, BORDER_WIDTH } from '@atlaskit/avatar';
2
- import * as colors from '@atlaskit/theme/colors';
2
+ import { B100, N0, N10, N20, N30, N40, N100, R50, R400 } from '@atlaskit/theme/colors';
3
+ import { token } from '@atlaskit/tokens';
3
4
  import memoizeOne from 'memoize-one';
4
5
  import { getAvatarSize } from './utils';
5
6
  import { mergeStyles } from '@atlaskit/select';
@@ -19,14 +20,14 @@ export const getStyles = memoizeOne((width, isMulti, overrideStyles) => {
19
20
  const isMulti = state.selectProps.isMulti;
20
21
  return { ...css,
21
22
  width,
22
- borderColor: state.isFocused ? css.borderColor : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : colors.N40,
23
- backgroundColor: state.isFocused ? css['backgroundColor'] : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ? colors.N10 : colors.N20,
23
+ borderColor: state.isFocused ? token('color.border.neutral', css.borderColor) : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : token('color.border.neutral', N40),
24
+ backgroundColor: state.isFocused ? token('color.background.default', css['backgroundColor']) : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ? token('color.background.subtleBorderedNeutral.resting', N10) : token('color.background.subtleNeutral.resting', N20),
24
25
  '&:hover .fabric-user-picker__clear-indicator': {
25
26
  opacity: 1
26
27
  },
27
28
  ':hover': { ...css[':hover'],
28
- borderColor: state.isFocused ? css[':hover'] ? css[':hover'].borderColor : colors.B100 : state.selectProps.subtle ? state.selectProps.hoveringClearIndicator ? colors.R50 : colors.N30 : colors.N40,
29
- backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? colors.R50 : state.isFocused ? css[':hover'] ? css[':hover'].backgroundColor : colors.N0 : state.isDisabled ? colors.N10 : colors.N30
29
+ borderColor: state.isFocused ? css[':hover'] ? token('color.border.focus', css[':hover'].borderColor) : token('color.border.focus', B100) : state.selectProps.subtle ? state.selectProps.hoveringClearIndicator ? token('color.iconBorder.danger', R50) : token('color.border.neutral', N30) : token('color.border.neutral', N40),
30
+ backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? token('color.background.subtleDanger.resting', R50) : state.isFocused ? css[':hover'] ? token('color.background.default', css[':hover'].backgroundColor) : token('color.background.default', N0) : state.isDisabled ? token('color.background.disabled', N10) : token('color.background.default', N30)
30
31
  },
31
32
  padding: 0,
32
33
  minHeight: isCompact ? 'none' : 44,
@@ -49,7 +50,7 @@ export const getStyles = memoizeOne((width, isMulti, overrideStyles) => {
49
50
  paddingTop: 0,
50
51
  padding: 0,
51
52
  ':hover': {
52
- color: colors.R400
53
+ color: token('color.text.danger', R400)
53
54
  }
54
55
  }),
55
56
  indicatorsContainer: css => ({ ...css,
@@ -135,14 +136,14 @@ export const getStyles = memoizeOne((width, isMulti, overrideStyles) => {
135
136
  paddingLeft: isMulti ? 0 : AVATAR_PADDING,
136
137
  '& input::placeholder': {
137
138
  /* Chrome, Firefox, Opera, Safari 10.1+ */
138
- color: colors.N100,
139
+ color: token('color.text.lowEmphasis', N100),
139
140
  opacity: 1
140
141
  /* Firefox */
141
142
 
142
143
  },
143
144
  '& input:-ms-input-placeholder': {
144
145
  /* Internet Explorer 10-11 */
145
- color: colors.N100
146
+ color: token('color.text.lowEmphasis', N100)
146
147
  }
147
148
  })
148
149
  };
@@ -7,6 +7,8 @@
7
7
  // Finnish
8
8
  export default {
9
9
  'fabric.elements.user-picker.email.add': 'Lisää käyttäjä',
10
+ 'fabric.elements.user-picker.email.add.potential': 'Anna sähköpostiosoite',
11
+ 'fabric.elements.user-picker.email.select.to.add': 'Valitse sähköpostiosoite',
10
12
  'fabric.elements.user-picker.external.sourced.from': 'Löydetty kohteesta:',
11
13
  'fabric.elements.user-picker.github.provider': 'GitHub',
12
14
  'fabric.elements.user-picker.google.provider': 'Google',
@@ -7,6 +7,8 @@
7
7
  // French
8
8
  export default {
9
9
  'fabric.elements.user-picker.email.add': 'Ajoutez un utilisateur',
10
+ 'fabric.elements.user-picker.email.add.potential': 'Saisissez une adresse e-mail',
11
+ 'fabric.elements.user-picker.email.select.to.add': 'Sélectionnez une adresse e-mail',
10
12
  'fabric.elements.user-picker.external.sourced.from': 'Trouvé dans :',
11
13
  'fabric.elements.user-picker.github.provider': 'GitHub',
12
14
  'fabric.elements.user-picker.google.provider': 'Google',
@@ -18,7 +20,7 @@ export default {
18
20
  'fabric.elements.user-picker.microsoft.provider': 'Microsoft',
19
21
  'fabric.elements.user-picker.multi.remove-item': 'Supprimer',
20
22
  'fabric.elements.user-picker.placeholder': 'Saisissez des personnes ou des équipes…',
21
- 'fabric.elements.user-picker.placeholder.add-more': 'ajouter davantage de personnes…',
23
+ 'fabric.elements.user-picker.placeholder.add-more': 'ajouter plus de personnes…',
22
24
  'fabric.elements.user-picker.single.clear': 'Effacer',
23
25
  'fabric.elements.user-picker.slack.provider': 'Slack',
24
26
  'fabric.elements.user-picker.team.member.50plus': 'Équipe • Plus de 50 membres',
@@ -4,33 +4,33 @@
4
4
  * This file is automatically generated by i18n-tools.
5
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
6
  */
7
- export { default as en_ZZ } from './en_ZZ';
7
+ export { default as zh } from './zh';
8
+ export { default as zh_TW } from './zh_TW';
8
9
  export { default as cs } from './cs';
9
10
  export { default as da } from './da';
10
- export { default as de } from './de';
11
- export { default as en } from './en';
12
- export { default as en_GB } from './en_GB';
13
- export { default as es } from './es';
11
+ export { default as nl } from './nl';
14
12
  export { default as et } from './et';
15
13
  export { default as fi } from './fi';
16
14
  export { default as fr } from './fr';
15
+ export { default as de } from './de';
17
16
  export { default as hu } from './hu';
18
- export { default as is } from './is';
19
17
  export { default as it } from './it';
20
18
  export { default as ja } from './ja';
21
19
  export { default as ko } from './ko';
22
20
  export { default as nb } from './nb';
23
- export { default as nl } from './nl';
24
21
  export { default as pl } from './pl';
25
22
  export { default as pt_BR } from './pt_BR';
26
23
  export { default as pt_PT } from './pt_PT';
27
- export { default as ro } from './ro';
28
24
  export { default as ru } from './ru';
29
25
  export { default as sk } from './sk';
26
+ export { default as es } from './es';
30
27
  export { default as sv } from './sv';
31
28
  export { default as th } from './th';
32
29
  export { default as tr } from './tr';
33
30
  export { default as uk } from './uk';
34
31
  export { default as vi } from './vi';
35
- export { default as zh } from './zh';
36
- export { default as zh_TW } from './zh_TW';
32
+ export { default as en_ZZ } from './en_ZZ';
33
+ export { default as en } from './en';
34
+ export { default as en_GB } from './en_GB';
35
+ export { default as is } from './is';
36
+ export { default as ro } from './ro';
@@ -7,6 +7,8 @@
7
7
  // Ukrainian
8
8
  export default {
9
9
  'fabric.elements.user-picker.email.add': 'Додайте користувача',
10
+ 'fabric.elements.user-picker.email.add.potential': 'Введіть адресу електронної пошти',
11
+ 'fabric.elements.user-picker.email.select.to.add': 'Виберіть адресу електронної пошти',
10
12
  'fabric.elements.user-picker.external.sourced.from': 'Знайдено в:',
11
13
  'fabric.elements.user-picker.github.provider': 'GitHub',
12
14
  'fabric.elements.user-picker.google.provider': 'Google',
@@ -7,6 +7,8 @@
7
7
  // undefined
8
8
  export default {
9
9
  'fabric.elements.user-picker.email.add': '新增使用者',
10
+ 'fabric.elements.user-picker.email.add.potential': '輸入電子郵件地址',
11
+ 'fabric.elements.user-picker.email.select.to.add': '選取電子郵件地址',
10
12
  'fabric.elements.user-picker.external.sourced.from': '尋找位置:',
11
13
  'fabric.elements.user-picker.github.provider': 'GitHub',
12
14
  'fabric.elements.user-picker.google.provider': 'Google',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "7.16.4",
3
+ "version": "8.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,11 +4,12 @@ var _templateObject;
4
4
 
5
5
  import EmailIcon from '@atlaskit/icon/glyph/email';
6
6
  import { N40, N500 } from '@atlaskit/theme/colors';
7
+ import { token } from '@atlaskit/tokens';
7
8
  import React from 'react';
8
9
  import styled from 'styled-components';
9
- var EmailAvatarWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: black;\n padding: ", "px;\n\n background-color: ", ";\n border-radius: 50%;\n display: flex;\n align-items: center;\n"])), function (props) {
10
+ var EmailAvatarWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: ", "px;\n\n background-color: ", ";\n border-radius: 50%;\n display: flex;\n align-items: center;\n"])), function (props) {
10
11
  return props.isLozenge ? 0 : 4;
11
- }, N40);
12
+ }, token('color.background.subtleNeutral.resting', N40));
12
13
  export var AddOptionAvatar = function AddOptionAvatar(_ref) {
13
14
  var isLozenge = _ref.isLozenge,
14
15
  label = _ref.label;
@@ -17,6 +18,6 @@ export var AddOptionAvatar = function AddOptionAvatar(_ref) {
17
18
  }, /*#__PURE__*/React.createElement(EmailIcon, {
18
19
  label: label,
19
20
  size: isLozenge ? 'small' : 'medium',
20
- primaryColor: N500
21
+ primaryColor: token('color.text.mediumEmphasis', N500)
21
22
  }));
22
23
  };
@@ -5,12 +5,13 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
5
  import React from 'react';
6
6
  import styled from 'styled-components';
7
7
  import { B400 } from '@atlaskit/theme/colors';
8
+ import { token } from '@atlaskit/tokens';
8
9
  import Lozenge from '@atlaskit/lozenge';
9
10
  import Tooltip from '@atlaskit/tooltip';
10
11
  var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n box-sizing: border-box;\n display: flex;\n line-height: 1;\n outline: none;\n margin: 0;\n width: 100%;\n cursor: pointer;\n"])));
11
- var Text = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0;\n color: ", ";\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n ", "\n"])), B400, function (_ref) {
12
+ var Text = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0;\n color: ", ";\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n ", "\n"])), token('color.text.selected', B400), function (_ref) {
12
13
  var secondary = _ref.secondary;
13
- return secondary && "color: ".concat(B400, "; font-size: 0.85em;");
14
+ return secondary && "color: ".concat(token('color.text.selected', B400), "; font-size: 0.85em;");
14
15
  });
15
16
  var AdditionalInfo = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n float: right;\n ", "\n"])), function (_ref2) {
16
17
  var withTooltip = _ref2.withTooltip;