@atlaskit/profilecard 26.24.10 → 26.24.12

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
+ ## 26.24.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 26.24.11
10
+
11
+ ### Patch Changes
12
+
13
+ - [`df79b6d67b5e8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df79b6d67b5e8) -
14
+ Omit aria-haspopup from the non-interactive hover wrapper under teams_a11y_user_profilecard. Honor
15
+ fullWidthTrigger and ariaHideProfileTrigger independently so full-width child controls can own
16
+ hover-trigger semantics.
17
+
18
+ Handle keyboard activation on keydown when a legacy hover card wraps a child control with
19
+ disabledAriaAttributes, preventing Space from also activating that child's navigation.
20
+
3
21
  ## 26.24.10
4
22
 
5
23
  ### Patch Changes
@@ -11,6 +11,6 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
11
11
  headers.append('X-ExperimentalApi', 'teams-beta');
12
12
  headers.append('X-ExperimentalApi', 'team-members-beta');
13
13
  headers.append('atl-client-name', "@atlaskit/profilecard");
14
- headers.append('atl-client-version', "26.24.9");
14
+ headers.append('atl-client-version', "26.24.11");
15
15
  return headers;
16
16
  };
@@ -11,7 +11,7 @@ var _AGGQuery = require("./AGGQuery");
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.24.9");
14
+ headers.append('atl-client-version', "26.24.11");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -340,16 +340,19 @@ function ProfilecardTriggerNext(_ref2) {
340
340
  }
341
341
  }, [hideProfilecard, propsIsVisible, showProfilecard]);
342
342
  var containerListeners = (0, _react.useMemo)(function () {
343
- return trigger === 'hover' ? {
343
+ return trigger === 'hover' ? _objectSpread({
344
344
  onMouseEnter: onMouseEnter,
345
345
  onMouseLeave: hideProfilecard,
346
- onBlur: hideProfilecard,
347
- onKeyPress: onKeyPress
346
+ onBlur: hideProfilecard
347
+ }, disabledAriaAttributes ? {
348
+ onKeyDown: onKeyPress
348
349
  } : {
350
+ onKeyPress: onKeyPress
351
+ }) : {
349
352
  onClick: onClick,
350
353
  onKeyPress: onKeyPress
351
354
  };
352
- }, [hideProfilecard, onClick, onKeyPress, onMouseEnter, trigger]);
355
+ }, [disabledAriaAttributes, hideProfilecard, onClick, onKeyPress, onMouseEnter, trigger]);
353
356
  var filterActions = (0, _react.useCallback)(function () {
354
357
  return (0, _filterActions.default)(actions, data);
355
358
  }, [actions, data]);
@@ -7,7 +7,7 @@ exports.USER_SUBJECT = exports.TEAM_SUBJECT = exports.PACKAGE_META_DATA = export
7
7
  var _process$env$_PACKAGE, _process$env$_PACKAGE2;
8
8
  var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
9
9
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
10
- packageVersion: (_process$env$_PACKAGE2 = "26.24.9") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
10
+ packageVersion: (_process$env$_PACKAGE2 = "26.24.11") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
11
11
  };
12
12
  var TEAM_SUBJECT = exports.TEAM_SUBJECT = 'teamProfileCard';
13
13
  var USER_SUBJECT = exports.USER_SUBJECT = 'profilecard';
@@ -22,7 +22,7 @@ var createEvent = exports.createEvent = function createEvent(eventType, action,
22
22
  actionSubjectId: actionSubjectId,
23
23
  attributes: _objectSpread(_objectSpread({
24
24
  packageName: "@atlaskit/profilecard",
25
- packageVersion: "26.24.9"
25
+ packageVersion: "26.24.11"
26
26
  }, attributes), {}, {
27
27
  firedAt: Math.round((0, _performance.getPageTime)())
28
28
  })
@@ -5,6 +5,6 @@ export const addHeaders = headers => {
5
5
  headers.append('X-ExperimentalApi', 'teams-beta');
6
6
  headers.append('X-ExperimentalApi', 'team-members-beta');
7
7
  headers.append('atl-client-name', "@atlaskit/profilecard");
8
- headers.append('atl-client-version', "26.24.9");
8
+ headers.append('atl-client-version', "26.24.11");
9
9
  return headers;
10
10
  };
@@ -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.24.9");
9
+ headers.append('atl-client-version', "26.24.11");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -277,11 +277,17 @@ export default function ProfilecardTriggerNext({
277
277
  onMouseEnter: onMouseEnter,
278
278
  onMouseLeave: hideProfilecard,
279
279
  onBlur: hideProfilecard,
280
- onKeyPress: onKeyPress
280
+ // A child button activates Space on keyup. Prevent its keydown default before
281
+ // that click can navigate as well as opening the profile card.
282
+ ...(disabledAriaAttributes ? {
283
+ onKeyDown: onKeyPress
284
+ } : {
285
+ onKeyPress
286
+ })
281
287
  } : {
282
288
  onClick: onClick,
283
289
  onKeyPress: onKeyPress
284
- }, [hideProfilecard, onClick, onKeyPress, onMouseEnter, trigger]);
290
+ }, [disabledAriaAttributes, hideProfilecard, onClick, onKeyPress, onMouseEnter, trigger]);
285
291
  const filterActions = useCallback(() => {
286
292
  return filterActionsInner(actions, data);
287
293
  }, [actions, data]);
@@ -1,7 +1,7 @@
1
1
  var _process$env$_PACKAGE, _process$env$_PACKAGE2;
2
2
  export const PACKAGE_META_DATA = {
3
3
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
4
- packageVersion: (_process$env$_PACKAGE2 = "26.24.9") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
4
+ packageVersion: (_process$env$_PACKAGE2 = "26.24.11") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
5
5
  };
6
6
  export const TEAM_SUBJECT = 'teamProfileCard';
7
7
  export const USER_SUBJECT = 'profilecard';
@@ -11,7 +11,7 @@ export const createEvent = (eventType, action, actionSubject, actionSubjectId, a
11
11
  actionSubjectId,
12
12
  attributes: {
13
13
  packageName: "@atlaskit/profilecard",
14
- packageVersion: "26.24.9",
14
+ packageVersion: "26.24.11",
15
15
  ...attributes,
16
16
  firedAt: Math.round(getPageTime())
17
17
  }
@@ -5,6 +5,6 @@ export var addHeaders = function addHeaders(headers) {
5
5
  headers.append('X-ExperimentalApi', 'teams-beta');
6
6
  headers.append('X-ExperimentalApi', 'team-members-beta');
7
7
  headers.append('atl-client-name', "@atlaskit/profilecard");
8
- headers.append('atl-client-version', "26.24.9");
8
+ headers.append('atl-client-version', "26.24.11");
9
9
  return headers;
10
10
  };
@@ -4,7 +4,7 @@ import { AGGQuery } from './AGGQuery';
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.24.9");
7
+ headers.append('atl-client-version', "26.24.11");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -331,16 +331,19 @@ export default function ProfilecardTriggerNext(_ref2) {
331
331
  }
332
332
  }, [hideProfilecard, propsIsVisible, showProfilecard]);
333
333
  var containerListeners = useMemo(function () {
334
- return trigger === 'hover' ? {
334
+ return trigger === 'hover' ? _objectSpread({
335
335
  onMouseEnter: onMouseEnter,
336
336
  onMouseLeave: hideProfilecard,
337
- onBlur: hideProfilecard,
338
- onKeyPress: onKeyPress
337
+ onBlur: hideProfilecard
338
+ }, disabledAriaAttributes ? {
339
+ onKeyDown: onKeyPress
339
340
  } : {
341
+ onKeyPress: onKeyPress
342
+ }) : {
340
343
  onClick: onClick,
341
344
  onKeyPress: onKeyPress
342
345
  };
343
- }, [hideProfilecard, onClick, onKeyPress, onMouseEnter, trigger]);
346
+ }, [disabledAriaAttributes, hideProfilecard, onClick, onKeyPress, onMouseEnter, trigger]);
344
347
  var filterActions = useCallback(function () {
345
348
  return filterActionsInner(actions, data);
346
349
  }, [actions, data]);
@@ -1,7 +1,7 @@
1
1
  var _process$env$_PACKAGE, _process$env$_PACKAGE2;
2
2
  export var PACKAGE_META_DATA = {
3
3
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
4
- packageVersion: (_process$env$_PACKAGE2 = "26.24.9") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
4
+ packageVersion: (_process$env$_PACKAGE2 = "26.24.11") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
5
5
  };
6
6
  export var TEAM_SUBJECT = 'teamProfileCard';
7
7
  export var USER_SUBJECT = 'profilecard';
@@ -16,7 +16,7 @@ export var createEvent = function createEvent(eventType, action, actionSubject,
16
16
  actionSubjectId: actionSubjectId,
17
17
  attributes: _objectSpread(_objectSpread({
18
18
  packageName: "@atlaskit/profilecard",
19
- packageVersion: "26.24.9"
19
+ packageVersion: "26.24.11"
20
20
  }, attributes), {}, {
21
21
  firedAt: Math.round(getPageTime())
22
22
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "26.24.10",
3
+ "version": "26.24.12",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/atlassian-context": "^1.2.0",
46
46
  "@atlaskit/avatar": "^28.0.0",
47
47
  "@atlaskit/avatar-group": "^14.3.0",
48
- "@atlaskit/button": "^25.3.0",
48
+ "@atlaskit/button": "^25.4.0",
49
49
  "@atlaskit/css": "^1.1.0",
50
50
  "@atlaskit/dropdown-menu": "^18.3.0",
51
51
  "@atlaskit/empty-state": "^12.2.0",
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/teams-avatar": "^4.1.0",
72
72
  "@atlaskit/teams-public": "^2.12.0",
73
73
  "@atlaskit/theme": "^28.2.0",
74
- "@atlaskit/tmp-editor-statsig": "^201.0.0",
74
+ "@atlaskit/tmp-editor-statsig": "^202.0.0",
75
75
  "@atlaskit/tokens": "^18.2.0",
76
76
  "@atlaskit/tooltip": "^24.3.0",
77
77
  "@babel/runtime": "^7.0.0",