@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
@@ -1,7 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { borderRadius as akBorderRadius, fontFamily } from '@atlaskit/theme/constants';
3
3
  import * as colors from '@atlaskit/theme/colors';
4
- import { token } from '@atlaskit/tokens';
5
4
  import { gs as gridSize } from '../../common/utils';
6
5
  export const className = 'media-card-frame';
7
6
  export const cardShadow = ``;
@@ -55,7 +54,7 @@ function getinteractiveStyles({
55
54
  ${visibleStyles}
56
55
  }
57
56
  &:active {
58
- background-color: ${token('color.background.selected', colors.B50)};
57
+ background-color: ${`var(--ds-background-selected, ${colors.B50})`};
59
58
  }
60
59
  ` : '';
61
60
  return `${visibleFrameStyles}${interactiveFrameStyles}`;
@@ -68,7 +67,7 @@ function selected({
68
67
  ${visibleStyles}
69
68
  &::after {
70
69
  cursor: pointer;
71
- box-shadow: 0 0 0 3px ${token('color.border.selected', colors.B100)};
70
+ box-shadow: 0 0 0 3px ${`var(--ds-border-selected, ${colors.B100})`};
72
71
  content: '';
73
72
  outline: none;
74
73
  position: absolute;
@@ -115,10 +114,10 @@ const wrapperStyles = props => `
115
114
  `;
116
115
 
117
116
  const visibleStyles = `
118
- background-color: ${token('color.background.neutral.subtle', colors.N30)};
117
+ background-color: ${`var(--ds-background-neutral-subtle, ${colors.N30})`};
119
118
 
120
119
  &:after {
121
- background: ${token('color.background.neutral', colors.N30)} !important;
120
+ background: ${`var(--ds-background-neutral, ${colors.N30})`} !important;
122
121
  }
123
122
  .embed-header {
124
123
  opacity: 1;
@@ -147,7 +146,7 @@ export const Header = styled.div`
147
146
  width: 100%;
148
147
  display: flex;
149
148
  align-items: center;
150
- color: ${token('color.icon', colors.N300)};
149
+ color: ${`var(--ds-icon, ${colors.N300})`};
151
150
  opacity: 0;
152
151
  transition: 300ms opacity cubic-bezier(0.15, 1, 0.3, 1);
153
152
  `;
@@ -159,7 +158,7 @@ export const IconWrapper = styled.div`
159
158
  }) => {
160
159
  if (isPlaceholder) {
161
160
  return `
162
- background-color: ${token('color.skeleton', colors.N30)};
161
+ background-color: ${`var(--ds-skeleton, ${colors.N30})`};
163
162
  `;
164
163
  } else {
165
164
  return '';
@@ -175,12 +174,12 @@ export const TextWrapper = styled.div`
175
174
  ${borderRadius}
176
175
  width: 125px;
177
176
  height: 12px;
178
- background-color: ${token('color.skeleton', colors.N30)};
177
+ background-color: ${`var(--ds-skeleton, ${colors.N30})`};
179
178
  `;
180
179
  } else {
181
180
  return '';
182
181
  }
183
- }} color: ${token('color.text.subtlest', colors.N300)};
182
+ }} color: ${`var(--ds-text-subtlest, ${colors.N300})`};
184
183
  font-size: 12px;
185
184
  line-height: 16px;
186
185
  ${ellipsis('none')};
@@ -191,7 +190,7 @@ export const TextWrapper = styled.div`
191
190
  export const Content = styled.div`
192
191
  ${borderRadius}
193
192
  ${cardShadow}
194
- background-color: ${token('elevation.surface.raised', 'white')};
193
+ background-color: ${"var(--ds-surface-raised, white)"};
195
194
  position: absolute;
196
195
  z-index: 1;
197
196
  width: 100%;
@@ -216,7 +215,7 @@ export const Content = styled.div`
216
215
  if (isInteractive) {
217
216
  return `
218
217
  .${className}:hover & {
219
- box-shadow: ${token('elevation.shadow.overlay', '0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25)')};
218
+ 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))"};
220
219
  }
221
220
  `;
222
221
  } else {
@@ -245,7 +244,7 @@ export const ContentWrapper = styled.div`
245
244
  padding: 8px 12px 12px 12px;
246
245
  `;
247
246
  export const Title = styled.div`
248
- color: ${token('color.text', colors.N900)};
247
+ color: ${`var(--ds-text, ${colors.N900})`};
249
248
  font-size: 16px;
250
249
  font-weight: 500;
251
250
  line-height: ${20 / 16};
@@ -254,7 +253,7 @@ export const Title = styled.div`
254
253
  `;
255
254
  export const Byline = styled.div`
256
255
  margin-top: 4px;
257
- color: ${token('color.text.subtlest', colors.N300)};
256
+ color: ${`var(--ds-text-subtlest, ${colors.N300})`};
258
257
  font-size: 12px;
259
258
  font-weight: normal;
260
259
  line-height: ${16 / 12};
@@ -262,7 +261,7 @@ export const Byline = styled.div`
262
261
  `;
263
262
  export const Description = styled.div`
264
263
  margin-top: 7px;
265
- color: ${token('color.text', colors.N800)};
264
+ color: ${`var(--ds-text, ${colors.N800})`};
266
265
  font-size: 12px;
267
266
  font-weight: normal;
268
267
  line-height: ${18 / 12};
@@ -277,7 +276,7 @@ export const Thumbnail = styled.div`
277
276
  ${csssize(48)}
278
277
  float: right;
279
278
  margin: 4px 0 12px 12px;
280
- background-color: ${token('color.skeleton', colors.N30)};
279
+ background-color: ${`var(--ds-skeleton, ${colors.N30})`};
281
280
  background-image: url(${({
282
281
  src
283
282
  }) => src});
@@ -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';
@@ -21,7 +20,7 @@ export const EmbedCardErroredView = ({
21
20
  testId: testId
22
21
  }, jsx(ErrorIcon, {
23
22
  size: "small",
24
- primaryColor: token('color.icon.danger', R300),
23
+ primaryColor: `var(--ds-icon-danger, ${R300})`,
25
24
  label: "error-icon"
26
25
  }), jsx("span", {
27
26
  css: {
@@ -4,8 +4,7 @@ import { B200, B400, N700, R400 } from '@atlaskit/theme/colors';
4
4
  import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
5
5
  import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
6
6
  import { IconType } from '../../../../../constants';
7
- import { token } from '@atlaskit/tokens'; // prettier-ignore
8
-
7
+ // prettier-ignore
9
8
  const importIconMapper = {
10
9
  [IconType.Archive]: () => import(
11
10
  /* webpackChunkName: "glyphArchive" */
@@ -243,7 +242,7 @@ const AtlaskitIcon = ({
243
242
  case IconType.Confluence:
244
243
  return /*#__PURE__*/React.createElement(ImportedIcon, {
245
244
  testId: testId,
246
- textColor: token('color.text.subtle', N700)
245
+ textColor: `var(--ds-text-subtle, ${N700})`
247
246
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
248
247
  ,
249
248
  iconColor: B200,
@@ -257,7 +256,7 @@ const AtlaskitIcon = ({
257
256
  // Logo component has a different prop set from other icon components
258
257
  return /*#__PURE__*/React.createElement(ImportedIcon, {
259
258
  testId: testId,
260
- textColor: token('color.text.subtle', N700)
259
+ textColor: `var(--ds-text-subtle, ${N700})`
261
260
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
262
261
  ,
263
262
  iconColor: B200,
@@ -272,7 +271,7 @@ const AtlaskitIcon = ({
272
271
  return /*#__PURE__*/React.createElement(ImportedIcon, {
273
272
  label: label,
274
273
  testId: testId,
275
- primaryColor: token('color.icon.danger', R400)
274
+ primaryColor: `var(--ds-icon-danger, ${R400})`
276
275
  });
277
276
 
278
277
  default:
@@ -1,7 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { css, jsx, keyframes } from '@emotion/react';
4
- import { token } from '@atlaskit/tokens';
5
4
 
6
5
  const LoadingSkeleton = ({
7
6
  testId,
@@ -17,11 +16,11 @@ const LoadingSkeleton = ({
17
16
  height: ${height}rem;
18
17
  border-radius: 2px;
19
18
  user-select: none;
20
- background: ${token('color.skeleton.subtle', '#f6f7f8')};
19
+ background: ${"var(--ds-skeleton-subtle, #f6f7f8)"};
21
20
  background-image: linear-gradient(
22
21
  to right,
23
22
  transparent 0%,
24
- ${token('color.skeleton', '#edeef1')} 20%,
23
+ ${"var(--ds-skeleton, #edeef1)"} 20%,
25
24
  transparent 40%,
26
25
  transparent 100%
27
26
  );
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { R300 } from '@atlaskit/theme/colors';
4
- import { token } from '@atlaskit/tokens';
5
4
  import ErrorIcon from '@atlaskit/icon/glyph/error';
6
5
  import Button from '@atlaskit/button/custom-theme-button';
7
6
  import { Frame } from '../Frame';
@@ -57,7 +56,7 @@ export class InlineCardErroredView extends React.Component {
57
56
  icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
58
57
  label: "error",
59
58
  size: "small",
60
- primaryColor: token('color.icon.danger', R300)
59
+ primaryColor: `var(--ds-icon-danger, ${R300})`
61
60
  })),
62
61
  link: url,
63
62
  title: url,
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
4
  import { R400, N500 } from '@atlaskit/theme/colors';
5
- import { token } from '@atlaskit/tokens';
6
5
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
7
6
  import Button from '@atlaskit/button/custom-theme-button';
8
7
  import { Frame } from '../Frame';
@@ -16,7 +15,7 @@ import { LozengeWrapper, LozengeBlockWrapper } from '../IconAndTitleLayout/style
16
15
  const FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
17
16
  label: "error",
18
17
  size: "small",
19
- primaryColor: token('color.icon.danger', R400)
18
+ primaryColor: `var(--ds-icon-danger, ${R400})`
20
19
  }));
21
20
  export class InlineCardForbiddenView extends React.Component {
22
21
  constructor(...args) {
@@ -110,7 +109,7 @@ export class InlineCardForbiddenView extends React.Component {
110
109
  link: url,
111
110
  title: url,
112
111
  onClick: onClick,
113
- titleColor: token('color.text.subtle', N500),
112
+ titleColor: `var(--ds-text-subtle, ${N500})`,
114
113
  rightSide: this.renderRightSide(),
115
114
  rightSideSpacer: this.state.hasRequestAccessContextMessage
116
115
  }));
@@ -2,11 +2,10 @@ import styled from '@emotion/styled';
2
2
  import { B100, B400, B50, DN40A, DN50A, N20, N40A, N50A } from '@atlaskit/theme/colors';
3
3
  import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
4
4
  import { themed } from '@atlaskit/theme/components';
5
- import { token } from '@atlaskit/tokens';
6
5
  const BACKGROUND_COLOR_DARK = '#262B31';
7
6
  const selected = `
8
7
  cursor: pointer;
9
- box-shadow: 0 0 0 2px ${token('color.border.selected', B100)};
8
+ box-shadow: 0 0 0 2px ${`var(--ds-border-selected, ${B100})`};
10
9
  outline: none;
11
10
  user-select: none;
12
11
  &, :hover, :focus, :active {
@@ -21,14 +20,14 @@ const isInteractive = ({
21
20
  return `
22
21
  :hover {
23
22
  background-color: ${themed({
24
- light: token('color.background.neutral.subtle.hovered', N20),
25
- dark: token('color.background.neutral.subtle.hovered', BACKGROUND_COLOR_DARK)
23
+ light: `var(--ds-background-neutral-subtle-hovered, ${N20})`,
24
+ dark: `var(--ds-background-neutral-subtle-hovered, ${BACKGROUND_COLOR_DARK})`
26
25
  })};
27
26
  }
28
27
  :active {
29
28
  background-color: ${themed({
30
- light: token('color.background.selected', B50),
31
- dark: token('color.background.selected', BACKGROUND_COLOR_DARK)
29
+ light: `var(--ds-background-selected, ${B50})`,
30
+ dark: `var(--ds-background-selected, ${BACKGROUND_COLOR_DARK})`
32
31
  })};
33
32
  }
34
33
  :focus {
@@ -71,16 +70,16 @@ const baseWrapperStyle = props => `
71
70
  box-decoration-break: clone;
72
71
  border-radius: ${akBorderRadius()}px;
73
72
  color: ${themed({
74
- light: token('color.link', B400),
75
- dark: token('color.link', '#4794FF')
73
+ light: `var(--ds-link, ${B400})`,
74
+ dark: "var(--ds-link, #4794FF)"
76
75
  })(props)};
77
76
  background-color: ${props.withoutBackground ? '' : themed({
78
- light: token('elevation.surface.raised', 'white'),
79
- dark: token('elevation.surface.raised', BACKGROUND_COLOR_DARK)
77
+ light: "var(--ds-surface-raised, white)",
78
+ dark: `var(--ds-surface-raised, ${BACKGROUND_COLOR_DARK})`
80
79
  })(props)};
81
80
  ${props.withoutBackground ? '' : themed({
82
- light: `box-shadow: ${token('elevation.shadow.raised', `0 1px 1px ${N50A}, 0 0 1px 1px ${N40A}`)};`,
83
- dark: `box-shadow: ${token('elevation.shadow.raised', `0 1px 1px ${DN50A}, 0 0 1px 1px ${DN40A}`)};`
81
+ light: `box-shadow: ${`var(--ds-shadow-raised, ${`0 1px 1px ${N50A}, 0 0 1px 1px ${N40A}`})`};`,
82
+ dark: `box-shadow: ${`var(--ds-shadow-raised, ${`0 1px 1px ${DN50A}, 0 0 1px 1px ${DN40A}`})`};`
84
83
  })(props)}
85
84
  ${isSelected(props)};
86
85
  transition: 0.1s all ease-in-out;
@@ -1,6 +1,5 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { keyframes } from '@emotion/react';
3
- import { token } from '@atlaskit/tokens';
4
3
  const placeholderShimmer = keyframes`
5
4
  0% {
6
5
  background-position: -20px 0;
@@ -42,11 +41,11 @@ export const Shimmer = styled.span`
42
41
  top: 50%;
43
42
  left: 50%;
44
43
  transform: translate(-50%, -50%);
45
- background: ${token('color.skeleton.subtle', '#f6f7f8')};
44
+ background: ${"var(--ds-skeleton-subtle, #f6f7f8)"};
46
45
  background-image: linear-gradient(
47
46
  to right,
48
47
  transparent 0%,
49
- ${token('color.skeleton', '#edeef1')} 20%,
48
+ ${"var(--ds-skeleton, #edeef1)"} 20%,
50
49
  transparent 40%,
51
50
  transparent 100%
52
51
  );
@@ -3,7 +3,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import Button from '@atlaskit/button/custom-theme-button';
4
4
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
5
5
  import { N500, R400 } from '@atlaskit/theme/colors';
6
- import { token } from '@atlaskit/tokens';
7
6
  import React from 'react';
8
7
  import { FormattedMessage } from 'react-intl-next';
9
8
  import { messages } from '../../../messages';
@@ -15,7 +14,7 @@ import { HoverCard } from '../../HoverCard';
15
14
  const FallbackUnauthorizedIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
16
15
  label: "error",
17
16
  size: "small",
18
- primaryColor: token('color.icon.danger', R400)
17
+ primaryColor: `var(--ds-icon-danger, ${R400})`
19
18
  }));
20
19
  export class InlineCardUnauthorizedView extends React.Component {
21
20
  constructor(...args) {
@@ -67,7 +66,7 @@ export class InlineCardUnauthorizedView extends React.Component {
67
66
  link: url,
68
67
  rightSide: this.renderRightSide(),
69
68
  onClick: onClick,
70
- titleColor: token('color.text.subtle', N500)
69
+ titleColor: `var(--ds-text-subtle, ${N500})`
71
70
  }));
72
71
 
73
72
  if (showAuthTooltip) {
@@ -1,7 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { B400, N200 } from '@atlaskit/theme/colors';
3
3
  import { themed } from '@atlaskit/theme/components';
4
- import { token } from '@atlaskit/tokens';
5
4
  const LINK_COLOR_DARK = '#4794FF'; // By default buttons will hide overflow and ellipsis content instead of wrapping.
6
5
  // This basically turns the button back into inline content
7
6
 
@@ -20,8 +19,8 @@ export const IconStyledButton = styled.span`
20
19
  `;
21
20
  export const NoLinkAppearance = styled.span`
22
21
  color: ${themed({
23
- light: token('color.text.subtlest', N200),
24
- dark: token('color.text.subtlest', LINK_COLOR_DARK)
22
+ light: `var(--ds-text-subtlest, ${N200})`,
23
+ dark: `var(--ds-text-subtlest, ${LINK_COLOR_DARK})`
25
24
  })};
26
25
  `;
27
26
  export const LowercaseAppearance = styled.span`
@@ -29,7 +28,7 @@ export const LowercaseAppearance = styled.span`
29
28
  `;
30
29
  export const LinkAppearance = styled.a`
31
30
  color: ${themed({
32
- light: token('color.link', B400),
33
- dark: token('color.link', LINK_COLOR_DARK)
31
+ light: `var(--ds-link, ${B400})`,
32
+ dark: `var(--ds-link, ${LINK_COLOR_DARK})`
34
33
  })};
35
34
  `;
@@ -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 const Byline = ({
7
6
  text,
@@ -12,7 +11,7 @@ export const Byline = ({
12
11
  css: mq({
13
12
  fontSize: gs(1.5),
14
13
  lineHeight: gs(2.5),
15
- color: `${token('color.text.subtlest', N300)}`,
14
+ color: `${`var(--ds-text-subtlest, ${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 const Metadata = ({
8
7
  text,
9
8
  icon,
@@ -31,7 +30,7 @@ export const Metadata = ({
31
30
  }, metadataIcon, jsx("span", {
32
31
  css: {
33
32
  fontSize: gs(1.5),
34
- color: `${token('color.text.subtlest', N300)}`,
33
+ color: `${`var(--ds-text-subtlest, ${N300})`}`,
35
34
  marginRight: gs(0.5),
36
35
  marginLeft: '2px'
37
36
  }
@@ -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 var extractAttachmentCount = function extractAttachmentCount(jsonLd) {
6
5
  var attachmentCount = jsonLd['atlassian:attachmentCount'];
7
6
 
@@ -11,7 +10,7 @@ export var extractAttachmentCount = function 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, ".concat(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 var extractCommentCount = function extractCommentCount(jsonLd) {
6
5
  var commentCount = jsonLd['schema:commentCount'];
@@ -12,7 +11,7 @@ export var extractCommentCount = function 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, ".concat(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 var extractProgrammingLanguage = function extractProgrammingLanguage(jsonLd) {
6
5
  var programmingLanguage = jsonLd['schema:programmingLanguage'];
7
6
 
@@ -11,7 +10,7 @@ export var extractProgrammingLanguage = function extractProgrammingLanguage(json
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, ".concat(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 var extractSubscriberCount = function extractSubscriberCount(jsonLd) {
6
5
  var subscriberCount = jsonLd['atlassian:subscriberCount'];
7
6
 
@@ -11,7 +10,7 @@ export var extractSubscriberCount = function 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, ".concat(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 var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
5
4
  var type = jsonLd['@type'];
6
5
 
@@ -11,7 +10,7 @@ export var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
11
10
 
12
11
  switch (highestPriorityType) {
13
12
  case 'atlassian:UndefinedLink':
14
- return token('color.text.danger', R500);
13
+ return "var(--ds-text-danger, ".concat(R500, ")");
15
14
 
16
15
  default:
17
16
  return undefined;
@@ -1,17 +1,16 @@
1
- import { token } from '@atlaskit/tokens';
2
1
  export var 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
  }
@@ -8,7 +8,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
8
8
  import { jsx } from '@emotion/react';
9
9
  import React from 'react';
10
10
  import { N20A, N30A, B200, N40A, N50A } from '@atlaskit/theme/colors';
11
- import { token } from '@atlaskit/tokens';
12
11
  import { gs, br, mq } from '../../common/utils';
13
12
  export var Frame = function Frame() {
14
13
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
@@ -22,7 +21,7 @@ var sharedFrameStyles = {
22
21
  maxWidth: gs(95),
23
22
  width: '100%',
24
23
  display: 'flex',
25
- backgroundColor: token('elevation.surface.raised', 'white')
24
+ backgroundColor: "var(--ds-surface-raised, white)"
26
25
  };
27
26
  export var ExpandedFrame = function ExpandedFrame(_ref) {
28
27
  var children = _ref.children,
@@ -35,15 +34,15 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
35
34
  css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
36
35
  '&:hover': isHoverable ? {
37
36
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4064
38
- backgroundColor: token('color.background.neutral.subtle.hovered', N20A),
37
+ backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N20A, ")"),
39
38
  cursor: 'pointer'
40
39
  } : undefined,
41
40
  minHeight: isFluidHeight ? 0 : [gs(21), gs(15)],
42
41
  borderRadius: isSelected ? br() : br(0.5),
43
- border: "2px solid ".concat(isSelected ? token('color.border.selected', B200) : 'transparent'),
42
+ border: "2px solid ".concat(isSelected ? "var(--ds-border-selected, ".concat(B200, ")") : 'transparent'),
44
43
  justifyContent: 'space-between',
45
44
  overflow: 'hidden',
46
- boxShadow: token('elevation.shadow.raised', "0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A))
45
+ boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A), ")")
47
46
  })),
48
47
  "data-testid": testId,
49
48
  className: className,
@@ -60,14 +59,14 @@ export var CompactFrame = function CompactFrame(_ref2) {
60
59
  return jsx("div", {
61
60
  css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
62
61
  '&:hover': isHoverable ? {
63
- backgroundColor: token('color.background.neutral.hovered', N30A)
62
+ backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30A, ")")
64
63
  } : undefined,
65
64
  borderRadius: isSelected ? br() : br(0.5),
66
- border: isSelected ? "2px solid ".concat(token('color.border.selected', B200)) : '',
65
+ border: isSelected ? "2px solid ".concat("var(--ds-border-selected, ".concat(B200, ")")) : '',
67
66
  justifyContent: 'center',
68
67
  alignItems: 'center',
69
68
  height: inheritDimensions ? '100%' : gs(5),
70
- backgroundColor: token('color.background.neutral', N20A),
69
+ backgroundColor: "var(--ds-background-neutral, ".concat(N20A, ")"),
71
70
  width: ['calc(100% - 16px)', '100%'],
72
71
  padding: ["0px ".concat(gs(1)), '0']
73
72
  })),
@@ -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 var Link = function Link(_ref) {
6
5
  var url = _ref.url,
7
6
  _ref$testId = _ref.testId,
@@ -11,7 +10,7 @@ export var Link = function Link(_ref) {
11
10
  "data-testid": "".concat(testId, "-link"),
12
11
  className: className,
13
12
  css: {
14
- color: token('color.link', B400),
13
+ color: "var(--ds-link, ".concat(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 var Provider = function Provider(_ref) {
7
6
  var name = _ref.name,
8
7
  icon = _ref.icon;
@@ -28,7 +27,7 @@ export var Provider = function Provider(_ref) {
28
27
  }
29
28
  }, iconToRender, jsx("span", {
30
29
  css: {
31
- color: token('color.text.subtlest', N300),
30
+ color: "var(--ds-text-subtlest, ".concat(N300, ")"),
32
31
  margin: 0,
33
32
  marginLeft: gs(0.5),
34
33
  // EDM-713: fixes copy-paste from renderer to editor for Firefox