@atlaskit/user-picker 11.0.9 → 11.0.11

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 (70) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/analytics.js +1 -1
  3. package/dist/cjs/components/ClearIndicator.compiled.css +8 -0
  4. package/dist/cjs/components/ClearIndicator.js +8 -1
  5. package/dist/cjs/components/Control.compiled.css +20 -0
  6. package/dist/cjs/components/Control.js +30 -0
  7. package/dist/cjs/components/Input.compiled.css +5 -0
  8. package/dist/cjs/components/Input.js +8 -1
  9. package/dist/cjs/components/MultiValueContainer.compiled.css +10 -0
  10. package/dist/cjs/components/MultiValueContainer.js +10 -1
  11. package/dist/cjs/components/Option.js +2 -2
  12. package/dist/cjs/components/PopupControl.js +2 -2
  13. package/dist/cjs/components/SingleValueContainer.compiled.css +14 -0
  14. package/dist/cjs/components/SingleValueContainer.js +21 -26
  15. package/dist/cjs/components/TeamOption/main.js +2 -2
  16. package/dist/cjs/components/UserPicker.js +4 -1
  17. package/dist/cjs/components/components.js +6 -4
  18. package/dist/es2019/analytics.js +1 -1
  19. package/dist/es2019/components/ClearIndicator.compiled.css +8 -0
  20. package/dist/es2019/components/ClearIndicator.js +8 -1
  21. package/dist/es2019/components/Control.compiled.css +20 -0
  22. package/dist/es2019/components/Control.js +20 -0
  23. package/dist/es2019/components/Input.compiled.css +5 -0
  24. package/dist/es2019/components/Input.js +8 -1
  25. package/dist/es2019/components/MultiValueContainer.compiled.css +10 -0
  26. package/dist/es2019/components/MultiValueContainer.js +10 -1
  27. package/dist/es2019/components/Option.js +1 -1
  28. package/dist/es2019/components/PopupControl.js +2 -2
  29. package/dist/es2019/components/SingleValueContainer.compiled.css +14 -0
  30. package/dist/es2019/components/SingleValueContainer.js +19 -26
  31. package/dist/es2019/components/TeamOption/main.js +1 -1
  32. package/dist/es2019/components/UserPicker.js +4 -1
  33. package/dist/es2019/components/components.js +5 -2
  34. package/dist/esm/analytics.js +1 -1
  35. package/dist/esm/components/ClearIndicator.compiled.css +8 -0
  36. package/dist/esm/components/ClearIndicator.js +8 -1
  37. package/dist/esm/components/Control.compiled.css +20 -0
  38. package/dist/esm/components/Control.js +20 -0
  39. package/dist/esm/components/Input.compiled.css +5 -0
  40. package/dist/esm/components/Input.js +8 -1
  41. package/dist/esm/components/MultiValueContainer.compiled.css +10 -0
  42. package/dist/esm/components/MultiValueContainer.js +10 -1
  43. package/dist/esm/components/Option.js +1 -1
  44. package/dist/esm/components/PopupControl.js +2 -2
  45. package/dist/esm/components/SingleValueContainer.compiled.css +14 -0
  46. package/dist/esm/components/SingleValueContainer.js +19 -26
  47. package/dist/esm/components/TeamOption/main.js +1 -1
  48. package/dist/esm/components/UserPicker.js +4 -1
  49. package/dist/esm/components/components.js +6 -4
  50. package/dist/types/components/BaseUserPicker.d.ts +6 -1
  51. package/dist/types/components/ClearIndicator.d.ts +5 -1
  52. package/dist/types/components/Control.d.ts +8 -0
  53. package/dist/types/components/Input.d.ts +5 -1
  54. package/dist/types/components/MultiValueContainer.d.ts +5 -1
  55. package/dist/types/components/PopupUserPicker.d.ts +2 -0
  56. package/dist/types/components/SingleValueContainer.d.ts +3 -4
  57. package/dist/types/components/UserPicker.d.ts +3 -2
  58. package/dist/types/components/components.d.ts +25 -17
  59. package/dist/types/types.d.ts +3 -1
  60. package/dist/types-ts4.5/components/BaseUserPicker.d.ts +6 -1
  61. package/dist/types-ts4.5/components/ClearIndicator.d.ts +5 -1
  62. package/dist/types-ts4.5/components/Control.d.ts +8 -0
  63. package/dist/types-ts4.5/components/Input.d.ts +5 -1
  64. package/dist/types-ts4.5/components/MultiValueContainer.d.ts +5 -1
  65. package/dist/types-ts4.5/components/PopupUserPicker.d.ts +2 -0
  66. package/dist/types-ts4.5/components/SingleValueContainer.d.ts +3 -4
  67. package/dist/types-ts4.5/components/UserPicker.d.ts +3 -2
  68. package/dist/types-ts4.5/components/components.d.ts +25 -17
  69. package/dist/types-ts4.5/types.d.ts +3 -1
  70. package/package.json +8 -8
@@ -49,6 +49,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
49
49
  subtle?: boolean | undefined;
50
50
  noBorder?: boolean | undefined;
51
51
  styles?: import("@atlaskit/select").StylesConfig | undefined;
52
+ components?: Partial<import("packages/design-system/react-select/dist/types/components").SelectComponents<import("../types").OptionData, boolean, import("@atlaskit/select").GroupType<import("../types").OptionData>>> | undefined;
52
53
  defaultValue?: import("../types").DefaultValue;
53
54
  placeholder?: React.ReactNode;
54
55
  placeholderAvatar?: "team" | "person" | undefined;
@@ -103,6 +104,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
103
104
  autoFocus?: boolean | undefined;
104
105
  captureMenuScroll?: boolean | undefined;
105
106
  closeMenuOnScroll?: boolean | EventListener | undefined;
107
+ components?: Partial<import("packages/design-system/react-select/dist/types/components").SelectComponents<import("../types").OptionData, boolean, import("@atlaskit/select").GroupType<import("../types").OptionData>>> | undefined;
106
108
  inputId?: string | undefined;
107
109
  isClearable?: boolean | undefined;
108
110
  isInvalid?: boolean | undefined;
@@ -2,15 +2,14 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { type ValueContainerProps } from '@atlaskit/select';
6
- import { jsx } from '@emotion/react';
7
5
  import React from 'react';
6
+ import { type ValueContainerProps } from '@atlaskit/select';
8
7
  import { type Option, type User } from '../types';
9
8
  export declare class SingleValueContainer extends React.Component<ValueContainerProps<Option<User>>> {
10
9
  private renderAvatar;
11
10
  onValueContainerClick: any;
12
11
  Wrapper: ({ children }: {
13
12
  children: React.ReactElement;
14
- }) => jsx.JSX.Element;
15
- render(): jsx.JSX.Element;
13
+ }) => JSX.Element;
14
+ render(): JSX.Element;
16
15
  }
@@ -8,7 +8,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
8
8
  isMulti: boolean;
9
9
  };
10
10
  componentDidMount(): void;
11
- render(): React.JSX.Element;
11
+ render(): JSX.Element;
12
12
  }
13
13
  export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
14
14
  fieldId: string | null;
@@ -40,6 +40,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
40
40
  subtle?: boolean | undefined;
41
41
  noBorder?: boolean | undefined;
42
42
  styles?: import("@atlaskit/select").StylesConfig | undefined;
43
+ components?: Partial<import("packages/design-system/react-select/dist/types/components").SelectComponents<import("../types").OptionData, boolean, import("@atlaskit/select").GroupType<import("../types").OptionData>>> | undefined;
43
44
  defaultValue?: import("../types").DefaultValue;
44
45
  placeholder?: React.ReactNode;
45
46
  placeholderAvatar?: "team" | "person" | undefined;
@@ -77,7 +78,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
77
78
  openMenuOnClick?: boolean | undefined;
78
79
  strategy?: "absolute" | "fixed" | undefined;
79
80
  showClearIndicator?: boolean | undefined;
80
- }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "openMenuOnClick" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "subtle" | "noBorder" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator"> & {
81
+ }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "openMenuOnClick" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "subtle" | "noBorder" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator"> & {
81
82
  isMulti?: boolean | undefined;
82
83
  width?: string | number | undefined;
83
84
  } & {} & React.RefAttributes<any>>;
@@ -7,29 +7,37 @@ import { SingleValueContainer } from './SingleValueContainer';
7
7
  import { PopupInput } from './PopupInput';
8
8
  import { PopupControl } from './PopupControl';
9
9
  import { Menu } from './Menu';
10
+ import { type SelectComponentsConfig } from '@atlaskit/select';
11
+ import { type OptionData } from '../types';
10
12
  /**
11
13
  * Memoize getComponents to avoid rerenders.
12
14
  */
13
- export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean, anchor?: React.ComponentType<any>, showClearIndicator?: boolean) => {
15
+ export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean, anchor?: React.ComponentType<any>, showClearIndicator?: boolean, customComponents?: SelectComponentsConfig<OptionData, boolean>) => {
14
16
  Control: import("react").ComponentType<any>;
15
17
  Option: import("react").FC<import("./Option").OptionProps>;
16
- MultiValue?: undefined;
17
- DropdownIndicator?: undefined;
18
- SingleValue?: undefined;
19
- ClearIndicator?: undefined;
20
- ValueContainer?: undefined;
21
- Input?: undefined;
22
- Menu?: undefined;
23
18
  } | {
24
- MultiValue: typeof MultiValue;
25
- DropdownIndicator: null;
26
- SingleValue: (props: import("./SingleValue").Props) => JSX.Element | null;
27
- ClearIndicator: typeof ClearIndicator | null;
28
- Option: import("react").FC<import("./Option").OptionProps>;
29
- ValueContainer: typeof MultiValueContainer | typeof SingleValueContainer;
30
- Input: typeof Input;
31
- Menu: typeof Menu;
32
- Control?: undefined;
19
+ Option: import("react").FC<import("./Option").OptionProps> | import("react").ComponentType<import("packages/design-system/react-select/dist/types").OptionProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
20
+ Group?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").GroupProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
21
+ ClearIndicator: typeof ClearIndicator | import("react").ComponentType<import("@atlaskit/select").ClearIndicatorProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | null;
22
+ Control: ((props: import("@atlaskit/select").ControlProps<any>) => JSX.Element) | import("react").ComponentType<import("packages/design-system/react-select/dist/types").ControlProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
23
+ DropdownIndicator: import("react").ComponentType<import("@atlaskit/select").DropdownIndicatorProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | null;
24
+ GroupHeading?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").GroupHeadingProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
25
+ IndicatorsContainer?: import("react").ComponentType<import("@atlaskit/select").IndicatorsContainerProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
26
+ Input: typeof Input | import("react").ComponentType<import("@atlaskit/select").InputProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
27
+ LoadingIndicator?: import("react").ComponentType<import("@atlaskit/select").LoadingIndicatorProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
28
+ Menu: typeof Menu | import("react").ComponentType<import("packages/design-system/react-select/dist/types").MenuProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
29
+ MenuList?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").MenuListProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
30
+ MenuPortal?: import("react").ComponentType<import("packages/design-system/react-select/dist/types/components/menu").MenuPortalProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
31
+ LoadingMessage?: import("react").ComponentType<import("@atlaskit/select").NoticeProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
32
+ NoOptionsMessage?: import("react").ComponentType<import("@atlaskit/select").NoticeProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
33
+ MultiValue: typeof MultiValue | import("react").ComponentType<import("@atlaskit/select").MultiValueProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
34
+ MultiValueContainer?: import("react").ComponentType<import("@atlaskit/select").MultiValueGenericProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
35
+ MultiValueLabel?: import("react").ComponentType<import("@atlaskit/select").MultiValueGenericProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
36
+ MultiValueRemove?: import("react").ComponentType<import("@atlaskit/select").MultiValueRemoveProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
37
+ Placeholder?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").PlaceholderProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
38
+ SelectContainer?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").ContainerProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
39
+ SingleValue: ((props: import("./SingleValue").Props) => JSX.Element | null) | import("react").ComponentType<import("@atlaskit/select").SingleValueProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
40
+ ValueContainer: typeof MultiValueContainer | typeof SingleValueContainer | import("react").ComponentType<import("packages/design-system/react-select/dist/types").ValueContainerProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
33
41
  }>;
34
42
  export declare const getPopupComponents: import("memoize-one").MemoizedFn<(hasPopupTitle: boolean) => {
35
43
  DropdownIndicator: null;
@@ -4,7 +4,7 @@ import { type AriaAttributes } from 'react';
4
4
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
5
  import { type Placement } from '@atlaskit/popper';
6
6
  import { type EmailValidator } from './components/emailValidation';
7
- import { type StylesConfig } from '@atlaskit/select';
7
+ import { type StylesConfig, type SelectComponentsConfig } from '@atlaskit/select';
8
8
  import { type BaseUserPickerWithoutAnalytics } from './components/BaseUserPicker';
9
9
  export type UserPickerProps = WithAnalyticsEventsProps & {
10
10
  /**
@@ -96,6 +96,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
96
96
  * See https://react-select.com/styles
97
97
  */
98
98
  styles?: StylesConfig;
99
+ /** Override the default components used in the user picker. */
100
+ components?: SelectComponentsConfig<OptionData, boolean>;
99
101
  /** Default value for the field to be used on initial render.
100
102
  * `defaultValue` differs from `value` in that it sets the initial value then leaves the component 'uncontrolled'
101
103
  * whereas setting the `value` prop delegates responsibility for maintaining the value to the caller
@@ -65,7 +65,11 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
65
65
  render(): React.JSX.Element;
66
66
  }
67
67
  export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
68
- fieldId: string | null;
68
+ fieldId: string | null; /**
69
+ * @deprecated This is a temporary prop to enable user-pickers to work in Draggable elements in react-beautiful-dnd.
70
+ * See https://product-fabric.atlassian.net/browse/DSP-15701 for more details.
71
+ * It may be removed in a future minor or patch when a longer-term workaround is found.
72
+ */
69
73
  options?: OptionData[] | undefined;
70
74
  width?: string | number | undefined;
71
75
  menuMinWidth?: number | undefined;
@@ -94,6 +98,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
94
98
  subtle?: boolean | undefined;
95
99
  noBorder?: boolean | undefined;
96
100
  styles?: import("@atlaskit/select").StylesConfig | undefined;
101
+ components?: Partial<import("packages/design-system/react-select/dist/types/components").SelectComponents<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
97
102
  defaultValue?: import("../types").DefaultValue;
98
103
  placeholder?: React.ReactNode;
99
104
  placeholderAvatar?: "team" | "person" | undefined;
@@ -1,6 +1,10 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import React from 'react';
2
6
  import { type ClearIndicatorProps } from '@atlaskit/select';
3
7
  export declare class ClearIndicator extends React.PureComponent<ClearIndicatorProps<any>> {
4
8
  private handleMouseDown;
5
- render(): React.JSX.Element;
9
+ render(): JSX.Element;
6
10
  }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+ import { type ControlProps } from '@atlaskit/select';
7
+ declare const Control: (props: ControlProps<any>) => JSX.Element;
8
+ export default Control;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import React, { type AriaAttributes } from 'react';
2
6
  import { type OptionType, type SelectProps } from '@atlaskit/select';
3
7
  import { type AriaAttributesType } from '../types';
@@ -18,5 +22,5 @@ export declare class Input extends React.Component<Props & AriaAttributes> {
18
22
  */
19
23
  get ariaLabelledBy(): AriaAttributesType;
20
24
  get ariaDescribedBy(): AriaAttributesType;
21
- render(): React.JSX.Element;
25
+ render(): JSX.Element;
22
26
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { type MultiValueProps } from '@atlaskit/select';
2
6
  import React from 'react';
3
7
  import { type Option, type User } from '../types';
@@ -26,6 +30,6 @@ export declare class MultiValueContainer extends React.PureComponent<Props, Stat
26
30
  private addPlaceholder;
27
31
  private renderChildren;
28
32
  onValueContainerClick: any;
29
- render(): React.JSX.Element;
33
+ render(): JSX.Element;
30
34
  }
31
35
  export {};
@@ -49,6 +49,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
49
49
  subtle?: boolean | undefined;
50
50
  noBorder?: boolean | undefined;
51
51
  styles?: import("@atlaskit/select").StylesConfig | undefined;
52
+ components?: Partial<import("packages/design-system/react-select/dist/types/components").SelectComponents<import("../types").OptionData, boolean, import("@atlaskit/select").GroupType<import("../types").OptionData>>> | undefined;
52
53
  defaultValue?: import("../types").DefaultValue;
53
54
  placeholder?: React.ReactNode;
54
55
  placeholderAvatar?: "team" | "person" | undefined;
@@ -109,6 +110,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
109
110
  autoFocus?: boolean | undefined;
110
111
  captureMenuScroll?: boolean | undefined;
111
112
  closeMenuOnScroll?: boolean | EventListener | undefined;
113
+ components?: Partial<import("packages/design-system/react-select/dist/types/components").SelectComponents<import("../types").OptionData, boolean, import("@atlaskit/select").GroupType<import("../types").OptionData>>> | undefined;
112
114
  inputId?: string | undefined;
113
115
  isClearable?: boolean | undefined;
114
116
  isInvalid?: boolean | undefined;
@@ -2,15 +2,14 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { type ValueContainerProps } from '@atlaskit/select';
6
- import { jsx } from '@emotion/react';
7
5
  import React from 'react';
6
+ import { type ValueContainerProps } from '@atlaskit/select';
8
7
  import { type Option, type User } from '../types';
9
8
  export declare class SingleValueContainer extends React.Component<ValueContainerProps<Option<User>>> {
10
9
  private renderAvatar;
11
10
  onValueContainerClick: any;
12
11
  Wrapper: ({ children }: {
13
12
  children: React.ReactElement;
14
- }) => jsx.JSX.Element;
15
- render(): jsx.JSX.Element;
13
+ }) => JSX.Element;
14
+ render(): JSX.Element;
16
15
  }
@@ -8,7 +8,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
8
8
  isMulti: boolean;
9
9
  };
10
10
  componentDidMount(): void;
11
- render(): React.JSX.Element;
11
+ render(): JSX.Element;
12
12
  }
13
13
  export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
14
14
  fieldId: string | null;
@@ -40,6 +40,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
40
40
  subtle?: boolean | undefined;
41
41
  noBorder?: boolean | undefined;
42
42
  styles?: import("@atlaskit/select").StylesConfig | undefined;
43
+ components?: Partial<import("packages/design-system/react-select/dist/types/components").SelectComponents<import("../types").OptionData, boolean, import("@atlaskit/select").GroupType<import("../types").OptionData>>> | undefined;
43
44
  defaultValue?: import("../types").DefaultValue;
44
45
  placeholder?: React.ReactNode;
45
46
  placeholderAvatar?: "team" | "person" | undefined;
@@ -77,7 +78,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
77
78
  openMenuOnClick?: boolean | undefined;
78
79
  strategy?: "absolute" | "fixed" | undefined;
79
80
  showClearIndicator?: boolean | undefined;
80
- }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "openMenuOnClick" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "subtle" | "noBorder" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator"> & {
81
+ }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "openMenuOnClick" | "styles" | "value" | "required" | "appearance" | "footer" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onOpen" | "onClose" | "subtle" | "noBorder" | "placeholderAvatar" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabel" | "ariaLabelledBy" | "ariaDescribedBy" | "ariaLive" | "header" | "UNSAFE_hasDraggableParentComponent" | "strategy" | "showClearIndicator"> & {
81
82
  isMulti?: boolean | undefined;
82
83
  width?: string | number | undefined;
83
84
  } & {} & React.RefAttributes<any>>;
@@ -7,29 +7,37 @@ import { SingleValueContainer } from './SingleValueContainer';
7
7
  import { PopupInput } from './PopupInput';
8
8
  import { PopupControl } from './PopupControl';
9
9
  import { Menu } from './Menu';
10
+ import { type SelectComponentsConfig } from '@atlaskit/select';
11
+ import { type OptionData } from '../types';
10
12
  /**
11
13
  * Memoize getComponents to avoid rerenders.
12
14
  */
13
- export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean, anchor?: React.ComponentType<any>, showClearIndicator?: boolean) => {
15
+ export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean, anchor?: React.ComponentType<any>, showClearIndicator?: boolean, customComponents?: SelectComponentsConfig<OptionData, boolean>) => {
14
16
  Control: import("react").ComponentType<any>;
15
17
  Option: import("react").FC<import("./Option").OptionProps>;
16
- MultiValue?: undefined;
17
- DropdownIndicator?: undefined;
18
- SingleValue?: undefined;
19
- ClearIndicator?: undefined;
20
- ValueContainer?: undefined;
21
- Input?: undefined;
22
- Menu?: undefined;
23
18
  } | {
24
- MultiValue: typeof MultiValue;
25
- DropdownIndicator: null;
26
- SingleValue: (props: import("./SingleValue").Props) => JSX.Element | null;
27
- ClearIndicator: typeof ClearIndicator | null;
28
- Option: import("react").FC<import("./Option").OptionProps>;
29
- ValueContainer: typeof MultiValueContainer | typeof SingleValueContainer;
30
- Input: typeof Input;
31
- Menu: typeof Menu;
32
- Control?: undefined;
19
+ Option: import("react").FC<import("./Option").OptionProps> | import("react").ComponentType<import("packages/design-system/react-select/dist/types").OptionProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
20
+ Group?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").GroupProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
21
+ ClearIndicator: typeof ClearIndicator | import("react").ComponentType<import("@atlaskit/select").ClearIndicatorProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | null;
22
+ Control: ((props: import("@atlaskit/select").ControlProps<any>) => JSX.Element) | import("react").ComponentType<import("packages/design-system/react-select/dist/types").ControlProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
23
+ DropdownIndicator: import("react").ComponentType<import("@atlaskit/select").DropdownIndicatorProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | null;
24
+ GroupHeading?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").GroupHeadingProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
25
+ IndicatorsContainer?: import("react").ComponentType<import("@atlaskit/select").IndicatorsContainerProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
26
+ Input: typeof Input | import("react").ComponentType<import("@atlaskit/select").InputProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
27
+ LoadingIndicator?: import("react").ComponentType<import("@atlaskit/select").LoadingIndicatorProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
28
+ Menu: typeof Menu | import("react").ComponentType<import("packages/design-system/react-select/dist/types").MenuProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
29
+ MenuList?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").MenuListProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
30
+ MenuPortal?: import("react").ComponentType<import("packages/design-system/react-select/dist/types/components/menu").MenuPortalProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
31
+ LoadingMessage?: import("react").ComponentType<import("@atlaskit/select").NoticeProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
32
+ NoOptionsMessage?: import("react").ComponentType<import("@atlaskit/select").NoticeProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
33
+ MultiValue: typeof MultiValue | import("react").ComponentType<import("@atlaskit/select").MultiValueProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
34
+ MultiValueContainer?: import("react").ComponentType<import("@atlaskit/select").MultiValueGenericProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
35
+ MultiValueLabel?: import("react").ComponentType<import("@atlaskit/select").MultiValueGenericProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
36
+ MultiValueRemove?: import("react").ComponentType<import("@atlaskit/select").MultiValueRemoveProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
37
+ Placeholder?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").PlaceholderProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
38
+ SelectContainer?: import("react").ComponentType<import("packages/design-system/react-select/dist/types").ContainerProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>> | undefined;
39
+ SingleValue: ((props: import("./SingleValue").Props) => JSX.Element | null) | import("react").ComponentType<import("@atlaskit/select").SingleValueProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
40
+ ValueContainer: typeof MultiValueContainer | typeof SingleValueContainer | import("react").ComponentType<import("packages/design-system/react-select/dist/types").ValueContainerProps<OptionData, boolean, import("@atlaskit/select").GroupType<OptionData>>>;
33
41
  }>;
34
42
  export declare const getPopupComponents: import("memoize-one").MemoizedFn<(hasPopupTitle: boolean) => {
35
43
  DropdownIndicator: null;
@@ -4,7 +4,7 @@ import { type AriaAttributes } from 'react';
4
4
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
5
  import { type Placement } from '@atlaskit/popper';
6
6
  import { type EmailValidator } from './components/emailValidation';
7
- import { type StylesConfig } from '@atlaskit/select';
7
+ import { type StylesConfig, type SelectComponentsConfig } from '@atlaskit/select';
8
8
  import { type BaseUserPickerWithoutAnalytics } from './components/BaseUserPicker';
9
9
  export type UserPickerProps = WithAnalyticsEventsProps & {
10
10
  /**
@@ -96,6 +96,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
96
96
  * See https://react-select.com/styles
97
97
  */
98
98
  styles?: StylesConfig;
99
+ /** Override the default components used in the user picker. */
100
+ components?: SelectComponentsConfig<OptionData, boolean>;
99
101
  /** Default value for the field to be used on initial render.
100
102
  * `defaultValue` differs from `value` in that it sets the initial value then leaves the component 'uncontrolled'
101
103
  * whereas setting the `value` prop delegates responsibility for maintaining the value to the caller
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "11.0.9",
3
+ "version": "11.0.11",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,18 +51,18 @@
51
51
  "dependencies": {
52
52
  "@atlaskit/analytics-next": "^11.0.0",
53
53
  "@atlaskit/avatar": "^25.0.0",
54
- "@atlaskit/icon": "^25.5.0",
55
- "@atlaskit/logo": "^16.0.0",
54
+ "@atlaskit/icon": "^25.6.0",
55
+ "@atlaskit/logo": "^17.0.0",
56
56
  "@atlaskit/lozenge": "^12.2.0",
57
57
  "@atlaskit/people-teams-ui-public": "^3.1.0",
58
58
  "@atlaskit/platform-feature-flags": "^1.1.0",
59
59
  "@atlaskit/popper": "^7.0.0",
60
- "@atlaskit/primitives": "^14.4.0",
61
- "@atlaskit/select": "^20.3.0",
60
+ "@atlaskit/primitives": "^14.6.0",
61
+ "@atlaskit/select": "^20.4.0",
62
62
  "@atlaskit/spinner": "^18.0.0",
63
63
  "@atlaskit/teams-avatar": "^2.3.0",
64
64
  "@atlaskit/theme": "^18.0.0",
65
- "@atlaskit/tokens": "^4.7.0",
65
+ "@atlaskit/tokens": "^4.8.0",
66
66
  "@atlaskit/tooltip": "^20.0.0",
67
67
  "@atlaskit/ufo": "^0.4.0",
68
68
  "@babel/runtime": "^7.0.0",
@@ -79,9 +79,9 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@atlaskit/analytics-viewer": "^0.8.0",
82
- "@atlaskit/elements-test-helpers": "^0.9.0",
82
+ "@atlaskit/elements-test-helpers": "workspace:^",
83
83
  "@atlaskit/heading": "^5.2.0",
84
- "@atlaskit/visual-regression": "^0.10.0",
84
+ "@atlaskit/visual-regression": "workspace:^",
85
85
  "@atlassian/feature-flags-test-utils": "^0.3.0",
86
86
  "@emotion/styled": "^11.0.0",
87
87
  "@testing-library/dom": "^10.1.0",