@atlaskit/user-picker 11.21.2 → 11.22.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 11.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c474c86e4ed4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c474c86e4ed4d) -
8
+ Add isHeaderFocused prop to enable tabbing through header plugin in user picker.
9
+
3
10
  ## 11.21.2
4
11
 
5
12
  ### Patch Changes
@@ -13,7 +13,7 @@ var _utils = require("./components/utils");
13
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
15
15
  var packageName = "@atlaskit/user-picker";
16
- var packageVersion = "0.0.0-development";
16
+ var packageVersion = "11.21.2";
17
17
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
18
18
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
19
19
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -253,7 +253,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
253
253
  });
254
254
  });
255
255
  (0, _defineProperty2.default)(_this, "handleBlur", function () {
256
- if (_this.isCreateTeamA11yEnabled && _this.props.isFooterFocused) {
256
+ if (_this.isCreateTeamA11yEnabled && (_this.props.isFooterFocused || _this.props.isHeaderFocused)) {
257
257
  return;
258
258
  }
259
259
  (0, _utils.callCallback)(_this.props.onBlur, _this.getSessionId());
@@ -269,7 +269,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
269
269
  });
270
270
  });
271
271
  (0, _defineProperty2.default)(_this, "handleClose", function () {
272
- if (_this.isCreateTeamA11yEnabled && _this.props.isFooterFocused) {
272
+ if (_this.isCreateTeamA11yEnabled && (_this.props.isFooterFocused || _this.props.isHeaderFocused)) {
273
273
  return;
274
274
  }
275
275
  _this.resetInputState();
@@ -339,10 +339,14 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
339
339
  options: []
340
340
  });
341
341
  _this.props.setIsFooterFocused && _this.props.setIsFooterFocused(false);
342
+ _this.props.setIsHeaderFocused && _this.props.setIsHeaderFocused(false);
342
343
  }
343
344
  if (event.key === 'Tab' && _this.props.setIsFooterFocused && _this.props.footer) {
344
345
  _this.props.setIsFooterFocused(true);
345
346
  }
347
+ if (event.key === 'Tab' && _this.props.setIsHeaderFocused && _this.props.header) {
348
+ _this.props.setIsHeaderFocused(true);
349
+ }
346
350
  }
347
351
  });
348
352
  (0, _defineProperty2.default)(_this, "handleClearIndicatorHover", function (hoveringClearIndicator) {
@@ -401,7 +405,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
401
405
  }
402
406
  });
403
407
  (0, _defineProperty2.default)(_this, "shouldKeepMenuOpen", function () {
404
- return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused);
408
+ return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused) || Boolean(!!_this.props.header) && Boolean(_this.props.isHeaderFocused);
405
409
  });
406
410
  _this.state = {
407
411
  options: [],
@@ -466,8 +470,8 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
466
470
  count = _this$state2.count,
467
471
  inputValue = _this$state2.inputValue;
468
472
 
469
- // Close menu when isFooterFocused changes from true to false
470
- if (this.isCreateTeamA11yEnabled && menuIsOpen && prevProps.isFooterFocused === true && this.props.isFooterFocused === false && !this.shouldKeepMenuOpen()) {
473
+ // Close menu when isFooterFocused or isHeaderFocused changes from true to false
474
+ if (this.isCreateTeamA11yEnabled && menuIsOpen && (prevProps.isFooterFocused === true && this.props.isFooterFocused === false || prevProps.isHeaderFocused === true && this.props.isHeaderFocused === false) && !this.shouldKeepMenuOpen()) {
471
475
  this.resetInputState();
472
476
  (0, _utils.callCallback)(this.props.onClose, this.getSessionId());
473
477
  this.setState({
@@ -4,7 +4,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
  import { isCustom, isExternalUser } from './components/utils';
6
6
  const packageName = "@atlaskit/user-picker";
7
- const packageVersion = "0.0.0-development";
7
+ const packageVersion = "11.21.2";
8
8
  const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
9
9
  const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
10
10
  const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -243,7 +243,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
243
243
  });
244
244
  });
245
245
  _defineProperty(this, "handleBlur", () => {
246
- if (this.isCreateTeamA11yEnabled && this.props.isFooterFocused) {
246
+ if (this.isCreateTeamA11yEnabled && (this.props.isFooterFocused || this.props.isHeaderFocused)) {
247
247
  return;
248
248
  }
249
249
  callCallback(this.props.onBlur, this.getSessionId());
@@ -259,7 +259,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
259
259
  });
260
260
  });
261
261
  _defineProperty(this, "handleClose", () => {
262
- if (this.isCreateTeamA11yEnabled && this.props.isFooterFocused) {
262
+ if (this.isCreateTeamA11yEnabled && (this.props.isFooterFocused || this.props.isHeaderFocused)) {
263
263
  return;
264
264
  }
265
265
  this.resetInputState();
@@ -329,10 +329,14 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
329
329
  options: []
330
330
  });
331
331
  this.props.setIsFooterFocused && this.props.setIsFooterFocused(false);
332
+ this.props.setIsHeaderFocused && this.props.setIsHeaderFocused(false);
332
333
  }
333
334
  if (event.key === 'Tab' && this.props.setIsFooterFocused && this.props.footer) {
334
335
  this.props.setIsFooterFocused(true);
335
336
  }
337
+ if (event.key === 'Tab' && this.props.setIsHeaderFocused && this.props.header) {
338
+ this.props.setIsHeaderFocused(true);
339
+ }
336
340
  }
337
341
  });
338
342
  _defineProperty(this, "handleClearIndicatorHover", hoveringClearIndicator => {
@@ -385,7 +389,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
385
389
  }));
386
390
  }
387
391
  });
388
- _defineProperty(this, "shouldKeepMenuOpen", () => Boolean(!!this.props.footer) && Boolean(this.props.isFooterFocused));
392
+ _defineProperty(this, "shouldKeepMenuOpen", () => Boolean(!!this.props.footer) && Boolean(this.props.isFooterFocused) || Boolean(!!this.props.header) && Boolean(this.props.isHeaderFocused));
389
393
  this.state = {
390
394
  options: [],
391
395
  isDefaultSet: false,
@@ -441,8 +445,8 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
441
445
  inputValue
442
446
  } = this.state;
443
447
 
444
- // Close menu when isFooterFocused changes from true to false
445
- if (this.isCreateTeamA11yEnabled && menuIsOpen && prevProps.isFooterFocused === true && this.props.isFooterFocused === false && !this.shouldKeepMenuOpen()) {
448
+ // Close menu when isFooterFocused or isHeaderFocused changes from true to false
449
+ if (this.isCreateTeamA11yEnabled && menuIsOpen && (prevProps.isFooterFocused === true && this.props.isFooterFocused === false || prevProps.isHeaderFocused === true && this.props.isHeaderFocused === false) && !this.shouldKeepMenuOpen()) {
446
450
  this.resetInputState();
447
451
  callCallback(this.props.onClose, this.getSessionId());
448
452
  this.setState({
@@ -7,7 +7,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
7
7
  import { v4 as uuidv4 } from 'uuid';
8
8
  import { isCustom, isExternalUser } from './components/utils';
9
9
  var packageName = "@atlaskit/user-picker";
10
- var packageVersion = "0.0.0-development";
10
+ var packageVersion = "11.21.2";
11
11
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
12
12
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
13
13
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -247,7 +247,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
247
247
  });
248
248
  });
249
249
  _defineProperty(_this, "handleBlur", function () {
250
- if (_this.isCreateTeamA11yEnabled && _this.props.isFooterFocused) {
250
+ if (_this.isCreateTeamA11yEnabled && (_this.props.isFooterFocused || _this.props.isHeaderFocused)) {
251
251
  return;
252
252
  }
253
253
  callCallback(_this.props.onBlur, _this.getSessionId());
@@ -263,7 +263,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
263
263
  });
264
264
  });
265
265
  _defineProperty(_this, "handleClose", function () {
266
- if (_this.isCreateTeamA11yEnabled && _this.props.isFooterFocused) {
266
+ if (_this.isCreateTeamA11yEnabled && (_this.props.isFooterFocused || _this.props.isHeaderFocused)) {
267
267
  return;
268
268
  }
269
269
  _this.resetInputState();
@@ -333,10 +333,14 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
333
333
  options: []
334
334
  });
335
335
  _this.props.setIsFooterFocused && _this.props.setIsFooterFocused(false);
336
+ _this.props.setIsHeaderFocused && _this.props.setIsHeaderFocused(false);
336
337
  }
337
338
  if (event.key === 'Tab' && _this.props.setIsFooterFocused && _this.props.footer) {
338
339
  _this.props.setIsFooterFocused(true);
339
340
  }
341
+ if (event.key === 'Tab' && _this.props.setIsHeaderFocused && _this.props.header) {
342
+ _this.props.setIsHeaderFocused(true);
343
+ }
340
344
  }
341
345
  });
342
346
  _defineProperty(_this, "handleClearIndicatorHover", function (hoveringClearIndicator) {
@@ -395,7 +399,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
395
399
  }
396
400
  });
397
401
  _defineProperty(_this, "shouldKeepMenuOpen", function () {
398
- return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused);
402
+ return Boolean(!!_this.props.footer) && Boolean(_this.props.isFooterFocused) || Boolean(!!_this.props.header) && Boolean(_this.props.isHeaderFocused);
399
403
  });
400
404
  _this.state = {
401
405
  options: [],
@@ -460,8 +464,8 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
460
464
  count = _this$state2.count,
461
465
  inputValue = _this$state2.inputValue;
462
466
 
463
- // Close menu when isFooterFocused changes from true to false
464
- if (this.isCreateTeamA11yEnabled && menuIsOpen && prevProps.isFooterFocused === true && this.props.isFooterFocused === false && !this.shouldKeepMenuOpen()) {
467
+ // Close menu when isFooterFocused or isHeaderFocused changes from true to false
468
+ if (this.isCreateTeamA11yEnabled && menuIsOpen && (prevProps.isFooterFocused === true && this.props.isFooterFocused === false || prevProps.isHeaderFocused === true && this.props.isHeaderFocused === false) && !this.shouldKeepMenuOpen()) {
465
469
  this.resetInputState();
466
470
  callCallback(this.props.onClose, this.getSessionId());
467
471
  this.setState({
@@ -98,6 +98,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
98
98
  isClearable?: boolean;
99
99
  isDisabled?: boolean;
100
100
  isFooterFocused?: boolean;
101
+ isHeaderFocused?: boolean;
101
102
  isInvalid?: boolean;
102
103
  isLoading?: boolean;
103
104
  isMulti?: boolean;
@@ -137,6 +138,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
137
138
  required?: boolean;
138
139
  search?: string;
139
140
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
141
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
140
142
  showClearIndicator?: boolean;
141
143
  strategy?: "fixed" | "absolute";
142
144
  styles?: StylesConfig;
@@ -47,6 +47,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
47
47
  isClearable?: boolean;
48
48
  isDisabled?: boolean;
49
49
  isFooterFocused?: boolean;
50
+ isHeaderFocused?: boolean;
50
51
  isInvalid?: boolean;
51
52
  isLoading?: boolean;
52
53
  isMulti?: boolean;
@@ -86,6 +87,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
86
87
  required?: boolean;
87
88
  search?: string;
88
89
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
90
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
89
91
  showClearIndicator?: boolean;
90
92
  strategy?: "fixed" | "absolute";
91
93
  styles?: import("@atlaskit/select").StylesConfig;
@@ -155,6 +157,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
155
157
  height?: number | string | undefined;
156
158
  includeTeamsUpdates?: boolean | undefined;
157
159
  isFooterFocused?: boolean | undefined;
160
+ isHeaderFocused?: boolean | undefined;
158
161
  isValidEmail?: import("./emailValidation").EmailValidator | undefined;
159
162
  loadOptions?: import("..").LoadOptions | undefined;
160
163
  loadOptionsErrorMessage?: ((value: {
@@ -173,6 +176,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
173
176
  placeholderAvatar?: "person" | "team" | undefined;
174
177
  popupSelectProps?: import("@atlaskit/select").PopupSelectProps<import("..").OptionData> | undefined;
175
178
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
179
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
176
180
  showClearIndicator?: boolean | undefined;
177
181
  strategy?: "fixed" | "absolute" | undefined;
178
182
  subtle?: boolean | undefined;
@@ -38,6 +38,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
38
38
  isClearable?: boolean;
39
39
  isDisabled?: boolean;
40
40
  isFooterFocused?: boolean;
41
+ isHeaderFocused?: boolean;
41
42
  isInvalid?: boolean;
42
43
  isLoading?: boolean;
43
44
  isMulti?: boolean;
@@ -77,6 +78,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
77
78
  required?: boolean;
78
79
  search?: string;
79
80
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
81
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
80
82
  showClearIndicator?: boolean;
81
83
  strategy?: "fixed" | "absolute";
82
84
  styles?: import("@atlaskit/select").StylesConfig;
@@ -86,7 +88,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
86
88
  UNSAFE_hasDraggableParentComponent?: boolean;
87
89
  value?: import("..").Value;
88
90
  width?: number | string;
89
- }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
91
+ }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isHeaderFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "setIsHeaderFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
90
92
  isMulti?: boolean | undefined;
91
93
  width?: number | string | undefined;
92
94
  } & {} & React.RefAttributes<any>>;
@@ -80,6 +80,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
80
80
  isDisabled?: boolean;
81
81
  /** Checks if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
82
82
  isFooterFocused?: boolean;
83
+ /** Checks if the header is focused or not. This is needed to keep the menu open when the header is focused */
84
+ isHeaderFocused?: boolean;
83
85
  /** Display the picker with a style to show the value is invalid */
84
86
  isInvalid?: boolean;
85
87
  /** Show the loading indicator. */
@@ -170,6 +172,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
170
172
  search?: string;
171
173
  /** Sets if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
172
174
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
175
+ /** Sets if the header is focused or not. This is needed to keep the menu open when the header is focused */
176
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
173
177
  /** Override default behavior and show the clear indicator. */
174
178
  showClearIndicator?: boolean;
175
179
  /** Positioning strategy for the popper element */
@@ -98,6 +98,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
98
98
  isClearable?: boolean;
99
99
  isDisabled?: boolean;
100
100
  isFooterFocused?: boolean;
101
+ isHeaderFocused?: boolean;
101
102
  isInvalid?: boolean;
102
103
  isLoading?: boolean;
103
104
  isMulti?: boolean;
@@ -137,6 +138,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
137
138
  required?: boolean;
138
139
  search?: string;
139
140
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
141
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
140
142
  showClearIndicator?: boolean;
141
143
  strategy?: "fixed" | "absolute";
142
144
  styles?: StylesConfig;
@@ -47,6 +47,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
47
47
  isClearable?: boolean;
48
48
  isDisabled?: boolean;
49
49
  isFooterFocused?: boolean;
50
+ isHeaderFocused?: boolean;
50
51
  isInvalid?: boolean;
51
52
  isLoading?: boolean;
52
53
  isMulti?: boolean;
@@ -86,6 +87,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
86
87
  required?: boolean;
87
88
  search?: string;
88
89
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
90
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
89
91
  showClearIndicator?: boolean;
90
92
  strategy?: "fixed" | "absolute";
91
93
  styles?: import("@atlaskit/select").StylesConfig;
@@ -161,6 +163,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
161
163
  height?: number | string | undefined;
162
164
  includeTeamsUpdates?: boolean | undefined;
163
165
  isFooterFocused?: boolean | undefined;
166
+ isHeaderFocused?: boolean | undefined;
164
167
  isValidEmail?: import("./emailValidation").EmailValidator | undefined;
165
168
  loadOptions?: import("..").LoadOptions | undefined;
166
169
  loadOptionsErrorMessage?: ((value: {
@@ -179,6 +182,7 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
179
182
  placeholderAvatar?: "person" | "team" | undefined;
180
183
  popupSelectProps?: import("@atlaskit/select").PopupSelectProps<import("..").OptionData> | undefined;
181
184
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
185
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
182
186
  showClearIndicator?: boolean | undefined;
183
187
  strategy?: "fixed" | "absolute" | undefined;
184
188
  subtle?: boolean | undefined;
@@ -38,6 +38,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
38
38
  isClearable?: boolean;
39
39
  isDisabled?: boolean;
40
40
  isFooterFocused?: boolean;
41
+ isHeaderFocused?: boolean;
41
42
  isInvalid?: boolean;
42
43
  isLoading?: boolean;
43
44
  isMulti?: boolean;
@@ -77,6 +78,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
77
78
  required?: boolean;
78
79
  search?: string;
79
80
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
81
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
80
82
  showClearIndicator?: boolean;
81
83
  strategy?: "fixed" | "absolute";
82
84
  styles?: import("@atlaskit/select").StylesConfig;
@@ -86,7 +88,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
86
88
  UNSAFE_hasDraggableParentComponent?: boolean;
87
89
  value?: import("..").Value;
88
90
  width?: number | string;
89
- }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
91
+ }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isHeaderFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "setIsHeaderFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
90
92
  isMulti?: boolean | undefined;
91
93
  width?: number | string | undefined;
92
94
  } & {} & React.RefAttributes<any>>;
@@ -80,6 +80,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
80
80
  isDisabled?: boolean;
81
81
  /** Checks if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
82
82
  isFooterFocused?: boolean;
83
+ /** Checks if the header is focused or not. This is needed to keep the menu open when the header is focused */
84
+ isHeaderFocused?: boolean;
83
85
  /** Display the picker with a style to show the value is invalid */
84
86
  isInvalid?: boolean;
85
87
  /** Show the loading indicator. */
@@ -170,6 +172,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
170
172
  search?: string;
171
173
  /** Sets if the footer is focused or not. This is needed to keep the menu open when the footer is focused */
172
174
  setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
175
+ /** Sets if the header is focused or not. This is needed to keep the menu open when the header is focused */
176
+ setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
173
177
  /** Override default behavior and show the clear indicator. */
174
178
  showClearIndicator?: boolean;
175
179
  /** Positioning strategy for the popper element */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "11.21.2",
3
+ "version": "11.22.0",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"