@atlaskit/user-picker 10.26.2 → 10.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 10.26.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#156360](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156360)
8
+ [`eef99f4bf497c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eef99f4bf497c) -
9
+ A11Y-7739 Add aria-hidden true to decorative images
10
+
3
11
  ## 10.26.2
4
12
 
5
13
  ### Patch Changes
@@ -12,7 +12,7 @@ var _utils = require("./components/utils");
12
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
14
  var packageName = "@atlaskit/user-picker";
15
- var packageVersion = "10.26.2";
15
+ var packageVersion = "10.26.3";
16
16
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
17
17
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
18
18
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -36,7 +36,8 @@ var AddOptionAvatar = exports.AddOptionAvatar = function AddOptionAvatar(_ref) {
36
36
  (0, _react.jsx)("div", {
37
37
  css: getEmailAvatarWrapperStyle(isLozenge)
38
38
  }, (0, _react.jsx)(_email.default, {
39
- label: label,
39
+ testId: "add-option-avatar-email-icon",
40
+ label: label || "",
40
41
  LEGACY_size: isLozenge ? 'small' : 'medium',
41
42
  LEGACY_margin: "0 0 0 -2px",
42
43
  color: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
@@ -15,13 +15,11 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
15
15
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _react = _interopRequireDefault(require("react"));
18
- var _reactIntlNext = require("react-intl-next");
19
18
  var _primitives = require("@atlaskit/primitives");
20
19
  var _select = require("@atlaskit/select");
21
20
  var _react2 = require("@emotion/react");
22
21
  var _AddOptionAvatar = require("./AddOptionAvatar");
23
22
  var _SizeableAvatar = require("./SizeableAvatar");
24
- var _i18n = require("./i18n");
25
23
  var _utils = require("./utils");
26
24
  var _peopleGroupPeople = _interopRequireDefault(require("@atlaskit/icon/core/migration/people-group--people"));
27
25
  var _verifiedTeamIcon = require("@atlaskit/people-teams-ui-public/verified-team-icon");
@@ -61,18 +59,11 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
61
59
  (0, _classCallCheck2.default)(this, MultiValue);
62
60
  _this = _super.call(this, props);
63
61
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getElemBefore", function () {
64
- var _this$props = _this.props,
65
- data = _this$props.data.data,
66
- selectProps = _this$props.selectProps;
62
+ var data = _this.props.data.data;
67
63
  if ((0, _utils.isEmail)(data)) {
68
- return selectProps.emailLabel ? (0, _react2.jsx)(_AddOptionAvatar.AddOptionAvatar, {
69
- isLozenge: true,
70
- label: selectProps.emailLabel
71
- }) : (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.addEmail, function (label) {
72
- return (0, _react2.jsx)(_AddOptionAvatar.AddOptionAvatar, {
73
- isLozenge: true,
74
- label: label
75
- });
64
+ // This element is a decorative icon and does not require a label
65
+ return (0, _react2.jsx)(_AddOptionAvatar.AddOptionAvatar, {
66
+ isLozenge: true
76
67
  });
77
68
  }
78
69
  if ((0, _utils.isGroup)(data)) {
@@ -81,7 +72,8 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
81
72
  }, (0, _react2.jsx)(_peopleGroupPeople.default, {
82
73
  LEGACY_margin: "-2px 0 0 0",
83
74
  color: "currentColor",
84
- label: "group-icon",
75
+ label: "" // This element is a decorative icon and does not require a label
76
+ ,
85
77
  LEGACY_size: "small"
86
78
  }));
87
79
  }
@@ -114,12 +106,12 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
114
106
  }, {
115
107
  key: "shouldComponentUpdate",
116
108
  value: function shouldComponentUpdate(nextProps) {
117
- var _this$props2 = this.props,
118
- _this$props2$data = _this$props2.data,
119
- label = _this$props2$data.label,
120
- data = _this$props2$data.data,
121
- innerProps = _this$props2.innerProps,
122
- isFocused = _this$props2.isFocused;
109
+ var _this$props = this.props,
110
+ _this$props$data = _this$props.data,
111
+ label = _this$props$data.label,
112
+ data = _this$props$data.data,
113
+ innerProps = _this$props.innerProps,
114
+ isFocused = _this$props.isFocused;
123
115
  var _nextProps$data = nextProps.data,
124
116
  nextLabel = _nextProps$data.label,
125
117
  nextData = _nextProps$data.data,
@@ -133,10 +125,10 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
133
125
  }, {
134
126
  key: "render",
135
127
  value: function render() {
136
- var _this$props3 = this.props,
137
- children = _this$props3.children,
138
- innerProps = _this$props3.innerProps,
139
- rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
128
+ var _this$props2 = this.props,
129
+ children = _this$props2.children,
130
+ innerProps = _this$props2.innerProps,
131
+ rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
140
132
  return (0, _react2.jsx)(_select.components.MultiValue, (0, _extends2.default)({}, rest, {
141
133
  innerProps: {
142
134
  ref: this.containerRef
@@ -2,7 +2,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
3
  import { isCustom, isExternalUser } from './components/utils';
4
4
  const packageName = "@atlaskit/user-picker";
5
- const packageVersion = "10.26.2";
5
+ const packageVersion = "10.26.3";
6
6
  const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
7
7
  const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
8
8
  const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -28,7 +28,8 @@ export const AddOptionAvatar = ({
28
28
  jsx("div", {
29
29
  css: getEmailAvatarWrapperStyle(isLozenge)
30
30
  }, jsx(EmailIcon, {
31
- label: label,
31
+ testId: "add-option-avatar-email-icon",
32
+ label: label || "",
32
33
  LEGACY_size: isLozenge ? 'small' : 'medium',
33
34
  LEGACY_margin: "0 0 0 -2px",
34
35
  color: `var(--ds-text-subtle, ${N500})`
@@ -5,14 +5,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  * @jsx jsx
6
6
  */
7
7
  import React from 'react';
8
- import { FormattedMessage } from 'react-intl-next';
9
8
  import { Box, Inline, xcss } from '@atlaskit/primitives';
10
9
  import { components } from '@atlaskit/select';
11
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
11
  import { css, jsx } from '@emotion/react';
13
12
  import { AddOptionAvatar } from './AddOptionAvatar';
14
13
  import { SizeableAvatar } from './SizeableAvatar';
15
- import { messages } from './i18n';
16
14
  import { getAvatarUrl, isEmail, isGroup, isTeam } from './utils';
17
15
  import PeopleIcon from '@atlaskit/icon/core/migration/people-group--people';
18
16
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
@@ -47,17 +45,13 @@ export class MultiValue extends React.Component {
47
45
  const {
48
46
  data: {
49
47
  data
50
- },
51
- selectProps
48
+ }
52
49
  } = this.props;
53
50
  if (isEmail(data)) {
54
- return selectProps.emailLabel ? jsx(AddOptionAvatar, {
55
- isLozenge: true,
56
- label: selectProps.emailLabel
57
- }) : jsx(FormattedMessage, messages.addEmail, label => jsx(AddOptionAvatar, {
58
- isLozenge: true,
59
- label: label
60
- }));
51
+ // This element is a decorative icon and does not require a label
52
+ return jsx(AddOptionAvatar, {
53
+ isLozenge: true
54
+ });
61
55
  }
62
56
  if (isGroup(data)) {
63
57
  return jsx(Box, {
@@ -65,7 +59,8 @@ export class MultiValue extends React.Component {
65
59
  }, jsx(PeopleIcon, {
66
60
  LEGACY_margin: "-2px 0 0 0",
67
61
  color: "currentColor",
68
- label: "group-icon",
62
+ label: "" // This element is a decorative icon and does not require a label
63
+ ,
69
64
  LEGACY_size: "small"
70
65
  }));
71
66
  }
@@ -5,7 +5,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
  import { isCustom, isExternalUser } from './components/utils';
7
7
  var packageName = "@atlaskit/user-picker";
8
- var packageVersion = "10.26.2";
8
+ var packageVersion = "10.26.3";
9
9
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
10
10
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
11
11
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -27,7 +27,8 @@ export var AddOptionAvatar = function AddOptionAvatar(_ref) {
27
27
  jsx("div", {
28
28
  css: getEmailAvatarWrapperStyle(isLozenge)
29
29
  }, jsx(EmailIcon, {
30
- label: label,
30
+ testId: "add-option-avatar-email-icon",
31
+ label: label || "",
31
32
  LEGACY_size: isLozenge ? 'small' : 'medium',
32
33
  LEGACY_margin: "0 0 0 -2px",
33
34
  color: "var(--ds-text-subtle, ".concat(N500, ")")
@@ -15,14 +15,12 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
15
15
  * @jsx jsx
16
16
  */
17
17
  import React from 'react';
18
- import { FormattedMessage } from 'react-intl-next';
19
18
  import { Box, Inline, xcss } from '@atlaskit/primitives';
20
19
  import { components } from '@atlaskit/select';
21
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
21
  import { css, jsx } from '@emotion/react';
23
22
  import { AddOptionAvatar } from './AddOptionAvatar';
24
23
  import { SizeableAvatar } from './SizeableAvatar';
25
- import { messages } from './i18n';
26
24
  import { getAvatarUrl, isEmail, isGroup, isTeam } from './utils';
27
25
  import PeopleIcon from '@atlaskit/icon/core/migration/people-group--people';
28
26
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
@@ -56,18 +54,11 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
56
54
  _classCallCheck(this, MultiValue);
57
55
  _this = _super.call(this, props);
58
56
  _defineProperty(_assertThisInitialized(_this), "getElemBefore", function () {
59
- var _this$props = _this.props,
60
- data = _this$props.data.data,
61
- selectProps = _this$props.selectProps;
57
+ var data = _this.props.data.data;
62
58
  if (isEmail(data)) {
63
- return selectProps.emailLabel ? jsx(AddOptionAvatar, {
64
- isLozenge: true,
65
- label: selectProps.emailLabel
66
- }) : jsx(FormattedMessage, messages.addEmail, function (label) {
67
- return jsx(AddOptionAvatar, {
68
- isLozenge: true,
69
- label: label
70
- });
59
+ // This element is a decorative icon and does not require a label
60
+ return jsx(AddOptionAvatar, {
61
+ isLozenge: true
71
62
  });
72
63
  }
73
64
  if (isGroup(data)) {
@@ -76,7 +67,8 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
76
67
  }, jsx(PeopleIcon, {
77
68
  LEGACY_margin: "-2px 0 0 0",
78
69
  color: "currentColor",
79
- label: "group-icon",
70
+ label: "" // This element is a decorative icon and does not require a label
71
+ ,
80
72
  LEGACY_size: "small"
81
73
  }));
82
74
  }
@@ -109,12 +101,12 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
109
101
  }, {
110
102
  key: "shouldComponentUpdate",
111
103
  value: function shouldComponentUpdate(nextProps) {
112
- var _this$props2 = this.props,
113
- _this$props2$data = _this$props2.data,
114
- label = _this$props2$data.label,
115
- data = _this$props2$data.data,
116
- innerProps = _this$props2.innerProps,
117
- isFocused = _this$props2.isFocused;
104
+ var _this$props = this.props,
105
+ _this$props$data = _this$props.data,
106
+ label = _this$props$data.label,
107
+ data = _this$props$data.data,
108
+ innerProps = _this$props.innerProps,
109
+ isFocused = _this$props.isFocused;
118
110
  var _nextProps$data = nextProps.data,
119
111
  nextLabel = _nextProps$data.label,
120
112
  nextData = _nextProps$data.data,
@@ -128,10 +120,10 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
128
120
  }, {
129
121
  key: "render",
130
122
  value: function render() {
131
- var _this$props3 = this.props,
132
- children = _this$props3.children,
133
- innerProps = _this$props3.innerProps,
134
- rest = _objectWithoutProperties(_this$props3, _excluded);
123
+ var _this$props2 = this.props,
124
+ children = _this$props2.children,
125
+ innerProps = _this$props2.innerProps,
126
+ rest = _objectWithoutProperties(_this$props2, _excluded);
135
127
  return jsx(components.MultiValue, _extends({}, rest, {
136
128
  innerProps: {
137
129
  ref: this.containerRef
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export type AddOptionAvatarProps = {
3
- label: string;
3
+ label?: string;
4
4
  isLozenge?: boolean;
5
5
  };
6
6
  export declare const AddOptionAvatar: React.FunctionComponent<AddOptionAvatarProps>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export type AddOptionAvatarProps = {
3
- label: string;
3
+ label?: string;
4
4
  isLozenge?: boolean;
5
5
  };
6
6
  export declare const AddOptionAvatar: React.FunctionComponent<AddOptionAvatarProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "10.26.2",
3
+ "version": "10.26.3",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/icon": "^22.24.0",
52
52
  "@atlaskit/logo": "^14.3.0",
53
53
  "@atlaskit/lozenge": "^11.12.0",
54
- "@atlaskit/people-teams-ui-public": "^1.2.0",
54
+ "@atlaskit/people-teams-ui-public": "^1.3.0",
55
55
  "@atlaskit/platform-feature-flags": "^0.3.0",
56
56
  "@atlaskit/popper": "^6.3.0",
57
57
  "@atlaskit/primitives": "^12.2.0",