@atlaskit/user-picker 10.20.1 → 10.20.3

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 +16 -0
  2. package/dist/cjs/analytics.js +1 -1
  3. package/dist/cjs/components/BaseUserPicker.js +32 -15
  4. package/dist/es2019/analytics.js +1 -1
  5. package/dist/es2019/components/BaseUserPicker.js +32 -15
  6. package/dist/esm/analytics.js +1 -1
  7. package/dist/esm/components/BaseUserPicker.js +32 -15
  8. package/dist/types/analytics.d.ts +2 -2
  9. package/dist/types/clients/UserSourceProvider.d.ts +2 -2
  10. package/dist/types/components/AvatarItemOption.d.ts +2 -2
  11. package/dist/types/components/ClearIndicator.d.ts +1 -1
  12. package/dist/types/components/CustomOption/main.d.ts +1 -1
  13. package/dist/types/components/EmailOption/main.d.ts +2 -2
  14. package/dist/types/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +1 -1
  15. package/dist/types/components/ExternalUserOption/SourcesTooltipContent.d.ts +1 -1
  16. package/dist/types/components/ExternalUserOption/main.d.ts +2 -2
  17. package/dist/types/components/ExternalUserSourcesContainer.d.ts +2 -2
  18. package/dist/types/components/GroupOption/main.d.ts +1 -1
  19. package/dist/types/components/HighlightText.d.ts +1 -1
  20. package/dist/types/components/Input.d.ts +1 -1
  21. package/dist/types/components/Menu.d.ts +1 -1
  22. package/dist/types/components/MessagesIntlProvider.d.ts +1 -1
  23. package/dist/types/components/MultiValue.d.ts +3 -3
  24. package/dist/types/components/MultiValueContainer.d.ts +2 -2
  25. package/dist/types/components/Option.d.ts +3 -3
  26. package/dist/types/components/PopupControl.d.ts +1 -1
  27. package/dist/types/components/PopupUserPicker.d.ts +1 -1
  28. package/dist/types/components/SingleValue.d.ts +2 -2
  29. package/dist/types/components/SingleValueContainer.d.ts +2 -2
  30. package/dist/types/components/TeamOption/main.d.ts +1 -1
  31. package/dist/types/components/UserOption.d.ts +1 -1
  32. package/dist/types/components/UserPicker.d.ts +1 -1
  33. package/dist/types/components/creatable.d.ts +2 -2
  34. package/dist/types/components/creatableEmailSuggestion.d.ts +2 -2
  35. package/dist/types/components/popup.d.ts +2 -2
  36. package/dist/types/components/styles.d.ts +1 -1
  37. package/dist/types/components/utils.d.ts +2 -2
  38. package/dist/types/types.d.ts +8 -6
  39. package/dist/types-ts4.5/analytics.d.ts +2 -2
  40. package/dist/types-ts4.5/clients/UserSourceProvider.d.ts +2 -2
  41. package/dist/types-ts4.5/components/AvatarItemOption.d.ts +2 -2
  42. package/dist/types-ts4.5/components/ClearIndicator.d.ts +1 -1
  43. package/dist/types-ts4.5/components/CustomOption/main.d.ts +1 -1
  44. package/dist/types-ts4.5/components/EmailOption/main.d.ts +2 -2
  45. package/dist/types-ts4.5/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +1 -1
  46. package/dist/types-ts4.5/components/ExternalUserOption/SourcesTooltipContent.d.ts +1 -1
  47. package/dist/types-ts4.5/components/ExternalUserOption/main.d.ts +2 -2
  48. package/dist/types-ts4.5/components/ExternalUserSourcesContainer.d.ts +2 -2
  49. package/dist/types-ts4.5/components/GroupOption/main.d.ts +1 -1
  50. package/dist/types-ts4.5/components/HighlightText.d.ts +1 -1
  51. package/dist/types-ts4.5/components/Input.d.ts +1 -1
  52. package/dist/types-ts4.5/components/Menu.d.ts +1 -1
  53. package/dist/types-ts4.5/components/MessagesIntlProvider.d.ts +1 -1
  54. package/dist/types-ts4.5/components/MultiValue.d.ts +3 -3
  55. package/dist/types-ts4.5/components/MultiValueContainer.d.ts +2 -2
  56. package/dist/types-ts4.5/components/Option.d.ts +3 -3
  57. package/dist/types-ts4.5/components/PopupControl.d.ts +1 -1
  58. package/dist/types-ts4.5/components/PopupUserPicker.d.ts +1 -1
  59. package/dist/types-ts4.5/components/SingleValue.d.ts +2 -2
  60. package/dist/types-ts4.5/components/SingleValueContainer.d.ts +2 -2
  61. package/dist/types-ts4.5/components/TeamOption/main.d.ts +1 -1
  62. package/dist/types-ts4.5/components/UserOption.d.ts +1 -1
  63. package/dist/types-ts4.5/components/UserPicker.d.ts +1 -1
  64. package/dist/types-ts4.5/components/creatable.d.ts +2 -2
  65. package/dist/types-ts4.5/components/creatableEmailSuggestion.d.ts +2 -2
  66. package/dist/types-ts4.5/components/popup.d.ts +2 -2
  67. package/dist/types-ts4.5/components/styles.d.ts +1 -1
  68. package/dist/types-ts4.5/components/utils.d.ts +2 -2
  69. package/dist/types-ts4.5/types.d.ts +8 -6
  70. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 10.20.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 10.20.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#101781](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101781)
14
+ [`ea3386009a3f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ea3386009a3f) -
15
+ A bug has been fixed where aria-activedescendant on the input elemnt would be try to set to a
16
+ menu list item before the menu was rendered.
17
+ - Updated dependencies
18
+
3
19
  ## 10.20.1
4
20
 
5
21
  ### Patch Changes
@@ -12,7 +12,7 @@ var _utils = require("./components/utils");
12
12
  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; }
13
13
  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; }
14
14
  var packageName = "@atlaskit/user-picker";
15
- var packageVersion = "10.20.1";
15
+ var packageVersion = "10.20.3";
16
16
  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}$/;
17
17
  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}$/;
18
18
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -315,7 +315,8 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
315
315
  if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
316
316
  var target = mutation.target;
317
317
  if (target.classList.contains(optionFocusedClass)) {
318
- _this.selectRef.select.inputRef.setAttribute('aria-activedescendant', target.id);
318
+ var _this$selectRef$selec;
319
+ (_this$selectRef$selec = _this.selectRef.select.inputRef) === null || _this$selectRef$selec === void 0 || _this$selectRef$selec.setAttribute('aria-activedescendant', target.id);
319
320
  break;
320
321
  }
321
322
  }
@@ -326,9 +327,9 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
326
327
  _iterator2.f();
327
328
  }
328
329
  });
329
- // for SSR, MutationObserver not existed in node, need to check its existence first
330
- // using typeof MutationObserver to check if MutationObserver is function, it is undefined in node
331
- // if it is node environment, focusedOptionObserver will be falsy value.
330
+ // Create a MutationObserver which will observe the menu list for changes. In
331
+ // node environments such as SSR, MutationObserver doesn't exist and this
332
+ // variable will be falsy.
332
333
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusedOptionObserver", typeof MutationObserver === 'function' && new MutationObserver(_this.focusedOptionObserverCallback));
333
334
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeyDown", function (event) {
334
335
  if (!_this.isMenuOpenOnClickForSingleSelect) {
@@ -457,16 +458,36 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
457
458
  resolving = _this$state2.resolving,
458
459
  count = _this$state2.count,
459
460
  inputValue = _this$state2.inputValue;
460
- if (menuIsOpen && !prevState.menuIsOpen) {
461
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.select-aria-activedescendant_psxzq')) {
461
+
462
+ // Create a new session when the menu is opened and there is no session
463
+ if (menuIsOpen && !prevState.menuIsOpen && !this.session) {
464
+ this.startSession();
465
+ }
466
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.select-aria-activedescendant_psxzq')) {
467
+ var _this$selectRef, _this$selectRef2, _this$selectRef3;
468
+ // When the menu is opened, set aria-activedescendant attribute on the
469
+ // input and instrument a mutation observer. On the first opening of the
470
+ // menu, menuIsOpen is true but the menu isn't actually in the DOM yet.
471
+ // For this reason, we the use the existence of the attribute.
472
+ var inputHasAriaActiveDecendant = (_this$selectRef = this.selectRef) === null || _this$selectRef === void 0 || (_this$selectRef = _this$selectRef.select) === null || _this$selectRef === void 0 || (_this$selectRef = _this$selectRef.inputRef) === null || _this$selectRef === void 0 ? void 0 : _this$selectRef.getAttribute('aria-activedescendant');
473
+ var inputRef = (_this$selectRef2 = this.selectRef) === null || _this$selectRef2 === void 0 || (_this$selectRef2 = _this$selectRef2.select) === null || _this$selectRef2 === void 0 ? void 0 : _this$selectRef2.inputRef;
474
+ var menuRef = (_this$selectRef3 = this.selectRef) === null || _this$selectRef3 === void 0 || (_this$selectRef3 = _this$selectRef3.select) === null || _this$selectRef3 === void 0 ? void 0 : _this$selectRef3.menuListRef;
475
+ if (menuIsOpen && menuRef && !inputHasAriaActiveDecendant) {
462
476
  var _menuRef$children$;
463
- var menuRef = this.selectRef.select.menuListRef;
464
- ((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && this.selectRef.select.inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
477
+ // Set the aria-activedescendant attribute on the input element
478
+ // to the first menu item
479
+ ((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && inputRef && inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
480
+
481
+ // Setup MutationObserver so when the selected option changes, update
482
+ // the aria-activedescendant attribute on the input element
465
483
  this.focusedOptionObserver && this.focusedOptionObserver.observe(menuRef, observerOptions);
466
484
  }
467
- if (!this.session) {
468
- // session should have been created onFocus
469
- this.startSession();
485
+
486
+ // Rewmoe the aria-active-descendant attribute and disconnect the observer
487
+ // when the menu is closed
488
+ if (!menuIsOpen && prevState.menuIsOpen) {
489
+ inputRef && inputRef.removeAttribute('aria-activedescendant');
490
+ this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
470
491
  }
471
492
  }
472
493
 
@@ -477,10 +498,6 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
477
498
  if (!menuIsOpen && prevState.menuIsOpen && this.session) {
478
499
  this.fireEvent(_analytics.cancelEvent, prevState);
479
500
  this.session = undefined;
480
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.select-aria-activedescendant_psxzq')) {
481
- this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
482
- this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
483
- }
484
501
  }
485
502
  if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
486
503
  this.fireEvent(_analytics.searchedEvent);
@@ -2,7 +2,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
3
  import { isCustom, isExternalUser } from './components/utils';
4
4
  const packageName = "@atlaskit/user-picker";
5
- const packageVersion = "10.20.1";
5
+ const packageVersion = "10.20.3";
6
6
  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}$/;
7
7
  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}$/;
8
8
  const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -300,15 +300,16 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
300
300
  if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
301
301
  const target = mutation.target;
302
302
  if (target.classList.contains(optionFocusedClass)) {
303
- this.selectRef.select.inputRef.setAttribute('aria-activedescendant', target.id);
303
+ var _this$selectRef$selec;
304
+ (_this$selectRef$selec = this.selectRef.select.inputRef) === null || _this$selectRef$selec === void 0 ? void 0 : _this$selectRef$selec.setAttribute('aria-activedescendant', target.id);
304
305
  break;
305
306
  }
306
307
  }
307
308
  }
308
309
  });
309
- // for SSR, MutationObserver not existed in node, need to check its existence first
310
- // using typeof MutationObserver to check if MutationObserver is function, it is undefined in node
311
- // if it is node environment, focusedOptionObserver will be falsy value.
310
+ // Create a MutationObserver which will observe the menu list for changes. In
311
+ // node environments such as SSR, MutationObserver doesn't exist and this
312
+ // variable will be falsy.
312
313
  _defineProperty(this, "focusedOptionObserver", typeof MutationObserver === 'function' && new MutationObserver(this.focusedOptionObserverCallback));
313
314
  _defineProperty(this, "handleKeyDown", event => {
314
315
  if (!this.isMenuOpenOnClickForSingleSelect) {
@@ -427,16 +428,36 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
427
428
  count,
428
429
  inputValue
429
430
  } = this.state;
430
- if (menuIsOpen && !prevState.menuIsOpen) {
431
- if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
431
+
432
+ // Create a new session when the menu is opened and there is no session
433
+ if (menuIsOpen && !prevState.menuIsOpen && !this.session) {
434
+ this.startSession();
435
+ }
436
+ if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
437
+ var _this$selectRef, _this$selectRef$selec2, _this$selectRef$selec3, _this$selectRef2, _this$selectRef2$sele, _this$selectRef3, _this$selectRef3$sele;
438
+ // When the menu is opened, set aria-activedescendant attribute on the
439
+ // input and instrument a mutation observer. On the first opening of the
440
+ // menu, menuIsOpen is true but the menu isn't actually in the DOM yet.
441
+ // For this reason, we the use the existence of the attribute.
442
+ const inputHasAriaActiveDecendant = (_this$selectRef = this.selectRef) === null || _this$selectRef === void 0 ? void 0 : (_this$selectRef$selec2 = _this$selectRef.select) === null || _this$selectRef$selec2 === void 0 ? void 0 : (_this$selectRef$selec3 = _this$selectRef$selec2.inputRef) === null || _this$selectRef$selec3 === void 0 ? void 0 : _this$selectRef$selec3.getAttribute('aria-activedescendant');
443
+ const inputRef = (_this$selectRef2 = this.selectRef) === null || _this$selectRef2 === void 0 ? void 0 : (_this$selectRef2$sele = _this$selectRef2.select) === null || _this$selectRef2$sele === void 0 ? void 0 : _this$selectRef2$sele.inputRef;
444
+ const menuRef = (_this$selectRef3 = this.selectRef) === null || _this$selectRef3 === void 0 ? void 0 : (_this$selectRef3$sele = _this$selectRef3.select) === null || _this$selectRef3$sele === void 0 ? void 0 : _this$selectRef3$sele.menuListRef;
445
+ if (menuIsOpen && menuRef && !inputHasAriaActiveDecendant) {
432
446
  var _menuRef$children$;
433
- const menuRef = this.selectRef.select.menuListRef;
434
- ((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && this.selectRef.select.inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
447
+ // Set the aria-activedescendant attribute on the input element
448
+ // to the first menu item
449
+ ((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && inputRef && inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
450
+
451
+ // Setup MutationObserver so when the selected option changes, update
452
+ // the aria-activedescendant attribute on the input element
435
453
  this.focusedOptionObserver && this.focusedOptionObserver.observe(menuRef, observerOptions);
436
454
  }
437
- if (!this.session) {
438
- // session should have been created onFocus
439
- this.startSession();
455
+
456
+ // Rewmoe the aria-active-descendant attribute and disconnect the observer
457
+ // when the menu is closed
458
+ if (!menuIsOpen && prevState.menuIsOpen) {
459
+ inputRef && inputRef.removeAttribute('aria-activedescendant');
460
+ this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
440
461
  }
441
462
  }
442
463
 
@@ -447,10 +468,6 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
447
468
  if (!menuIsOpen && prevState.menuIsOpen && this.session) {
448
469
  this.fireEvent(cancelEvent, prevState);
449
470
  this.session = undefined;
450
- if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
451
- this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
452
- this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
453
- }
454
471
  }
455
472
  if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
456
473
  this.fireEvent(searchedEvent);
@@ -5,7 +5,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
  import { isCustom, isExternalUser } from './components/utils';
7
7
  var packageName = "@atlaskit/user-picker";
8
- var packageVersion = "10.20.1";
8
+ var packageVersion = "10.20.3";
9
9
  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}$/;
10
10
  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}$/;
11
11
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -308,7 +308,8 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
308
308
  if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
309
309
  var target = mutation.target;
310
310
  if (target.classList.contains(optionFocusedClass)) {
311
- _this.selectRef.select.inputRef.setAttribute('aria-activedescendant', target.id);
311
+ var _this$selectRef$selec;
312
+ (_this$selectRef$selec = _this.selectRef.select.inputRef) === null || _this$selectRef$selec === void 0 || _this$selectRef$selec.setAttribute('aria-activedescendant', target.id);
312
313
  break;
313
314
  }
314
315
  }
@@ -319,9 +320,9 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
319
320
  _iterator2.f();
320
321
  }
321
322
  });
322
- // for SSR, MutationObserver not existed in node, need to check its existence first
323
- // using typeof MutationObserver to check if MutationObserver is function, it is undefined in node
324
- // if it is node environment, focusedOptionObserver will be falsy value.
323
+ // Create a MutationObserver which will observe the menu list for changes. In
324
+ // node environments such as SSR, MutationObserver doesn't exist and this
325
+ // variable will be falsy.
325
326
  _defineProperty(_assertThisInitialized(_this), "focusedOptionObserver", typeof MutationObserver === 'function' && new MutationObserver(_this.focusedOptionObserverCallback));
326
327
  _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
327
328
  if (!_this.isMenuOpenOnClickForSingleSelect) {
@@ -450,16 +451,36 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
450
451
  resolving = _this$state2.resolving,
451
452
  count = _this$state2.count,
452
453
  inputValue = _this$state2.inputValue;
453
- if (menuIsOpen && !prevState.menuIsOpen) {
454
- if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
454
+
455
+ // Create a new session when the menu is opened and there is no session
456
+ if (menuIsOpen && !prevState.menuIsOpen && !this.session) {
457
+ this.startSession();
458
+ }
459
+ if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
460
+ var _this$selectRef, _this$selectRef2, _this$selectRef3;
461
+ // When the menu is opened, set aria-activedescendant attribute on the
462
+ // input and instrument a mutation observer. On the first opening of the
463
+ // menu, menuIsOpen is true but the menu isn't actually in the DOM yet.
464
+ // For this reason, we the use the existence of the attribute.
465
+ var inputHasAriaActiveDecendant = (_this$selectRef = this.selectRef) === null || _this$selectRef === void 0 || (_this$selectRef = _this$selectRef.select) === null || _this$selectRef === void 0 || (_this$selectRef = _this$selectRef.inputRef) === null || _this$selectRef === void 0 ? void 0 : _this$selectRef.getAttribute('aria-activedescendant');
466
+ var inputRef = (_this$selectRef2 = this.selectRef) === null || _this$selectRef2 === void 0 || (_this$selectRef2 = _this$selectRef2.select) === null || _this$selectRef2 === void 0 ? void 0 : _this$selectRef2.inputRef;
467
+ var menuRef = (_this$selectRef3 = this.selectRef) === null || _this$selectRef3 === void 0 || (_this$selectRef3 = _this$selectRef3.select) === null || _this$selectRef3 === void 0 ? void 0 : _this$selectRef3.menuListRef;
468
+ if (menuIsOpen && menuRef && !inputHasAriaActiveDecendant) {
455
469
  var _menuRef$children$;
456
- var menuRef = this.selectRef.select.menuListRef;
457
- ((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && this.selectRef.select.inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
470
+ // Set the aria-activedescendant attribute on the input element
471
+ // to the first menu item
472
+ ((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && inputRef && inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
473
+
474
+ // Setup MutationObserver so when the selected option changes, update
475
+ // the aria-activedescendant attribute on the input element
458
476
  this.focusedOptionObserver && this.focusedOptionObserver.observe(menuRef, observerOptions);
459
477
  }
460
- if (!this.session) {
461
- // session should have been created onFocus
462
- this.startSession();
478
+
479
+ // Rewmoe the aria-active-descendant attribute and disconnect the observer
480
+ // when the menu is closed
481
+ if (!menuIsOpen && prevState.menuIsOpen) {
482
+ inputRef && inputRef.removeAttribute('aria-activedescendant');
483
+ this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
463
484
  }
464
485
  }
465
486
 
@@ -470,10 +491,6 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
470
491
  if (!menuIsOpen && prevState.menuIsOpen && this.session) {
471
492
  this.fireEvent(cancelEvent, prevState);
472
493
  this.session = undefined;
473
- if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
474
- this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
475
- this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
476
- }
477
494
  }
478
495
  if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
479
496
  this.fireEvent(searchedEvent);
@@ -1,5 +1,5 @@
1
- import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
- import { UserPickerProps, UserPickerState } from './types';
1
+ import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import { type UserPickerProps, type UserPickerState } from './types';
3
3
  export type UserPickerSession = {
4
4
  id: string;
5
5
  start: number;
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
- import { LoadUserSource, UserSource } from '../types';
1
+ import { type PropsWithChildren } from 'react';
2
+ import { type LoadUserSource, type UserSource } from '../types';
3
3
  export interface UserSourceContext {
4
4
  fetchUserSource?: LoadUserSource;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { LozengeProps } from '../types';
4
+ import { type LozengeProps } from '../types';
5
5
  export declare const textWrapper: (color?: string) => import("@emotion/react").SerializedStyles;
6
6
  export type AvatarItemOptionProps = {
7
7
  avatar: ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ClearIndicatorProps } from '@atlaskit/select';
2
+ import { type ClearIndicatorProps } from '@atlaskit/select';
3
3
  export declare class ClearIndicator extends React.PureComponent<ClearIndicatorProps<any>> {
4
4
  private handleMouseDown;
5
5
  render(): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import React from 'react';
3
- import { Custom } from '../../types';
3
+ import { type Custom } from '../../types';
4
4
  export type CustomOptionProps = {
5
5
  data: Custom;
6
6
  isSelected: boolean;
@@ -1,8 +1,8 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { Email } from '../../types';
5
- import { EmailValidationResponse } from '../emailValidation';
4
+ import { type Email } from '../../types';
5
+ import { type EmailValidationResponse } from '../emailValidation';
6
6
  export type EmailOptionProps = {
7
7
  email: Email;
8
8
  isSelected: boolean;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  export type ExternalAvatarItemOptionProps = {
5
5
  avatar: ReactNode;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ExternalUserSourcesData } from '../ExternalUserSourcesContainer';
2
+ import { type ExternalUserSourcesData } from '../ExternalUserSourcesContainer';
3
3
  export declare const sourceWrapper: import("@emotion/react").SerializedStyles;
4
4
  export declare const SourcesTooltipContent: React.FC<ExternalUserSourcesData>;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
4
- import { ExternalUser } from '../../types';
3
+ import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
4
+ import { type ExternalUser } from '../../types';
5
5
  export declare const imageContainer: import("@emotion/react").SerializedStyles;
6
6
  export declare const emailDomainWrapper: import("@emotion/react").SerializedStyles;
7
7
  export type ExternalUserOptionProps = WithAnalyticsEventsProps & {
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { UserSource } from '../types';
1
+ import { type ReactNode } from 'react';
2
+ import { type UserSource } from '../types';
3
3
  export interface ExternalUserSourcesData {
4
4
  sources: UserSource[];
5
5
  sourcesLoading: boolean;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { Group } from '../../types';
4
+ import { type Group } from '../../types';
5
5
  export declare const groupOptionIconWrapper: import("@emotion/react").SerializedStyles;
6
6
  export type GroupOptionProps = {
7
7
  group: Group;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { HighlightRange } from '../types';
2
+ import { type HighlightRange } from '../types';
3
3
  export interface Props {
4
4
  highlights?: HighlightRange[];
5
5
  children: string;
@@ -1,6 +1,6 @@
1
1
  import React, { type AriaAttributes } from 'react';
2
2
  import { type OptionType, type SelectProps } from '@atlaskit/select';
3
- import { AriaAttributesType } from '../types';
3
+ import { type AriaAttributesType } from '../types';
4
4
  export type Props = {
5
5
  selectProps?: SelectProps<OptionType, boolean>;
6
6
  innerRef: (ref: React.Ref<HTMLInputElement>) => void;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { UserPickerProps } from '../types';
3
+ import { type UserPickerProps } from '../types';
4
4
  import { jsx } from '@emotion/react';
5
5
  export type Props = React.PropsWithChildren<{
6
6
  selectProps: UserPickerProps;
@@ -1,3 +1,3 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { type PropsWithChildren } from 'react';
2
2
  declare const MessagesIntlProvider: (props: PropsWithChildren<{}>) => JSX.Element;
3
3
  export default MessagesIntlProvider;
@@ -1,9 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { OptionType } from '@atlaskit/select';
3
+ import { type OptionType } from '@atlaskit/select';
4
4
  import { jsx } from '@emotion/react';
5
- import { Option, UserPickerProps } from '../types';
6
- import { MultiValueProps } from '@atlaskit/select';
5
+ import { type Option, type UserPickerProps } from '../types';
6
+ import { type MultiValueProps } from '@atlaskit/select';
7
7
  export declare const scrollToValue: (valueContainer: HTMLDivElement, control: HTMLElement) => void;
8
8
  type Props = MultiValueProps<OptionType> & {
9
9
  isFocused?: boolean;
@@ -1,6 +1,6 @@
1
- import { MultiValueProps } from '@atlaskit/select';
1
+ import { type MultiValueProps } from '@atlaskit/select';
2
2
  import React from 'react';
3
- import { Option, User } from '../types';
3
+ import { type Option, type User } from '../types';
4
4
  export type State = {
5
5
  valueSize: number;
6
6
  previousValueSize: number;
@@ -1,6 +1,6 @@
1
- import { OptionProps as AkOptionProps } from '@atlaskit/select';
2
- import { FC } from 'react';
3
- import { Option as OptionType } from '../types';
1
+ import { type OptionProps as AkOptionProps } from '@atlaskit/select';
2
+ import { type FC } from 'react';
3
+ import { type Option as OptionType } from '../types';
4
4
  export type OptionProps = AkOptionProps & {
5
5
  data: OptionType;
6
6
  isSelected: boolean;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { ControlProps } from '@atlaskit/select';
3
+ import { type ControlProps } from '@atlaskit/select';
4
4
  import { jsx } from '@emotion/react';
5
5
  export declare class PopupControl extends React.PureComponent<ControlProps<any>> {
6
6
  render(): jsx.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { PopupUserPickerProps } from '../types';
2
+ import { type PopupUserPickerProps } from '../types';
3
3
  interface State {
4
4
  flipped: boolean;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx } from '@emotion/react';
2
- import { Option } from '../types';
3
- import { SingleValueProps } from '@atlaskit/select';
2
+ import { type Option } from '../types';
3
+ import { type SingleValueProps } from '@atlaskit/select';
4
4
  export type Props = SingleValueProps<Option>;
5
5
  export declare const SingleValue: (props: Props) => jsx.JSX.Element | null;
@@ -1,8 +1,8 @@
1
1
  /** @jsx jsx */
2
- import { ValueContainerProps } from '@atlaskit/select';
2
+ import { type ValueContainerProps } from '@atlaskit/select';
3
3
  import { jsx } from '@emotion/react';
4
4
  import React from 'react';
5
- import { Option, User } from '../types';
5
+ import { type Option, type User } from '../types';
6
6
  export declare class SingleValueContainer extends React.Component<ValueContainerProps<Option<User>>> {
7
7
  private renderAvatar;
8
8
  onValueContainerClick: any;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import React from 'react';
3
- import { Team } from '../../types';
3
+ import { type Team } from '../../types';
4
4
  export type TeamOptionProps = {
5
5
  team: Team;
6
6
  isSelected: boolean;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import React from 'react';
3
- import { User } from '../types';
3
+ import { type User } from '../types';
4
4
  export type UserOptionProps = {
5
5
  user: User;
6
6
  status?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { UserPickerProps } from '../types';
2
+ import { type UserPickerProps } from '../types';
3
3
  export declare class UserPickerWithoutAnalytics extends React.Component<UserPickerProps> {
4
4
  ufoId: string;
5
5
  constructor(props: UserPickerProps);
@@ -1,5 +1,5 @@
1
- import { Option } from '../types';
2
- import { EmailValidator } from './emailValidation';
1
+ import { type Option } from '../types';
2
+ import { type EmailValidator } from './emailValidation';
3
3
  declare function creatableProps(isValidEmail?: EmailValidator): {
4
4
  allowCreateWhileLoading: boolean;
5
5
  createOptionPosition: string;
@@ -1,5 +1,5 @@
1
- import { Option } from '../types';
2
- import { EmailValidator } from './emailValidation';
1
+ import { type Option } from '../types';
2
+ import { type EmailValidator } from './emailValidation';
3
3
  export declare const getCreatableSuggestedEmailProps: import("memoize-one").MemoizedFn<(emailDomain: string, isValidEmail?: EmailValidator) => {
4
4
  allowCreateWhileLoading: boolean;
5
5
  createOptionPosition: string;
@@ -1,5 +1,5 @@
1
- import { Placement } from '@atlaskit/popper';
2
- import { Target, BoundariesElement, RootBoundary } from '../types';
1
+ import { type Placement } from '@atlaskit/popper';
2
+ import { type Target, type BoundariesElement, type RootBoundary } from '../types';
3
3
  export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement, offset?: number[], placement?: Placement, rootBoundary?: RootBoundary, shouldFlip?: boolean, popupTitle?: string) => {
4
4
  searchThreshold: number;
5
5
  controlShouldRenderValue: boolean;
@@ -1,4 +1,4 @@
1
- import { StylesConfig } from '@atlaskit/select';
1
+ import { type StylesConfig } from '@atlaskit/select';
2
2
  export declare const BORDER_PADDING: "var(--ds-space-075)";
3
3
  export declare const AVATAR_PADDING = 6;
4
4
  export declare const INDICATOR_WIDTH = 39;
@@ -1,5 +1,5 @@
1
- import { ReactChild, ReactElement, ReactNode } from 'react';
2
- import { AtlaskitSelectValue, ExternalUser, Custom, Email, Option, OptionData, Promisable, Team, Group, User, OptionIdentifier, DefaultValue, LozengeProps } from '../types';
1
+ import { type ReactChild, type ReactElement, type ReactNode } from 'react';
2
+ import { type AtlaskitSelectValue, type ExternalUser, type Custom, type Email, type Option, type OptionData, type Promisable, type Team, type Group, type User, type OptionIdentifier, type DefaultValue, type LozengeProps } from '../types';
3
3
  export declare const isExternalUser: (option: OptionData) => option is ExternalUser;
4
4
  export declare const isUser: (option: OptionData) => option is User;
5
5
  export declare const isTeam: (option: OptionData) => option is Team;
@@ -1,9 +1,11 @@
1
- import React, { type AriaAttributes, ReactNode } from 'react';
2
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { Placement } from '@atlaskit/popper';
4
- import { EmailValidator } from './components/emailValidation';
5
- import { StylesConfig } from '@atlaskit/select';
6
- import { BaseUserPickerWithoutAnalytics } from './components/BaseUserPicker';
1
+ import { type ReactNode } from 'react';
2
+ import type React from 'react';
3
+ import { type AriaAttributes } from 'react';
4
+ import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
+ import { type Placement } from '@atlaskit/popper';
6
+ import { type EmailValidator } from './components/emailValidation';
7
+ import { type StylesConfig } from '@atlaskit/select';
8
+ import { type BaseUserPickerWithoutAnalytics } from './components/BaseUserPicker';
7
9
  export type UserPickerProps = WithAnalyticsEventsProps & {
8
10
  /**
9
11
  * Used to configure additional information regarding where the
@@ -1,5 +1,5 @@
1
- import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
- import { UserPickerProps, UserPickerState } from './types';
1
+ import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import { type UserPickerProps, type UserPickerState } from './types';
3
3
  export type UserPickerSession = {
4
4
  id: string;
5
5
  start: number;
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
- import { LoadUserSource, UserSource } from '../types';
1
+ import { type PropsWithChildren } from 'react';
2
+ import { type LoadUserSource, type UserSource } from '../types';
3
3
  export interface UserSourceContext {
4
4
  fetchUserSource?: LoadUserSource;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { LozengeProps } from '../types';
4
+ import { type LozengeProps } from '../types';
5
5
  export declare const textWrapper: (color?: string) => import("@emotion/react").SerializedStyles;
6
6
  export type AvatarItemOptionProps = {
7
7
  avatar: ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ClearIndicatorProps } from '@atlaskit/select';
2
+ import { type ClearIndicatorProps } from '@atlaskit/select';
3
3
  export declare class ClearIndicator extends React.PureComponent<ClearIndicatorProps<any>> {
4
4
  private handleMouseDown;
5
5
  render(): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import React from 'react';
3
- import { Custom } from '../../types';
3
+ import { type Custom } from '../../types';
4
4
  export type CustomOptionProps = {
5
5
  data: Custom;
6
6
  isSelected: boolean;
@@ -1,8 +1,8 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { Email } from '../../types';
5
- import { EmailValidationResponse } from '../emailValidation';
4
+ import { type Email } from '../../types';
5
+ import { type EmailValidationResponse } from '../emailValidation';
6
6
  export type EmailOptionProps = {
7
7
  email: Email;
8
8
  isSelected: boolean;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  export type ExternalAvatarItemOptionProps = {
5
5
  avatar: ReactNode;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ExternalUserSourcesData } from '../ExternalUserSourcesContainer';
2
+ import { type ExternalUserSourcesData } from '../ExternalUserSourcesContainer';
3
3
  export declare const sourceWrapper: import("@emotion/react").SerializedStyles;
4
4
  export declare const SourcesTooltipContent: React.FC<ExternalUserSourcesData>;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
4
- import { ExternalUser } from '../../types';
3
+ import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
4
+ import { type ExternalUser } from '../../types';
5
5
  export declare const imageContainer: import("@emotion/react").SerializedStyles;
6
6
  export declare const emailDomainWrapper: import("@emotion/react").SerializedStyles;
7
7
  export type ExternalUserOptionProps = WithAnalyticsEventsProps & {
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { UserSource } from '../types';
1
+ import { type ReactNode } from 'react';
2
+ import { type UserSource } from '../types';
3
3
  export interface ExternalUserSourcesData {
4
4
  sources: UserSource[];
5
5
  sourcesLoading: boolean;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { Group } from '../../types';
4
+ import { type Group } from '../../types';
5
5
  export declare const groupOptionIconWrapper: import("@emotion/react").SerializedStyles;
6
6
  export type GroupOptionProps = {
7
7
  group: Group;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { HighlightRange } from '../types';
2
+ import { type HighlightRange } from '../types';
3
3
  export interface Props {
4
4
  highlights?: HighlightRange[];
5
5
  children: string;
@@ -1,6 +1,6 @@
1
1
  import React, { type AriaAttributes } from 'react';
2
2
  import { type OptionType, type SelectProps } from '@atlaskit/select';
3
- import { AriaAttributesType } from '../types';
3
+ import { type AriaAttributesType } from '../types';
4
4
  export type Props = {
5
5
  selectProps?: SelectProps<OptionType, boolean>;
6
6
  innerRef: (ref: React.Ref<HTMLInputElement>) => void;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { UserPickerProps } from '../types';
3
+ import { type UserPickerProps } from '../types';
4
4
  import { jsx } from '@emotion/react';
5
5
  export type Props = React.PropsWithChildren<{
6
6
  selectProps: UserPickerProps;
@@ -1,3 +1,3 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { type PropsWithChildren } from 'react';
2
2
  declare const MessagesIntlProvider: (props: PropsWithChildren<{}>) => JSX.Element;
3
3
  export default MessagesIntlProvider;
@@ -1,9 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { OptionType } from '@atlaskit/select';
3
+ import { type OptionType } from '@atlaskit/select';
4
4
  import { jsx } from '@emotion/react';
5
- import { Option, UserPickerProps } from '../types';
6
- import { MultiValueProps } from '@atlaskit/select';
5
+ import { type Option, type UserPickerProps } from '../types';
6
+ import { type MultiValueProps } from '@atlaskit/select';
7
7
  export declare const scrollToValue: (valueContainer: HTMLDivElement, control: HTMLElement) => void;
8
8
  type Props = MultiValueProps<OptionType> & {
9
9
  isFocused?: boolean;
@@ -1,6 +1,6 @@
1
- import { MultiValueProps } from '@atlaskit/select';
1
+ import { type MultiValueProps } from '@atlaskit/select';
2
2
  import React from 'react';
3
- import { Option, User } from '../types';
3
+ import { type Option, type User } from '../types';
4
4
  export type State = {
5
5
  valueSize: number;
6
6
  previousValueSize: number;
@@ -1,6 +1,6 @@
1
- import { OptionProps as AkOptionProps } from '@atlaskit/select';
2
- import { FC } from 'react';
3
- import { Option as OptionType } from '../types';
1
+ import { type OptionProps as AkOptionProps } from '@atlaskit/select';
2
+ import { type FC } from 'react';
3
+ import { type Option as OptionType } from '../types';
4
4
  export type OptionProps = AkOptionProps & {
5
5
  data: OptionType;
6
6
  isSelected: boolean;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { ControlProps } from '@atlaskit/select';
3
+ import { type ControlProps } from '@atlaskit/select';
4
4
  import { jsx } from '@emotion/react';
5
5
  export declare class PopupControl extends React.PureComponent<ControlProps<any>> {
6
6
  render(): jsx.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { PopupUserPickerProps } from '../types';
2
+ import { type PopupUserPickerProps } from '../types';
3
3
  interface State {
4
4
  flipped: boolean;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx } from '@emotion/react';
2
- import { Option } from '../types';
3
- import { SingleValueProps } from '@atlaskit/select';
2
+ import { type Option } from '../types';
3
+ import { type SingleValueProps } from '@atlaskit/select';
4
4
  export type Props = SingleValueProps<Option>;
5
5
  export declare const SingleValue: (props: Props) => jsx.JSX.Element | null;
@@ -1,8 +1,8 @@
1
1
  /** @jsx jsx */
2
- import { ValueContainerProps } from '@atlaskit/select';
2
+ import { type ValueContainerProps } from '@atlaskit/select';
3
3
  import { jsx } from '@emotion/react';
4
4
  import React from 'react';
5
- import { Option, User } from '../types';
5
+ import { type Option, type User } from '../types';
6
6
  export declare class SingleValueContainer extends React.Component<ValueContainerProps<Option<User>>> {
7
7
  private renderAvatar;
8
8
  onValueContainerClick: any;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import React from 'react';
3
- import { Team } from '../../types';
3
+ import { type Team } from '../../types';
4
4
  export type TeamOptionProps = {
5
5
  team: Team;
6
6
  isSelected: boolean;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import React from 'react';
3
- import { User } from '../types';
3
+ import { type User } from '../types';
4
4
  export type UserOptionProps = {
5
5
  user: User;
6
6
  status?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { UserPickerProps } from '../types';
2
+ import { type UserPickerProps } from '../types';
3
3
  export declare class UserPickerWithoutAnalytics extends React.Component<UserPickerProps> {
4
4
  ufoId: string;
5
5
  constructor(props: UserPickerProps);
@@ -1,5 +1,5 @@
1
- import { Option } from '../types';
2
- import { EmailValidator } from './emailValidation';
1
+ import { type Option } from '../types';
2
+ import { type EmailValidator } from './emailValidation';
3
3
  declare function creatableProps(isValidEmail?: EmailValidator): {
4
4
  allowCreateWhileLoading: boolean;
5
5
  createOptionPosition: string;
@@ -1,5 +1,5 @@
1
- import { Option } from '../types';
2
- import { EmailValidator } from './emailValidation';
1
+ import { type Option } from '../types';
2
+ import { type EmailValidator } from './emailValidation';
3
3
  export declare const getCreatableSuggestedEmailProps: import("memoize-one").MemoizedFn<(emailDomain: string, isValidEmail?: EmailValidator) => {
4
4
  allowCreateWhileLoading: boolean;
5
5
  createOptionPosition: string;
@@ -1,5 +1,5 @@
1
- import { Placement } from '@atlaskit/popper';
2
- import { Target, BoundariesElement, RootBoundary } from '../types';
1
+ import { type Placement } from '@atlaskit/popper';
2
+ import { type Target, type BoundariesElement, type RootBoundary } from '../types';
3
3
  export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement, offset?: number[], placement?: Placement, rootBoundary?: RootBoundary, shouldFlip?: boolean, popupTitle?: string) => {
4
4
  searchThreshold: number;
5
5
  controlShouldRenderValue: boolean;
@@ -1,4 +1,4 @@
1
- import { StylesConfig } from '@atlaskit/select';
1
+ import { type StylesConfig } from '@atlaskit/select';
2
2
  export declare const BORDER_PADDING: "var(--ds-space-075)";
3
3
  export declare const AVATAR_PADDING = 6;
4
4
  export declare const INDICATOR_WIDTH = 39;
@@ -1,5 +1,5 @@
1
- import { ReactChild, ReactElement, ReactNode } from 'react';
2
- import { AtlaskitSelectValue, ExternalUser, Custom, Email, Option, OptionData, Promisable, Team, Group, User, OptionIdentifier, DefaultValue, LozengeProps } from '../types';
1
+ import { type ReactChild, type ReactElement, type ReactNode } from 'react';
2
+ import { type AtlaskitSelectValue, type ExternalUser, type Custom, type Email, type Option, type OptionData, type Promisable, type Team, type Group, type User, type OptionIdentifier, type DefaultValue, type LozengeProps } from '../types';
3
3
  export declare const isExternalUser: (option: OptionData) => option is ExternalUser;
4
4
  export declare const isUser: (option: OptionData) => option is User;
5
5
  export declare const isTeam: (option: OptionData) => option is Team;
@@ -1,9 +1,11 @@
1
- import React, { type AriaAttributes, ReactNode } from 'react';
2
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { Placement } from '@atlaskit/popper';
4
- import { EmailValidator } from './components/emailValidation';
5
- import { StylesConfig } from '@atlaskit/select';
6
- import { BaseUserPickerWithoutAnalytics } from './components/BaseUserPicker';
1
+ import { type ReactNode } from 'react';
2
+ import type React from 'react';
3
+ import { type AriaAttributes } from 'react';
4
+ import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
+ import { type Placement } from '@atlaskit/popper';
6
+ import { type EmailValidator } from './components/emailValidation';
7
+ import { type StylesConfig } from '@atlaskit/select';
8
+ import { type BaseUserPickerWithoutAnalytics } from './components/BaseUserPicker';
7
9
  export type UserPickerProps = WithAnalyticsEventsProps & {
8
10
  /**
9
11
  * Used to configure additional information regarding where the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "10.20.1",
3
+ "version": "10.20.3",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,19 +43,19 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@atlaskit/analytics-next": "^9.3.0",
46
- "@atlaskit/avatar": "^21.6.0",
47
- "@atlaskit/icon": "^22.1.0",
48
- "@atlaskit/logo": "^13.15.0",
46
+ "@atlaskit/avatar": "^21.9.0",
47
+ "@atlaskit/icon": "^22.3.0",
48
+ "@atlaskit/logo": "^13.17.0",
49
49
  "@atlaskit/lozenge": "^11.7.0",
50
50
  "@atlaskit/platform-feature-flags": "^0.2.0",
51
- "@atlaskit/popper": "^5.5.0",
52
- "@atlaskit/primitives": "^6.0.0",
53
- "@atlaskit/select": "^17.8.0",
51
+ "@atlaskit/popper": "^6.0.0",
52
+ "@atlaskit/primitives": "^6.3.0",
53
+ "@atlaskit/select": "^17.9.0",
54
54
  "@atlaskit/spinner": "^16.1.0",
55
55
  "@atlaskit/teams-avatar": "^1.0.0",
56
- "@atlaskit/theme": "^12.7.0",
57
- "@atlaskit/tokens": "^1.45.0",
58
- "@atlaskit/tooltip": "^18.3.0",
56
+ "@atlaskit/theme": "^12.8.0",
57
+ "@atlaskit/tokens": "^1.49.0",
58
+ "@atlaskit/tooltip": "^18.4.0",
59
59
  "@atlaskit/ufo": "^0.2.0",
60
60
  "@babel/runtime": "^7.0.0",
61
61
  "@emotion/react": "^11.7.1",
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@atlaskit/analytics-viewer": "^0.5.0",
73
73
  "@atlaskit/elements-test-helpers": "^0.7.0",
74
- "@atlaskit/heading": "^2.2.0",
74
+ "@atlaskit/heading": "^2.3.0",
75
75
  "@atlaskit/visual-regression": "*",
76
76
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
77
77
  "@emotion/styled": "^11.0.0",