@atlaskit/user-picker 11.23.3 → 11.24.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-jira/tsconfig.json +3 -0
  4. package/afm-products/tsconfig.json +3 -0
  5. package/dist/cjs/analytics.js +1 -1
  6. package/dist/cjs/components/ClearIndicator.js +1 -1
  7. package/dist/cjs/components/Control.js +1 -1
  8. package/dist/cjs/components/Input.js +1 -1
  9. package/dist/cjs/components/MultiValue.js +148 -10
  10. package/dist/cjs/components/MultiValueContainer.js +1 -1
  11. package/dist/cjs/components/SingleValue.js +1 -1
  12. package/dist/cjs/components/SingleValueContainer.js +1 -1
  13. package/dist/cjs/components/UserPicker.js +1 -1
  14. package/dist/cjs/components/styles.js +2 -1
  15. package/dist/es2019/analytics.js +1 -1
  16. package/dist/es2019/components/ClearIndicator.js +1 -1
  17. package/dist/es2019/components/Control.js +1 -1
  18. package/dist/es2019/components/Input.js +1 -1
  19. package/dist/es2019/components/MultiValue.js +143 -11
  20. package/dist/es2019/components/MultiValueContainer.js +1 -1
  21. package/dist/es2019/components/SingleValue.js +1 -1
  22. package/dist/es2019/components/SingleValueContainer.js +1 -1
  23. package/dist/es2019/components/UserPicker.js +1 -1
  24. package/dist/es2019/components/styles.js +2 -1
  25. package/dist/esm/analytics.js +1 -1
  26. package/dist/esm/components/ClearIndicator.js +1 -1
  27. package/dist/esm/components/Control.js +1 -1
  28. package/dist/esm/components/Input.js +1 -1
  29. package/dist/esm/components/MultiValue.js +148 -10
  30. package/dist/esm/components/MultiValueContainer.js +1 -1
  31. package/dist/esm/components/SingleValue.js +1 -1
  32. package/dist/esm/components/SingleValueContainer.js +1 -1
  33. package/dist/esm/components/UserPicker.js +1 -1
  34. package/dist/esm/components/styles.js +2 -1
  35. package/package.json +5 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 11.24.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`1ad583e025c33`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1ad583e025c33) -
8
+ [ux] Updates User picker, behind a feature gate, to use @atlaski/tag component when isMulti is
9
+ true.
10
+
3
11
  ## 11.23.3
4
12
 
5
13
  ### Patch Changes
@@ -59,6 +59,9 @@
59
59
  {
60
60
  "path": "../../../design-system/spinner/afm-cc/tsconfig.json"
61
61
  },
62
+ {
63
+ "path": "../../../design-system/tag/afm-cc/tsconfig.json"
64
+ },
62
65
  {
63
66
  "path": "../../../people-and-teams/teams-avatar/afm-cc/tsconfig.json"
64
67
  },
@@ -59,6 +59,9 @@
59
59
  {
60
60
  "path": "../../../design-system/spinner/afm-jira/tsconfig.json"
61
61
  },
62
+ {
63
+ "path": "../../../design-system/tag/afm-jira/tsconfig.json"
64
+ },
62
65
  {
63
66
  "path": "../../../people-and-teams/teams-avatar/afm-jira/tsconfig.json"
64
67
  },
@@ -59,6 +59,9 @@
59
59
  {
60
60
  "path": "../../../design-system/spinner/afm-products/tsconfig.json"
61
61
  },
62
+ {
63
+ "path": "../../../design-system/tag/afm-products/tsconfig.json"
64
+ },
62
65
  {
63
66
  "path": "../../../people-and-teams/teams-avatar/afm-products/tsconfig.json"
64
67
  },
@@ -13,7 +13,7 @@ var _utils = require("./components/utils");
13
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
15
15
  var packageName = "@atlaskit/user-picker";
16
- var packageVersion = "0.0.0-development";
16
+ var packageVersion = "11.23.3";
17
17
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
18
18
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
19
19
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -1,4 +1,4 @@
1
- /* ClearIndicator.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* ClearIndicator.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* Control.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Control.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* Input.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Input.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -17,13 +17,17 @@ var _react = _interopRequireDefault(require("react"));
17
17
  var _primitives = require("@atlaskit/primitives");
18
18
  var _select = require("@atlaskit/select");
19
19
  var _react2 = require("@emotion/react");
20
+ var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
21
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
+ var _tag = require("@atlaskit/tag");
23
+ var _teamsAvatar = _interopRequireDefault(require("@atlaskit/teams-avatar"));
20
24
  var _AddOptionAvatar = require("./AddOptionAvatar");
21
25
  var _AvatarOrIcon = require("./AvatarOrIcon");
22
26
  var _SizeableAvatar = require("./SizeableAvatar");
23
27
  var _utils = require("./utils");
24
28
  var _peopleGroup = _interopRequireDefault(require("@atlaskit/icon/core/people-group"));
25
29
  var _verifiedTeamIcon = require("@atlaskit/people-teams-ui-public/verified-team-icon");
26
- var _excluded = ["children", "innerProps"];
30
+ var _excluded = ["children", "innerProps", "removeProps", "data"];
27
31
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
28
32
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
29
33
  * @jsxRuntime classic
@@ -43,14 +47,30 @@ var scrollToValue = exports.scrollToValue = function scrollToValue(valueContaine
43
47
  valueContainer.scrollIntoView(false);
44
48
  }
45
49
  };
46
- var groupTagContainer = (0, _primitives.xcss)({
50
+ var groupTagContainerOld = (0, _primitives.xcss)({
47
51
  paddingLeft: 'space.025',
48
52
  marginTop: 'space.025'
49
53
  });
54
+ var groupTagContainer = (0, _primitives.xcss)({
55
+ paddingLeft: 'space.050'
56
+ });
57
+ var iconStyle = (0, _react2.css)({
58
+ display: 'flex',
59
+ alignItems: 'center',
60
+ justifyContent: 'center',
61
+ flexShrink: 0,
62
+ width: '20px',
63
+ height: '20px'
64
+ });
50
65
  var nameWrapper = (0, _react2.css)({
51
66
  font: "var(--ds-font-body, normal 400 14px/20px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
52
67
  paddingLeft: "var(--ds-space-050, 4px)"
53
68
  });
69
+ var avatarTagWrapperStyle = (0, _react2.css)({
70
+ display: 'inline-flex',
71
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- offsets AvatarTag's built-in space.050 margin down to space.025
72
+ margin: '-2px'
73
+ });
54
74
  var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
55
75
  function MultiValue(props) {
56
76
  var _this;
@@ -67,7 +87,7 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
67
87
  }
68
88
  if ((0, _utils.isGroup)(data)) {
69
89
  return (0, _react2.jsx)(_primitives.Box, {
70
- xcss: groupTagContainer
90
+ xcss: groupTagContainerOld
71
91
  }, (0, _react2.jsx)(_peopleGroup.default, {
72
92
  color: "currentColor",
73
93
  label: "" // This element is a decorative icon and does not require a label
@@ -114,16 +134,19 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
114
134
  key: "shouldComponentUpdate",
115
135
  value: function shouldComponentUpdate(nextProps) {
116
136
  var _this$props = this.props,
117
- _this$props$data = _this$props.data,
118
- label = _this$props$data.label,
119
- data = _this$props$data.data,
137
+ option = _this$props.data,
120
138
  innerProps = _this$props.innerProps,
121
139
  isFocused = _this$props.isFocused;
122
- var _nextProps$data = nextProps.data,
123
- nextLabel = _nextProps$data.label,
124
- nextData = _nextProps$data.data,
140
+ var nextOption = nextProps.data,
125
141
  nextInnerProps = nextProps.innerProps,
126
142
  nextIsFocused = nextProps.isFocused;
143
+ if (option == null || nextOption == null) {
144
+ return option !== nextOption || innerProps !== nextInnerProps || isFocused !== nextIsFocused;
145
+ }
146
+ var label = option.label,
147
+ data = option.data;
148
+ var nextLabel = nextOption.label,
149
+ nextData = nextOption.data;
127
150
 
128
151
  // We can ignore onRemove here because it is an anonymous function
129
152
  // that will be recreated every time but with the same implementation.
@@ -134,9 +157,124 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
134
157
  value: function render() {
135
158
  var _this$props2 = this.props,
136
159
  children = _this$props2.children,
137
- innerProps = _this$props2.innerProps,
160
+ _innerProps = _this$props2.innerProps,
161
+ removeProps = _this$props2.removeProps,
162
+ option = _this$props2.data,
138
163
  rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
164
+ if ((0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts')) {
165
+ var _this$props$selectPro;
166
+ var data = option.data,
167
+ label = option.label;
168
+ var isTeamOption = (0, _utils.isTeam)(data);
169
+ var isGroupOption = (0, _utils.isGroup)(data);
170
+ var isEmailOption = (0, _utils.isEmail)(data);
171
+ var avatarUrl = (0, _utils.getAvatarUrl)(data);
172
+ var isDisabled = Boolean((_this$props$selectPro = this.props.selectProps) === null || _this$props$selectPro === void 0 ? void 0 : _this$props$selectPro.isDisabled);
173
+ var avatarProps = avatarUrl ? {
174
+ name: data.name,
175
+ src: avatarUrl
176
+ } : {
177
+ name: data.name
178
+ };
179
+ var removeAction = function removeAction() {
180
+ removeProps.onClick({});
181
+ return true;
182
+ };
183
+ if (isEmailOption) {
184
+ var emailAvatar = function emailAvatar(props) {
185
+ return (0, _react2.jsx)(_avatar.default, (0, _extends2.default)({}, props, {
186
+ children: (0, _react2.jsx)(_AddOptionAvatar.AddOptionAvatar, {
187
+ isLozenge: true,
188
+ isPendingAction: data.isPendingAction
189
+ })
190
+ }));
191
+ };
192
+ return (0, _react2.jsx)("span", {
193
+ ref: this.containerRef,
194
+ css: avatarTagWrapperStyle,
195
+ "data-user-picker-multi-value": true
196
+ }, (0, _react2.jsx)(_tag.AvatarTag, {
197
+ text: label,
198
+ type: "other",
199
+ avatar: emailAvatar,
200
+ isRemovable: !isDisabled,
201
+ onBeforeRemoveAction: removeAction
202
+ }));
203
+ }
204
+ if (isGroupOption) {
205
+ var groupAvatar = function groupAvatar(props) {
206
+ return (0, _react2.jsx)(_avatar.default, (0, _extends2.default)({}, props, {
207
+ children: (0, _react2.jsx)(_primitives.Box, {
208
+ xcss: groupTagContainer
209
+ }, (0, _react2.jsx)(_peopleGroup.default, {
210
+ color: "currentColor",
211
+ label: "" // This element is a decorative icon and does not require a label
212
+ ,
213
+ size: "small"
214
+ }))
215
+ }));
216
+ };
217
+ return (0, _react2.jsx)("span", {
218
+ ref: this.containerRef,
219
+ css: avatarTagWrapperStyle,
220
+ "data-user-picker-multi-value": true
221
+ }, (0, _react2.jsx)(_tag.AvatarTag, {
222
+ type: "other",
223
+ text: label,
224
+ isVerified: data.includeTeamsUpdates,
225
+ isRemovable: !isDisabled,
226
+ onBeforeRemoveAction: removeAction,
227
+ avatar: groupAvatar
228
+ }));
229
+ }
230
+ if (data.icon) {
231
+ var iconAvatar = function iconAvatar(props) {
232
+ return (0, _react2.jsx)(_avatar.default, (0, _extends2.default)({}, props, {
233
+ children: (0, _react2.jsx)("div", {
234
+ css: iconStyle,
235
+ style: {
236
+ color: data.iconColor
237
+ }
238
+ }, data.icon)
239
+ }));
240
+ };
241
+ return (0, _react2.jsx)("span", {
242
+ css: avatarTagWrapperStyle,
243
+ "data-user-picker-multi-value": true
244
+ }, (0, _react2.jsx)(_tag.AvatarTag, {
245
+ text: label,
246
+ type: isTeamOption ? 'other' : 'user',
247
+ avatar: iconAvatar,
248
+ isRemovable: !isDisabled,
249
+ onBeforeRemoveAction: removeAction
250
+ }));
251
+ }
252
+ return (0, _react2.jsx)("span", {
253
+ ref: this.containerRef,
254
+ css: avatarTagWrapperStyle,
255
+ "data-user-picker-multi-value": true
256
+ }, isTeamOption ? (0, _react2.jsx)(_tag.AvatarTag, {
257
+ type: "other",
258
+ text: label,
259
+ isVerified: isTeamOption ? data.verified : undefined,
260
+ isRemovable: !isDisabled,
261
+ onBeforeRemoveAction: removeAction,
262
+ avatar: function avatar(props) {
263
+ return (0, _react2.jsx)(_teamsAvatar.default, (0, _extends2.default)({}, props, avatarProps));
264
+ }
265
+ }) : (0, _react2.jsx)(_tag.AvatarTag, {
266
+ type: "user",
267
+ text: label,
268
+ isRemovable: !isDisabled,
269
+ onBeforeRemoveAction: removeAction,
270
+ avatar: function avatar(props) {
271
+ return (0, _react2.jsx)(_avatar.default, (0, _extends2.default)({}, props, avatarProps));
272
+ }
273
+ }));
274
+ }
139
275
  return (0, _react2.jsx)(_select.components.MultiValue, (0, _extends2.default)({}, rest, {
276
+ data: option,
277
+ removeProps: removeProps,
140
278
  innerProps: {
141
279
  ref: this.containerRef
142
280
  },
@@ -1,4 +1,4 @@
1
- /* MultiValueContainer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* MultiValueContainer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* SingleValue.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* SingleValue.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* SingleValueContainer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* SingleValueContainer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* UserPicker.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* UserPicker.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -10,6 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
12
12
  var _select = require("@atlaskit/select");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _excluded = ["_paddingTop", "_paddingBottom", "_paddingLeft", "_paddingRight"],
14
15
  _excluded2 = ["_paddingTop", "_paddingBottom", "_position"];
15
16
  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; }
@@ -36,7 +37,7 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
36
37
  return _objectSpread(_objectSpread({}, css), {}, {
37
38
  width: width,
38
39
  borderColor: state.isFocused ? "var(--ds-border-focused, ".concat(css.borderColor, ")") : state.isInvalid ? "var(--ds-border-danger, ".concat(_colors.R400, ")") : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : "var(--ds-border-input, ".concat(_colors.N90, ")"),
39
- backgroundColor: state.isFocused ? "var(--ds-background-input, ".concat(css['backgroundColor'], ")") : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ? "var(--ds-background-input, ".concat(_colors.N10, ")") : "var(--ds-background-input, ".concat(_colors.N20, ")"),
40
+ backgroundColor: state.isFocused ? "var(--ds-background-input, ".concat(css['backgroundColor'], ")") : state.selectProps.subtle ? 'transparent' : state.isDisabled && (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? "var(--ds-background-disabled, ".concat(_colors.N10, ")") : state.selectProps.textFieldBackgroundColor ? "var(--ds-background-input, ".concat(_colors.N10, ")") : "var(--ds-background-input, ".concat(_colors.N20, ")"),
40
41
  '&:hover .fabric-user-picker__clear-indicator': {
41
42
  opacity: 1
42
43
  },
@@ -4,7 +4,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
  import { isCustom, isExternalUser } from './components/utils';
6
6
  const packageName = "@atlaskit/user-picker";
7
- const packageVersion = "0.0.0-development";
7
+ const packageVersion = "11.23.3";
8
8
  const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
9
9
  const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
10
10
  const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -1,4 +1,4 @@
1
- /* ClearIndicator.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* ClearIndicator.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./ClearIndicator.compiled.css";
@@ -1,4 +1,4 @@
1
- /* Control.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Control.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./Control.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* Input.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Input.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./Input.compiled.css";
@@ -10,6 +10,10 @@ import { Box, Inline, xcss } from '@atlaskit/primitives';
10
10
  import { components } from '@atlaskit/select';
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
12
  import { css, jsx } from '@emotion/react';
13
+ import Avatar from '@atlaskit/avatar';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
15
+ import { AvatarTag } from '@atlaskit/tag';
16
+ import TeamAvatar from '@atlaskit/teams-avatar';
13
17
  import { AddOptionAvatar } from './AddOptionAvatar';
14
18
  import { AvatarOrIcon } from './AvatarOrIcon';
15
19
  import { SizeableAvatar } from './SizeableAvatar';
@@ -31,14 +35,30 @@ export const scrollToValue = (valueContainer, control) => {
31
35
  valueContainer.scrollIntoView(false);
32
36
  }
33
37
  };
34
- const groupTagContainer = xcss({
38
+ const groupTagContainerOld = xcss({
35
39
  paddingLeft: 'space.025',
36
40
  marginTop: 'space.025'
37
41
  });
42
+ const groupTagContainer = xcss({
43
+ paddingLeft: 'space.050'
44
+ });
45
+ const iconStyle = css({
46
+ display: 'flex',
47
+ alignItems: 'center',
48
+ justifyContent: 'center',
49
+ flexShrink: 0,
50
+ width: '20px',
51
+ height: '20px'
52
+ });
38
53
  const nameWrapper = css({
39
54
  font: "var(--ds-font-body, normal 400 14px/20px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
40
55
  paddingLeft: "var(--ds-space-050, 4px)"
41
56
  });
57
+ const avatarTagWrapperStyle = css({
58
+ display: 'inline-flex',
59
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- offsets AvatarTag's built-in space.050 margin down to space.025
60
+ margin: '-2px'
61
+ });
42
62
  export class MultiValue extends React.Component {
43
63
  constructor(props) {
44
64
  super(props);
@@ -57,7 +77,7 @@ export class MultiValue extends React.Component {
57
77
  }
58
78
  if (isGroup(data)) {
59
79
  return jsx(Box, {
60
- xcss: groupTagContainer
80
+ xcss: groupTagContainerOld
61
81
  }, jsx(PeopleIcon, {
62
82
  color: "currentColor",
63
83
  label: "" // This element is a decorative icon and does not require a label
@@ -104,21 +124,26 @@ export class MultiValue extends React.Component {
104
124
  }
105
125
  shouldComponentUpdate(nextProps) {
106
126
  const {
107
- data: {
108
- label,
109
- data
110
- },
127
+ data: option,
111
128
  innerProps,
112
129
  isFocused
113
130
  } = this.props;
114
131
  const {
115
- data: {
116
- label: nextLabel,
117
- data: nextData
118
- },
132
+ data: nextOption,
119
133
  innerProps: nextInnerProps,
120
134
  isFocused: nextIsFocused
121
135
  } = nextProps;
136
+ if (option == null || nextOption == null) {
137
+ return option !== nextOption || innerProps !== nextInnerProps || isFocused !== nextIsFocused;
138
+ }
139
+ const {
140
+ label,
141
+ data
142
+ } = option;
143
+ const {
144
+ label: nextLabel,
145
+ data: nextData
146
+ } = nextOption;
122
147
 
123
148
  // We can ignore onRemove here because it is an anonymous function
124
149
  // that will be recreated every time but with the same implementation.
@@ -127,10 +152,117 @@ export class MultiValue extends React.Component {
127
152
  render() {
128
153
  const {
129
154
  children,
130
- innerProps,
155
+ innerProps: _innerProps,
156
+ removeProps,
157
+ data: option,
131
158
  ...rest
132
159
  } = this.props;
160
+ if (fg('platform-dst-lozenge-tag-badge-visual-uplifts')) {
161
+ var _this$props$selectPro;
162
+ const {
163
+ data,
164
+ label
165
+ } = option;
166
+ const isTeamOption = isTeam(data);
167
+ const isGroupOption = isGroup(data);
168
+ const isEmailOption = isEmail(data);
169
+ const avatarUrl = getAvatarUrl(data);
170
+ const isDisabled = Boolean((_this$props$selectPro = this.props.selectProps) === null || _this$props$selectPro === void 0 ? void 0 : _this$props$selectPro.isDisabled);
171
+ const avatarProps = avatarUrl ? {
172
+ name: data.name,
173
+ src: avatarUrl
174
+ } : {
175
+ name: data.name
176
+ };
177
+ const removeAction = () => {
178
+ removeProps.onClick({});
179
+ return true;
180
+ };
181
+ if (isEmailOption) {
182
+ const emailAvatar = props => jsx(Avatar, _extends({}, props, {
183
+ children: jsx(AddOptionAvatar, {
184
+ isLozenge: true,
185
+ isPendingAction: data.isPendingAction
186
+ })
187
+ }));
188
+ return jsx("span", {
189
+ ref: this.containerRef,
190
+ css: avatarTagWrapperStyle,
191
+ "data-user-picker-multi-value": true
192
+ }, jsx(AvatarTag, {
193
+ text: label,
194
+ type: "other",
195
+ avatar: emailAvatar,
196
+ isRemovable: !isDisabled,
197
+ onBeforeRemoveAction: removeAction
198
+ }));
199
+ }
200
+ if (isGroupOption) {
201
+ const groupAvatar = props => jsx(Avatar, _extends({}, props, {
202
+ children: jsx(Box, {
203
+ xcss: groupTagContainer
204
+ }, jsx(PeopleIcon, {
205
+ color: "currentColor",
206
+ label: "" // This element is a decorative icon and does not require a label
207
+ ,
208
+ size: "small"
209
+ }))
210
+ }));
211
+ return jsx("span", {
212
+ ref: this.containerRef,
213
+ css: avatarTagWrapperStyle,
214
+ "data-user-picker-multi-value": true
215
+ }, jsx(AvatarTag, {
216
+ type: "other",
217
+ text: label,
218
+ isVerified: data.includeTeamsUpdates,
219
+ isRemovable: !isDisabled,
220
+ onBeforeRemoveAction: removeAction,
221
+ avatar: groupAvatar
222
+ }));
223
+ }
224
+ if (data.icon) {
225
+ const iconAvatar = props => jsx(Avatar, _extends({}, props, {
226
+ children: jsx("div", {
227
+ css: iconStyle,
228
+ style: {
229
+ color: data.iconColor
230
+ }
231
+ }, data.icon)
232
+ }));
233
+ return jsx("span", {
234
+ css: avatarTagWrapperStyle,
235
+ "data-user-picker-multi-value": true
236
+ }, jsx(AvatarTag, {
237
+ text: label,
238
+ type: isTeamOption ? 'other' : 'user',
239
+ avatar: iconAvatar,
240
+ isRemovable: !isDisabled,
241
+ onBeforeRemoveAction: removeAction
242
+ }));
243
+ }
244
+ return jsx("span", {
245
+ ref: this.containerRef,
246
+ css: avatarTagWrapperStyle,
247
+ "data-user-picker-multi-value": true
248
+ }, isTeamOption ? jsx(AvatarTag, {
249
+ type: "other",
250
+ text: label,
251
+ isVerified: isTeamOption ? data.verified : undefined,
252
+ isRemovable: !isDisabled,
253
+ onBeforeRemoveAction: removeAction,
254
+ avatar: props => jsx(TeamAvatar, _extends({}, props, avatarProps))
255
+ }) : jsx(AvatarTag, {
256
+ type: "user",
257
+ text: label,
258
+ isRemovable: !isDisabled,
259
+ onBeforeRemoveAction: removeAction,
260
+ avatar: props => jsx(Avatar, _extends({}, props, avatarProps))
261
+ }));
262
+ }
133
263
  return jsx(components.MultiValue, _extends({}, rest, {
264
+ data: option,
265
+ removeProps: removeProps,
134
266
  innerProps: {
135
267
  ref: this.containerRef
136
268
  },
@@ -1,4 +1,4 @@
1
- /* MultiValueContainer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* MultiValueContainer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./MultiValueContainer.compiled.css";
@@ -1,4 +1,4 @@
1
- /* SingleValue.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* SingleValue.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./SingleValue.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* SingleValueContainer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* SingleValueContainer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./SingleValueContainer.compiled.css";
@@ -1,4 +1,4 @@
1
- /* UserPicker.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* UserPicker.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,6 +1,7 @@
1
1
  import { B100, N0, N10, N20, N30, N100, R50, R400, N90 } from '@atlaskit/theme/colors';
2
2
  import memoizeOne from 'memoize-one';
3
3
  import { mergeStyles } from '@atlaskit/select';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  export const BORDER_PADDING = "var(--ds-space-075, 6px)";
5
6
  export const AVATAR_PADDING = 6;
6
7
  export const INDICATOR_WIDTH = 39;
@@ -22,7 +23,7 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles,
22
23
  ...css,
23
24
  width,
24
25
  borderColor: state.isFocused ? `var(--ds-border-focused, ${css.borderColor})` : state.isInvalid ? `var(--ds-border-danger, ${R400})` : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : `var(--ds-border-input, ${N90})`,
25
- backgroundColor: state.isFocused ? `var(--ds-background-input, ${css['backgroundColor']})` : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ? `var(--ds-background-input, ${N10})` : `var(--ds-background-input, ${N20})`,
26
+ backgroundColor: state.isFocused ? `var(--ds-background-input, ${css['backgroundColor']})` : state.selectProps.subtle ? 'transparent' : state.isDisabled && fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? `var(--ds-background-disabled, ${N10})` : state.selectProps.textFieldBackgroundColor ? `var(--ds-background-input, ${N10})` : `var(--ds-background-input, ${N20})`,
26
27
  '&:hover .fabric-user-picker__clear-indicator': {
27
28
  opacity: 1
28
29
  },
@@ -7,7 +7,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
7
7
  import { v4 as uuidv4 } from 'uuid';
8
8
  import { isCustom, isExternalUser } from './components/utils';
9
9
  var packageName = "@atlaskit/user-picker";
10
- var packageVersion = "0.0.0-development";
10
+ var packageVersion = "11.23.3";
11
11
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
12
12
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
13
13
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -1,4 +1,4 @@
1
- /* ClearIndicator.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* ClearIndicator.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -1,4 +1,4 @@
1
- /* Control.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Control.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./Control.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* Input.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Input.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _inherits from "@babel/runtime/helpers/inherits";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- var _excluded = ["children", "innerProps"];
9
+ var _excluded = ["children", "innerProps", "removeProps", "data"];
10
10
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  /**
@@ -19,6 +19,10 @@ import { Box, Inline, xcss } from '@atlaskit/primitives';
19
19
  import { components } from '@atlaskit/select';
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
21
  import { css, jsx } from '@emotion/react';
22
+ import Avatar from '@atlaskit/avatar';
23
+ import { fg } from '@atlaskit/platform-feature-flags';
24
+ import { AvatarTag } from '@atlaskit/tag';
25
+ import TeamAvatar from '@atlaskit/teams-avatar';
22
26
  import { AddOptionAvatar } from './AddOptionAvatar';
23
27
  import { AvatarOrIcon } from './AvatarOrIcon';
24
28
  import { SizeableAvatar } from './SizeableAvatar';
@@ -38,14 +42,30 @@ export var scrollToValue = function scrollToValue(valueContainer, control) {
38
42
  valueContainer.scrollIntoView(false);
39
43
  }
40
44
  };
41
- var groupTagContainer = xcss({
45
+ var groupTagContainerOld = xcss({
42
46
  paddingLeft: 'space.025',
43
47
  marginTop: 'space.025'
44
48
  });
49
+ var groupTagContainer = xcss({
50
+ paddingLeft: 'space.050'
51
+ });
52
+ var iconStyle = css({
53
+ display: 'flex',
54
+ alignItems: 'center',
55
+ justifyContent: 'center',
56
+ flexShrink: 0,
57
+ width: '20px',
58
+ height: '20px'
59
+ });
45
60
  var nameWrapper = css({
46
61
  font: "var(--ds-font-body, normal 400 14px/20px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
47
62
  paddingLeft: "var(--ds-space-050, 4px)"
48
63
  });
64
+ var avatarTagWrapperStyle = css({
65
+ display: 'inline-flex',
66
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- offsets AvatarTag's built-in space.050 margin down to space.025
67
+ margin: '-2px'
68
+ });
49
69
  export var MultiValue = /*#__PURE__*/function (_React$Component) {
50
70
  function MultiValue(props) {
51
71
  var _this;
@@ -62,7 +82,7 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
62
82
  }
63
83
  if (isGroup(data)) {
64
84
  return jsx(Box, {
65
- xcss: groupTagContainer
85
+ xcss: groupTagContainerOld
66
86
  }, jsx(PeopleIcon, {
67
87
  color: "currentColor",
68
88
  label: "" // This element is a decorative icon and does not require a label
@@ -109,16 +129,19 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
109
129
  key: "shouldComponentUpdate",
110
130
  value: function shouldComponentUpdate(nextProps) {
111
131
  var _this$props = this.props,
112
- _this$props$data = _this$props.data,
113
- label = _this$props$data.label,
114
- data = _this$props$data.data,
132
+ option = _this$props.data,
115
133
  innerProps = _this$props.innerProps,
116
134
  isFocused = _this$props.isFocused;
117
- var _nextProps$data = nextProps.data,
118
- nextLabel = _nextProps$data.label,
119
- nextData = _nextProps$data.data,
135
+ var nextOption = nextProps.data,
120
136
  nextInnerProps = nextProps.innerProps,
121
137
  nextIsFocused = nextProps.isFocused;
138
+ if (option == null || nextOption == null) {
139
+ return option !== nextOption || innerProps !== nextInnerProps || isFocused !== nextIsFocused;
140
+ }
141
+ var label = option.label,
142
+ data = option.data;
143
+ var nextLabel = nextOption.label,
144
+ nextData = nextOption.data;
122
145
 
123
146
  // We can ignore onRemove here because it is an anonymous function
124
147
  // that will be recreated every time but with the same implementation.
@@ -129,9 +152,124 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
129
152
  value: function render() {
130
153
  var _this$props2 = this.props,
131
154
  children = _this$props2.children,
132
- innerProps = _this$props2.innerProps,
155
+ _innerProps = _this$props2.innerProps,
156
+ removeProps = _this$props2.removeProps,
157
+ option = _this$props2.data,
133
158
  rest = _objectWithoutProperties(_this$props2, _excluded);
159
+ if (fg('platform-dst-lozenge-tag-badge-visual-uplifts')) {
160
+ var _this$props$selectPro;
161
+ var data = option.data,
162
+ label = option.label;
163
+ var isTeamOption = isTeam(data);
164
+ var isGroupOption = isGroup(data);
165
+ var isEmailOption = isEmail(data);
166
+ var avatarUrl = getAvatarUrl(data);
167
+ var isDisabled = Boolean((_this$props$selectPro = this.props.selectProps) === null || _this$props$selectPro === void 0 ? void 0 : _this$props$selectPro.isDisabled);
168
+ var avatarProps = avatarUrl ? {
169
+ name: data.name,
170
+ src: avatarUrl
171
+ } : {
172
+ name: data.name
173
+ };
174
+ var removeAction = function removeAction() {
175
+ removeProps.onClick({});
176
+ return true;
177
+ };
178
+ if (isEmailOption) {
179
+ var emailAvatar = function emailAvatar(props) {
180
+ return jsx(Avatar, _extends({}, props, {
181
+ children: jsx(AddOptionAvatar, {
182
+ isLozenge: true,
183
+ isPendingAction: data.isPendingAction
184
+ })
185
+ }));
186
+ };
187
+ return jsx("span", {
188
+ ref: this.containerRef,
189
+ css: avatarTagWrapperStyle,
190
+ "data-user-picker-multi-value": true
191
+ }, jsx(AvatarTag, {
192
+ text: label,
193
+ type: "other",
194
+ avatar: emailAvatar,
195
+ isRemovable: !isDisabled,
196
+ onBeforeRemoveAction: removeAction
197
+ }));
198
+ }
199
+ if (isGroupOption) {
200
+ var groupAvatar = function groupAvatar(props) {
201
+ return jsx(Avatar, _extends({}, props, {
202
+ children: jsx(Box, {
203
+ xcss: groupTagContainer
204
+ }, jsx(PeopleIcon, {
205
+ color: "currentColor",
206
+ label: "" // This element is a decorative icon and does not require a label
207
+ ,
208
+ size: "small"
209
+ }))
210
+ }));
211
+ };
212
+ return jsx("span", {
213
+ ref: this.containerRef,
214
+ css: avatarTagWrapperStyle,
215
+ "data-user-picker-multi-value": true
216
+ }, jsx(AvatarTag, {
217
+ type: "other",
218
+ text: label,
219
+ isVerified: data.includeTeamsUpdates,
220
+ isRemovable: !isDisabled,
221
+ onBeforeRemoveAction: removeAction,
222
+ avatar: groupAvatar
223
+ }));
224
+ }
225
+ if (data.icon) {
226
+ var iconAvatar = function iconAvatar(props) {
227
+ return jsx(Avatar, _extends({}, props, {
228
+ children: jsx("div", {
229
+ css: iconStyle,
230
+ style: {
231
+ color: data.iconColor
232
+ }
233
+ }, data.icon)
234
+ }));
235
+ };
236
+ return jsx("span", {
237
+ css: avatarTagWrapperStyle,
238
+ "data-user-picker-multi-value": true
239
+ }, jsx(AvatarTag, {
240
+ text: label,
241
+ type: isTeamOption ? 'other' : 'user',
242
+ avatar: iconAvatar,
243
+ isRemovable: !isDisabled,
244
+ onBeforeRemoveAction: removeAction
245
+ }));
246
+ }
247
+ return jsx("span", {
248
+ ref: this.containerRef,
249
+ css: avatarTagWrapperStyle,
250
+ "data-user-picker-multi-value": true
251
+ }, isTeamOption ? jsx(AvatarTag, {
252
+ type: "other",
253
+ text: label,
254
+ isVerified: isTeamOption ? data.verified : undefined,
255
+ isRemovable: !isDisabled,
256
+ onBeforeRemoveAction: removeAction,
257
+ avatar: function avatar(props) {
258
+ return jsx(TeamAvatar, _extends({}, props, avatarProps));
259
+ }
260
+ }) : jsx(AvatarTag, {
261
+ type: "user",
262
+ text: label,
263
+ isRemovable: !isDisabled,
264
+ onBeforeRemoveAction: removeAction,
265
+ avatar: function avatar(props) {
266
+ return jsx(Avatar, _extends({}, props, avatarProps));
267
+ }
268
+ }));
269
+ }
134
270
  return jsx(components.MultiValue, _extends({}, rest, {
271
+ data: option,
272
+ removeProps: removeProps,
135
273
  innerProps: {
136
274
  ref: this.containerRef
137
275
  },
@@ -1,4 +1,4 @@
1
- /* MultiValueContainer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* MultiValueContainer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
@@ -1,4 +1,4 @@
1
- /* SingleValue.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* SingleValue.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./SingleValue.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* SingleValueContainer.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* SingleValueContainer.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
@@ -1,4 +1,4 @@
1
- /* UserPicker.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* UserPicker.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { B100, N0, N10, N20, N30, N100, R50, R400, N90 } from '@atlaskit/theme/colors';
8
8
  import memoizeOne from 'memoize-one';
9
9
  import { mergeStyles } from '@atlaskit/select';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  export var BORDER_PADDING = "var(--ds-space-075, 6px)";
11
12
  export var AVATAR_PADDING = 6;
12
13
  export var INDICATOR_WIDTH = 39;
@@ -29,7 +30,7 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
29
30
  return _objectSpread(_objectSpread({}, css), {}, {
30
31
  width: width,
31
32
  borderColor: state.isFocused ? "var(--ds-border-focused, ".concat(css.borderColor, ")") : state.isInvalid ? "var(--ds-border-danger, ".concat(R400, ")") : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : "var(--ds-border-input, ".concat(N90, ")"),
32
- backgroundColor: state.isFocused ? "var(--ds-background-input, ".concat(css['backgroundColor'], ")") : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ? "var(--ds-background-input, ".concat(N10, ")") : "var(--ds-background-input, ".concat(N20, ")"),
33
+ backgroundColor: state.isFocused ? "var(--ds-background-input, ".concat(css['backgroundColor'], ")") : state.selectProps.subtle ? 'transparent' : state.isDisabled && fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? "var(--ds-background-disabled, ".concat(N10, ")") : state.selectProps.textFieldBackgroundColor ? "var(--ds-background-input, ".concat(N10, ")") : "var(--ds-background-input, ".concat(N20, ")"),
33
34
  '&:hover .fabric-user-picker__clear-indicator': {
34
35
  opacity: 1
35
36
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "11.23.3",
3
+ "version": "11.24.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/"
@@ -55,6 +55,7 @@
55
55
  "@atlaskit/primitives": "^18.0.0",
56
56
  "@atlaskit/select": "^21.7.0",
57
57
  "@atlaskit/spinner": "^19.0.0",
58
+ "@atlaskit/tag": "^14.5.0",
58
59
  "@atlaskit/teams-avatar": "^2.4.0",
59
60
  "@atlaskit/theme": "^22.0.0",
60
61
  "@atlaskit/tokens": "^11.0.0",
@@ -118,6 +119,9 @@
118
119
  },
119
120
  "jira_ai_agent_avatar_user_picker_user_option": {
120
121
  "type": "boolean"
122
+ },
123
+ "platform-dst-lozenge-tag-badge-visual-uplifts": {
124
+ "type": "boolean"
121
125
  }
122
126
  }
123
127
  }