@atlaskit/profilecard 26.17.0 → 26.17.2

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,19 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 26.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f89e6f648b1fc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f89e6f648b1fc) -
8
+ Improve profile card accessibility
9
+ - Updated dependencies
10
+
11
+ ## 26.17.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 26.17.0
4
18
 
5
19
  ### Minor Changes
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
11
11
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
12
12
  var addHeaders = function addHeaders(headers) {
13
13
  headers.append('atl-client-name', "@atlaskit/profilecard");
14
- headers.append('atl-client-version', "26.16.4");
14
+ headers.append('atl-client-version', "26.17.1");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
66
66
  headers.append('X-ExperimentalApi', 'teams-beta');
67
67
  headers.append('X-ExperimentalApi', 'team-members-beta');
68
68
  headers.append('atl-client-name', "@atlaskit/profilecard");
69
- headers.append('atl-client-version', "26.16.4");
69
+ headers.append('atl-client-version', "26.17.1");
70
70
  return headers;
71
71
  };
72
72
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -44,9 +44,13 @@ var IconLabel = exports.default = /*#__PURE__*/function (_React$PureComponent) {
44
44
  label: "".concat(this.props.icon),
45
45
  color: "var(--ds-text-subtlest, #6B6E76)"
46
46
  }) : null;
47
+ var label = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Card.DetailsLabelIcon, null, displayIcon), /*#__PURE__*/_react.default.createElement(_Card.DetailsLabelText, null, this.props.children));
48
+ if (this.props.isDescriptionListItem) {
49
+ return label;
50
+ }
47
51
  return /*#__PURE__*/_react.default.createElement(_Card.DetailsLabel, {
48
52
  extraTopSpace: this.props.extraTopSpace
49
- }, /*#__PURE__*/_react.default.createElement(_Card.DetailsLabelIcon, null, displayIcon), /*#__PURE__*/_react.default.createElement(_Card.DetailsLabelText, null, this.props.children));
53
+ }, label);
50
54
  }
51
55
  }]);
52
56
  }(_react.default.PureComponent);
@@ -15,6 +15,7 @@ var _react = _interopRequireWildcard(require("react"));
15
15
  var _react2 = require("@compiled/react");
16
16
  var _reactIntl = require("react-intl");
17
17
  var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge/lozenge"));
18
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
18
19
  var _compiled = require("@atlaskit/primitives/compiled");
19
20
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
21
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
@@ -155,16 +156,21 @@ var ProfileCardDetails = exports.ProfileCardDetails = function ProfileCardDetail
155
156
  return /*#__PURE__*/_react.default.createElement(_Card.DetailsGroup, null, renderName(props.nickname, props.fullName, meta, nameRef, isRenderedInPortal, isTriggeredUsingKeyboard), meta && /*#__PURE__*/_react.default.createElement(_Card.JobTitleLabel, null, meta), meta && props.customLozenges && props.customLozenges.length > 0 ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
156
157
  paddingBlockStart: "space.150"
157
158
  }, lozenges) : lozenges, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
159
+ as: (0, _fg.fg)('ptc-a11y-42024-profilecard-details-list') ? 'dl' : 'div',
158
160
  xcss: styles.detailedListWrapperNext
159
161
  }, /*#__PURE__*/_react.default.createElement(_Icon.IconLabel, {
160
162
  icon: "email",
161
- extraTopSpace: true
163
+ extraTopSpace: true,
164
+ isDescriptionListItem: (0, _fg.fg)('ptc-a11y-42024-profilecard-details-list')
162
165
  }, props.email), /*#__PURE__*/_react.default.createElement(_Icon.IconLabel, {
163
- icon: "time"
166
+ icon: "time",
167
+ isDescriptionListItem: (0, _fg.fg)('ptc-a11y-42024-profilecard-details-list')
164
168
  }, props.timestring), /*#__PURE__*/_react.default.createElement(_Icon.IconLabel, {
165
- icon: "companyName"
169
+ icon: "companyName",
170
+ isDescriptionListItem: (0, _fg.fg)('ptc-a11y-42024-profilecard-details-list')
166
171
  }, props.companyName), /*#__PURE__*/_react.default.createElement(_Icon.IconLabel, {
167
- icon: "location"
172
+ icon: "location",
173
+ isDescriptionListItem: (0, _fg.fg)('ptc-a11y-42024-profilecard-details-list')
168
174
  }, props.location)), /*#__PURE__*/_react.default.createElement(_ReportingLinesDetails.default, {
169
175
  reportingLines: props.reportingLines,
170
176
  reportingLinesProfileUrl: props.reportingLinesProfileUrl,
@@ -12,7 +12,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
12
12
  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; }
13
13
  var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
14
14
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
15
- packageVersion: (_process$env$_PACKAGE2 = "26.16.4") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
15
+ packageVersion: (_process$env$_PACKAGE2 = "26.17.1") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
16
16
  };
17
17
  var TEAM_SUBJECT = 'teamProfileCard';
18
18
  var USER_SUBJECT = 'profilecard';
@@ -31,7 +31,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
31
31
  actionSubjectId: actionSubjectId,
32
32
  attributes: _objectSpread(_objectSpread({
33
33
  packageName: "@atlaskit/profilecard",
34
- packageVersion: "26.16.4"
34
+ packageVersion: "26.17.1"
35
35
  }, attributes), {}, {
36
36
  firedAt: Math.round((0, _performance.getPageTime)())
37
37
  })
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
6
6
  }`;
7
7
  const addHeaders = headers => {
8
8
  headers.append('atl-client-name', "@atlaskit/profilecard");
9
- headers.append('atl-client-version', "26.16.4");
9
+ headers.append('atl-client-version', "26.17.1");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -78,7 +78,7 @@ export const addHeaders = headers => {
78
78
  headers.append('X-ExperimentalApi', 'teams-beta');
79
79
  headers.append('X-ExperimentalApi', 'team-members-beta');
80
80
  headers.append('atl-client-name', "@atlaskit/profilecard");
81
- headers.append('atl-client-version', "26.16.4");
81
+ headers.append('atl-client-version', "26.17.1");
82
82
  return headers;
83
83
  };
84
84
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -23,9 +23,13 @@ export default class IconLabel extends React.PureComponent {
23
23
  label: `${this.props.icon}`,
24
24
  color: "var(--ds-text-subtlest, #6B6E76)"
25
25
  }) : null;
26
+ const label = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DetailsLabelIcon, null, displayIcon), /*#__PURE__*/React.createElement(DetailsLabelText, null, this.props.children));
27
+ if (this.props.isDescriptionListItem) {
28
+ return label;
29
+ }
26
30
  return /*#__PURE__*/React.createElement(DetailsLabel, {
27
31
  extraTopSpace: this.props.extraTopSpace
28
- }, /*#__PURE__*/React.createElement(DetailsLabelIcon, null, displayIcon), /*#__PURE__*/React.createElement(DetailsLabelText, null, this.props.children));
32
+ }, label);
29
33
  }
30
34
  }
31
35
  _defineProperty(IconLabel, "defaultProps", {
@@ -6,6 +6,7 @@ import React, { useRef } from 'react';
6
6
  import { cx } from '@compiled/react';
7
7
  import { FormattedMessage } from 'react-intl';
8
8
  import Lozenge from '@atlaskit/lozenge/lozenge';
9
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
9
10
  import { Box, Text } from '@atlaskit/primitives/compiled';
10
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  import Tooltip from '@atlaskit/tooltip';
@@ -149,16 +150,21 @@ export const ProfileCardDetails = props => {
149
150
  return /*#__PURE__*/React.createElement(DetailsGroup, null, renderName(props.nickname, props.fullName, meta, nameRef, isRenderedInPortal, isTriggeredUsingKeyboard), meta && /*#__PURE__*/React.createElement(JobTitleLabel, null, meta), meta && props.customLozenges && props.customLozenges.length > 0 ? /*#__PURE__*/React.createElement(Box, {
150
151
  paddingBlockStart: "space.150"
151
152
  }, lozenges) : lozenges, /*#__PURE__*/React.createElement(Box, {
153
+ as: fg('ptc-a11y-42024-profilecard-details-list') ? 'dl' : 'div',
152
154
  xcss: styles.detailedListWrapperNext
153
155
  }, /*#__PURE__*/React.createElement(IconLabel, {
154
156
  icon: "email",
155
- extraTopSpace: true
157
+ extraTopSpace: true,
158
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
156
159
  }, props.email), /*#__PURE__*/React.createElement(IconLabel, {
157
- icon: "time"
160
+ icon: "time",
161
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
158
162
  }, props.timestring), /*#__PURE__*/React.createElement(IconLabel, {
159
- icon: "companyName"
163
+ icon: "companyName",
164
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
160
165
  }, props.companyName), /*#__PURE__*/React.createElement(IconLabel, {
161
- icon: "location"
166
+ icon: "location",
167
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
162
168
  }, props.location)), /*#__PURE__*/React.createElement(ReportingLinesDetails, {
163
169
  reportingLines: props.reportingLines,
164
170
  reportingLinesProfileUrl: props.reportingLinesProfileUrl,
@@ -2,7 +2,7 @@ var _process$env$_PACKAGE, _process$env$_PACKAGE2;
2
2
  import { getPageTime } from './performance';
3
3
  export const PACKAGE_META_DATA = {
4
4
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
5
- packageVersion: (_process$env$_PACKAGE2 = "26.16.4") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
5
+ packageVersion: (_process$env$_PACKAGE2 = "26.17.1") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
6
6
  };
7
7
  const TEAM_SUBJECT = 'teamProfileCard';
8
8
  const USER_SUBJECT = 'profilecard';
@@ -19,7 +19,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
19
19
  actionSubjectId,
20
20
  attributes: {
21
21
  packageName: "@atlaskit/profilecard",
22
- packageVersion: "26.16.4",
22
+ packageVersion: "26.17.1",
23
23
  ...attributes,
24
24
  firedAt: Math.round(getPageTime())
25
25
  }
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
4
4
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
5
5
  var addHeaders = function addHeaders(headers) {
6
6
  headers.append('atl-client-name', "@atlaskit/profilecard");
7
- headers.append('atl-client-version', "26.16.4");
7
+ headers.append('atl-client-version', "26.17.1");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -59,7 +59,7 @@ export var addHeaders = function addHeaders(headers) {
59
59
  headers.append('X-ExperimentalApi', 'teams-beta');
60
60
  headers.append('X-ExperimentalApi', 'team-members-beta');
61
61
  headers.append('atl-client-name', "@atlaskit/profilecard");
62
- headers.append('atl-client-version', "26.16.4");
62
+ headers.append('atl-client-version', "26.17.1");
63
63
  return headers;
64
64
  };
65
65
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -37,9 +37,13 @@ var IconLabel = /*#__PURE__*/function (_React$PureComponent) {
37
37
  label: "".concat(this.props.icon),
38
38
  color: "var(--ds-text-subtlest, #6B6E76)"
39
39
  }) : null;
40
+ var label = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DetailsLabelIcon, null, displayIcon), /*#__PURE__*/React.createElement(DetailsLabelText, null, this.props.children));
41
+ if (this.props.isDescriptionListItem) {
42
+ return label;
43
+ }
40
44
  return /*#__PURE__*/React.createElement(DetailsLabel, {
41
45
  extraTopSpace: this.props.extraTopSpace
42
- }, /*#__PURE__*/React.createElement(DetailsLabelIcon, null, displayIcon), /*#__PURE__*/React.createElement(DetailsLabelText, null, this.props.children));
46
+ }, label);
43
47
  }
44
48
  }]);
45
49
  }(React.PureComponent);
@@ -8,6 +8,7 @@ import React, { useRef } from 'react';
8
8
  import { cx } from '@compiled/react';
9
9
  import { FormattedMessage } from 'react-intl';
10
10
  import Lozenge from '@atlaskit/lozenge/lozenge';
11
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
12
  import { Box, Text } from '@atlaskit/primitives/compiled';
12
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
14
  import Tooltip from '@atlaskit/tooltip';
@@ -146,16 +147,21 @@ export var ProfileCardDetails = function ProfileCardDetails(props) {
146
147
  return /*#__PURE__*/React.createElement(DetailsGroup, null, renderName(props.nickname, props.fullName, meta, nameRef, isRenderedInPortal, isTriggeredUsingKeyboard), meta && /*#__PURE__*/React.createElement(JobTitleLabel, null, meta), meta && props.customLozenges && props.customLozenges.length > 0 ? /*#__PURE__*/React.createElement(Box, {
147
148
  paddingBlockStart: "space.150"
148
149
  }, lozenges) : lozenges, /*#__PURE__*/React.createElement(Box, {
150
+ as: fg('ptc-a11y-42024-profilecard-details-list') ? 'dl' : 'div',
149
151
  xcss: styles.detailedListWrapperNext
150
152
  }, /*#__PURE__*/React.createElement(IconLabel, {
151
153
  icon: "email",
152
- extraTopSpace: true
154
+ extraTopSpace: true,
155
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
153
156
  }, props.email), /*#__PURE__*/React.createElement(IconLabel, {
154
- icon: "time"
157
+ icon: "time",
158
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
155
159
  }, props.timestring), /*#__PURE__*/React.createElement(IconLabel, {
156
- icon: "companyName"
160
+ icon: "companyName",
161
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
157
162
  }, props.companyName), /*#__PURE__*/React.createElement(IconLabel, {
158
- icon: "location"
163
+ icon: "location",
164
+ isDescriptionListItem: fg('ptc-a11y-42024-profilecard-details-list')
159
165
  }, props.location)), /*#__PURE__*/React.createElement(ReportingLinesDetails, {
160
166
  reportingLines: props.reportingLines,
161
167
  reportingLinesProfileUrl: props.reportingLinesProfileUrl,
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { getPageTime } from './performance';
6
6
  export var PACKAGE_META_DATA = {
7
7
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
8
- packageVersion: (_process$env$_PACKAGE2 = "26.16.4") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
8
+ packageVersion: (_process$env$_PACKAGE2 = "26.17.1") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
9
9
  };
10
10
  var TEAM_SUBJECT = 'teamProfileCard';
11
11
  var USER_SUBJECT = 'profilecard';
@@ -24,7 +24,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
24
24
  actionSubjectId: actionSubjectId,
25
25
  attributes: _objectSpread(_objectSpread({
26
26
  packageName: "@atlaskit/profilecard",
27
- packageVersion: "26.16.4"
27
+ packageVersion: "26.17.1"
28
28
  }, attributes), {}, {
29
29
  firedAt: Math.round(getPageTime())
30
30
  })
@@ -3,6 +3,7 @@ type Props = {
3
3
  icon: string;
4
4
  children?: React.ReactNode;
5
5
  extraTopSpace?: boolean;
6
+ isDescriptionListItem?: boolean;
6
7
  };
7
8
  export default class IconLabel extends React.PureComponent<Props> {
8
9
  static defaultProps: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "26.17.0",
3
+ "version": "26.17.2",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/dropdown-menu": "^18.0.0",
48
48
  "@atlaskit/empty-state": "^12.0.0",
49
49
  "@atlaskit/feature-gate-js-client": "^6.0.0",
50
- "@atlaskit/give-kudos": "^6.12.0",
50
+ "@atlaskit/give-kudos": "^6.13.0",
51
51
  "@atlaskit/heading": "^7.0.0",
52
52
  "@atlaskit/icon": "^37.3.0",
53
53
  "@atlaskit/link": "5.0.0",
@@ -60,7 +60,7 @@
60
60
  "@atlaskit/primitives": "^22.2.0",
61
61
  "@atlaskit/react-compiler-gating": "^0.2.0",
62
62
  "@atlaskit/rovo-agent-components": "^8.3.0",
63
- "@atlaskit/rovo-triggers": "^10.7.0",
63
+ "@atlaskit/rovo-triggers": "^10.11.0",
64
64
  "@atlaskit/spinner": "^20.1.0",
65
65
  "@atlaskit/teams-app-config": "^2.2.0",
66
66
  "@atlaskit/teams-app-internal-analytics": "^2.3.0",
@@ -68,11 +68,11 @@
68
68
  "@atlaskit/teams-avatar": "^4.1.0",
69
69
  "@atlaskit/teams-public": "^2.7.0",
70
70
  "@atlaskit/theme": "^28.0.0",
71
- "@atlaskit/tmp-editor-statsig": "^146.0.0",
72
- "@atlaskit/tokens": "^16.6.0",
71
+ "@atlaskit/tmp-editor-statsig": "^147.0.0",
72
+ "@atlaskit/tokens": "^16.7.0",
73
73
  "@atlaskit/tooltip": "^24.0.0",
74
74
  "@babel/runtime": "^7.0.0",
75
- "@compiled/react": "^1.0.0",
75
+ "@compiled/react": "^1.0.2",
76
76
  "date-fns": "^2.17.0",
77
77
  "date-fns-tz": "^2.0.0",
78
78
  "graphql": "^15.8.0",
@@ -126,6 +126,9 @@
126
126
  "manual-studio-entry-link": {
127
127
  "type": "boolean"
128
128
  },
129
+ "ptc-a11y-42024-profilecard-details-list": {
130
+ "type": "boolean"
131
+ },
129
132
  "enable_ptc_townsquare_reporting_lines_unsharded": {
130
133
  "type": "boolean"
131
134
  },