@atlaskit/smart-card 23.11.0 → 23.11.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +1 -3
  3. package/dist/cjs/extractors/common/detail/extractCommentCount.js +1 -3
  4. package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +1 -3
  5. package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +1 -3
  6. package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +1 -3
  7. package/dist/cjs/utils/token.js +14 -17
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/cjs/view/BlockCard/components/Frame.js +7 -9
  10. package/dist/cjs/view/BlockCard/components/Link.js +1 -3
  11. package/dist/cjs/view/BlockCard/components/Provider.js +1 -3
  12. package/dist/cjs/view/BlockCard/views/ErroredView.js +1 -3
  13. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +1 -3
  14. package/dist/cjs/view/BlockCard/views/NotFoundView.js +1 -3
  15. package/dist/cjs/view/BlockCard/views/ResolvingView.js +2 -4
  16. package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -3
  17. package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -3
  18. package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +1 -3
  19. package/dist/cjs/view/EmbedCard/components/styled.js +13 -15
  20. package/dist/cjs/view/EmbedCard/views/ErroredView.js +1 -3
  21. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +3 -5
  22. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +1 -3
  23. package/dist/cjs/view/InlineCard/ErroredView/index.js +1 -3
  24. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +2 -4
  25. package/dist/cjs/view/InlineCard/Frame/styled.js +11 -13
  26. package/dist/cjs/view/InlineCard/Icon.js +1 -3
  27. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +2 -4
  28. package/dist/cjs/view/InlineCard/styled.js +4 -6
  29. package/dist/cjs/view/common/Byline.js +1 -3
  30. package/dist/cjs/view/common/Metadata.js +1 -3
  31. package/dist/es2019/extractors/common/detail/extractAttachmentCount.js +1 -2
  32. package/dist/es2019/extractors/common/detail/extractCommentCount.js +1 -2
  33. package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +1 -2
  34. package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +1 -2
  35. package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +1 -2
  36. package/dist/es2019/utils/token.js +14 -15
  37. package/dist/es2019/version.json +1 -1
  38. package/dist/es2019/view/BlockCard/components/Frame.js +7 -8
  39. package/dist/es2019/view/BlockCard/components/Link.js +1 -2
  40. package/dist/es2019/view/BlockCard/components/Provider.js +1 -2
  41. package/dist/es2019/view/BlockCard/views/ErroredView.js +1 -2
  42. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +1 -2
  43. package/dist/es2019/view/BlockCard/views/NotFoundView.js +1 -2
  44. package/dist/es2019/view/BlockCard/views/ResolvingView.js +2 -3
  45. package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -2
  46. package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -2
  47. package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +1 -2
  48. package/dist/es2019/view/EmbedCard/components/styled.js +14 -15
  49. package/dist/es2019/view/EmbedCard/views/ErroredView.js +1 -2
  50. package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +4 -5
  51. package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -3
  52. package/dist/es2019/view/InlineCard/ErroredView/index.js +1 -2
  53. package/dist/es2019/view/InlineCard/ForbiddenView/index.js +2 -3
  54. package/dist/es2019/view/InlineCard/Frame/styled.js +11 -12
  55. package/dist/es2019/view/InlineCard/Icon.js +2 -3
  56. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +2 -3
  57. package/dist/es2019/view/InlineCard/styled.js +4 -5
  58. package/dist/es2019/view/common/Byline.js +1 -2
  59. package/dist/es2019/view/common/Metadata.js +1 -2
  60. package/dist/esm/extractors/common/detail/extractAttachmentCount.js +1 -2
  61. package/dist/esm/extractors/common/detail/extractCommentCount.js +1 -2
  62. package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +1 -2
  63. package/dist/esm/extractors/common/detail/extractSubscriberCount.js +1 -2
  64. package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +1 -2
  65. package/dist/esm/utils/token.js +14 -15
  66. package/dist/esm/version.json +1 -1
  67. package/dist/esm/view/BlockCard/components/Frame.js +7 -8
  68. package/dist/esm/view/BlockCard/components/Link.js +1 -2
  69. package/dist/esm/view/BlockCard/components/Provider.js +1 -2
  70. package/dist/esm/view/BlockCard/views/ErroredView.js +1 -2
  71. package/dist/esm/view/BlockCard/views/ForbiddenView.js +1 -2
  72. package/dist/esm/view/BlockCard/views/NotFoundView.js +1 -2
  73. package/dist/esm/view/BlockCard/views/ResolvingView.js +2 -3
  74. package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -2
  75. package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -2
  76. package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +1 -2
  77. package/dist/esm/view/EmbedCard/components/styled.js +13 -14
  78. package/dist/esm/view/EmbedCard/views/ErroredView.js +1 -2
  79. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +4 -5
  80. package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +1 -2
  81. package/dist/esm/view/InlineCard/ErroredView/index.js +1 -2
  82. package/dist/esm/view/InlineCard/ForbiddenView/index.js +2 -3
  83. package/dist/esm/view/InlineCard/Frame/styled.js +11 -12
  84. package/dist/esm/view/InlineCard/Icon.js +1 -2
  85. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +2 -3
  86. package/dist/esm/view/InlineCard/styled.js +4 -5
  87. package/dist/esm/view/common/Byline.js +1 -2
  88. package/dist/esm/view/common/Metadata.js +1 -2
  89. package/package.json +1 -1
@@ -27,8 +27,6 @@ var _react = _interopRequireDefault(require("react"));
27
27
 
28
28
  var _colors = require("@atlaskit/theme/colors");
29
29
 
30
- var _tokens = require("@atlaskit/tokens");
31
-
32
30
  var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
33
31
 
34
32
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
@@ -56,7 +54,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
56
54
  var FallbackForbiddenIcon = /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
57
55
  label: "error",
58
56
  size: "small",
59
- primaryColor: (0, _tokens.token)('color.icon.danger', _colors.R400)
57
+ primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
60
58
  }));
61
59
 
62
60
  var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
@@ -156,7 +154,7 @@ var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
156
154
  link: url,
157
155
  title: url,
158
156
  onClick: onClick,
159
- titleColor: (0, _tokens.token)('color.text.subtle', _colors.N500),
157
+ titleColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
160
158
  rightSide: this.renderRightSide(),
161
159
  rightSideSpacer: this.state.hasRequestAccessContextMessage
162
160
  }));
@@ -17,23 +17,21 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _components = require("@atlaskit/theme/components");
19
19
 
20
- var _tokens = require("@atlaskit/tokens");
21
-
22
20
  var _templateObject, _templateObject2;
23
21
 
24
22
  var BACKGROUND_COLOR_DARK = '#262B31';
25
- var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat((0, _tokens.token)('color.border.selected', _colors.B100), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
23
+ var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat("var(--ds-border-selected, ".concat(_colors.B100, ")"), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
26
24
 
27
25
  var isInteractive = function isInteractive(_ref) {
28
26
  var isInteractive = _ref.isInteractive;
29
27
 
30
28
  if (isInteractive) {
31
29
  return "\n :hover {\n background-color: ".concat((0, _components.themed)({
32
- light: (0, _tokens.token)('color.background.neutral.subtle.hovered', _colors.N20),
33
- dark: (0, _tokens.token)('color.background.neutral.subtle.hovered', BACKGROUND_COLOR_DARK)
30
+ light: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20, ")"),
31
+ dark: "var(--ds-background-neutral-subtle-hovered, ".concat(BACKGROUND_COLOR_DARK, ")")
34
32
  }), ";\n }\n :active {\n background-color: ").concat((0, _components.themed)({
35
- light: (0, _tokens.token)('color.background.selected', _colors.B50),
36
- dark: (0, _tokens.token)('color.background.selected', BACKGROUND_COLOR_DARK)
33
+ light: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
34
+ dark: "var(--ds-background-selected, ".concat(BACKGROUND_COLOR_DARK, ")")
37
35
  }), ";\n }\n :focus {\n ").concat(selected, "\n }\n ");
38
36
  } else {
39
37
  return '';
@@ -65,14 +63,14 @@ var isSelected = function isSelected(_ref2) {
65
63
 
66
64
  var baseWrapperStyle = function baseWrapperStyle(props) {
67
65
  return "\n line-height: 16px;\n padding: 1px 0.24em 2px 0.24em;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ").concat((0, _constants.borderRadius)(), "px;\n color: ").concat((0, _components.themed)({
68
- light: (0, _tokens.token)('color.link', _colors.B400),
69
- dark: (0, _tokens.token)('color.link', '#4794FF')
66
+ light: "var(--ds-link, ".concat(_colors.B400, ")"),
67
+ dark: "var(--ds-link, #4794FF)"
70
68
  })(props), ";\n background-color: ").concat(props.withoutBackground ? '' : (0, _components.themed)({
71
- light: (0, _tokens.token)('elevation.surface.raised', 'white'),
72
- dark: (0, _tokens.token)('elevation.surface.raised', BACKGROUND_COLOR_DARK)
69
+ light: "var(--ds-surface-raised, white)",
70
+ dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
73
71
  })(props), ";\n ").concat(props.withoutBackground ? '' : (0, _components.themed)({
74
- light: "box-shadow: ".concat((0, _tokens.token)('elevation.shadow.raised', "0 1px 1px ".concat(_colors.N50A, ", 0 0 1px 1px ").concat(_colors.N40A)), ";"),
75
- dark: "box-shadow: ".concat((0, _tokens.token)('elevation.shadow.raised', "0 1px 1px ".concat(_colors.DN50A, ", 0 0 1px 1px ").concat(_colors.DN40A)), ";")
72
+ light: "box-shadow: ".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(_colors.N50A, ", 0 0 1px 1px ").concat(_colors.N40A), ")"), ";"),
73
+ dark: "box-shadow: ".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(_colors.DN50A, ", 0 0 1px 1px ").concat(_colors.DN40A), ")"), ";")
76
74
  })(props), "\n ").concat(isSelected(props), ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n");
77
75
  };
78
76
 
@@ -13,8 +13,6 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
13
13
 
14
14
  var _react = require("@emotion/react");
15
15
 
16
- var _tokens = require("@atlaskit/tokens");
17
-
18
16
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
19
17
 
20
18
  var placeholderShimmer = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n background-position: -20px 0;\n }\n\n 100% {\n background-position: 20px 0;\n }\n"]))); // TODO: Figure out a more scalable/responsive solution
@@ -34,6 +32,6 @@ var AKIconWrapper = _styled.default.span(_templateObject3 || (_templateObject3 =
34
32
 
35
33
  exports.AKIconWrapper = AKIconWrapper;
36
34
 
37
- var Shimmer = _styled.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 14px;\n width: 14px;\n margin-right: 4px;\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: ", ";\n background-image: linear-gradient(\n to right,\n transparent 0%,\n ", " 20%,\n transparent 40%,\n transparent 100%\n );\n background-repeat: no-repeat;\n background-size: 40px 14px;\n display: inline-block;\n\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n"])), (0, _tokens.token)('color.skeleton.subtle', '#f6f7f8'), (0, _tokens.token)('color.skeleton', '#edeef1'), placeholderShimmer);
35
+ var Shimmer = _styled.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 14px;\n width: 14px;\n margin-right: 4px;\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: ", ";\n background-image: linear-gradient(\n to right,\n transparent 0%,\n ", " 20%,\n transparent 40%,\n transparent 100%\n );\n background-repeat: no-repeat;\n background-size: 40px 14px;\n display: inline-block;\n\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n"])), "var(--ds-skeleton-subtle, #f6f7f8)", "var(--ds-skeleton, #edeef1)", placeholderShimmer);
38
36
 
39
37
  exports.Shimmer = Shimmer;
@@ -29,8 +29,6 @@ var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-fill
29
29
 
30
30
  var _colors = require("@atlaskit/theme/colors");
31
31
 
32
- var _tokens = require("@atlaskit/tokens");
33
-
34
32
  var _react = _interopRequireDefault(require("react"));
35
33
 
36
34
  var _reactIntlNext = require("react-intl-next");
@@ -54,7 +52,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
54
52
  var FallbackUnauthorizedIcon = /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
55
53
  label: "error",
56
54
  size: "small",
57
- primaryColor: (0, _tokens.token)('color.icon.danger', _colors.R400)
55
+ primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
58
56
  }));
59
57
 
60
58
  var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component) {
@@ -119,7 +117,7 @@ var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component) {
119
117
  link: url,
120
118
  rightSide: this.renderRightSide(),
121
119
  onClick: onClick,
122
- titleColor: (0, _tokens.token)('color.text.subtle', _colors.N500)
120
+ titleColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
123
121
  }));
124
122
 
125
123
  if (showAuthTooltip) {
@@ -15,8 +15,6 @@ var _colors = require("@atlaskit/theme/colors");
15
15
 
16
16
  var _components = require("@atlaskit/theme/components");
17
17
 
18
- var _tokens = require("@atlaskit/tokens");
19
-
20
18
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
21
19
 
22
20
  var LINK_COLOR_DARK = '#4794FF'; // By default buttons will hide overflow and ellipsis content instead of wrapping.
@@ -27,8 +25,8 @@ var IconStyledButton = _styled.default.span(_templateObject || (_templateObject
27
25
  exports.IconStyledButton = IconStyledButton;
28
26
 
29
27
  var NoLinkAppearance = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _components.themed)({
30
- light: (0, _tokens.token)('color.text.subtlest', _colors.N200),
31
- dark: (0, _tokens.token)('color.text.subtlest', LINK_COLOR_DARK)
28
+ light: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
29
+ dark: "var(--ds-text-subtlest, ".concat(LINK_COLOR_DARK, ")")
32
30
  }));
33
31
 
34
32
  exports.NoLinkAppearance = NoLinkAppearance;
@@ -38,8 +36,8 @@ var LowercaseAppearance = _styled.default.span(_templateObject3 || (_templateObj
38
36
  exports.LowercaseAppearance = LowercaseAppearance;
39
37
 
40
38
  var LinkAppearance = _styled.default.a(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _components.themed)({
41
- light: (0, _tokens.token)('color.link', _colors.B400),
42
- dark: (0, _tokens.token)('color.link', LINK_COLOR_DARK)
39
+ light: "var(--ds-link, ".concat(_colors.B400, ")"),
40
+ dark: "var(--ds-link, ".concat(LINK_COLOR_DARK, ")")
43
41
  }));
44
42
 
45
43
  exports.LinkAppearance = LinkAppearance;
@@ -9,8 +9,6 @@ var _react = require("@emotion/react");
9
9
 
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
 
12
- var _tokens = require("@atlaskit/tokens");
13
-
14
12
  var _utils = require("./utils");
15
13
 
16
14
  /** @jsx jsx */
@@ -23,7 +21,7 @@ var Byline = function Byline(_ref) {
23
21
  css: (0, _utils.mq)({
24
22
  fontSize: (0, _utils.gs)(1.5),
25
23
  lineHeight: (0, _utils.gs)(2.5),
26
- color: "".concat((0, _tokens.token)('color.text.subtlest', _colors.N300)),
24
+ color: "".concat("var(--ds-text-subtlest, ".concat(_colors.N300, ")")),
27
25
  fontWeight: 'normal',
28
26
  marginTop: (0, _utils.gs)(0.5),
29
27
  // Spec: only allow two lines MAX to be shown.
@@ -15,8 +15,6 @@ var _utils = require("./utils");
15
15
 
16
16
  var _colors = require("@atlaskit/theme/colors");
17
17
 
18
- var _tokens = require("@atlaskit/tokens");
19
-
20
18
  /** @jsx jsx */
21
19
  var Metadata = function Metadata(_ref) {
22
20
  var text = _ref.text,
@@ -44,7 +42,7 @@ var Metadata = function Metadata(_ref) {
44
42
  }, metadataIcon, (0, _react.jsx)("span", {
45
43
  css: {
46
44
  fontSize: (0, _utils.gs)(1.5),
47
- color: "".concat((0, _tokens.token)('color.text.subtlest', _colors.N300)),
45
+ color: "".concat("var(--ds-text-subtlest, ".concat(_colors.N300, ")")),
48
46
  marginRight: (0, _utils.gs)(0.5),
49
47
  marginLeft: '2px'
50
48
  }
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { N600 } from '@atlaskit/theme/colors';
3
3
  import AttachmentIcon from '@atlaskit/icon/glyph/attachment';
4
- import { token } from '@atlaskit/tokens';
5
4
  export const extractAttachmentCount = jsonLd => {
6
5
  const attachmentCount = jsonLd['atlassian:attachmentCount'];
7
6
 
@@ -11,7 +10,7 @@ export const extractAttachmentCount = jsonLd => {
11
10
  icon: /*#__PURE__*/React.createElement(AttachmentIcon, {
12
11
  size: "small",
13
12
  label: "attachments",
14
- primaryColor: token('color.icon.subtle', N600)
13
+ primaryColor: `var(--ds-icon-subtle, ${N600})`
15
14
  })
16
15
  };
17
16
  }
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { N600 } from '@atlaskit/theme/colors';
3
- import { token } from '@atlaskit/tokens';
4
3
  import ChatIcon from '@atlaskit/icon/glyph/comment';
5
4
  export const extractCommentCount = jsonLd => {
6
5
  const commentCount = jsonLd['schema:commentCount'];
@@ -12,7 +11,7 @@ export const extractCommentCount = jsonLd => {
12
11
  label: "comment-count",
13
12
  key: "comments-count-icon",
14
13
  size: "small",
15
- primaryColor: token('color.icon.subtle', N600)
14
+ primaryColor: `var(--ds-icon-subtle, ${N600})`
16
15
  })
17
16
  };
18
17
  }
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { N600 } from '@atlaskit/theme/colors';
3
3
  import CodeIcon from '@atlaskit/icon/glyph/code';
4
- import { token } from '@atlaskit/tokens';
5
4
  export const extractProgrammingLanguage = jsonLd => {
6
5
  const programmingLanguage = jsonLd['schema:programmingLanguage'];
7
6
 
@@ -11,7 +10,7 @@ export const extractProgrammingLanguage = jsonLd => {
11
10
  icon: /*#__PURE__*/React.createElement(CodeIcon, {
12
11
  size: "small",
13
12
  label: "code",
14
- primaryColor: token('color.icon.subtle', N600)
13
+ primaryColor: `var(--ds-icon-subtle, ${N600})`
15
14
  })
16
15
  };
17
16
  }
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { N600 } from '@atlaskit/theme/colors';
3
3
  import PeopleIcon from '@atlaskit/icon/glyph/people';
4
- import { token } from '@atlaskit/tokens';
5
4
  export const extractSubscriberCount = jsonLd => {
6
5
  const subscriberCount = jsonLd['atlassian:subscriberCount'];
7
6
 
@@ -11,7 +10,7 @@ export const extractSubscriberCount = jsonLd => {
11
10
  icon: /*#__PURE__*/React.createElement(PeopleIcon, {
12
11
  size: "small",
13
12
  label: "subscribers",
14
- primaryColor: token('color.icon.subtle', N600)
13
+ primaryColor: `var(--ds-icon-subtle, ${N600})`
15
14
  })
16
15
  };
17
16
  }
@@ -1,6 +1,5 @@
1
1
  import { extractorPriorityMap } from '../icon/priority';
2
2
  import { R500 } from '@atlaskit/theme/colors';
3
- import { token } from '@atlaskit/tokens';
4
3
  export const extractTitleTextColor = jsonLd => {
5
4
  const type = jsonLd['@type'];
6
5
 
@@ -9,7 +8,7 @@ export const extractTitleTextColor = jsonLd => {
9
8
 
10
9
  switch (highestPriorityType) {
11
10
  case 'atlassian:UndefinedLink':
12
- return token('color.text.danger', R500);
11
+ return `var(--ds-text-danger, ${R500})`;
13
12
 
14
13
  default:
15
14
  return undefined;
@@ -1,17 +1,16 @@
1
- import { token } from '@atlaskit/tokens';
2
1
  export const tokens = {
3
- actionIcon: token('color.icon', '#44546F'),
4
- background: token('elevation.surface.raised', '#FFFFFF'),
5
- badgeIcon: token('color.icon.subtle', '#626F86'),
6
- badgeText: token('color.text.subtlest', '#626F86'),
7
- blackLink: token('color.text.subtle', '#44546F'),
8
- blackLinkPressed: token('color.text', '#172B4D'),
9
- blueLink: token('color.link', '#0C66E4'),
10
- blueLinkPressed: token('color.link.pressed', '#0055CC'),
11
- elevation: token('elevation.shadow.raised', '0px 1px 1px #091E4240, 0px 0px 1px #091E424F'),
12
- errorMessage: token('color.text.disabled', '#6B778C'),
13
- errorMessageHover: token('color.text.subtle', '#8993A4'),
14
- focus: token('color.border.focused', '#388BFF'),
15
- snippet: token('color.text', '#172B4D'),
16
- text: token('color.text.subtlest', '#626F86')
2
+ actionIcon: "var(--ds-icon, #44546F)",
3
+ background: "var(--ds-surface-raised, #FFFFFF)",
4
+ badgeIcon: "var(--ds-icon-subtle, #626F86)",
5
+ badgeText: "var(--ds-text-subtlest, #626F86)",
6
+ blackLink: "var(--ds-text-subtle, #44546F)",
7
+ blackLinkPressed: "var(--ds-text, #172B4D)",
8
+ blueLink: "var(--ds-link, #0C66E4)",
9
+ blueLinkPressed: "var(--ds-link-pressed, #0055CC)",
10
+ elevation: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424F)",
11
+ errorMessage: "var(--ds-text-disabled, #6B778C)",
12
+ errorMessageHover: "var(--ds-text-subtle, #8993A4)",
13
+ focus: "var(--ds-border-focused, #388BFF)",
14
+ snippet: "var(--ds-text, #172B4D)",
15
+ text: "var(--ds-text-subtlest, #626F86)"
17
16
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.11.0",
3
+ "version": "23.11.2",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,6 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import React from 'react';
4
4
  import { N20A, N30A, B200, N40A, N50A } from '@atlaskit/theme/colors';
5
- import { token } from '@atlaskit/tokens';
6
5
  import { gs, br, mq } from '../../common/utils';
7
6
  export const Frame = (props = {
8
7
  isSelected: false,
@@ -13,7 +12,7 @@ const sharedFrameStyles = {
13
12
  maxWidth: gs(95),
14
13
  width: '100%',
15
14
  display: 'flex',
16
- backgroundColor: token('elevation.surface.raised', 'white')
15
+ backgroundColor: "var(--ds-surface-raised, white)"
17
16
  };
18
17
  export const ExpandedFrame = ({
19
18
  children,
@@ -27,15 +26,15 @@ export const ExpandedFrame = ({
27
26
  css: mq({ ...sharedFrameStyles,
28
27
  '&:hover': isHoverable ? {
29
28
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4064
30
- backgroundColor: token('color.background.neutral.subtle.hovered', N20A),
29
+ backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${N20A})`,
31
30
  cursor: 'pointer'
32
31
  } : undefined,
33
32
  minHeight: isFluidHeight ? 0 : [gs(21), gs(15)],
34
33
  borderRadius: isSelected ? br() : br(0.5),
35
- border: `2px solid ${isSelected ? token('color.border.selected', B200) : 'transparent'}`,
34
+ border: `2px solid ${isSelected ? `var(--ds-border-selected, ${B200})` : 'transparent'}`,
36
35
  justifyContent: 'space-between',
37
36
  overflow: 'hidden',
38
- boxShadow: token('elevation.shadow.raised', `0 1px 1px ${N50A}, 0 0 1px 1px ${N40A}`)
37
+ boxShadow: `var(--ds-shadow-raised, ${`0 1px 1px ${N50A}, 0 0 1px 1px ${N40A}`})`
39
38
  }),
40
39
  "data-testid": testId,
41
40
  className: className,
@@ -53,14 +52,14 @@ export const CompactFrame = ({
53
52
  return jsx("div", {
54
53
  css: mq({ ...sharedFrameStyles,
55
54
  '&:hover': isHoverable ? {
56
- backgroundColor: token('color.background.neutral.hovered', N30A)
55
+ backgroundColor: `var(--ds-background-neutral-hovered, ${N30A})`
57
56
  } : undefined,
58
57
  borderRadius: isSelected ? br() : br(0.5),
59
- border: isSelected ? `2px solid ${token('color.border.selected', B200)}` : '',
58
+ border: isSelected ? `2px solid ${`var(--ds-border-selected, ${B200})`}` : '',
60
59
  justifyContent: 'center',
61
60
  alignItems: 'center',
62
61
  height: inheritDimensions ? '100%' : gs(5),
63
- backgroundColor: token('color.background.neutral', N20A),
62
+ backgroundColor: `var(--ds-background-neutral, ${N20A})`,
64
63
  width: ['calc(100% - 16px)', '100%'],
65
64
  padding: [`0px ${gs(1)}`, '0']
66
65
  }),
@@ -1,7 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { B400 } from '@atlaskit/theme/colors';
4
- import { token } from '@atlaskit/tokens';
5
4
  export const Link = ({
6
5
  url,
7
6
  testId = 'block-card',
@@ -11,7 +10,7 @@ export const Link = ({
11
10
  "data-testid": `${testId}-link`,
12
11
  className: className,
13
12
  css: {
14
- color: token('color.link', B400),
13
+ color: `var(--ds-link, ${B400})`,
15
14
  wordBreak: 'break-all'
16
15
  }
17
16
  }, url);
@@ -2,7 +2,6 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { N300 } from '@atlaskit/theme/colors';
4
4
  import { gs } from '../../common/utils';
5
- import { token } from '@atlaskit/tokens';
6
5
  export const Provider = ({
7
6
  name,
8
7
  icon
@@ -29,7 +28,7 @@ export const Provider = ({
29
28
  }
30
29
  }, iconToRender, jsx("span", {
31
30
  css: {
32
- color: token('color.text.subtlest', N300),
31
+ color: `var(--ds-text-subtlest, ${N300})`,
33
32
  margin: 0,
34
33
  marginLeft: gs(0.5),
35
34
  // EDM-713: fixes copy-paste from renderer to editor for Firefox
@@ -15,7 +15,6 @@ import { handleClickCommon } from '../utils/handlers';
15
15
  import { Link } from '../components/Link';
16
16
  import { UnresolvedText } from '../components/UnresolvedText';
17
17
  import { RetryAction } from '../actions/RetryAction';
18
- import { token } from '@atlaskit/tokens';
19
18
  const textDescriptionProps = { ...messages.could_not_load_link
20
19
  };
21
20
  export const blockCardErroredViewClassName = 'block-card-errored-view';
@@ -48,7 +47,7 @@ export const ErroredView = ({
48
47
  icon: jsx(WarningIcon, {
49
48
  label: "errored-warning-icon",
50
49
  size: "small",
51
- primaryColor: token('color.icon.warning', R300),
50
+ primaryColor: `var(--ds-icon-warning, ${R300})`,
52
51
  testId: `${testId}-warning-icon`
53
52
  }),
54
53
  text: jsx(FormattedMessage, textDescriptionProps)
@@ -4,7 +4,6 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import { jsx } from '@emotion/react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import { R300 } from '@atlaskit/theme/colors';
7
- import { token } from '@atlaskit/tokens';
8
7
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
9
8
  import { Frame } from '../components/Frame';
10
9
  import { Provider } from '../components/Provider';
@@ -56,7 +55,7 @@ export const ForbiddenView = ({
56
55
  icon: jsx(LockIcon, {
57
56
  label: "forbidden-lock-icon",
58
57
  size: "small",
59
- primaryColor: token('color.icon.danger', R300),
58
+ primaryColor: `var(--ds-icon-danger, ${R300})`,
60
59
  testId: `${testId}-lock-icon`
61
60
  }),
62
61
  text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
@@ -14,7 +14,6 @@ import { ContentHeader } from '../components/ContentHeader';
14
14
  import { Link } from '../components/Link';
15
15
  import { UnresolvedText } from '../components/UnresolvedText';
16
16
  import { handleClickCommon } from '../utils/handlers';
17
- import { token } from '@atlaskit/tokens';
18
17
  const textDescriptionProps = { ...messages.not_found_description
19
18
  };
20
19
  export const blockCardNotFoundViewClassName = 'block-card-not-found-view';
@@ -46,7 +45,7 @@ export const NotFoundView = ({
46
45
  icon: jsx(WarningIcon, {
47
46
  label: "not-found-warning-icon",
48
47
  size: "small",
49
- primaryColor: token('color.icon.warning', R300),
48
+ primaryColor: `var(--ds-icon-warning, ${R300})`,
50
49
  testId: `${testId}-warning-icon`
51
50
  }),
52
51
  text: jsx(FormattedMessage, textDescriptionProps)
@@ -3,7 +3,6 @@ import { jsx } from '@emotion/react';
3
3
  import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
4
4
  import { N50, N90 } from '@atlaskit/theme/colors';
5
5
  import { fontSize } from '@atlaskit/theme/constants';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { Frame } from '../components/Frame';
8
7
  import { gs } from '../../common/utils';
9
8
  import { FormattedMessage } from 'react-intl-next';
@@ -21,12 +20,12 @@ export const ResolvingView = ({
21
20
  className: blockCardResolvingViewClassName
22
21
  }, jsx(DocumentFilledIcon, {
23
22
  size: "small",
24
- primaryColor: token('color.icon.subtle', N50),
23
+ primaryColor: `var(--ds-icon-subtle, ${N50})`,
25
24
  label: "document-icon"
26
25
  }), jsx("span", {
27
26
  css: {
28
27
  fontSize: `${fontSize()}px`,
29
- color: token('color.text.subtlest', N90),
28
+ color: `var(--ds-text-subtlest, ${N90})`,
30
29
  marginLeft: gs(0.5)
31
30
  }
32
31
  }, jsx(FormattedMessage, messages.loading)));
@@ -2,7 +2,6 @@ import React, { useMemo } from 'react';
2
2
  import FlexibleCard from '../../../FlexibleCard';
3
3
  import TitleBlock from '../../../FlexibleCard/components/blocks/title-block';
4
4
  import { messages } from '../../../../messages';
5
- import { token } from '@atlaskit/tokens';
6
5
  import { R300 } from '@atlaskit/theme/colors';
7
6
  import WarningIcon from '@atlaskit/icon/glyph/warning';
8
7
  import BlockCardFooter from '../../components/flexible/footer';
@@ -40,7 +39,7 @@ const FlexibleErroredView = ({
40
39
  }), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(WarningIcon, {
41
40
  label: "errored-warning-icon",
42
41
  size: "small",
43
- primaryColor: token('color.icon.warning', R300),
42
+ primaryColor: `var(--ds-icon-warning, ${R300})`,
44
43
  testId: `${testId}-warning-icon`
45
44
  }), /*#__PURE__*/React.createElement(Text, {
46
45
  message: {
@@ -2,7 +2,6 @@ import React, { useMemo } from 'react';
2
2
  import FlexibleCard from '../../../FlexibleCard';
3
3
  import TitleBlock from '../../../FlexibleCard/components/blocks/title-block';
4
4
  import { CustomBlock } from '../../../FlexibleCard/components/blocks';
5
- import { token } from '@atlaskit/tokens';
6
5
  import { R300 } from '@atlaskit/theme/colors';
7
6
  import { messages } from '../../../../messages';
8
7
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
@@ -70,7 +69,7 @@ const FlexibleForbiddenView = ({
70
69
  }), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(LockIcon, {
71
70
  label: "forbidden-lock-icon",
72
71
  size: "small",
73
- primaryColor: token('color.icon.danger', R300),
72
+ primaryColor: `var(--ds-icon-danger, ${R300})`,
74
73
  testId: `${testId}-lock-icon`
75
74
  }), /*#__PURE__*/React.createElement(Text, {
76
75
  message: {
@@ -3,7 +3,6 @@ import FlexibleCard from '../../../FlexibleCard';
3
3
  import TitleBlock from '../../../FlexibleCard/components/blocks/title-block';
4
4
  import { messages } from '../../../../messages';
5
5
  import WarningIcon from '@atlaskit/icon/glyph/warning';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { R300 } from '@atlaskit/theme/colors';
8
7
  import BlockCardFooter from '../../components/flexible/footer';
9
8
  import Text from '../../../FlexibleCard/components/elements/text';
@@ -39,7 +38,7 @@ const FlexibleNotFoundView = ({
39
38
  }), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(WarningIcon, {
40
39
  label: "not-found-warning-icon",
41
40
  size: "small",
42
- primaryColor: token('color.icon.warning', R300),
41
+ primaryColor: `var(--ds-icon-warning, ${R300})`,
43
42
  testId: `${testId}-warning-icon`
44
43
  }), /*#__PURE__*/React.createElement(Text, {
45
44
  message: {