@atlaskit/user-picker 11.9.0 → 11.11.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,20 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 11.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`11f67199573c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/11f67199573c8) -
8
+ Clean up the FG and remove findDOMNode for good
9
+
10
+ ## 11.10.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`b7c680ed7d6c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b7c680ed7d6c8) -
15
+ [ux] fix screenreader doesn't announce selected option when both aria labelledby and describedby
16
+ are provided
17
+
3
18
  ## 11.9.0
4
19
 
5
20
  ### Minor 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 = "11.8.2";
15
+ var packageVersion = "0.0.0-development";
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}$/;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.BaseUserPickerWithoutAnalytics = exports.BaseUserPicker = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
12
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
@@ -24,6 +25,8 @@ var _i18n = require("./i18n");
24
25
  var _utils = require("./utils");
25
26
  var _groupOptionsByType = require("../util/group-options-by-type");
26
27
  var _ufoExperiences = require("../util/ufoExperiences");
28
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
+ var _excluded = ["aria-labelledby", "aria-describedby"];
27
30
  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; }
28
31
  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; }
29
32
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
@@ -524,12 +527,18 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
524
527
  blurInputOnSelect: !isMulti,
525
528
  openMenuOnFocus: true
526
529
  });
530
+ var _this$ariaProps = this.ariaProps,
531
+ ariaLabelledByStandard = _this$ariaProps['aria-labelledby'],
532
+ ariaDescribedByStandard = _this$ariaProps['aria-describedby'],
533
+ restAriaProps = (0, _objectWithoutProperties2.default)(_this$ariaProps, _excluded);
527
534
  return /*#__PURE__*/_react.default.createElement(SelectComponent, (0, _extends2.default)({
528
535
  name: name,
529
536
  value: value,
530
537
  autoFocus: autoFocus !== undefined ? autoFocus : menuIsOpen,
531
- "aria-labelledby": ariaLabelledBy,
532
- "aria-describedby": ariaDescribedBy,
538
+ labelId: (0, _platformFeatureFlags.fg)('user_picker_migrate_aria_label_description') ? ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : ariaLabelledByStandard : undefined,
539
+ "aria-labelledby": (0, _platformFeatureFlags.fg)('user_picker_migrate_aria_label_description') ? undefined : ariaLabelledBy,
540
+ descriptionId: (0, _platformFeatureFlags.fg)('user_picker_migrate_aria_label_description') ? ariaDescribedBy !== null && ariaDescribedBy !== void 0 ? ariaDescribedBy : ariaDescribedByStandard : undefined,
541
+ "aria-describedby": (0, _platformFeatureFlags.fg)('user_picker_migrate_aria_label_description') ? undefined : ariaDescribedBy,
533
542
  "aria-live": ariaLive,
534
543
  "aria-required": required // This has been added as a safety net.
535
544
  ,
@@ -582,7 +591,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
582
591
  textFieldBackgroundColor: textFieldBackgroundColor,
583
592
  header: header,
584
593
  placeholderAvatar: placeholderAvatar
585
- }, this.ariaProps, pickerProps, UNSAFE_hasDraggableParentComponent && {
594
+ }, (0, _platformFeatureFlags.fg)('user_picker_migrate_aria_label_description') ? restAriaProps : this.ariaProps, pickerProps, UNSAFE_hasDraggableParentComponent && {
586
595
  onValueContainerClick: this.handleClickDraggableParentComponent
587
596
  }, menuOpenDeciderProps));
588
597
  }
@@ -33,7 +33,7 @@ var _default = exports.default = function _default() {
33
33
  return setHoverState(false);
34
34
  }, [setHoverState]);
35
35
  return (
36
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/mouse-events-have-key-events
36
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
37
37
  (0, _react2.jsx)("div", {
38
38
  css: wrapper,
39
39
  onMouseEnter: onMouseEnter,
@@ -95,6 +95,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
95
95
  }, emailDomainWithAt))
96
96
  );
97
97
  }
98
+ return null;
98
99
  });
99
100
  (0, _defineProperty2.default)(_this, "renderAvatar", function () {
100
101
  var _this$props = _this.props,
@@ -19,12 +19,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
19
19
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
20
20
  var _select = require("@atlaskit/select");
21
21
  var _react = _interopRequireWildcard(require("react"));
22
- var _reactDom = _interopRequireDefault(require("react-dom"));
23
22
  var _reactIntlNext = require("react-intl-next");
24
23
  var _i18n = require("./i18n");
25
24
  var _utils = require("./utils");
26
25
  var _ValueContainerWrapper = _interopRequireDefault(require("./ValueContainerWrapper"));
27
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
26
  var _excluded = ["children", "innerProps"];
29
27
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
30
28
  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; }
@@ -44,14 +42,7 @@ var MultiValueContainer = exports.MultiValueContainer = /*#__PURE__*/function (_
44
42
  _this.timeoutId = window.setTimeout(function () {
45
43
  var current = _this.valueContainerInnerProps.ref.current;
46
44
  if (current !== null) {
47
- if ((0, _platformFeatureFlags.fg)('user-picker-migrate-off-finddomnode')) {
48
- current.scrollTop = current.scrollHeight;
49
- } else {
50
- var container = _reactDom.default.findDOMNode(current);
51
- if (container instanceof HTMLDivElement) {
52
- container.scrollTop = container.scrollHeight;
53
- }
54
- }
45
+ current.scrollTop = current.scrollHeight;
55
46
  }
56
47
  _this.timeoutId = null;
57
48
  });
@@ -107,6 +107,7 @@ var callCallback = exports.callCallback = function callCallback(callback) {
107
107
  console.error('@atlassian/user-select: an error happening in `callCallback`: ', error);
108
108
  }
109
109
  }
110
+ return undefined;
110
111
  };
111
112
  var getAvatarUrl = exports.getAvatarUrl = function getAvatarUrl(optionData) {
112
113
  if (isUser(optionData) || isTeam(optionData) || isCustom(optionData) || isExternalUser(optionData)) {
@@ -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 = "11.8.2";
5
+ const packageVersion = "0.0.0-development";
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}$/;
@@ -12,6 +12,7 @@ import { messages } from './i18n';
12
12
  import { callCallback, extractOptionValue, getOptions, isIterable, isPopupUserPickerByComponent, isDefaultValuePopulated, isSingleValue, optionToSelectableOptions } from './utils';
13
13
  import { groupOptionsByType } from '../util/group-options-by-type';
14
14
  import { userPickerOptionsShownUfoExperience } from '../util/ufoExperiences';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
15
16
  const loadingMessage = () => null;
16
17
  const classNamePrefix = 'fabric-user-picker';
17
18
  export class BaseUserPickerWithoutAnalytics extends React.Component {
@@ -505,12 +506,19 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
505
506
  openMenuOnFocus: true
506
507
  })
507
508
  };
509
+ const {
510
+ 'aria-labelledby': ariaLabelledByStandard,
511
+ 'aria-describedby': ariaDescribedByStandard,
512
+ ...restAriaProps
513
+ } = this.ariaProps;
508
514
  return /*#__PURE__*/React.createElement(SelectComponent, _extends({
509
515
  name: name,
510
516
  value: value,
511
517
  autoFocus: autoFocus !== undefined ? autoFocus : menuIsOpen,
512
- "aria-labelledby": ariaLabelledBy,
513
- "aria-describedby": ariaDescribedBy,
518
+ labelId: fg('user_picker_migrate_aria_label_description') ? ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : ariaLabelledByStandard : undefined,
519
+ "aria-labelledby": fg('user_picker_migrate_aria_label_description') ? undefined : ariaLabelledBy,
520
+ descriptionId: fg('user_picker_migrate_aria_label_description') ? ariaDescribedBy !== null && ariaDescribedBy !== void 0 ? ariaDescribedBy : ariaDescribedByStandard : undefined,
521
+ "aria-describedby": fg('user_picker_migrate_aria_label_description') ? undefined : ariaDescribedBy,
514
522
  "aria-live": ariaLive,
515
523
  "aria-required": required // This has been added as a safety net.
516
524
  ,
@@ -561,7 +569,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
561
569
  textFieldBackgroundColor: textFieldBackgroundColor,
562
570
  header: header,
563
571
  placeholderAvatar: placeholderAvatar
564
- }, this.ariaProps, pickerProps, UNSAFE_hasDraggableParentComponent && {
572
+ }, fg('user_picker_migrate_aria_label_description') ? restAriaProps : this.ariaProps, pickerProps, UNSAFE_hasDraggableParentComponent && {
565
573
  onValueContainerClick: this.handleClickDraggableParentComponent
566
574
  }, menuOpenDeciderProps));
567
575
  }
@@ -16,7 +16,7 @@ export default (() => {
16
16
  const onMouseEnter = useCallback(() => setHoverState(true), [setHoverState]);
17
17
  const onMouseLeave = useCallback(() => setHoverState(false), [setHoverState]);
18
18
  return (
19
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/mouse-events-have-key-events
19
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
20
20
  jsx("div", {
21
21
  css: wrapper,
22
22
  onMouseEnter: onMouseEnter,
@@ -80,6 +80,7 @@ class ExternalUserOptionImpl extends React.PureComponent {
80
80
  }, emailDomainWithAt))
81
81
  );
82
82
  }
83
+ return null;
83
84
  });
84
85
  _defineProperty(this, "renderAvatar", () => {
85
86
  const {
@@ -5,12 +5,10 @@ import "./MultiValueContainer.compiled.css";
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { components } from '@atlaskit/select';
7
7
  import React, { Fragment } from 'react';
8
- import ReactDOM from 'react-dom';
9
8
  import { FormattedMessage } from 'react-intl-next';
10
9
  import { messages } from './i18n';
11
10
  import { isChildInput } from './utils';
12
11
  import ValueContainerWrapper from './ValueContainerWrapper';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
12
  const valueContainerStyles = {
15
13
  root: "_yv0e5bpd _ca0q12x7 _n3td12x7 _19bv12x7 _1reo15vq _18m91wug _1fjgglyw _c71l1osq _1suq1j28 _1ke8idpf"
16
14
  };
@@ -32,14 +30,7 @@ export class MultiValueContainer extends React.PureComponent {
32
30
  }
33
31
  } = this.valueContainerInnerProps;
34
32
  if (current !== null) {
35
- if (fg('user-picker-migrate-off-finddomnode')) {
36
- current.scrollTop = current.scrollHeight;
37
- } else {
38
- const container = ReactDOM.findDOMNode(current);
39
- if (container instanceof HTMLDivElement) {
40
- container.scrollTop = container.scrollHeight;
41
- }
42
- }
33
+ current.scrollTop = current.scrollHeight;
43
34
  }
44
35
  this.timeoutId = null;
45
36
  });
@@ -65,6 +65,7 @@ export const callCallback = (callback, ...args) => {
65
65
  console.error('@atlassian/user-select: an error happening in `callCallback`: ', error);
66
66
  }
67
67
  }
68
+ return undefined;
68
69
  };
69
70
  export const getAvatarUrl = optionData => {
70
71
  if (isUser(optionData) || isTeam(optionData) || isCustom(optionData) || isExternalUser(optionData)) {
@@ -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 = "11.8.2";
8
+ var packageVersion = "0.0.0-development";
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}$/;
@@ -1,10 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
4
  import _createClass from "@babel/runtime/helpers/createClass";
4
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
7
  import _inherits from "@babel/runtime/helpers/inherits";
7
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ var _excluded = ["aria-labelledby", "aria-describedby"];
8
10
  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; }
9
11
  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) { _defineProperty(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; }
10
12
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
@@ -24,6 +26,7 @@ import { messages } from './i18n';
24
26
  import { callCallback, extractOptionValue, getOptions, isIterable, isPopupUserPickerByComponent, isDefaultValuePopulated, isSingleValue, optionToSelectableOptions } from './utils';
25
27
  import { groupOptionsByType } from '../util/group-options-by-type';
26
28
  import { userPickerOptionsShownUfoExperience } from '../util/ufoExperiences';
29
+ import { fg } from '@atlaskit/platform-feature-flags';
27
30
  var loadingMessage = function loadingMessage() {
28
31
  return null;
29
32
  };
@@ -517,12 +520,18 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
517
520
  blurInputOnSelect: !isMulti,
518
521
  openMenuOnFocus: true
519
522
  });
523
+ var _this$ariaProps = this.ariaProps,
524
+ ariaLabelledByStandard = _this$ariaProps['aria-labelledby'],
525
+ ariaDescribedByStandard = _this$ariaProps['aria-describedby'],
526
+ restAriaProps = _objectWithoutProperties(_this$ariaProps, _excluded);
520
527
  return /*#__PURE__*/React.createElement(SelectComponent, _extends({
521
528
  name: name,
522
529
  value: value,
523
530
  autoFocus: autoFocus !== undefined ? autoFocus : menuIsOpen,
524
- "aria-labelledby": ariaLabelledBy,
525
- "aria-describedby": ariaDescribedBy,
531
+ labelId: fg('user_picker_migrate_aria_label_description') ? ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : ariaLabelledByStandard : undefined,
532
+ "aria-labelledby": fg('user_picker_migrate_aria_label_description') ? undefined : ariaLabelledBy,
533
+ descriptionId: fg('user_picker_migrate_aria_label_description') ? ariaDescribedBy !== null && ariaDescribedBy !== void 0 ? ariaDescribedBy : ariaDescribedByStandard : undefined,
534
+ "aria-describedby": fg('user_picker_migrate_aria_label_description') ? undefined : ariaDescribedBy,
526
535
  "aria-live": ariaLive,
527
536
  "aria-required": required // This has been added as a safety net.
528
537
  ,
@@ -575,7 +584,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
575
584
  textFieldBackgroundColor: textFieldBackgroundColor,
576
585
  header: header,
577
586
  placeholderAvatar: placeholderAvatar
578
- }, this.ariaProps, pickerProps, UNSAFE_hasDraggableParentComponent && {
587
+ }, fg('user_picker_migrate_aria_label_description') ? restAriaProps : this.ariaProps, pickerProps, UNSAFE_hasDraggableParentComponent && {
579
588
  onValueContainerClick: this.handleClickDraggableParentComponent
580
589
  }, menuOpenDeciderProps));
581
590
  }
@@ -24,7 +24,7 @@ export default (function () {
24
24
  return setHoverState(false);
25
25
  }, [setHoverState]);
26
26
  return (
27
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/mouse-events-have-key-events
27
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
28
28
  jsx("div", {
29
29
  css: wrapper,
30
30
  onMouseEnter: onMouseEnter,
@@ -91,6 +91,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
91
91
  }, emailDomainWithAt))
92
92
  );
93
93
  }
94
+ return null;
94
95
  });
95
96
  _defineProperty(_this, "renderAvatar", function () {
96
97
  var _this$props = _this.props,
@@ -16,12 +16,10 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
16
16
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
17
17
  import { components } from '@atlaskit/select';
18
18
  import React, { Fragment } from 'react';
19
- import ReactDOM from 'react-dom';
20
19
  import { FormattedMessage } from 'react-intl-next';
21
20
  import { messages } from './i18n';
22
21
  import { isChildInput } from './utils';
23
22
  import ValueContainerWrapper from './ValueContainerWrapper';
24
- import { fg } from '@atlaskit/platform-feature-flags';
25
23
  var valueContainerStyles = {
26
24
  root: "_yv0e5bpd _ca0q12x7 _n3td12x7 _19bv12x7 _1reo15vq _18m91wug _1fjgglyw _c71l1osq _1suq1j28 _1ke8idpf"
27
25
  };
@@ -35,14 +33,7 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
35
33
  _this.timeoutId = window.setTimeout(function () {
36
34
  var current = _this.valueContainerInnerProps.ref.current;
37
35
  if (current !== null) {
38
- if (fg('user-picker-migrate-off-finddomnode')) {
39
- current.scrollTop = current.scrollHeight;
40
- } else {
41
- var container = ReactDOM.findDOMNode(current);
42
- if (container instanceof HTMLDivElement) {
43
- container.scrollTop = container.scrollHeight;
44
- }
45
- }
36
+ current.scrollTop = current.scrollHeight;
46
37
  }
47
38
  _this.timeoutId = null;
48
39
  });
@@ -100,6 +100,7 @@ export var callCallback = function callCallback(callback) {
100
100
  console.error('@atlassian/user-select: an error happening in `callCallback`: ', error);
101
101
  }
102
102
  }
103
+ return undefined;
103
104
  };
104
105
  export var getAvatarUrl = function getAvatarUrl(optionData) {
105
106
  if (isUser(optionData) || isTeam(optionData) || isCustom(optionData) || isExternalUser(optionData)) {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Appearance, OptionData, UserPickerProps, UserPickerState } from '../types';
3
+ import type { AriaAttributes } from 'react';
3
4
  export type BaseUserPickerProps = UserPickerProps & {
4
5
  components: any;
5
6
  name?: string;
@@ -60,7 +61,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
60
61
  handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
61
62
  private getOptions;
62
63
  private getAppearance;
63
- get ariaProps(): {};
64
+ get ariaProps(): Partial<AriaAttributes>;
64
65
  private handleClickDraggableParentComponent;
65
66
  render(): React.JSX.Element;
66
67
  }
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Appearance, OptionData, UserPickerProps, UserPickerState } from '../types';
3
+ import type { AriaAttributes } from 'react';
3
4
  export type BaseUserPickerProps = UserPickerProps & {
4
5
  components: any;
5
6
  name?: string;
@@ -60,7 +61,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
60
61
  handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
61
62
  private getOptions;
62
63
  private getAppearance;
63
- get ariaProps(): {};
64
+ get ariaProps(): Partial<AriaAttributes>;
64
65
  private handleClickDraggableParentComponent;
65
66
  render(): React.JSX.Element;
66
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "11.9.0",
3
+ "version": "11.11.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/"
@@ -51,13 +51,13 @@
51
51
  "@atlaskit/people-teams-ui-public": "^3.5.0",
52
52
  "@atlaskit/platform-feature-flags": "^1.1.0",
53
53
  "@atlaskit/popper": "^7.1.0",
54
- "@atlaskit/primitives": "^16.0.0",
54
+ "@atlaskit/primitives": "^16.1.0",
55
55
  "@atlaskit/select": "^21.3.0",
56
56
  "@atlaskit/spinner": "^19.0.0",
57
57
  "@atlaskit/teams-avatar": "^2.3.0",
58
58
  "@atlaskit/theme": "^21.0.0",
59
- "@atlaskit/tokens": "^7.0.0",
60
- "@atlaskit/tooltip": "^20.6.0",
59
+ "@atlaskit/tokens": "^7.1.0",
60
+ "@atlaskit/tooltip": "^20.7.0",
61
61
  "@atlaskit/ufo": "^0.4.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@compiled/react": "^0.18.6",
@@ -112,10 +112,10 @@
112
112
  "product-terminology-refresh": {
113
113
  "type": "boolean"
114
114
  },
115
- "user-picker-migrate-off-finddomnode": {
115
+ "jira_ai_agent_avatar_user_picker_user_option": {
116
116
  "type": "boolean"
117
117
  },
118
- "jira_ai_agent_avatar_user_picker_user_option": {
118
+ "user_picker_migrate_aria_label_description": {
119
119
  "type": "boolean"
120
120
  }
121
121
  }
@@ -1,75 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.dev-agents.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../dev-agents/tsDist/@atlaskit__user-picker/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-dev-agents/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar/afm-dev-agents/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/icon/afm-dev-agents/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/logo/afm-dev-agents/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/lozenge/afm-dev-agents/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../people-and-teams/people-teams-ui-public/afm-dev-agents/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../platform/feature-flags/afm-dev-agents/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/popper/afm-dev-agents/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/primitives/afm-dev-agents/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/select/afm-dev-agents/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/spinner/afm-dev-agents/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../people-and-teams/teams-avatar/afm-dev-agents/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/theme/afm-dev-agents/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/tokens/afm-dev-agents/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../design-system/tooltip/afm-dev-agents/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../data/ufo-external/afm-dev-agents/tsconfig.json"
73
- }
74
- ]
75
- }
@@ -1,75 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.passionfruit.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../passionfruit/tsDist/@atlaskit__user-picker/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-passionfruit/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar/afm-passionfruit/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/icon/afm-passionfruit/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/logo/afm-passionfruit/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/lozenge/afm-passionfruit/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../people-and-teams/people-teams-ui-public/afm-passionfruit/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../platform/feature-flags/afm-passionfruit/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/popper/afm-passionfruit/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/primitives/afm-passionfruit/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/select/afm-passionfruit/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/spinner/afm-passionfruit/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../people-and-teams/teams-avatar/afm-passionfruit/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/theme/afm-passionfruit/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/tokens/afm-passionfruit/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../design-system/tooltip/afm-passionfruit/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../data/ufo-external/afm-passionfruit/tsconfig.json"
73
- }
74
- ]
75
- }
@@ -1,75 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.post-office.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../post-office/tsDist/@atlaskit__user-picker/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-post-office/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar/afm-post-office/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/icon/afm-post-office/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/logo/afm-post-office/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/lozenge/afm-post-office/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../people-and-teams/people-teams-ui-public/afm-post-office/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/popper/afm-post-office/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/primitives/afm-post-office/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/select/afm-post-office/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/spinner/afm-post-office/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../people-and-teams/teams-avatar/afm-post-office/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/theme/afm-post-office/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/tokens/afm-post-office/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../design-system/tooltip/afm-post-office/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../data/ufo-external/afm-post-office/tsconfig.json"
73
- }
74
- ]
75
- }
@@ -1,75 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.rovo-extension.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../rovo-extension/tsDist/@atlaskit__user-picker/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-rovo-extension/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar/afm-rovo-extension/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/icon/afm-rovo-extension/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/logo/afm-rovo-extension/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/lozenge/afm-rovo-extension/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../people-and-teams/people-teams-ui-public/afm-rovo-extension/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../platform/feature-flags/afm-rovo-extension/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/popper/afm-rovo-extension/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/primitives/afm-rovo-extension/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/select/afm-rovo-extension/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/spinner/afm-rovo-extension/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../people-and-teams/teams-avatar/afm-rovo-extension/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/theme/afm-rovo-extension/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/tokens/afm-rovo-extension/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../design-system/tooltip/afm-rovo-extension/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../data/ufo-external/afm-rovo-extension/tsconfig.json"
73
- }
74
- ]
75
- }
@@ -1,75 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.townsquare.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../townsquare/tsDist/@atlaskit__user-picker/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-townsquare/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar/afm-townsquare/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/icon/afm-townsquare/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/logo/afm-townsquare/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/lozenge/afm-townsquare/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../people-and-teams/people-teams-ui-public/afm-townsquare/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../platform/feature-flags/afm-townsquare/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/popper/afm-townsquare/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/primitives/afm-townsquare/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/select/afm-townsquare/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/spinner/afm-townsquare/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../people-and-teams/teams-avatar/afm-townsquare/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/theme/afm-townsquare/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/tokens/afm-townsquare/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../design-system/tooltip/afm-townsquare/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../data/ufo-external/afm-townsquare/tsconfig.json"
73
- }
74
- ]
75
- }
@@ -1,75 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.volt.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../volt/tsDist/@atlaskit__user-picker/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-volt/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar/afm-volt/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/icon/afm-volt/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/logo/afm-volt/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/lozenge/afm-volt/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../people-and-teams/people-teams-ui-public/afm-volt/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../platform/feature-flags/afm-volt/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/popper/afm-volt/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/primitives/afm-volt/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/select/afm-volt/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/spinner/afm-volt/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../people-and-teams/teams-avatar/afm-volt/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/theme/afm-volt/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/tokens/afm-volt/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../design-system/tooltip/afm-volt/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../data/ufo-external/afm-volt/tsconfig.json"
73
- }
74
- ]
75
- }