@atlaskit/user-picker 10.27.6 → 10.27.8

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 (47) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/analytics.js +1 -1
  3. package/dist/cjs/components/BaseUserPicker.js +35 -38
  4. package/dist/cjs/components/ClearIndicator.js +6 -9
  5. package/dist/cjs/components/CustomOption/main.js +10 -13
  6. package/dist/cjs/components/EmailOption/main.js +9 -12
  7. package/dist/cjs/components/ExternalUserOption/main.js +12 -15
  8. package/dist/cjs/components/GroupOption/main.js +9 -12
  9. package/dist/cjs/components/HighlightText.js +5 -7
  10. package/dist/cjs/components/Input.js +6 -9
  11. package/dist/cjs/components/Menu.js +5 -7
  12. package/dist/cjs/components/MultiValue.js +7 -10
  13. package/dist/cjs/components/MultiValueContainer.js +11 -14
  14. package/dist/cjs/components/PopupControl.js +6 -8
  15. package/dist/cjs/components/PopupInput.js +7 -10
  16. package/dist/cjs/components/PopupUserPicker.js +7 -10
  17. package/dist/cjs/components/SingleValueContainer.js +8 -11
  18. package/dist/cjs/components/SizeableAvatar.js +5 -7
  19. package/dist/cjs/components/TeamOption/main.js +11 -14
  20. package/dist/cjs/components/UserOption.js +9 -12
  21. package/dist/cjs/components/UserPicker.js +5 -7
  22. package/dist/cjs/util/ufoExperiences.js +5 -7
  23. package/dist/es2019/analytics.js +1 -1
  24. package/dist/es2019/components/ExternalUserOption/main.js +1 -1
  25. package/dist/es2019/components/PopupControl.js +1 -1
  26. package/dist/esm/analytics.js +1 -1
  27. package/dist/esm/components/BaseUserPicker.js +35 -38
  28. package/dist/esm/components/ClearIndicator.js +6 -9
  29. package/dist/esm/components/CustomOption/main.js +10 -13
  30. package/dist/esm/components/EmailOption/main.js +9 -12
  31. package/dist/esm/components/ExternalUserOption/main.js +12 -15
  32. package/dist/esm/components/GroupOption/main.js +9 -12
  33. package/dist/esm/components/HighlightText.js +5 -7
  34. package/dist/esm/components/Input.js +6 -9
  35. package/dist/esm/components/Menu.js +5 -7
  36. package/dist/esm/components/MultiValue.js +7 -10
  37. package/dist/esm/components/MultiValueContainer.js +11 -14
  38. package/dist/esm/components/PopupControl.js +6 -8
  39. package/dist/esm/components/PopupInput.js +7 -10
  40. package/dist/esm/components/PopupUserPicker.js +7 -10
  41. package/dist/esm/components/SingleValueContainer.js +8 -11
  42. package/dist/esm/components/SizeableAvatar.js +5 -7
  43. package/dist/esm/components/TeamOption/main.js +11 -14
  44. package/dist/esm/components/UserOption.js +9 -12
  45. package/dist/esm/components/UserPicker.js +5 -7
  46. package/dist/esm/util/ufoExperiences.js +5 -7
  47. package/package.json +2 -2
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  /**
11
10
  * @jsxRuntime classic
@@ -19,16 +18,14 @@ import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
19
18
  import { HighlightText } from '../HighlightText';
20
19
  import { SizeableAvatar } from '../SizeableAvatar';
21
20
  export var CustomOption = /*#__PURE__*/function (_React$PureComponent) {
22
- _inherits(CustomOption, _React$PureComponent);
23
- var _super = _createSuper(CustomOption);
24
21
  function CustomOption() {
25
22
  var _this;
26
23
  _classCallCheck(this, CustomOption);
27
24
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
28
25
  args[_key] = arguments[_key];
29
26
  }
30
- _this = _super.call.apply(_super, [this].concat(args));
31
- _defineProperty(_assertThisInitialized(_this), "getPrimaryText", function () {
27
+ _this = _callSuper(this, CustomOption, [].concat(args));
28
+ _defineProperty(_this, "getPrimaryText", function () {
32
29
  var _this$props$data = _this.props.data,
33
30
  name = _this$props$data.name,
34
31
  highlight = _this$props$data.highlight;
@@ -41,35 +38,36 @@ export var CustomOption = /*#__PURE__*/function (_React$PureComponent) {
41
38
  highlights: highlight && highlight.name
42
39
  }, name))];
43
40
  });
44
- _defineProperty(_assertThisInitialized(_this), "getBylineComponent", function (isSelected, message) {
41
+ _defineProperty(_this, "getBylineComponent", function (isSelected, message) {
45
42
  return jsx("span", {
46
43
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
47
44
  css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
48
45
  "data-testid": "user-picker-custom-secondary-text"
49
46
  }, message);
50
47
  });
51
- _defineProperty(_assertThisInitialized(_this), "renderByline", function () {
48
+ _defineProperty(_this, "renderByline", function () {
52
49
  var _this$props$data2;
53
50
  if (!((_this$props$data2 = _this.props.data) !== null && _this$props$data2 !== void 0 && _this$props$data2.byline)) {
54
51
  return undefined;
55
52
  }
56
53
  return _this.getBylineComponent(_this.props.isSelected, _this.props.data.byline);
57
54
  });
58
- _defineProperty(_assertThisInitialized(_this), "renderAvatar", function () {
55
+ _defineProperty(_this, "renderAvatar", function () {
59
56
  var avatarUrl = _this.props.data.avatarUrl;
60
57
  return jsx(SizeableAvatar, {
61
58
  appearance: "big",
62
59
  src: avatarUrl
63
60
  });
64
61
  });
65
- _defineProperty(_assertThisInitialized(_this), "getLozengeProps", function () {
62
+ _defineProperty(_this, "getLozengeProps", function () {
66
63
  return typeof _this.props.data.lozenge === 'string' ? {
67
64
  text: _this.props.data.lozenge
68
65
  } : _this.props.data.lozenge;
69
66
  });
70
67
  return _this;
71
68
  }
72
- _createClass(CustomOption, [{
69
+ _inherits(CustomOption, _React$PureComponent);
70
+ return _createClass(CustomOption, [{
73
71
  key: "render",
74
72
  value: function render() {
75
73
  return jsx(AvatarItemOption, {
@@ -81,5 +79,4 @@ export var CustomOption = /*#__PURE__*/function (_React$PureComponent) {
81
79
  });
82
80
  }
83
81
  }]);
84
- return CustomOption;
85
82
  }(React.PureComponent);
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  /**
11
10
  * @jsxRuntime classic
@@ -23,21 +22,19 @@ var getAddEmailMessage = function getAddEmailMessage(validity) {
23
22
  return validity === 'POTENTIAL' ? messages.continueToAddEmail : messages.selectToAddEmail;
24
23
  };
25
24
  export var EmailOption = /*#__PURE__*/function (_React$PureComponent) {
26
- _inherits(EmailOption, _React$PureComponent);
27
- var _super = _createSuper(EmailOption);
28
25
  function EmailOption() {
29
26
  var _this;
30
27
  _classCallCheck(this, EmailOption);
31
28
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
29
  args[_key] = arguments[_key];
33
30
  }
34
- _this = _super.call.apply(_super, [this].concat(args));
35
- _defineProperty(_assertThisInitialized(_this), "getLozengeProps", function () {
31
+ _this = _callSuper(this, EmailOption, [].concat(args));
32
+ _defineProperty(_this, "getLozengeProps", function () {
36
33
  return typeof _this.props.email.lozenge === 'string' ? {
37
34
  text: _this.props.email.lozenge
38
35
  } : _this.props.email.lozenge;
39
36
  });
40
- _defineProperty(_assertThisInitialized(_this), "renderPrimaryText", function () {
37
+ _defineProperty(_this, "renderPrimaryText", function () {
41
38
  var id = _this.props.email.id;
42
39
  return jsx("span", {
43
40
  key: "name"
@@ -46,14 +43,14 @@ export var EmailOption = /*#__PURE__*/function (_React$PureComponent) {
46
43
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
47
44
  }, id);
48
45
  });
49
- _defineProperty(_assertThisInitialized(_this), "renderSecondaryText", function (label) {
46
+ _defineProperty(_this, "renderSecondaryText", function (label) {
50
47
  return jsx("span", {
51
48
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
52
49
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
53
50
  "data-testid": "user-picker-email-secondary-text"
54
51
  }, label);
55
52
  });
56
- _defineProperty(_assertThisInitialized(_this), "renderOption", function (label) {
53
+ _defineProperty(_this, "renderOption", function (label) {
57
54
  return jsx(AvatarItemOption, {
58
55
  avatar: jsx(AddOptionAvatar, {
59
56
  label: label
@@ -66,7 +63,8 @@ export var EmailOption = /*#__PURE__*/function (_React$PureComponent) {
66
63
  });
67
64
  return _this;
68
65
  }
69
- _createClass(EmailOption, [{
66
+ _inherits(EmailOption, _React$PureComponent);
67
+ return _createClass(EmailOption, [{
70
68
  key: "render",
71
69
  value: function render() {
72
70
  var _this2 = this;
@@ -78,5 +76,4 @@ export var EmailOption = /*#__PURE__*/function (_React$PureComponent) {
78
76
  });
79
77
  }
80
78
  }]);
81
- return EmailOption;
82
79
  }(React.PureComponent);
@@ -1,12 +1,11 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
8
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
10
  /**
12
11
  * @jsxRuntime classic
@@ -38,19 +37,17 @@ export var imageContainer = css({
38
37
 
39
38
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
40
39
  export var emailDomainWrapper = css({
41
- fontWeight: 'bold'
40
+ fontWeight: "var(--ds-font-weight-bold, 700)"
42
41
  });
43
42
  var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
44
- _inherits(ExternalUserOptionImpl, _React$PureComponent);
45
- var _super = _createSuper(ExternalUserOptionImpl);
46
43
  function ExternalUserOptionImpl() {
47
44
  var _this;
48
45
  _classCallCheck(this, ExternalUserOptionImpl);
49
46
  for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
50
47
  _args[_key] = arguments[_key];
51
48
  }
52
- _this = _super.call.apply(_super, [this].concat(_args));
53
- _defineProperty(_assertThisInitialized(_this), "getPrimaryText", function () {
49
+ _this = _callSuper(this, ExternalUserOptionImpl, [].concat(_args));
50
+ _defineProperty(_this, "getPrimaryText", function () {
54
51
  var name = _this.props.user.name;
55
52
  return jsx("span", {
56
53
  key: "name"
@@ -59,7 +56,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
59
56
  css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
60
57
  }, name);
61
58
  });
62
- _defineProperty(_assertThisInitialized(_this), "renderSecondaryText", function () {
59
+ _defineProperty(_this, "renderSecondaryText", function () {
63
60
  var _this$props$user = _this.props.user,
64
61
  byline = _this$props$user.byline,
65
62
  email = _this$props$user.email;
@@ -93,7 +90,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
93
90
  );
94
91
  }
95
92
  });
96
- _defineProperty(_assertThisInitialized(_this), "renderAvatar", function () {
93
+ _defineProperty(_this, "renderAvatar", function () {
97
94
  var _this$props = _this.props,
98
95
  avatarUrl = _this$props.user.avatarUrl,
99
96
  status = _this$props.status;
@@ -103,7 +100,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
103
100
  presence: status
104
101
  });
105
102
  });
106
- _defineProperty(_assertThisInitialized(_this), "fireEvent", function (eventCreator) {
103
+ _defineProperty(_this, "fireEvent", function (eventCreator) {
107
104
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
108
105
  args[_key2 - 1] = arguments[_key2];
109
106
  }
@@ -112,11 +109,11 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
112
109
  createAndFireEventInElementsChannel(eventCreator.apply(void 0, args))(createAnalyticsEvent);
113
110
  }
114
111
  });
115
- _defineProperty(_assertThisInitialized(_this), "onShow", function () {
112
+ _defineProperty(_this, "onShow", function () {
116
113
  var user = _this.props.user;
117
114
  _this.fireEvent(userInfoEvent, user.sources, user.id);
118
115
  });
119
- _defineProperty(_assertThisInitialized(_this), "getSourcesInfoTooltip", function () {
116
+ _defineProperty(_this, "getSourcesInfoTooltip", function () {
120
117
  return _this.props.user.isExternal ? jsx(Tooltip, {
121
118
  content: _this.formattedTooltipContent(),
122
119
  position: 'right-start',
@@ -125,7 +122,8 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
125
122
  });
126
123
  return _this;
127
124
  }
128
- _createClass(ExternalUserOptionImpl, [{
125
+ _inherits(ExternalUserOptionImpl, _React$PureComponent);
126
+ return _createClass(ExternalUserOptionImpl, [{
129
127
  key: "render",
130
128
  value: function render() {
131
129
  return jsx(ExternalAvatarItemOption, {
@@ -152,6 +150,5 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
152
150
  });
153
151
  }
154
152
  }]);
155
- return ExternalUserOptionImpl;
156
153
  }(React.PureComponent);
157
154
  export var ExternalUserOption = withAnalyticsEvents()(ExternalUserOptionImpl);
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  /**
11
10
  * @jsxRuntime classic
@@ -32,16 +31,14 @@ export var groupOptionIconWrapper = css({
32
31
  }
33
32
  });
34
33
  export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
35
- _inherits(GroupOption, _React$PureComponent);
36
- var _super = _createSuper(GroupOption);
37
34
  function GroupOption() {
38
35
  var _this;
39
36
  _classCallCheck(this, GroupOption);
40
37
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
41
38
  args[_key] = arguments[_key];
42
39
  }
43
- _this = _super.call.apply(_super, [this].concat(args));
44
- _defineProperty(_assertThisInitialized(_this), "getPrimaryText", function () {
40
+ _this = _callSuper(this, GroupOption, [].concat(args));
41
+ _defineProperty(_this, "getPrimaryText", function () {
45
42
  var _this$props = _this.props,
46
43
  isSelected = _this$props.isSelected,
47
44
  _this$props$group = _this$props.group,
@@ -56,7 +53,7 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
56
53
  highlights: highlight && highlight.name
57
54
  }, name))];
58
55
  });
59
- _defineProperty(_assertThisInitialized(_this), "renderAvatar", function () {
56
+ _defineProperty(_this, "renderAvatar", function () {
60
57
  return jsx("span", {
61
58
  css: groupOptionIconWrapper
62
59
  }, jsx(PeopleIcon, {
@@ -66,7 +63,7 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
66
63
  spacing: "spacious"
67
64
  }));
68
65
  });
69
- _defineProperty(_assertThisInitialized(_this), "renderByline", function () {
66
+ _defineProperty(_this, "renderByline", function () {
70
67
  var _this$props2 = _this.props,
71
68
  isSelected = _this$props2.isSelected,
72
69
  group = _this$props2.group;
@@ -76,14 +73,15 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
76
73
  "data-testid": "user-picker-group-secondary-text"
77
74
  }, group.byline ? group.byline : jsx(FormattedMessage, messages.groupByline));
78
75
  });
79
- _defineProperty(_assertThisInitialized(_this), "getLozengeProps", function () {
76
+ _defineProperty(_this, "getLozengeProps", function () {
80
77
  return typeof _this.props.group.lozenge === 'string' ? {
81
78
  text: _this.props.group.lozenge
82
79
  } : _this.props.group.lozenge;
83
80
  });
84
81
  return _this;
85
82
  }
86
- _createClass(GroupOption, [{
83
+ _inherits(GroupOption, _React$PureComponent);
84
+ return _createClass(GroupOption, [{
87
85
  key: "render",
88
86
  value: function render() {
89
87
  return jsx(AvatarItemOption, {
@@ -95,5 +93,4 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
95
93
  });
96
94
  }
97
95
  }]);
98
- return GroupOption;
99
96
  }(React.PureComponent);
@@ -1,19 +1,18 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  export var HighlightText = /*#__PURE__*/function (_React$PureComponent) {
10
- _inherits(HighlightText, _React$PureComponent);
11
- var _super = _createSuper(HighlightText);
12
10
  function HighlightText() {
13
11
  _classCallCheck(this, HighlightText);
14
- return _super.apply(this, arguments);
12
+ return _callSuper(this, HighlightText, arguments);
15
13
  }
16
- _createClass(HighlightText, [{
14
+ _inherits(HighlightText, _React$PureComponent);
15
+ return _createClass(HighlightText, [{
17
16
  key: "render",
18
17
  value: function render() {
19
18
  var _this$props = this.props,
@@ -68,5 +67,4 @@ export var HighlightText = /*#__PURE__*/function (_React$PureComponent) {
68
67
  });
69
68
  }
70
69
  }]);
71
- return HighlightText;
72
70
  }(React.PureComponent);
@@ -1,28 +1,25 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
8
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
10
  import React from 'react';
12
11
  import { components } from '@atlaskit/select';
13
12
  export var Input = /*#__PURE__*/function (_React$Component) {
14
- _inherits(Input, _React$Component);
15
- var _super = _createSuper(Input);
16
13
  function Input() {
17
14
  var _this;
18
15
  _classCallCheck(this, Input);
19
16
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
20
17
  args[_key] = arguments[_key];
21
18
  }
22
- _this = _super.call.apply(_super, [this].concat(args));
19
+ _this = _callSuper(this, Input, [].concat(args));
23
20
  // onKeyPress is used instead as
24
21
  // react-select is using onKeyDown for capturing keyboard input
25
- _defineProperty(_assertThisInitialized(_this), "handleKeyPress", function (e) {
22
+ _defineProperty(_this, "handleKeyPress", function (e) {
26
23
  var _this$props$selectPro;
27
24
  if (e.key === 'Enter') {
28
25
  e.preventDefault();
@@ -34,7 +31,8 @@ export var Input = /*#__PURE__*/function (_React$Component) {
34
31
  });
35
32
  return _this;
36
33
  }
37
- _createClass(Input, [{
34
+ _inherits(Input, _React$Component);
35
+ return _createClass(Input, [{
38
36
  key: "ariaLabelledBy",
39
37
  get:
40
38
  /**
@@ -66,5 +64,4 @@ export var Input = /*#__PURE__*/function (_React$Component) {
66
64
  }));
67
65
  }
68
66
  }]);
69
- return Input;
70
67
  }(React.Component);
@@ -1,9 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -19,13 +19,12 @@ var getFooterStyle = function getFooterStyle() {
19
19
  });
20
20
  };
21
21
  export var Menu = /*#__PURE__*/function (_React$Component) {
22
- _inherits(Menu, _React$Component);
23
- var _super = _createSuper(Menu);
24
22
  function Menu() {
25
23
  _classCallCheck(this, Menu);
26
- return _super.apply(this, arguments);
24
+ return _callSuper(this, Menu, arguments);
27
25
  }
28
- _createClass(Menu, [{
26
+ _inherits(Menu, _React$Component);
27
+ return _createClass(Menu, [{
29
28
  key: "render",
30
29
  value: function render() {
31
30
  return jsx(components.Menu, this.props, this.props.selectProps.header, this.props.children, this.props.selectProps.footer &&
@@ -35,5 +34,4 @@ export var Menu = /*#__PURE__*/function (_React$Component) {
35
34
  }, this.props.selectProps.footer));
36
35
  }
37
36
  }]);
38
- return Menu;
39
37
  }(React.Component);
@@ -2,13 +2,12 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime/helpers/inherits";
7
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ import _inherits from "@babel/runtime/helpers/inherits";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
9
  var _excluded = ["children", "innerProps"];
11
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
12
  /**
14
13
  * @jsxRuntime classic
@@ -47,13 +46,11 @@ var nameWrapper = css({
47
46
  paddingLeft: "var(--ds-space-050, 4px)"
48
47
  });
49
48
  export var MultiValue = /*#__PURE__*/function (_React$Component) {
50
- _inherits(MultiValue, _React$Component);
51
- var _super = _createSuper(MultiValue);
52
49
  function MultiValue(props) {
53
50
  var _this;
54
51
  _classCallCheck(this, MultiValue);
55
- _this = _super.call(this, props);
56
- _defineProperty(_assertThisInitialized(_this), "getElemBefore", function () {
52
+ _this = _callSuper(this, MultiValue, [props]);
53
+ _defineProperty(_this, "getElemBefore", function () {
57
54
  var data = _this.props.data.data;
58
55
  if (isEmail(data)) {
59
56
  // This element is a decorative icon and does not require a label
@@ -78,7 +75,7 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
78
75
  type: isTeam(data) && fg('verified-team-in-user-picker') ? 'team' : 'person'
79
76
  });
80
77
  });
81
- _defineProperty(_assertThisInitialized(_this), "getElemAfter", function () {
78
+ _defineProperty(_this, "getElemAfter", function () {
82
79
  var data = _this.props.data.data;
83
80
  if (isTeam(data) && data.verified && fg('verified-team-in-user-picker')) {
84
81
  return jsx(VerifiedTeamIcon, {
@@ -90,7 +87,8 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
90
87
  _this.containerRef = /*#__PURE__*/React.createRef();
91
88
  return _this;
92
89
  }
93
- _createClass(MultiValue, [{
90
+ _inherits(MultiValue, _React$Component);
91
+ return _createClass(MultiValue, [{
94
92
  key: "componentDidUpdate",
95
93
  value: function componentDidUpdate() {
96
94
  var isFocused = this.props.isFocused;
@@ -136,5 +134,4 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
136
134
  }, children), this.getElemAfter()));
137
135
  }
138
136
  }]);
139
- return MultiValue;
140
137
  }(React.Component);
@@ -1,15 +1,14 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
8
  var _excluded = ["children", "innerProps"];
10
9
  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; }
11
10
  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; }
12
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
11
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
13
  import { components } from '@atlaskit/select';
15
14
  import React, { Fragment } from 'react';
@@ -19,14 +18,12 @@ import { messages } from './i18n';
19
18
  import { isChildInput } from './utils';
20
19
  import ValueContainerWrapper from './ValueContainerWrapper';
21
20
  export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
22
- _inherits(MultiValueContainer, _React$PureComponent);
23
- var _super = _createSuper(MultiValueContainer);
24
21
  function MultiValueContainer(props) {
25
22
  var _this;
26
23
  _classCallCheck(this, MultiValueContainer);
27
- _this = _super.call(this, props);
28
- _defineProperty(_assertThisInitialized(_this), "timeoutId", null);
29
- _defineProperty(_assertThisInitialized(_this), "scrollToBottom", function () {
24
+ _this = _callSuper(this, MultiValueContainer, [props]);
25
+ _defineProperty(_this, "timeoutId", null);
26
+ _defineProperty(_this, "scrollToBottom", function () {
30
27
  _this.timeoutId = window.setTimeout(function () {
31
28
  var current = _this.valueContainerInnerProps.ref.current;
32
29
  if (current !== null) {
@@ -38,11 +35,11 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
38
35
  _this.timeoutId = null;
39
36
  });
40
37
  });
41
- _defineProperty(_assertThisInitialized(_this), "showPlaceholder", function () {
38
+ _defineProperty(_this, "showPlaceholder", function () {
42
39
  var value = _this.props.selectProps.value;
43
40
  return value && value.length > 0;
44
41
  });
45
- _defineProperty(_assertThisInitialized(_this), "addPlaceholder", function (placeholder) {
42
+ _defineProperty(_this, "addPlaceholder", function (placeholder) {
46
43
  var children = React.Children.map(_this.props.children, function (child) {
47
44
  return isChildInput(child) && _this.showPlaceholder() ? /*#__PURE__*/React.cloneElement(child, {
48
45
  placeholder: placeholder
@@ -50,7 +47,7 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
50
47
  });
51
48
  return /*#__PURE__*/React.createElement(Fragment, null, children);
52
49
  });
53
- _defineProperty(_assertThisInitialized(_this), "renderChildren", function () {
50
+ _defineProperty(_this, "renderChildren", function () {
54
51
  var _this$props$selectPro = _this.props.selectProps,
55
52
  addMoreMessage = _this$props$selectPro.addMoreMessage,
56
53
  isDisabled = _this$props$selectPro.isDisabled;
@@ -72,7 +69,7 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
72
69
  return _this.addPlaceholder(addMoreMessage);
73
70
  });
74
71
  //@ts-ignore react-select unsupported props
75
- _defineProperty(_assertThisInitialized(_this), "onValueContainerClick", _this.props.selectProps.onValueContainerClick);
72
+ _defineProperty(_this, "onValueContainerClick", _this.props.selectProps.onValueContainerClick);
76
73
  _this.state = {
77
74
  valueSize: 0,
78
75
  previousValueSize: 0
@@ -82,7 +79,8 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
82
79
  };
83
80
  return _this;
84
81
  }
85
- _createClass(MultiValueContainer, [{
82
+ _inherits(MultiValueContainer, _React$PureComponent);
83
+ return _createClass(MultiValueContainer, [{
86
84
  key: "componentDidUpdate",
87
85
  value: function componentDidUpdate() {
88
86
  var _this$state = this.state,
@@ -129,5 +127,4 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
129
127
  };
130
128
  }
131
129
  }]);
132
- return MultiValueContainer;
133
130
  }(React.PureComponent);
@@ -1,9 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -27,7 +27,7 @@ var getLabelStyle = function getLabelStyle() {
27
27
  return css({
28
28
  color: "var(--ds-text-subtlest, ".concat(N200, ")"),
29
29
  fontSize: "".concat(fontSize, "px"),
30
- fontWeight: 600,
30
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
31
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
32
32
  lineHeight: "".concat(lineHeight),
33
33
  paddingBottom: "var(--ds-space-050, 4px)",
@@ -37,13 +37,12 @@ var getLabelStyle = function getLabelStyle() {
37
37
  });
38
38
  };
39
39
  export var PopupControl = /*#__PURE__*/function (_React$PureComponent) {
40
- _inherits(PopupControl, _React$PureComponent);
41
- var _super = _createSuper(PopupControl);
42
40
  function PopupControl() {
43
41
  _classCallCheck(this, PopupControl);
44
- return _super.apply(this, arguments);
42
+ return _callSuper(this, PopupControl, arguments);
45
43
  }
46
- _createClass(PopupControl, [{
44
+ _inherits(PopupControl, _React$PureComponent);
45
+ return _createClass(PopupControl, [{
47
46
  key: "render",
48
47
  value: function render() {
49
48
  var popupTitle = this.props.selectProps.popupTitle;
@@ -54,5 +53,4 @@ export var PopupControl = /*#__PURE__*/function (_React$PureComponent) {
54
53
  }, popupTitle), jsx(components.Control, this.props));
55
54
  }
56
55
  }]);
57
- return PopupControl;
58
56
  }(React.PureComponent);