@atlaskit/user-picker 7.16.6 → 8.2.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 (96) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/cjs/components/AddOptionAvatar.js +5 -3
  3. package/dist/cjs/components/AvatarItemOption.js +25 -7
  4. package/dist/cjs/components/BaseUserPicker.js +2 -2
  5. package/dist/cjs/components/ClearIndicator.js +25 -6
  6. package/dist/cjs/components/EmailOption/index.js +29 -0
  7. package/dist/cjs/components/{EmailOption.js → EmailOption/main.js} +9 -7
  8. package/dist/cjs/components/ExternalUserOption/index.js +29 -0
  9. package/dist/cjs/components/{ExternalUserOption.js → ExternalUserOption/main.js} +15 -13
  10. package/dist/cjs/components/GroupOption/index.js +29 -0
  11. package/dist/cjs/components/{GroupOption.js → GroupOption/main.js} +10 -8
  12. package/dist/cjs/components/MessagesIntlProvider.js +6 -6
  13. package/dist/cjs/components/MultiValue.js +2 -2
  14. package/dist/cjs/components/MultiValueContainer.js +5 -3
  15. package/dist/cjs/components/Option.js +26 -13
  16. package/dist/cjs/components/PopupControl.js +4 -2
  17. package/dist/cjs/components/TeamOption/index.js +29 -0
  18. package/dist/cjs/components/{TeamOption.js → TeamOption/main.js} +13 -11
  19. package/dist/cjs/components/UserOption.js +5 -3
  20. package/dist/cjs/components/assets/github.js +3 -1
  21. package/dist/cjs/components/assets/google.js +6 -4
  22. package/dist/cjs/components/assets/microsoft.js +7 -5
  23. package/dist/cjs/components/assets/slack.js +11 -9
  24. package/dist/cjs/components/i18n.js +2 -2
  25. package/dist/cjs/components/smart-user-picker/components/index.js +2 -2
  26. package/dist/cjs/components/styles.js +9 -7
  27. package/dist/cjs/version.json +1 -1
  28. package/dist/es2019/components/AddOptionAvatar.js +3 -3
  29. package/dist/es2019/components/AvatarItemOption.js +15 -6
  30. package/dist/es2019/components/BaseUserPicker.js +1 -1
  31. package/dist/es2019/components/ClearIndicator.js +14 -5
  32. package/dist/es2019/components/EmailOption/index.js +9 -0
  33. package/dist/es2019/components/{EmailOption.js → EmailOption/main.js} +7 -6
  34. package/dist/es2019/components/ExternalUserOption/index.js +9 -0
  35. package/dist/es2019/components/{ExternalUserOption.js → ExternalUserOption/main.js} +12 -11
  36. package/dist/es2019/components/GroupOption/index.js +9 -0
  37. package/dist/es2019/components/{GroupOption.js → GroupOption/main.js} +8 -7
  38. package/dist/es2019/components/MessagesIntlProvider.js +4 -3
  39. package/dist/es2019/components/MultiValue.js +1 -1
  40. package/dist/es2019/components/MultiValueContainer.js +7 -4
  41. package/dist/es2019/components/Option.js +23 -9
  42. package/dist/es2019/components/PopupControl.js +3 -2
  43. package/dist/es2019/components/TeamOption/index.js +9 -0
  44. package/dist/es2019/components/{TeamOption.js → TeamOption/main.js} +8 -7
  45. package/dist/es2019/components/UserOption.js +4 -3
  46. package/dist/es2019/components/assets/github.js +2 -1
  47. package/dist/es2019/components/assets/google.js +5 -4
  48. package/dist/es2019/components/assets/microsoft.js +6 -5
  49. package/dist/es2019/components/assets/slack.js +10 -9
  50. package/dist/es2019/components/i18n.js +1 -1
  51. package/dist/es2019/components/smart-user-picker/components/index.js +1 -1
  52. package/dist/es2019/components/styles.js +8 -7
  53. package/dist/es2019/version.json +1 -1
  54. package/dist/esm/components/AddOptionAvatar.js +4 -3
  55. package/dist/esm/components/AvatarItemOption.js +17 -6
  56. package/dist/esm/components/BaseUserPicker.js +1 -1
  57. package/dist/esm/components/ClearIndicator.js +16 -5
  58. package/dist/esm/components/EmailOption/index.js +11 -0
  59. package/dist/esm/components/{EmailOption.js → EmailOption/main.js} +7 -6
  60. package/dist/esm/components/ExternalUserOption/index.js +11 -0
  61. package/dist/esm/components/{ExternalUserOption.js → ExternalUserOption/main.js} +12 -11
  62. package/dist/esm/components/GroupOption/index.js +11 -0
  63. package/dist/esm/components/{GroupOption.js → GroupOption/main.js} +8 -7
  64. package/dist/esm/components/MessagesIntlProvider.js +5 -4
  65. package/dist/esm/components/MultiValue.js +1 -1
  66. package/dist/esm/components/MultiValueContainer.js +3 -2
  67. package/dist/esm/components/Option.js +25 -12
  68. package/dist/esm/components/PopupControl.js +3 -2
  69. package/dist/esm/components/TeamOption/index.js +11 -0
  70. package/dist/esm/components/{TeamOption.js → TeamOption/main.js} +8 -7
  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 +8 -7
  79. package/dist/esm/version.json +1 -1
  80. package/dist/types/components/BaseUserPicker.d.ts +1 -1
  81. package/dist/types/components/EmailOption/index.d.ts +3 -0
  82. package/dist/types/components/{EmailOption.d.ts → EmailOption/main.d.ts} +2 -2
  83. package/dist/types/components/ExternalUserOption/index.d.ts +3 -0
  84. package/dist/types/components/{ExternalUserOption.d.ts → ExternalUserOption/main.d.ts} +1 -1
  85. package/dist/types/components/GroupOption/index.d.ts +3 -0
  86. package/dist/types/components/{GroupOption.d.ts → GroupOption/main.d.ts} +1 -1
  87. package/dist/types/components/MessagesIntlProvider.d.ts +2 -8
  88. package/dist/types/components/Option.d.ts +4 -1
  89. package/dist/types/components/PopupUserPicker.d.ts +1 -1
  90. package/dist/types/components/SingleValue.d.ts +1 -0
  91. package/dist/types/components/TeamOption/index.d.ts +3 -0
  92. package/dist/types/components/{TeamOption.d.ts → TeamOption/main.d.ts} +1 -1
  93. package/dist/types/components/UserPicker.d.ts +1 -1
  94. package/dist/types/components/smart-user-picker/service/recommendationClient.d.ts +2 -2
  95. package/dist/types/components/smart-user-picker/service/users-transformer.d.ts +3 -3
  96. package/package.json +10 -4
@@ -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 var messages = defineMessages({
3
3
  placeholder: {
4
4
  id: 'fabric.elements.user-picker.placeholder',
@@ -22,7 +22,7 @@ import debounce from 'lodash/debounce';
22
22
  import uuidV4 from 'uuid/v4';
23
23
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
24
24
  import memoizeOne from 'memoize-one';
25
- import { injectIntl } from 'react-intl';
25
+ import { injectIntl } from 'react-intl-next';
26
26
  import { requestUsersEvent, filterUsersEvent, preparedUsersLoadedEvent, successfulRequestUsersEvent, failedRequestUsersEvent, mountedWithPrefetchEvent, createAndFireEventInElementsChannel } from '../../../analytics';
27
27
  import { UserType } from '../../../types';
28
28
  import { UserPicker } from '../../UserPicker';
@@ -7,6 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
 
8
8
  import { AVATAR_SIZES, BORDER_WIDTH } from '@atlaskit/avatar';
9
9
  import { B100, N0, N10, N20, N30, N40, N100, R50, R400 } from '@atlaskit/theme/colors';
10
+ import { token } from '@atlaskit/tokens';
10
11
  import memoizeOne from 'memoize-one';
11
12
  import { getAvatarSize } from './utils';
12
13
  import { mergeStyles } from '@atlaskit/select';
@@ -28,14 +29,14 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
28
29
  var isMulti = state.selectProps.isMulti;
29
30
  return _objectSpread(_objectSpread({}, css), {}, {
30
31
  width: width,
31
- borderColor: state.isFocused ? css.borderColor : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : N40,
32
- backgroundColor: state.isFocused ? css['backgroundColor'] : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ? N10 : N20,
32
+ borderColor: state.isFocused ? token('color.border.neutral', css.borderColor) : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : token('color.border.neutral', N40),
33
+ 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),
33
34
  '&:hover .fabric-user-picker__clear-indicator': {
34
35
  opacity: 1
35
36
  },
36
37
  ':hover': _objectSpread(_objectSpread({}, css[':hover']), {}, {
37
- borderColor: state.isFocused ? css[':hover'] ? css[':hover'].borderColor : B100 : state.selectProps.subtle ? state.selectProps.hoveringClearIndicator ? R50 : N30 : N40,
38
- backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? R50 : state.isFocused ? css[':hover'] ? css[':hover'].backgroundColor : N0 : state.isDisabled ? N10 : N30
38
+ 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),
39
+ 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)
39
40
  }),
40
41
  padding: 0,
41
42
  minHeight: isCompact ? 'none' : 44,
@@ -59,7 +60,7 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
59
60
  paddingTop: 0,
60
61
  padding: 0,
61
62
  ':hover': {
62
- color: R400
63
+ color: token('color.text.danger', R400)
63
64
  }
64
65
  });
65
66
  },
@@ -157,14 +158,14 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
157
158
  paddingLeft: isMulti ? 0 : AVATAR_PADDING,
158
159
  '& input::placeholder': {
159
160
  /* Chrome, Firefox, Opera, Safari 10.1+ */
160
- color: N100,
161
+ color: token('color.text.lowEmphasis', N100),
161
162
  opacity: 1
162
163
  /* Firefox */
163
164
 
164
165
  },
165
166
  '& input:-ms-input-placeholder': {
166
167
  /* Internet Explorer 10-11 */
167
- color: N100
168
+ color: token('color.text.lowEmphasis', N100)
168
169
  }
169
170
  });
170
171
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "7.16.6",
3
+ "version": "8.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -48,7 +48,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
48
48
  private getAppearance;
49
49
  render(): JSX.Element;
50
50
  }
51
- export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Pick<BaseUserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps"> & Partial<Pick<Pick<BaseUserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
51
+ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Pick<BaseUserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps"> & Partial<Pick<Pick<BaseUserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
52
52
  isMulti: boolean;
53
53
  subtle: boolean;
54
54
  noBorder: boolean;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AsyncEmailOption: React.LazyExoticComponent<typeof import("./main").EmailOption>;
3
+ export default AsyncEmailOption;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { Email } from '../types';
3
- import { EmailValidationResponse } from './emailValidation';
2
+ import { Email } from '../../types';
3
+ import { EmailValidationResponse } from '../emailValidation';
4
4
  export declare type EmailOptionProps = {
5
5
  email: Email;
6
6
  isSelected: boolean;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AsyncExternalUserOption: React.LazyExoticComponent<typeof import("./main").ExternalUserOption>;
3
+ export default AsyncExternalUserOption;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ExternalUser } from '../types';
2
+ import { ExternalUser } from '../../types';
3
3
  export declare const ImageContainer: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
4
4
  export declare const SourcesTooltipContainer: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
5
5
  export declare const SourceWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AsyncGroupOption: React.LazyExoticComponent<typeof import("./main").GroupOption>;
3
+ export default AsyncGroupOption;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Group } from '../types';
2
+ import { Group } from '../../types';
3
3
  export declare const GroupOptionIconWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
4
4
  export declare type GroupOptionProps = {
5
5
  group: Group;
@@ -1,9 +1,3 @@
1
1
  import React from 'react';
2
- import { InjectedIntl } from 'react-intl';
3
- export interface MessagesIntlProviderProps {
4
- intl: InjectedIntl;
5
- }
6
- declare const _default: React.ComponentClass<unknown, any> & {
7
- WrappedComponent: ReactIntl.ComponentConstructor<ReactIntl.InjectedIntlProps>;
8
- };
9
- export default _default;
2
+ declare const MessagesIntlProvider: React.FC;
3
+ export default MessagesIntlProvider;
@@ -1,8 +1,11 @@
1
+ import { OptionProps as AkOptionProps } from '@atlaskit/select';
1
2
  import { FC } from 'react';
2
3
  import { Option as OptionType } from '../types';
3
- export declare type OptionProps = {
4
+ export declare type OptionProps = AkOptionProps & {
4
5
  data: OptionType;
5
6
  isSelected: boolean;
7
+ isDisabled: boolean;
8
+ isFocused: boolean;
6
9
  status?: string;
7
10
  selectProps: {
8
11
  emailLabel?: string;
@@ -27,7 +27,7 @@ export declare class PopupUserPickerWithoutAnalytics extends React.Component<Pop
27
27
  };
28
28
  render(): JSX.Element;
29
29
  }
30
- export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Pick<PopupUserPickerProps, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle"> & Partial<Pick<Pick<PopupUserPickerProps, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "isMulti" | "offset" | "width" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">> & Partial<Pick<{
30
+ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Pick<PopupUserPickerProps, "placeholder" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "placeholder" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle"> & Partial<Pick<Pick<PopupUserPickerProps, "placeholder" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "isMulti" | "offset" | "width" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">> & Partial<Pick<{
31
31
  boundariesElement: string;
32
32
  width: number;
33
33
  isMulti: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Option } from '../types';
2
3
  declare type Props = {
3
4
  data: Option;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AsyncTeamOption: React.LazyExoticComponent<typeof import("./main").TeamOption>;
3
+ export default AsyncTeamOption;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Team } from '../types';
2
+ import { Team } from '../../types';
3
3
  export declare type TeamOptionProps = {
4
4
  team: Team;
5
5
  isSelected: boolean;
@@ -7,7 +7,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
7
7
  };
8
8
  render(): JSX.Element;
9
9
  }
10
- export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Pick<UserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions">, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions"> & Partial<Pick<Pick<UserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions">, "isMulti" | "width">> & Partial<Pick<{
10
+ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Pick<UserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions">, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions"> & Partial<Pick<Pick<UserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions">, "isMulti" | "width">> & Partial<Pick<{
11
11
  width: number;
12
12
  isMulti: boolean;
13
13
  }, never>> & React.RefAttributes<any>>;
@@ -1,6 +1,6 @@
1
1
  import { OptionData } from '../../../types';
2
2
  import { ProductAttributes, RecommendationRequest } from '../components';
3
- import { InjectedIntl } from 'react-intl';
3
+ import { IntlShape } from 'react-intl-next';
4
4
  /**
5
5
  * @deprecated Please use @atlassian/smart-user-picker
6
6
  */
@@ -15,7 +15,7 @@ export interface Context {
15
15
  siteId: string;
16
16
  productAttributes?: ProductAttributes;
17
17
  }
18
- declare const getUserRecommendations: (request: RecommendationRequest, intl: InjectedIntl) => Promise<OptionData[]>;
18
+ declare const getUserRecommendations: (request: RecommendationRequest, intl: IntlShape) => Promise<OptionData[]>;
19
19
  /**
20
20
  * @deprecated Please use @atlassian/smart-user-picker
21
21
  */
@@ -1,5 +1,5 @@
1
1
  import { OptionData } from '../../../types';
2
- import { InjectedIntl } from 'react-intl';
2
+ import { IntlShape } from 'react-intl-next';
3
3
  interface ServerItem {
4
4
  id: string;
5
5
  name?: string;
@@ -11,7 +11,7 @@ interface ServerItem {
11
11
  }
12
12
  interface ServerResponse {
13
13
  recommendedUsers: ServerItem[];
14
- intl: InjectedIntl;
14
+ intl: IntlShape;
15
15
  }
16
16
  declare enum EntityType {
17
17
  USER = "USER",
@@ -21,5 +21,5 @@ declare enum EntityType {
21
21
  /**
22
22
  * @deprecated Please use @atlassian/smart-user-picker
23
23
  */
24
- export declare const transformUsers: (serverResponse: ServerResponse, intl: InjectedIntl) => OptionData[];
24
+ export declare const transformUsers: (serverResponse: ServerResponse, intl: IntlShape) => OptionData[];
25
25
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "7.16.6",
3
+ "version": "8.2.1",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,16 +33,17 @@
33
33
  "@atlaskit/popper": "^5.0.0",
34
34
  "@atlaskit/select": "^15.2.0",
35
35
  "@atlaskit/theme": "^12.0.0",
36
+ "@atlaskit/tokens": "^0.4.0",
36
37
  "@atlaskit/tooltip": "^17.5.0",
37
38
  "@babel/runtime": "^7.0.0",
38
- "lodash": "^4.17.15",
39
+ "lodash": "^4.17.21",
39
40
  "memoize-one": "^6.0.0",
40
41
  "uuid": "^3.1.0"
41
42
  },
42
43
  "peerDependencies": {
43
44
  "react": "^16.8.0",
44
45
  "react-dom": "^16.8.0",
45
- "react-intl": "^2.6.0",
46
+ "react-intl-next": "npm:react-intl@^5.18.1",
46
47
  "styled-components": "^3.2.6"
47
48
  },
48
49
  "devDependencies": {
@@ -61,12 +62,17 @@
61
62
  "enzyme-react-intl": "^2.0.6",
62
63
  "faker": "^4.1.0",
63
64
  "mock-apollo-client": "^0.1.0",
64
- "react-intl": "^2.6.0",
65
+ "react-intl-next": "npm:react-intl@^5.18.1",
65
66
  "typescript": "3.9.6"
66
67
  },
67
68
  "keywords": [
68
69
  "fabric",
69
70
  "ui"
70
71
  ],
72
+ "techstack": {
73
+ "@repo/internal": {
74
+ "theming": "tokens"
75
+ }
76
+ },
71
77
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
72
78
  }