@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
@@ -21,7 +21,6 @@ import { handleClickCommon } from '../utils/handlers';
21
21
  import { Link } from '../components/Link';
22
22
  import { UnresolvedText } from '../components/UnresolvedText';
23
23
  import { RetryAction } from '../actions/RetryAction';
24
- import { token } from '@atlaskit/tokens';
25
24
 
26
25
  var textDescriptionProps = _objectSpread({}, messages.could_not_load_link);
27
26
 
@@ -64,7 +63,7 @@ export var ErroredView = function ErroredView(_ref) {
64
63
  icon: jsx(WarningIcon, {
65
64
  label: "errored-warning-icon",
66
65
  size: "small",
67
- primaryColor: token('color.icon.warning', R300),
66
+ primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
68
67
  testId: "".concat(testId, "-warning-icon")
69
68
  }),
70
69
  text: jsx(FormattedMessage, textDescriptionProps)
@@ -5,7 +5,6 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
5
  import { jsx } from '@emotion/react';
6
6
  import { FormattedMessage } from 'react-intl-next';
7
7
  import { R300 } from '@atlaskit/theme/colors';
8
- import { token } from '@atlaskit/tokens';
9
8
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
10
9
  import { Frame } from '../components/Frame';
11
10
  import { Provider } from '../components/Provider';
@@ -66,7 +65,7 @@ export var ForbiddenView = function ForbiddenView(_ref) {
66
65
  icon: jsx(LockIcon, {
67
66
  label: "forbidden-lock-icon",
68
67
  size: "small",
69
- primaryColor: token('color.icon.danger', R300),
68
+ primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
70
69
  testId: "".concat(testId, "-lock-icon")
71
70
  }),
72
71
  text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
@@ -20,7 +20,6 @@ import { ContentHeader } from '../components/ContentHeader';
20
20
  import { Link } from '../components/Link';
21
21
  import { UnresolvedText } from '../components/UnresolvedText';
22
22
  import { handleClickCommon } from '../utils/handlers';
23
- import { token } from '@atlaskit/tokens';
24
23
 
25
24
  var textDescriptionProps = _objectSpread({}, messages.not_found_description);
26
25
 
@@ -60,7 +59,7 @@ export var NotFoundView = function NotFoundView(_ref) {
60
59
  icon: jsx(WarningIcon, {
61
60
  label: "not-found-warning-icon",
62
61
  size: "small",
63
- primaryColor: token('color.icon.warning', R300),
62
+ primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
64
63
  testId: "".concat(testId, "-warning-icon")
65
64
  }),
66
65
  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';
@@ -23,12 +22,12 @@ export var ResolvingView = function ResolvingView(_ref) {
23
22
  className: blockCardResolvingViewClassName
24
23
  }, jsx(DocumentFilledIcon, {
25
24
  size: "small",
26
- primaryColor: token('color.icon.subtle', N50),
25
+ primaryColor: "var(--ds-icon-subtle, ".concat(N50, ")"),
27
26
  label: "document-icon"
28
27
  }), jsx("span", {
29
28
  css: {
30
29
  fontSize: "".concat(fontSize(), "px"),
31
- color: token('color.text.subtlest', N90),
30
+ color: "var(--ds-text-subtlest, ".concat(N90, ")"),
32
31
  marginLeft: gs(0.5)
33
32
  }
34
33
  }, 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';
@@ -42,7 +41,7 @@ var FlexibleErroredView = function FlexibleErroredView(_ref) {
42
41
  }), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(WarningIcon, {
43
42
  label: "errored-warning-icon",
44
43
  size: "small",
45
- primaryColor: token('color.icon.warning', R300),
44
+ primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
46
45
  testId: "".concat(testId, "-warning-icon")
47
46
  }), /*#__PURE__*/React.createElement(Text, {
48
47
  message: {
@@ -3,7 +3,6 @@ import React, { useMemo } from 'react';
3
3
  import FlexibleCard from '../../../FlexibleCard';
4
4
  import TitleBlock from '../../../FlexibleCard/components/blocks/title-block';
5
5
  import { CustomBlock } from '../../../FlexibleCard/components/blocks';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { R300 } from '@atlaskit/theme/colors';
8
7
  import { messages } from '../../../../messages';
9
8
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
@@ -69,7 +68,7 @@ var FlexibleForbiddenView = function FlexibleForbiddenView(_ref) {
69
68
  }), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(LockIcon, {
70
69
  label: "forbidden-lock-icon",
71
70
  size: "small",
72
- primaryColor: token('color.icon.danger', R300),
71
+ primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
73
72
  testId: "".concat(testId, "-lock-icon")
74
73
  }), /*#__PURE__*/React.createElement(Text, {
75
74
  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 @@ var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
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, ".concat(R300, ")"),
43
42
  testId: "".concat(testId, "-warning-icon")
44
43
  }), /*#__PURE__*/React.createElement(Text, {
45
44
  message: {
@@ -5,7 +5,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
5
5
  import styled from '@emotion/styled';
6
6
  import { borderRadius as akBorderRadius, fontFamily } from '@atlaskit/theme/constants';
7
7
  import * as colors from '@atlaskit/theme/colors';
8
- import { token } from '@atlaskit/tokens';
9
8
  import { gs as gridSize } from '../../common/utils';
10
9
  export var className = 'media-card-frame';
11
10
  export var cardShadow = "";
@@ -45,13 +44,13 @@ function getinteractiveStyles(_ref3) {
45
44
  var isInteractive = _ref3.isInteractive,
46
45
  isFrameVisible = _ref3.isFrameVisible;
47
46
  var visibleFrameStyles = isFrameVisible ? visibleStyles : '';
48
- var interactiveFrameStyles = isInteractive ? "\n &:hover {\n ".concat(visibleStyles, "\n }\n &:active {\n background-color: ").concat(token('color.background.selected', colors.B50), ";\n }\n") : '';
47
+ var interactiveFrameStyles = isInteractive ? "\n &:hover {\n ".concat(visibleStyles, "\n }\n &:active {\n background-color: ", "var(--ds-background-selected, ".concat(colors.B50, ")"), ";\n }\n") : '';
49
48
  return "".concat(visibleFrameStyles).concat(interactiveFrameStyles);
50
49
  }
51
50
 
52
51
  function selected(_ref4) {
53
52
  var isSelected = _ref4.isSelected;
54
- return isSelected ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ").concat(token('color.border.selected', colors.B100), ";\n content: '';\n outline: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(borderRadius, "\n }\n ") : '';
53
+ return isSelected ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ", "var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n content: '';\n outline: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(borderRadius, "\n }\n ") : '';
55
54
  }
56
55
 
57
56
  var height = function height(_ref5) {
@@ -63,7 +62,7 @@ var wrapperStyles = function wrapperStyles(props) {
63
62
  return "\n ".concat(borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getinteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat(fontFamily(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n background: transparent;\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ").concat(gridSize(2), ");\n height: calc(100% + ").concat(gridSize(1), ");\n left: -").concat(gridSize(1), ";\n ").concat(borderRadius, "\n }\n");
64
63
  };
65
64
 
66
- var visibleStyles = "\n background-color: ".concat(token('color.background.neutral.subtle', colors.N30), ";\n\n &:after {\n background: ").concat(token('color.background.neutral', colors.N30), " !important;\n }\n .embed-header {\n opacity: 1;\n }");
65
+ var visibleStyles = "\n background-color: ".concat("var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), ";\n\n &:after {\n background: ", "var(--ds-background-neutral, ".concat(colors.N30, ")"), " !important;\n }\n .embed-header {\n opacity: 1;\n }");
67
66
 
68
67
  function visible(_ref6) {
69
68
  var isVisible = _ref6.isVisible;
@@ -77,12 +76,12 @@ export var Wrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedT
77
76
  return wrapperStyles(props);
78
77
  });
79
78
  export var embedHeaderHeight = 32;
80
- export var Header = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: ", "px;\n position: absolute;\n z-index: 1;\n width: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n opacity: 0;\n transition: 300ms opacity cubic-bezier(0.15, 1, 0.3, 1);\n"])), embedHeaderHeight, token('color.icon', colors.N300));
79
+ export var Header = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: ", "px;\n position: absolute;\n z-index: 1;\n width: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n opacity: 0;\n transition: 300ms opacity cubic-bezier(0.15, 1, 0.3, 1);\n"])), embedHeaderHeight, "var(--ds-icon, ".concat(colors.N300, ")"));
81
80
  export var IconWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", " margin-right: 4px;\n"])), borderRadius, csssize(16), function (_ref7) {
82
81
  var isPlaceholder = _ref7.isPlaceholder;
83
82
 
84
83
  if (isPlaceholder) {
85
- return "\n background-color: ".concat(token('color.skeleton', colors.N30), ";\n ");
84
+ return "\n background-color: ".concat("var(--ds-skeleton, ".concat(colors.N30, ")"), ";\n ");
86
85
  } else {
87
86
  return '';
88
87
  }
@@ -91,19 +90,19 @@ export var TextWrapper = styled.div(_templateObject5 || (_templateObject5 = _tag
91
90
  var isPlaceholder = _ref8.isPlaceholder;
92
91
 
93
92
  if (isPlaceholder) {
94
- return "\n ".concat(borderRadius, "\n width: 125px;\n height: 12px;\n background-color: ").concat(token('color.skeleton', colors.N30), ";\n ");
93
+ return "\n ".concat(borderRadius, "\n width: 125px;\n height: 12px;\n background-color: ", "var(--ds-skeleton, ".concat(colors.N30, ")"), ";\n ");
95
94
  } else {
96
95
  return '';
97
96
  }
98
- }, token('color.text.subtlest', colors.N300), ellipsis('none'));
97
+ }, "var(--ds-text-subtlest, ".concat(colors.N300, ")"), ellipsis('none'));
99
98
  // NB: `overflow` is kept as `hidden` since
100
99
  // the internal contents of the `iframe` should
101
100
  // manage scrolling behaviour.
102
- export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n top: ", ";\n height: calc(100% - ", ");\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", ";\n\n ", "\n"])), borderRadius, cardShadow, token('elevation.surface.raised', 'white'), gridSize(4), gridSize(4), function (_ref9) {
101
+ export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n top: ", ";\n height: calc(100% - ", ");\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", ";\n\n ", "\n"])), borderRadius, cardShadow, "var(--ds-surface-raised, white)", gridSize(4), gridSize(4), function (_ref9) {
103
102
  var isInteractive = _ref9.isInteractive;
104
103
 
105
104
  if (isInteractive) {
106
- return "\n .".concat(className, ":hover & {\n box-shadow: ").concat(token('elevation.shadow.overlay', '0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25)'), ";\n }\n ");
105
+ return "\n .".concat(className, ":hover & {\n box-shadow: ", "var(--ds-shadow-overlay, 0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25))", ";\n }\n ");
107
106
  } else {
108
107
  return '';
109
108
  }
@@ -117,11 +116,11 @@ export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTem
117
116
  }, borderRadius);
118
117
  export var maxAvatarCount = 6;
119
118
  export var ContentWrapper = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding: 8px 12px 12px 12px;\n"])));
120
- export var Title = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), token('color.text', colors.N900), 20 / 16, 20 * 4);
121
- export var Byline = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: 4px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), token('color.text.subtlest', colors.N300), 16 / 12, ellipsis('100%'));
122
- export var Description = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), token('color.text', colors.N800), 18 / 12, 18 * 3);
119
+ export var Title = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N900, ")"), 20 / 16, 20 * 4);
120
+ export var Byline = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: 4px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), "var(--ds-text-subtlest, ".concat(colors.N300, ")"), 16 / 12, ellipsis('100%'));
121
+ export var Description = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N800, ")"), 18 / 12, 18 * 3);
123
122
  export var ResolvedViewIconWrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-top: 4px;\n"])));
124
- export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), token('color.skeleton', colors.N30), function (_ref12) {
123
+ export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref12) {
125
124
  var src = _ref12.src;
126
125
  return src;
127
126
  });
@@ -4,7 +4,6 @@ import Button from '@atlaskit/button/custom-theme-button';
4
4
  import ErrorIcon from '@atlaskit/icon/glyph/error';
5
5
  import { fontSize } from '@atlaskit/theme/constants';
6
6
  import { R300 } from '@atlaskit/theme/colors';
7
- import { token } from '@atlaskit/tokens';
8
7
  import { Frame } from '../../BlockCard/components/Frame';
9
8
  import { FormattedMessage } from 'react-intl-next';
10
9
  import { messages } from '../../../messages';
@@ -23,7 +22,7 @@ export var EmbedCardErroredView = function EmbedCardErroredView(_ref) {
23
22
  testId: testId
24
23
  }, jsx(ErrorIcon, {
25
24
  size: "small",
26
- primaryColor: token('color.icon.danger', R300),
25
+ primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
27
26
  label: "error-icon"
28
27
  }), jsx("span", {
29
28
  css: {
@@ -8,8 +8,7 @@ import { B200, B400, N700, R400 } from '@atlaskit/theme/colors';
8
8
  import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
9
9
  import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
10
10
  import { IconType } from '../../../../../constants';
11
- import { token } from '@atlaskit/tokens'; // prettier-ignore
12
-
11
+ // prettier-ignore
13
12
  var importIconMapper = (_importIconMapper = {}, _defineProperty(_importIconMapper, IconType.Archive, function () {
14
13
  return import(
15
14
  /* webpackChunkName: "glyphArchive" */
@@ -311,7 +310,7 @@ var AtlaskitIcon = function AtlaskitIcon(_ref3) {
311
310
  case IconType.Confluence:
312
311
  return /*#__PURE__*/React.createElement(ImportedIcon, {
313
312
  testId: testId,
314
- textColor: token('color.text.subtle', N700)
313
+ textColor: "var(--ds-text-subtle, ".concat(N700, ")")
315
314
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
316
315
  ,
317
316
  iconColor: B200,
@@ -325,7 +324,7 @@ var AtlaskitIcon = function AtlaskitIcon(_ref3) {
325
324
  // Logo component has a different prop set from other icon components
326
325
  return /*#__PURE__*/React.createElement(ImportedIcon, {
327
326
  testId: testId,
328
- textColor: token('color.text.subtle', N700)
327
+ textColor: "var(--ds-text-subtle, ".concat(N700, ")")
329
328
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
330
329
  ,
331
330
  iconColor: B200,
@@ -340,7 +339,7 @@ var AtlaskitIcon = function AtlaskitIcon(_ref3) {
340
339
  return /*#__PURE__*/React.createElement(ImportedIcon, {
341
340
  label: label,
342
341
  testId: testId,
343
- primaryColor: token('color.icon.danger', R400)
342
+ primaryColor: "var(--ds-icon-danger, ".concat(R400, ")")
344
343
  });
345
344
 
346
345
  default:
@@ -5,14 +5,13 @@ var _templateObject, _templateObject2;
5
5
  /** @jsx jsx */
6
6
  import React from 'react';
7
7
  import { css, jsx, keyframes } from '@emotion/react';
8
- import { token } from '@atlaskit/tokens';
9
8
 
10
9
  var LoadingSkeleton = function LoadingSkeleton(_ref) {
11
10
  var testId = _ref.testId,
12
11
  width = _ref.width,
13
12
  height = _ref.height;
14
13
  var animationNameStyles = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { background-position: 50% 0; }\n 100% { background-position: -50% 0; }\n "])));
15
- var styles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "rem;\n height: ", "rem;\n border-radius: 2px;\n user-select: none;\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: 280% 100%;\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 "])), width, height, token('color.skeleton.subtle', '#f6f7f8'), token('color.skeleton', '#edeef1'), animationNameStyles);
14
+ var styles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "rem;\n height: ", "rem;\n border-radius: 2px;\n user-select: none;\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: 280% 100%;\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 "])), width, height, "var(--ds-skeleton-subtle, #f6f7f8)", "var(--ds-skeleton, #edeef1)", animationNameStyles);
16
15
  return jsx("span", {
17
16
  css: styles,
18
17
  "data-testid": testId
@@ -12,7 +12,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
12
12
 
13
13
  import React from 'react';
14
14
  import { R300 } from '@atlaskit/theme/colors';
15
- import { token } from '@atlaskit/tokens';
16
15
  import ErrorIcon from '@atlaskit/icon/glyph/error';
17
16
  import Button from '@atlaskit/button/custom-theme-button';
18
17
  import { Frame } from '../Frame';
@@ -81,7 +80,7 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
81
80
  icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
82
81
  label: "error",
83
82
  size: "small",
84
- primaryColor: token('color.icon.danger', R300)
83
+ primaryColor: "var(--ds-icon-danger, ".concat(R300, ")")
85
84
  })),
86
85
  link: url,
87
86
  title: url,
@@ -13,7 +13,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
 
14
14
  import React from 'react';
15
15
  import { R400, N500 } from '@atlaskit/theme/colors';
16
- import { token } from '@atlaskit/tokens';
17
16
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
18
17
  import Button from '@atlaskit/button/custom-theme-button';
19
18
  import { Frame } from '../Frame';
@@ -27,7 +26,7 @@ import { LozengeWrapper, LozengeBlockWrapper } from '../IconAndTitleLayout/style
27
26
  var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
28
27
  label: "error",
29
28
  size: "small",
30
- primaryColor: token('color.icon.danger', R400)
29
+ primaryColor: "var(--ds-icon-danger, ".concat(R400, ")")
31
30
  }));
32
31
  export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
33
32
  _inherits(InlineCardForbiddenView, _React$Component);
@@ -131,7 +130,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
131
130
  link: url,
132
131
  title: url,
133
132
  onClick: onClick,
134
- titleColor: token('color.text.subtle', N500),
133
+ titleColor: "var(--ds-text-subtle, ".concat(N500, ")"),
135
134
  rightSide: this.renderRightSide(),
136
135
  rightSideSpacer: this.state.hasRequestAccessContextMessage
137
136
  }));
@@ -6,20 +6,19 @@ import styled from '@emotion/styled';
6
6
  import { B100, B400, B50, DN40A, DN50A, N20, N40A, N50A } from '@atlaskit/theme/colors';
7
7
  import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
8
8
  import { themed } from '@atlaskit/theme/components';
9
- import { token } from '@atlaskit/tokens';
10
9
  var BACKGROUND_COLOR_DARK = '#262B31';
11
- var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat(token('color.border.selected', B100), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
10
+ var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat("var(--ds-border-selected, ".concat(B100, ")"), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
12
11
 
13
12
  var isInteractive = function isInteractive(_ref) {
14
13
  var isInteractive = _ref.isInteractive;
15
14
 
16
15
  if (isInteractive) {
17
16
  return "\n :hover {\n background-color: ".concat(themed({
18
- light: token('color.background.neutral.subtle.hovered', N20),
19
- dark: token('color.background.neutral.subtle.hovered', BACKGROUND_COLOR_DARK)
17
+ light: "var(--ds-background-neutral-subtle-hovered, ".concat(N20, ")"),
18
+ dark: "var(--ds-background-neutral-subtle-hovered, ".concat(BACKGROUND_COLOR_DARK, ")")
20
19
  }), ";\n }\n :active {\n background-color: ").concat(themed({
21
- light: token('color.background.selected', B50),
22
- dark: token('color.background.selected', BACKGROUND_COLOR_DARK)
20
+ light: "var(--ds-background-selected, ".concat(B50, ")"),
21
+ dark: "var(--ds-background-selected, ".concat(BACKGROUND_COLOR_DARK, ")")
23
22
  }), ";\n }\n :focus {\n ").concat(selected, "\n }\n ");
24
23
  } else {
25
24
  return '';
@@ -51,14 +50,14 @@ var isSelected = function isSelected(_ref2) {
51
50
 
52
51
  var baseWrapperStyle = function baseWrapperStyle(props) {
53
52
  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(akBorderRadius(), "px;\n color: ").concat(themed({
54
- light: token('color.link', B400),
55
- dark: token('color.link', '#4794FF')
53
+ light: "var(--ds-link, ".concat(B400, ")"),
54
+ dark: "var(--ds-link, #4794FF)"
56
55
  })(props), ";\n background-color: ").concat(props.withoutBackground ? '' : themed({
57
- light: token('elevation.surface.raised', 'white'),
58
- dark: token('elevation.surface.raised', BACKGROUND_COLOR_DARK)
56
+ light: "var(--ds-surface-raised, white)",
57
+ dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
59
58
  })(props), ";\n ").concat(props.withoutBackground ? '' : themed({
60
- light: "box-shadow: ".concat(token('elevation.shadow.raised', "0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A)), ";"),
61
- dark: "box-shadow: ".concat(token('elevation.shadow.raised', "0 1px 1px ".concat(DN50A, ", 0 0 1px 1px ").concat(DN40A)), ";")
59
+ light: "box-shadow: ".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A), ")"), ";"),
60
+ dark: "box-shadow: ".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(DN50A, ", 0 0 1px 1px ").concat(DN40A), ")"), ";")
62
61
  })(props), "\n ").concat(isSelected(props), ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n");
63
62
  };
64
63
 
@@ -4,7 +4,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
4
4
 
5
5
  import styled from '@emotion/styled';
6
6
  import { keyframes } from '@emotion/react';
7
- import { token } from '@atlaskit/tokens';
8
7
  var placeholderShimmer = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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
9
8
  // for vertical alignment.
10
9
  // Current rationale: vertically positioned at the top of
@@ -16,4 +15,4 @@ export var Icon = styled.img(_templateObject2 || (_templateObject2 = _taggedTemp
16
15
  // TODO: Replace this override with proper AtlasKit solution.
17
16
 
18
17
  export var AKIconWrapper = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: -2px;\n"])));
19
- export var Shimmer = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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"])), token('color.skeleton.subtle', '#f6f7f8'), token('color.skeleton', '#edeef1'), placeholderShimmer);
18
+ export var Shimmer = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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);
@@ -14,7 +14,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
14
14
  import Button from '@atlaskit/button/custom-theme-button';
15
15
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
16
16
  import { N500, R400 } from '@atlaskit/theme/colors';
17
- import { token } from '@atlaskit/tokens';
18
17
  import React from 'react';
19
18
  import { FormattedMessage } from 'react-intl-next';
20
19
  import { messages } from '../../../messages';
@@ -26,7 +25,7 @@ import { HoverCard } from '../../HoverCard';
26
25
  var FallbackUnauthorizedIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
27
26
  label: "error",
28
27
  size: "small",
29
- primaryColor: token('color.icon.danger', R400)
28
+ primaryColor: "var(--ds-icon-danger, ".concat(R400, ")")
30
29
  }));
31
30
  export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component) {
32
31
  _inherits(InlineCardUnauthorizedView, _React$Component);
@@ -92,7 +91,7 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
92
91
  link: url,
93
92
  rightSide: this.renderRightSide(),
94
93
  onClick: onClick,
95
- titleColor: token('color.text.subtle', N500)
94
+ titleColor: "var(--ds-text-subtle, ".concat(N500, ")")
96
95
  }));
97
96
 
98
97
  if (showAuthTooltip) {
@@ -5,17 +5,16 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
5
  import styled from '@emotion/styled';
6
6
  import { B400, N200 } from '@atlaskit/theme/colors';
7
7
  import { themed } from '@atlaskit/theme/components';
8
- import { token } from '@atlaskit/tokens';
9
8
  var LINK_COLOR_DARK = '#4794FF'; // By default buttons will hide overflow and ellipsis content instead of wrapping.
10
9
  // This basically turns the button back into inline content
11
10
 
12
11
  export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: initial !important;\n display: inline !important;\n\n > span {\n display: inline;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])));
13
12
  export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
14
- light: token('color.text.subtlest', N200),
15
- dark: token('color.text.subtlest', LINK_COLOR_DARK)
13
+ light: "var(--ds-text-subtlest, ".concat(N200, ")"),
14
+ dark: "var(--ds-text-subtlest, ".concat(LINK_COLOR_DARK, ")")
16
15
  }));
17
16
  export var LowercaseAppearance = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-transform: lowercase;\n"])));
18
17
  export var LinkAppearance = styled.a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
19
- light: token('color.link', B400),
20
- dark: token('color.link', LINK_COLOR_DARK)
18
+ light: "var(--ds-link, ".concat(B400, ")"),
19
+ dark: "var(--ds-link, ".concat(LINK_COLOR_DARK, ")")
21
20
  }));
@@ -1,7 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { N300 } from '@atlaskit/theme/colors';
4
- import { token } from '@atlaskit/tokens';
5
4
  import { gs, mq } from './utils';
6
5
  export var Byline = function Byline(_ref) {
7
6
  var text = _ref.text,
@@ -12,7 +11,7 @@ export var Byline = function Byline(_ref) {
12
11
  css: mq({
13
12
  fontSize: gs(1.5),
14
13
  lineHeight: gs(2.5),
15
- color: "".concat(token('color.text.subtlest', N300)),
14
+ color: "".concat("var(--ds-text-subtlest, ".concat(N300, ")")),
16
15
  fontWeight: 'normal',
17
16
  marginTop: gs(0.5),
18
17
  // Spec: only allow two lines MAX to be shown.
@@ -3,7 +3,6 @@ import { jsx } from '@emotion/react';
3
3
  import Tooltip from '@atlaskit/tooltip';
4
4
  import { gs } from './utils';
5
5
  import { N300 } from '@atlaskit/theme/colors';
6
- import { token } from '@atlaskit/tokens';
7
6
  export var Metadata = function Metadata(_ref) {
8
7
  var text = _ref.text,
9
8
  icon = _ref.icon,
@@ -30,7 +29,7 @@ export var Metadata = function Metadata(_ref) {
30
29
  }, metadataIcon, jsx("span", {
31
30
  css: {
32
31
  fontSize: gs(1.5),
33
- color: "".concat(token('color.text.subtlest', N300)),
32
+ color: "".concat("var(--ds-text-subtlest, ".concat(N300, ")")),
34
33
  marginRight: gs(0.5),
35
34
  marginLeft: '2px'
36
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.11.0",
3
+ "version": "23.11.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"