@atlaskit/profilecard 15.7.1 → 16.0.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 (50) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/cjs/client/UserProfileCardClient.js +1 -1
  3. package/dist/cjs/client/index.js +1 -1
  4. package/dist/cjs/components/Error/ErrorIllustration.js +4 -1
  5. package/dist/cjs/components/Team/TeamProfileCard.js +5 -5
  6. package/dist/cjs/components/User/ProfileCard.js +9 -7
  7. package/dist/cjs/components/User/index.js +4 -4
  8. package/dist/cjs/i18n/index.js +22 -22
  9. package/dist/cjs/index.js +23 -23
  10. package/dist/cjs/internal/relative-date.js +1 -1
  11. package/dist/cjs/messages.js +2 -2
  12. package/dist/cjs/mocks/simple-mock-clients.js +1 -1
  13. package/dist/cjs/mocks/util.js +1 -1
  14. package/dist/cjs/styled/Card.js +2 -4
  15. package/dist/cjs/styled/Error.js +4 -2
  16. package/dist/cjs/styled/TeamCard.js +6 -4
  17. package/dist/cjs/styled/constants.js +35 -28
  18. package/dist/cjs/util/analytics.js +2 -2
  19. package/dist/cjs/util/config.js +1 -1
  20. package/dist/cjs/version.json +1 -1
  21. package/dist/es2019/components/Error/ErrorIllustration.js +3 -1
  22. package/dist/es2019/components/Team/TeamProfileCard.js +1 -1
  23. package/dist/es2019/components/User/ProfileCard.js +3 -2
  24. package/dist/es2019/i18n/index.js +10 -10
  25. package/dist/es2019/messages.js +1 -1
  26. package/dist/es2019/styled/Card.js +2 -3
  27. package/dist/es2019/styled/Error.js +2 -1
  28. package/dist/es2019/styled/TeamCard.js +4 -3
  29. package/dist/es2019/styled/constants.js +31 -26
  30. package/dist/es2019/util/analytics.js +1 -1
  31. package/dist/es2019/version.json +1 -1
  32. package/dist/esm/components/Error/ErrorIllustration.js +3 -1
  33. package/dist/esm/components/Team/TeamProfileCard.js +1 -1
  34. package/dist/esm/components/User/ProfileCard.js +3 -2
  35. package/dist/esm/i18n/index.js +10 -10
  36. package/dist/esm/messages.js +1 -1
  37. package/dist/esm/styled/Card.js +2 -3
  38. package/dist/esm/styled/Error.js +2 -1
  39. package/dist/esm/styled/TeamCard.js +4 -3
  40. package/dist/esm/styled/constants.js +31 -26
  41. package/dist/esm/util/analytics.js +1 -1
  42. package/dist/esm/version.json +1 -1
  43. package/dist/types/components/Error/ErrorIllustration.d.ts +1 -0
  44. package/dist/types/components/Team/TeamLoadingState.d.ts +1 -0
  45. package/dist/types/components/Team/TeamProfileCard.d.ts +1 -0
  46. package/dist/types/components/User/UserLoadingState.d.ts +1 -0
  47. package/dist/types/i18n/index.d.ts +10 -10
  48. package/dist/types/styled/constants.d.ts +14 -13
  49. package/dist/types/types.d.ts +1 -1
  50. package/package.json +10 -6
@@ -5,78 +5,85 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.errorTextColor = exports.errorTitleColor = exports.errorIconColor = exports.labelIconColor = exports.labelTextColor = exports.appLabelTextColor = exports.appLabelBgColor = exports.headerTextColorInactive = exports.headerTextColor = exports.headerBgColorDisabledUser = exports.teamHeaderBgColor = exports.headerBgColor = exports.bgColor = void 0;
8
+ exports.teamHeaderBgColor = exports.labelTextColor = exports.labelIconColor = exports.headerTextColorInactive = exports.headerTextColor = exports.headerBgColorDisabledUser = exports.headerBgColor = exports.errorTitleColor = exports.errorTextColor = exports.errorIconColor = exports.boxShadow = exports.bgColor = exports.appLabelTextColor = exports.appLabelBgColor = void 0;
9
9
 
10
10
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
11
11
 
12
12
  var _components = require("@atlaskit/theme/components");
13
13
 
14
+ var _tokens = require("@atlaskit/tokens");
15
+
14
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
17
 
16
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
19
 
18
20
  var bgColor = (0, _components.themed)({
19
- light: colors.N0,
20
- dark: colors.DN50
21
+ light: (0, _tokens.token)('color.background.overlay', colors.N0),
22
+ dark: (0, _tokens.token)('color.background.overlay', colors.DN50)
21
23
  });
22
24
  exports.bgColor = bgColor;
23
25
  var headerBgColor = (0, _components.themed)({
24
- light: colors.B500,
25
- dark: colors.B100
26
+ light: (0, _tokens.token)('color.background.boldBrand.resting', colors.B500),
27
+ dark: (0, _tokens.token)('color.background.boldBrand.resting', colors.B100)
26
28
  });
27
29
  exports.headerBgColor = headerBgColor;
28
30
  var teamHeaderBgColor = (0, _components.themed)({
29
- light: colors.N50,
30
- dark: colors.N50
31
+ light: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.N50),
32
+ dark: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.N50)
31
33
  });
32
34
  exports.teamHeaderBgColor = teamHeaderBgColor;
33
35
  var headerBgColorDisabledUser = (0, _components.themed)({
34
- light: colors.N30,
35
- dark: colors.B100
36
+ light: (0, _tokens.token)('color.background.disabled', colors.N30),
37
+ dark: (0, _tokens.token)('color.background.disabled', colors.B100)
36
38
  });
37
39
  exports.headerBgColorDisabledUser = headerBgColorDisabledUser;
38
40
  var headerTextColor = (0, _components.themed)({
39
- light: colors.N0,
40
- dark: colors.N0
41
+ light: (0, _tokens.token)('color.text.onBold', colors.N0),
42
+ dark: (0, _tokens.token)('color.text.onBold', colors.N0)
41
43
  });
42
44
  exports.headerTextColor = headerTextColor;
43
45
  var headerTextColorInactive = (0, _components.themed)({
44
- light: colors.N800,
45
- dark: colors.N0
46
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.N800),
47
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.N0)
46
48
  });
47
49
  exports.headerTextColorInactive = headerTextColorInactive;
48
50
  var appLabelBgColor = (0, _components.themed)({
49
- light: colors.N20,
50
- dark: colors.N20
51
+ light: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.N20),
52
+ dark: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.N20)
51
53
  });
52
54
  exports.appLabelBgColor = appLabelBgColor;
53
55
  var appLabelTextColor = (0, _components.themed)({
54
- light: colors.N500,
55
- dark: colors.N500
56
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.N500),
57
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.N500)
56
58
  });
57
59
  exports.appLabelTextColor = appLabelTextColor;
58
60
  var labelTextColor = (0, _components.themed)({
59
- light: colors.N800,
60
- dark: colors.DN900
61
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.N800),
62
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.DN900)
61
63
  });
62
64
  exports.labelTextColor = labelTextColor;
63
65
  var labelIconColor = (0, _components.themed)({
64
- light: colors.N60,
65
- dark: colors.DN100
66
+ light: (0, _tokens.token)('color.text.lowEmphasis', colors.N60),
67
+ dark: (0, _tokens.token)('color.text.lowEmphasis', colors.DN100)
66
68
  });
67
69
  exports.labelIconColor = labelIconColor;
68
70
  var errorIconColor = (0, _components.themed)({
69
- light: colors.N90,
70
- dark: colors.DN90
71
+ light: (0, _tokens.token)('color.text.disabled', colors.N90),
72
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN90)
71
73
  });
72
74
  exports.errorIconColor = errorIconColor;
73
75
  var errorTitleColor = (0, _components.themed)({
74
- light: colors.N800,
75
- dark: colors.DN800
76
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.N800),
77
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.DN800)
76
78
  });
77
79
  exports.errorTitleColor = errorTitleColor;
78
80
  var errorTextColor = (0, _components.themed)({
79
- light: colors.N90,
80
- dark: colors.DN90
81
+ light: (0, _tokens.token)('color.text.lowEmphasis', colors.N90),
82
+ dark: (0, _tokens.token)('color.text.lowEmphasis', colors.DN90)
83
+ });
84
+ exports.errorTextColor = errorTextColor;
85
+ var boxShadow = (0, _components.themed)({
86
+ light: (0, _tokens.token)('shadow.overlay', "0 4px 8px -2px ".concat(colors.N50A, ", 0 0 1px ").concat(colors.N60A)),
87
+ dark: (0, _tokens.token)('shadow.overlay', "0 4px 8px -2px ".concat(colors.DN50A, ", 0 0 1px ").concat(colors.DN60A))
81
88
  });
82
- exports.errorTextColor = errorTextColor;
89
+ exports.boxShadow = boxShadow;
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.errorRetryClicked = exports.moreMembersClicked = exports.teamAvatarClicked = exports.moreActionsClicked = exports.teamActionClicked = exports.teamProfileCardRendered = exports.teamRequestAnalytics = exports.teamCardTriggered = exports.firePeopleTeamsEvent = void 0;
8
+ exports.teamRequestAnalytics = exports.teamProfileCardRendered = exports.teamCardTriggered = exports.teamAvatarClicked = exports.teamActionClicked = exports.moreMembersClicked = exports.moreActionsClicked = exports.firePeopleTeamsEvent = exports.errorRetryClicked = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -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: "15.7.1"
34
+ packageVersion: "16.0.0"
35
35
  }, attributes), {}, {
36
36
  firedAt: (0, _performance.getPageTime)()
37
37
  })
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.DELAY_MS_HIDE = exports.DELAY_MS_SHOW = void 0;
6
+ exports.DELAY_MS_SHOW = exports.DELAY_MS_HIDE = void 0;
7
7
  var DELAY_MS_SHOW = 800;
8
8
  exports.DELAY_MS_SHOW = DELAY_MS_SHOW;
9
9
  var DELAY_MS_HIDE = 200;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "15.7.1"
3
+ "version": "16.0.0"
4
4
  }
@@ -1,4 +1,6 @@
1
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
1
2
  import React from 'react';
3
+ import { token } from '@atlaskit/tokens';
2
4
  export const ErrorIllustration = () => {
3
5
  return /*#__PURE__*/React.createElement("svg", {
4
6
  width: "42",
@@ -10,7 +12,7 @@ export const ErrorIllustration = () => {
10
12
  clipPath: "url(#clip0)"
11
13
  }, /*#__PURE__*/React.createElement("path", {
12
14
  d: "M0.649902 0H163.93V212H0.649902V0Z",
13
- fill: "white",
15
+ fill: token('color.background.overlay', 'white'),
14
16
  fillOpacity: "0.01"
15
17
  }), /*#__PURE__*/React.createElement("path", {
16
18
  d: "M95.4299 74.1603L161.87 189.24C167.71 199.36 160.41 212 148.73 212H15.8499C4.16994 212 -3.13006 199.35 2.70994 189.24L69.1499 74.1603C74.9899 64.0403 89.5899 64.0403 95.4299 74.1603ZM87.8699 157.71L90.7499 113.36C91.0899 108.07 86.8899 103.58 81.5899 103.58C76.2799 103.58 72.0799 108.06 72.4299 113.36L75.3099 157.71C75.5299 161.02 78.2699 163.6 81.5899 163.6C84.8999 163.6 87.6499 161.02 87.8699 157.71ZM72.0299 181.25C72.0299 186.91 76.7899 191.35 82.4199 190.83C87.2699 190.38 91.1499 186.33 91.2499 181.46C91.3599 176.01 86.9399 171.52 81.5199 171.52C76.2899 171.51 72.0299 175.89 72.0299 181.25Z",
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useEffect, useRef, useState } from 'react';
3
- import { FormattedMessage } from 'react-intl';
3
+ import { FormattedMessage } from 'react-intl-next';
4
4
  import AvatarGroup from '@atlaskit/avatar-group';
5
5
  import ButtonGroup from '@atlaskit/button/button-group';
6
6
  import LoadingButton from '@atlaskit/button/loading-button';
@@ -1,12 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
- import { FormattedMessage } from 'react-intl';
4
+ import { FormattedMessage } from 'react-intl-next';
5
5
  import Avatar from '@atlaskit/avatar';
6
6
  import Button from '@atlaskit/button/custom-theme-button';
7
7
  import Lozenge from '@atlaskit/lozenge';
8
8
  import Spinner from '@atlaskit/spinner';
9
9
  import { N0 } from '@atlaskit/theme/colors';
10
+ import { token } from '@atlaskit/tokens';
10
11
  import { AnalyticsName } from '../../internal/analytics';
11
12
  import relativeDate from '../../internal/relative-date';
12
13
  import messages from '../../messages';
@@ -234,7 +235,7 @@ export default class Profilecard extends React.PureComponent {
234
235
  }, /*#__PURE__*/React.createElement(ProfileImage, null, /*#__PURE__*/React.createElement(Avatar, {
235
236
  size: "xlarge",
236
237
  src: this.props.status !== 'closed' ? this.props.avatarUrl : undefined,
237
- borderColor: N0
238
+ borderColor: token('color.background.overlay', N0)
238
239
  })), /*#__PURE__*/React.createElement(CardContent, null, this.renderCardDetails(), actions ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsFlexSpacer, null), actions) : null));
239
240
  }
240
241
 
@@ -4,33 +4,33 @@
4
4
  * This file is automatically generated by i18n-tools.
5
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
6
  */
7
- export { default as en_ZZ } from './en_ZZ';
7
+ export { default as zh } from './zh';
8
+ export { default as zh_TW } from './zh_TW';
8
9
  export { default as cs } from './cs';
9
10
  export { default as da } from './da';
10
- export { default as de } from './de';
11
- export { default as en } from './en';
12
- export { default as en_GB } from './en_GB';
13
- export { default as es } from './es';
11
+ export { default as nl } from './nl';
14
12
  export { default as et } from './et';
15
13
  export { default as fi } from './fi';
16
14
  export { default as fr } from './fr';
15
+ export { default as de } from './de';
17
16
  export { default as hu } from './hu';
18
- export { default as is } from './is';
19
17
  export { default as it } from './it';
20
18
  export { default as ja } from './ja';
21
19
  export { default as ko } from './ko';
22
20
  export { default as nb } from './nb';
23
- export { default as nl } from './nl';
24
21
  export { default as pl } from './pl';
25
22
  export { default as pt_BR } from './pt_BR';
26
23
  export { default as pt_PT } from './pt_PT';
27
- export { default as ro } from './ro';
28
24
  export { default as ru } from './ru';
29
25
  export { default as sk } from './sk';
26
+ export { default as es } from './es';
30
27
  export { default as sv } from './sv';
31
28
  export { default as th } from './th';
32
29
  export { default as tr } from './tr';
33
30
  export { default as uk } from './uk';
34
31
  export { default as vi } from './vi';
35
- export { default as zh } from './zh';
36
- export { default as zh_TW } from './zh_TW';
32
+ export { default as en_ZZ } from './en_ZZ';
33
+ export { default as en } from './en';
34
+ export { default as en_GB } from './en_GB';
35
+ export { default as is } from './is';
36
+ export { default as ro } from './ro';
@@ -1,4 +1,4 @@
1
- import { defineMessages } from 'react-intl';
1
+ import { defineMessages } from 'react-intl-next';
2
2
  const messages = defineMessages({
3
3
  inactiveAccountMsg: {
4
4
  id: 'pt.profile-card.inactive.account',
@@ -1,7 +1,6 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import { borderRadius, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
3
- import { e200 } from '@atlaskit/theme/elevation';
4
- import { appLabelBgColor, appLabelTextColor, bgColor, headerBgColor, headerBgColorDisabledUser, headerTextColor, headerTextColorInactive, labelIconColor, labelTextColor } from '../styled/constants';
3
+ import { appLabelBgColor, appLabelTextColor, bgColor, boxShadow, headerBgColor, headerBgColorDisabledUser, headerTextColor, headerTextColorInactive, labelIconColor, labelTextColor } from '../styled/constants';
5
4
 
6
5
  const getFullNameMargin = props => props.noMeta ? `${gridSize() * 4.5}px 0 ${gridSize() * 1.5}px 0` : `${gridSize() * 1.5}px 0 0 0`;
7
6
 
@@ -128,7 +127,7 @@ export const CardContainer = styled.div`
128
127
  }
129
128
 
130
129
  return css`
131
- ${e200}
130
+ box-shadow: ${boxShadow};
132
131
  border-radius: ${borderRadius}px;
133
132
  `;
134
133
  }}
@@ -2,6 +2,7 @@ import styled from 'styled-components';
2
2
  import { N200 } from '@atlaskit/theme/colors';
3
3
  import { gridSize } from '@atlaskit/theme/constants';
4
4
  import { h400 } from '@atlaskit/theme/typography';
5
+ import { token } from '@atlaskit/tokens';
5
6
  import { errorIconColor, errorTextColor, errorTitleColor } from '../styled/constants';
6
7
  export const ErrorWrapper = styled.div`
7
8
  text-align: center;
@@ -20,6 +21,6 @@ export const TeamErrorTitle = styled.p`
20
21
  ${h400};
21
22
  `;
22
23
  export const TeamErrorText = styled.p`
23
- color: ${N200};
24
+ color: ${token('color.text.lowEmphasis', N200)};
24
25
  margin-top: ${gridSize() * 1}px;
25
26
  `;
@@ -2,6 +2,7 @@ import styled, { css } from 'styled-components';
2
2
  import { N20, N200 } from '@atlaskit/theme/colors';
3
3
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
4
4
  import { h600 } from '@atlaskit/theme/typography';
5
+ import { token } from '@atlaskit/tokens';
5
6
  import { bgColor, teamHeaderBgColor } from '../styled/constants';
6
7
  export const CardTriggerWrapper = styled.div`
7
8
  display: inherit;
@@ -15,7 +16,7 @@ export const CardWrapper = styled.div`
15
16
  -moz-osx-font-smoothing: grayscale;
16
17
  `;
17
18
  const loadingImage = css`
18
- background-color: ${N20};
19
+ background-color: ${token('color.background.subtleNeutral.resting', N20)};
19
20
  `;
20
21
  const defaultImage = css`
21
22
  background-color: ${teamHeaderBgColor};
@@ -57,7 +58,7 @@ export const TeamName = styled.h6`
57
58
  -webkit-box-orient: vertical;
58
59
  `;
59
60
  export const MemberCount = styled.div`
60
- color: ${N200};
61
+ color: ${token('color.text.lowEmphasis', N200)};
61
62
  margin-top: ${gridSize() * 0.5}px;
62
63
  `;
63
64
  export const AvatarSection = styled.div`
@@ -81,7 +82,7 @@ export const ActionButtons = styled.div`
81
82
  display: flex;
82
83
  justify-content: space-between;
83
84
  margin: ${gridSize() * 3}px -${gridSize() * 3}px 0 -${gridSize()}px;
84
- background-color: hsla(0, 100%, 100%, 0.2);
85
+ background-color: ${token('color.background.overlay', 'hsla(0, 100%, 100%, 0.2)')};
85
86
  `;
86
87
  export const WrappedButton = styled.div`
87
88
  flex-basis: 0;
@@ -1,54 +1,59 @@
1
1
  import * as colors from '@atlaskit/theme/colors';
2
2
  import { themed } from '@atlaskit/theme/components';
3
+ import { token } from '@atlaskit/tokens';
3
4
  export const bgColor = themed({
4
- light: colors.N0,
5
- dark: colors.DN50
5
+ light: token('color.background.overlay', colors.N0),
6
+ dark: token('color.background.overlay', colors.DN50)
6
7
  });
7
8
  export const headerBgColor = themed({
8
- light: colors.B500,
9
- dark: colors.B100
9
+ light: token('color.background.boldBrand.resting', colors.B500),
10
+ dark: token('color.background.boldBrand.resting', colors.B100)
10
11
  });
11
12
  export const teamHeaderBgColor = themed({
12
- light: colors.N50,
13
- dark: colors.N50
13
+ light: token('color.background.subtleNeutral.resting', colors.N50),
14
+ dark: token('color.background.subtleNeutral.resting', colors.N50)
14
15
  });
15
16
  export const headerBgColorDisabledUser = themed({
16
- light: colors.N30,
17
- dark: colors.B100
17
+ light: token('color.background.disabled', colors.N30),
18
+ dark: token('color.background.disabled', colors.B100)
18
19
  });
19
20
  export const headerTextColor = themed({
20
- light: colors.N0,
21
- dark: colors.N0
21
+ light: token('color.text.onBold', colors.N0),
22
+ dark: token('color.text.onBold', colors.N0)
22
23
  });
23
24
  export const headerTextColorInactive = themed({
24
- light: colors.N800,
25
- dark: colors.N0
25
+ light: token('color.text.highEmphasis', colors.N800),
26
+ dark: token('color.text.highEmphasis', colors.N0)
26
27
  });
27
28
  export const appLabelBgColor = themed({
28
- light: colors.N20,
29
- dark: colors.N20
29
+ light: token('color.background.subtleNeutral.resting', colors.N20),
30
+ dark: token('color.background.subtleNeutral.resting', colors.N20)
30
31
  });
31
32
  export const appLabelTextColor = themed({
32
- light: colors.N500,
33
- dark: colors.N500
33
+ light: token('color.text.highEmphasis', colors.N500),
34
+ dark: token('color.text.highEmphasis', colors.N500)
34
35
  });
35
36
  export const labelTextColor = themed({
36
- light: colors.N800,
37
- dark: colors.DN900
37
+ light: token('color.text.highEmphasis', colors.N800),
38
+ dark: token('color.text.highEmphasis', colors.DN900)
38
39
  });
39
40
  export const labelIconColor = themed({
40
- light: colors.N60,
41
- dark: colors.DN100
41
+ light: token('color.text.lowEmphasis', colors.N60),
42
+ dark: token('color.text.lowEmphasis', colors.DN100)
42
43
  });
43
44
  export const errorIconColor = themed({
44
- light: colors.N90,
45
- dark: colors.DN90
45
+ light: token('color.text.disabled', colors.N90),
46
+ dark: token('color.text.disabled', colors.DN90)
46
47
  });
47
48
  export const errorTitleColor = themed({
48
- light: colors.N800,
49
- dark: colors.DN800
49
+ light: token('color.text.highEmphasis', colors.N800),
50
+ dark: token('color.text.highEmphasis', colors.DN800)
50
51
  });
51
52
  export const errorTextColor = themed({
52
- light: colors.N90,
53
- dark: colors.DN90
53
+ light: token('color.text.lowEmphasis', colors.N90),
54
+ dark: token('color.text.lowEmphasis', colors.DN90)
55
+ });
56
+ export const boxShadow = themed({
57
+ light: token('shadow.overlay', `0 4px 8px -2px ${colors.N50A}, 0 0 1px ${colors.N60A}`),
58
+ dark: token('shadow.overlay', `0 4px 8px -2px ${colors.DN50A}, 0 0 1px ${colors.DN60A}`)
54
59
  });
@@ -11,7 +11,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
11
11
  actionSubjectId,
12
12
  attributes: {
13
13
  packageName: "@atlaskit/profilecard",
14
- packageVersion: "15.7.1",
14
+ packageVersion: "16.0.0",
15
15
  ...attributes,
16
16
  firedAt: getPageTime()
17
17
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "15.7.1"
3
+ "version": "16.0.0"
4
4
  }
@@ -1,4 +1,6 @@
1
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
1
2
  import React from 'react';
3
+ import { token } from '@atlaskit/tokens';
2
4
  export var ErrorIllustration = function ErrorIllustration() {
3
5
  return /*#__PURE__*/React.createElement("svg", {
4
6
  width: "42",
@@ -10,7 +12,7 @@ export var ErrorIllustration = function ErrorIllustration() {
10
12
  clipPath: "url(#clip0)"
11
13
  }, /*#__PURE__*/React.createElement("path", {
12
14
  d: "M0.649902 0H163.93V212H0.649902V0Z",
13
- fill: "white",
15
+ fill: token('color.background.overlay', 'white'),
14
16
  fillOpacity: "0.01"
15
17
  }), /*#__PURE__*/React.createElement("path", {
16
18
  d: "M95.4299 74.1603L161.87 189.24C167.71 199.36 160.41 212 148.73 212H15.8499C4.16994 212 -3.13006 199.35 2.70994 189.24L69.1499 74.1603C74.9899 64.0403 89.5899 64.0403 95.4299 74.1603ZM87.8699 157.71L90.7499 113.36C91.0899 108.07 86.8899 103.58 81.5899 103.58C76.2799 103.58 72.0799 108.06 72.4299 113.36L75.3099 157.71C75.5299 161.02 78.2699 163.6 81.5899 163.6C84.8999 163.6 87.6499 161.02 87.8699 157.71ZM72.0299 181.25C72.0299 186.91 76.7899 191.35 82.4199 190.83C87.2699 190.38 91.1499 186.33 91.2499 181.46C91.3599 176.01 86.9399 171.52 81.5199 171.52C76.2899 171.51 72.0299 175.89 72.0299 181.25Z",
@@ -8,7 +8,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
8
8
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
9
9
 
10
10
  import React, { useCallback, useEffect, useRef, useState } from 'react';
11
- import { FormattedMessage } from 'react-intl';
11
+ import { FormattedMessage } from 'react-intl-next';
12
12
  import AvatarGroup from '@atlaskit/avatar-group';
13
13
  import ButtonGroup from '@atlaskit/button/button-group';
14
14
  import LoadingButton from '@atlaskit/button/loading-button';
@@ -13,12 +13,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
13
13
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
14
 
15
15
  import React from 'react';
16
- import { FormattedMessage } from 'react-intl';
16
+ import { FormattedMessage } from 'react-intl-next';
17
17
  import Avatar from '@atlaskit/avatar';
18
18
  import Button from '@atlaskit/button/custom-theme-button';
19
19
  import Lozenge from '@atlaskit/lozenge';
20
20
  import Spinner from '@atlaskit/spinner';
21
21
  import { N0 } from '@atlaskit/theme/colors';
22
+ import { token } from '@atlaskit/tokens';
22
23
  import { AnalyticsName } from '../../internal/analytics';
23
24
  import relativeDate from '../../internal/relative-date';
24
25
  import messages from '../../messages';
@@ -280,7 +281,7 @@ var Profilecard = /*#__PURE__*/function (_React$PureComponent) {
280
281
  }, /*#__PURE__*/React.createElement(ProfileImage, null, /*#__PURE__*/React.createElement(Avatar, {
281
282
  size: "xlarge",
282
283
  src: this.props.status !== 'closed' ? this.props.avatarUrl : undefined,
283
- borderColor: N0
284
+ borderColor: token('color.background.overlay', N0)
284
285
  })), /*#__PURE__*/React.createElement(CardContent, null, this.renderCardDetails(), actions ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsFlexSpacer, null), actions) : null));
285
286
  }
286
287
 
@@ -4,33 +4,33 @@
4
4
  * This file is automatically generated by i18n-tools.
5
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
6
  */
7
- export { default as en_ZZ } from './en_ZZ';
7
+ export { default as zh } from './zh';
8
+ export { default as zh_TW } from './zh_TW';
8
9
  export { default as cs } from './cs';
9
10
  export { default as da } from './da';
10
- export { default as de } from './de';
11
- export { default as en } from './en';
12
- export { default as en_GB } from './en_GB';
13
- export { default as es } from './es';
11
+ export { default as nl } from './nl';
14
12
  export { default as et } from './et';
15
13
  export { default as fi } from './fi';
16
14
  export { default as fr } from './fr';
15
+ export { default as de } from './de';
17
16
  export { default as hu } from './hu';
18
- export { default as is } from './is';
19
17
  export { default as it } from './it';
20
18
  export { default as ja } from './ja';
21
19
  export { default as ko } from './ko';
22
20
  export { default as nb } from './nb';
23
- export { default as nl } from './nl';
24
21
  export { default as pl } from './pl';
25
22
  export { default as pt_BR } from './pt_BR';
26
23
  export { default as pt_PT } from './pt_PT';
27
- export { default as ro } from './ro';
28
24
  export { default as ru } from './ru';
29
25
  export { default as sk } from './sk';
26
+ export { default as es } from './es';
30
27
  export { default as sv } from './sv';
31
28
  export { default as th } from './th';
32
29
  export { default as tr } from './tr';
33
30
  export { default as uk } from './uk';
34
31
  export { default as vi } from './vi';
35
- export { default as zh } from './zh';
36
- export { default as zh_TW } from './zh_TW';
32
+ export { default as en_ZZ } from './en_ZZ';
33
+ export { default as en } from './en';
34
+ export { default as en_GB } from './en_GB';
35
+ export { default as is } from './is';
36
+ export { default as ro } from './ro';
@@ -1,4 +1,4 @@
1
- import { defineMessages } from 'react-intl';
1
+ import { defineMessages } from 'react-intl-next';
2
2
  var messages = defineMessages({
3
3
  inactiveAccountMsg: {
4
4
  id: 'pt.profile-card.inactive.account',
@@ -4,8 +4,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
4
4
 
5
5
  import styled, { css } from 'styled-components';
6
6
  import { borderRadius, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
7
- import { e200 } from '@atlaskit/theme/elevation';
8
- import { appLabelBgColor, appLabelTextColor, bgColor, headerBgColor, headerBgColorDisabledUser, headerTextColor, headerTextColorInactive, labelIconColor, labelTextColor } from '../styled/constants';
7
+ import { appLabelBgColor, appLabelTextColor, bgColor, boxShadow, headerBgColor, headerBgColorDisabledUser, headerTextColor, headerTextColorInactive, labelIconColor, labelTextColor } from '../styled/constants';
9
8
 
10
9
  var getFullNameMargin = function getFullNameMargin(props) {
11
10
  return props.noMeta ? "".concat(gridSize() * 4.5, "px 0 ").concat(gridSize() * 1.5, "px 0") : "".concat(gridSize() * 1.5, "px 0 0 0");
@@ -38,7 +37,7 @@ export var CardContainer = styled.div(_templateObject15 || (_templateObject15 =
38
37
  return '';
39
38
  }
40
39
 
41
- return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n ", "\n border-radius: ", "px;\n "])), e200, borderRadius);
40
+ return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n border-radius: ", "px;\n "])), boxShadow, borderRadius);
42
41
  });
43
42
  export var DetailsLabel = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n line-height: ", "px;\n font-size: ", "px;\n margin: ", "px 0 0 0;\n white-space: nowrap;\n\n & + & {\n margin-top: ", "px;\n }\n"])), gridSize() * 3, gridSize() * 1.5, gridSize() * 2, gridSize() / 4);
44
43
  export var DetailsLabelIcon = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n flex-shrink: 0;\n color: ", ";\n width: ", "px;\n height: ", "px;\n padding: ", "px;\n vertical-align: top;\n\n svg {\n width: 100%;\n height: 100%;\n }\n"])), labelIconColor, gridSize() * 2, gridSize() * 2, gridSize() / 2);
@@ -6,9 +6,10 @@ import styled from 'styled-components';
6
6
  import { N200 } from '@atlaskit/theme/colors';
7
7
  import { gridSize } from '@atlaskit/theme/constants';
8
8
  import { h400 } from '@atlaskit/theme/typography';
9
+ import { token } from '@atlaskit/tokens';
9
10
  import { errorIconColor, errorTextColor, errorTitleColor } from '../styled/constants';
10
11
  export var ErrorWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: center;\n padding: ", "px;\n color: ", ";\n"])), gridSize() * 3, errorIconColor);
11
12
  export var ErrorTitle = styled.p(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n line-height: ", "px;\n margin: ", "px 0;\n"])), errorTitleColor, gridSize() * 3, gridSize);
12
13
  export var ErrorText = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n"])), errorTextColor);
13
14
  export var TeamErrorTitle = styled.p(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n"])), h400);
14
- export var TeamErrorText = styled.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n margin-top: ", "px;\n"])), N200, gridSize() * 1);
15
+ export var TeamErrorText = styled.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n margin-top: ", "px;\n"])), token('color.text.lowEmphasis', N200), gridSize() * 1);
@@ -6,10 +6,11 @@ import styled, { css } from 'styled-components';
6
6
  import { N20, N200 } from '@atlaskit/theme/colors';
7
7
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
8
8
  import { h600 } from '@atlaskit/theme/typography';
9
+ import { token } from '@atlaskit/tokens';
9
10
  import { bgColor, teamHeaderBgColor } from '../styled/constants';
10
11
  export var CardTriggerWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inherit;\n"])));
11
12
  export var CardWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n width: ", "px;\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n"])), bgColor, borderRadius, gridSize() * 40);
12
- var loadingImage = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), N20);
13
+ var loadingImage = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), token('color.background.subtleNeutral.resting', N20));
13
14
  var defaultImage = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), teamHeaderBgColor);
14
15
  export var CardHeader = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n background-repeat: no-repeat;\n background-size: cover;\n box-sizing: content-box;\n height: ", "px;\n"])), function (props) {
15
16
  if (props.isLoading) {
@@ -24,11 +25,11 @@ export var CardHeader = styled.div(_templateObject5 || (_templateObject5 = _tagg
24
25
  }, gridSize() * 16);
25
26
  export var CardContent = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ", "px;\n min-height: ", "px;\n"])), gridSize() * 3, gridSize() * 13);
26
27
  export var TeamName = styled.h6(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", ";\n text-transform: none;\n overflow: hidden;\n max-height: 48px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])), h600);
27
- export var MemberCount = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n margin-top: ", "px;\n"])), N200, gridSize() * 0.5);
28
+ export var MemberCount = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n margin-top: ", "px;\n"])), token('color.text.lowEmphasis', N200), gridSize() * 0.5);
28
29
  export var AvatarSection = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n margin-left: -2px;\n"])), gridSize() * 2);
29
30
  export var DescriptionWrapper = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n align-items: center;\n display: flex;\n"])), gridSize() * 2);
30
31
  export var Description = styled.span(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n overflow: hidden;\n max-height: 60px;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n"])));
31
- export var ActionButtons = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: calc(100% + 8px);\n display: flex;\n justify-content: space-between;\n margin: ", "px -", "px 0 -", "px;\n background-color: hsla(0, 100%, 100%, 0.2);\n"])), gridSize() * 3, gridSize() * 3, gridSize());
32
+ export var ActionButtons = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: calc(100% + 8px);\n display: flex;\n justify-content: space-between;\n margin: ", "px -", "px 0 -", "px;\n background-color: ", ";\n"])), gridSize() * 3, gridSize() * 3, gridSize(), token('color.background.overlay', 'hsla(0, 100%, 100%, 0.2)'));
32
33
  export var WrappedButton = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n flex-basis: 0;\n flex-grow: 1;\n margin-left: 8px;\n"])));
33
34
  export var MoreButton = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-left: 8px;\n"])));
34
35
  export var LoadingWrapper = styled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n text-align: center;\n margin-top: ", "px;\n"])), gridSize() * 5); // export const LoadingTeamName = styled.div`