@atlaskit/profilecard 23.7.5 → 23.7.7

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,23 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 23.7.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#131544](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131544)
8
+ [`302f011a91ef3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/302f011a91ef3) -
9
+ a11y fix added labels to profile card buttons
10
+ - Updated dependencies
11
+
12
+ ## 23.7.6
13
+
14
+ ### Patch Changes
15
+
16
+ - [#134630](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134630)
17
+ [`b76e2126fff89`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b76e2126fff89) -
18
+ Header Structure a11y fix in profile card
19
+ - Updated dependencies
20
+
3
21
  ## 23.7.5
4
22
 
5
23
  ### Patch 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', "23.7.5");
14
+ headers.append('atl-client-version', "23.7.7");
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', "23.7.5");
69
+ headers.append('atl-client-version', "23.7.7");
70
70
  return headers;
71
71
  };
72
72
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -180,7 +180,9 @@ var Actions = function Actions(_ref) {
180
180
  return onActionClick(action, args, event, index);
181
181
  },
182
182
  href: action.link || '',
183
- autoFocus: index === 0 && isTriggeredUsingKeyboard
183
+ autoFocus: index === 0 && isTriggeredUsingKeyboard,
184
+ id: "action-button-".concat(action.id),
185
+ "aria-labelledby": (0, _platformFeatureFlags.fg)('enable_userprofilecard_arialabelfix') ? "action-button-".concat(action.id, " profilecard-name-label") : ''
184
186
  }, action.label, isKudos && /*#__PURE__*/_react.default.createElement(_Card.AnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_Card.KudosBlobAnimation, null))) : /*#__PURE__*/_react.default.createElement(_button.default, {
185
187
  appearance: "default",
186
188
  key: action.id || index,
@@ -13,6 +13,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
13
13
  var _react = _interopRequireDefault(require("react"));
14
14
  var _styled = _interopRequireDefault(require("@emotion/styled"));
15
15
  var _css = require("@atlaskit/css");
16
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
16
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _compiled = require("@atlaskit/primitives/compiled");
18
19
  var _colors = require("@atlaskit/theme/colors");
@@ -118,7 +119,13 @@ var CardContentLegacy = _styled.default.div({
118
119
  minHeight: '104px'
119
120
  });
120
121
  var TeamName = exports.TeamName = function TeamName(props) {
121
- return (0, _platformFeatureFlags.fg)('compiled-migration-profilecard') ? /*#__PURE__*/_react.default.createElement(_compiled.Box, (0, _extends2.default)({
122
+ return (0, _platformFeatureFlags.fg)('compiled-migration-profilecard') ? (0, _platformFeatureFlags.fg)('enable_profilecard_h2tag_a11y_fix') ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
123
+ xcss: (0, _css.cx)(styles.teamname)
124
+ }, /*#__PURE__*/_react.default.createElement(_heading.default, {
125
+ size: "medium",
126
+ as: "h2",
127
+ children: props.children
128
+ })) : /*#__PURE__*/_react.default.createElement(_compiled.Box, (0, _extends2.default)({
122
129
  xcss: (0, _css.cx)(styles.teamname)
123
130
  }, props)) : /*#__PURE__*/_react.default.createElement(TeamNameLegacy, props);
124
131
  };
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
45
45
  actionSubjectId: actionSubjectId,
46
46
  attributes: _objectSpread(_objectSpread({
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "23.7.5"
48
+ packageVersion: "23.7.7"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })
@@ -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', "23.7.5");
9
+ headers.append('atl-client-version', "23.7.7");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -75,7 +75,7 @@ export const addHeaders = headers => {
75
75
  headers.append('X-ExperimentalApi', 'teams-beta');
76
76
  headers.append('X-ExperimentalApi', 'team-members-beta');
77
77
  headers.append('atl-client-name', "@atlaskit/profilecard");
78
- headers.append('atl-client-version', "23.7.5");
78
+ headers.append('atl-client-version', "23.7.7");
79
79
  return headers;
80
80
  };
81
81
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -161,7 +161,9 @@ const Actions = ({
161
161
  key: action.id || index,
162
162
  onClick: (event, ...args) => onActionClick(action, args, event, index),
163
163
  href: action.link || '',
164
- autoFocus: index === 0 && isTriggeredUsingKeyboard
164
+ autoFocus: index === 0 && isTriggeredUsingKeyboard,
165
+ id: `action-button-${action.id}`,
166
+ "aria-labelledby": fg('enable_userprofilecard_arialabelfix') ? `action-button-${action.id} profilecard-name-label` : ''
165
167
  }, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(ButtonLegacy, {
166
168
  appearance: "default",
167
169
  key: action.id || index,
@@ -7,6 +7,7 @@ import React from 'react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import styled from '@emotion/styled';
9
9
  import { cx } from '@atlaskit/css';
10
+ import Heading from '@atlaskit/heading';
10
11
  import { fg } from '@atlaskit/platform-feature-flags';
11
12
  import { Box, Text } from '@atlaskit/primitives/compiled';
12
13
  import { N20, N200 } from '@atlaskit/theme/colors';
@@ -106,7 +107,13 @@ const CardContentLegacy = styled.div({
106
107
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
107
108
  minHeight: '104px'
108
109
  });
109
- export const TeamName = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
110
+ export const TeamName = props => fg('compiled-migration-profilecard') ? fg('enable_profilecard_h2tag_a11y_fix') ? /*#__PURE__*/React.createElement(Box, {
111
+ xcss: cx(styles.teamname)
112
+ }, /*#__PURE__*/React.createElement(Heading, {
113
+ size: "medium",
114
+ as: "h2",
115
+ children: props.children
116
+ })) : /*#__PURE__*/React.createElement(Box, _extends({
110
117
  xcss: cx(styles.teamname)
111
118
  }, props)) : /*#__PURE__*/React.createElement(TeamNameLegacy, props);
112
119
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "23.7.5",
35
+ packageVersion: "23.7.7",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -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', "23.7.5");
7
+ headers.append('atl-client-version', "23.7.7");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -57,7 +57,7 @@ export var addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "23.7.5");
60
+ headers.append('atl-client-version', "23.7.7");
61
61
  return headers;
62
62
  };
63
63
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -170,7 +170,9 @@ var Actions = function Actions(_ref) {
170
170
  return onActionClick(action, args, event, index);
171
171
  },
172
172
  href: action.link || '',
173
- autoFocus: index === 0 && isTriggeredUsingKeyboard
173
+ autoFocus: index === 0 && isTriggeredUsingKeyboard,
174
+ id: "action-button-".concat(action.id),
175
+ "aria-labelledby": fg('enable_userprofilecard_arialabelfix') ? "action-button-".concat(action.id, " profilecard-name-label") : ''
174
176
  }, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(ButtonLegacy, {
175
177
  appearance: "default",
176
178
  key: action.id || index,
@@ -9,6 +9,7 @@ import React from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import styled from '@emotion/styled';
11
11
  import { cx } from '@atlaskit/css';
12
+ import Heading from '@atlaskit/heading';
12
13
  import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { Box, Text } from '@atlaskit/primitives/compiled';
14
15
  import { N20, N200 } from '@atlaskit/theme/colors';
@@ -113,7 +114,13 @@ var CardContentLegacy = styled.div({
113
114
  minHeight: '104px'
114
115
  });
115
116
  export var TeamName = function TeamName(props) {
116
- return fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
117
+ return fg('compiled-migration-profilecard') ? fg('enable_profilecard_h2tag_a11y_fix') ? /*#__PURE__*/React.createElement(Box, {
118
+ xcss: cx(styles.teamname)
119
+ }, /*#__PURE__*/React.createElement(Heading, {
120
+ size: "medium",
121
+ as: "h2",
122
+ children: props.children
123
+ })) : /*#__PURE__*/React.createElement(Box, _extends({
117
124
  xcss: cx(styles.teamname)
118
125
  }, props)) : /*#__PURE__*/React.createElement(TeamNameLegacy, props);
119
126
  };
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
39
39
  actionSubjectId: actionSubjectId,
40
40
  attributes: _objectSpread(_objectSpread({
41
41
  packageName: "@atlaskit/profilecard",
42
- packageVersion: "23.7.5"
42
+ packageVersion: "23.7.7"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "23.7.5",
3
+ "version": "23.7.7",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -54,29 +54,29 @@
54
54
  "@atlaskit/atlassian-context": "^0.2.0",
55
55
  "@atlaskit/avatar": "^25.0.0",
56
56
  "@atlaskit/avatar-group": "^12.0.0",
57
- "@atlaskit/button": "^22.0.0",
57
+ "@atlaskit/button": "^23.0.0",
58
58
  "@atlaskit/css": "^0.10.0",
59
59
  "@atlaskit/dropdown-menu": "^14.0.0",
60
60
  "@atlaskit/empty-state": "^9.0.0",
61
61
  "@atlaskit/focus-ring": "^3.0.0",
62
62
  "@atlaskit/give-kudos": "^4.0.0",
63
63
  "@atlaskit/heading": "^5.1.0",
64
- "@atlaskit/icon": "^25.3.0",
64
+ "@atlaskit/icon": "^25.4.0",
65
65
  "@atlaskit/logo": "^16.0.0",
66
66
  "@atlaskit/lozenge": "^12.2.0",
67
67
  "@atlaskit/menu": "^3.2.0",
68
- "@atlaskit/modal-dialog": "^14.0.0",
68
+ "@atlaskit/modal-dialog": "^14.1.0",
69
69
  "@atlaskit/people-teams-ui-public": "^3.1.0",
70
70
  "@atlaskit/platform-feature-flags": "^1.1.0",
71
71
  "@atlaskit/popup": "^3.0.0",
72
- "@atlaskit/primitives": "^14.2.0",
72
+ "@atlaskit/primitives": "^14.3.0",
73
73
  "@atlaskit/rovo-agent-components": "^2.3.0",
74
74
  "@atlaskit/rovo-triggers": "^2.9.0",
75
75
  "@atlaskit/spinner": "^18.0.0",
76
76
  "@atlaskit/teams-avatar": "^2.3.0",
77
77
  "@atlaskit/teams-public": "^0.23.0",
78
78
  "@atlaskit/theme": "^18.0.0",
79
- "@atlaskit/tokens": "^4.5.0",
79
+ "@atlaskit/tokens": "^4.6.0",
80
80
  "@atlaskit/tooltip": "^20.0.0",
81
81
  "@babel/runtime": "^7.0.0",
82
82
  "@compiled/react": "^0.18.3",
@@ -159,6 +159,12 @@
159
159
  },
160
160
  "enable_team_profilecard_toggletip_a11y_fix": {
161
161
  "type": "boolean"
162
+ },
163
+ "enable_profilecard_h2tag_a11y_fix": {
164
+ "type": "boolean"
165
+ },
166
+ "enable_userprofilecard_arialabelfix": {
167
+ "type": "boolean"
162
168
  }
163
169
  },
164
170
  "sideEffects": [