@atlaskit/smart-card 40.7.1 → 40.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 40.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bd5987cfa6e70`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd5987cfa6e70) -
8
+ [ux] Modify BaseLinkComponent so the black theme is consistent with the grey theme
9
+
3
10
  ## 40.7.1
4
11
 
5
12
  ### Patch Changes
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "40.7.0"
14
+ packageVersion: "40.7.1"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -25,8 +25,12 @@ a._ye10131l{color:var(--ds-text-subtlest,#626f86)}
25
25
  ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}
26
26
  ._9oik1r31:hover{text-decoration-color:currentColor}
27
27
  ._jf4cnqa1:hover{text-decoration-style:solid}
28
+ ._1iohnqa1:active, ._5goinqa1:focus, ._jf4cnqa1:hover, ._1726nqa1:visited{text-decoration-style:solid}
29
+ ._1nrm1r31:active, ._1a3b1r31:focus, ._9oik1r31:hover, ._1ydc1r31:visited{text-decoration-color:currentColor}
28
30
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
29
31
  ._9h8h1fxt:active{color:var(--ds-text,#172b4d)}
32
+ ._9h8h1gjq:active, ._f8pj1gjq:focus, ._30l31gjq:hover, ._10531gjq:visited{color:var(--ds-text-subtle,#44546f)}
33
+ ._c2wa8stv:active, ._4fpr8stv:focus, ._1bnx8stv:hover, ._1x288stv:visited{text-decoration-line:underline}
30
34
  a._1ray131l:active, a._dlb7131l:focus, a._rnxt131l:hover, a._1h4d131l:visited{color:var(--ds-text-subtlest,#626f86)}
31
35
  a._fjv61r31:active, a._93u91r31:focus, a._g2lk1r31:hover, a._pnzf1r31:visited{text-decoration-color:currentColor}
32
36
  a._hlwq8stv:active, a._1e2m8stv:focus, a._1l4b8stv:hover, a._ue8d8stv:visited{text-decoration-line:underline}
@@ -11,6 +11,7 @@ require("./index.compiled.css");
11
11
  var _runtime = require("@compiled/react/runtime");
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
  var _react = _interopRequireWildcard(require("react"));
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
15
16
  var _constants = require("../../../../../../constants");
16
17
  var _useLinkClicked = require("../../../../../../state/analytics/useLinkClicked");
@@ -66,11 +67,20 @@ var anchorLinkLineHeight2Map = {
66
67
  medium: "_102kviql",
67
68
  small: "_102kviql"
68
69
  };
69
- var themeStyleMap = {
70
+
71
+ /**
72
+ * Remove on FG clean up of twg-graphyte-smart-card-link-theme-fix
73
+ */
74
+ var themeStyleMapOld = {
70
75
  grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
71
76
  black: "_syaz1gjq _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31gjq _9h8h1fxt",
72
77
  link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
73
78
  };
79
+ var themeStyleMap = {
80
+ grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
81
+ black: "_syaz1gjq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2wa8stv _4fpr8stv _1bnx8stv _1x288stv _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _9h8h1gjq _f8pj1gjq _30l31gjq _10531gjq",
82
+ link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
83
+ };
74
84
  /**
75
85
  * A base element that represent an anchor.
76
86
  * @internal
@@ -108,7 +118,7 @@ var BaseLinkElement = function BaseLinkElement(_ref) {
108
118
  href: url
109
119
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
110
120
  ,
111
- className: (0, _runtime.ax)(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], themeStyleMap[theme], className])
121
+ className: (0, _runtime.ax)(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], (0, _platformFeatureFlags.fg)('twg-graphyte-smart-card-link-theme-fix') ? themeStyleMap[theme] : themeStyleMapOld[theme], className])
112
122
  // We do not want set the target if it is the default value of '_self'. This prevents link
113
123
  // click issues in Confluence and Trello which rely on it not being set unless necessary.
114
124
  }, target !== '_self' && {
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
19
19
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
20
20
  var PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/smart-card",
22
- packageVersion: "40.7.0",
22
+ packageVersion: "40.7.1",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "40.7.0"
5
+ packageVersion: "40.7.1"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -25,8 +25,12 @@ a._ye10131l{color:var(--ds-text-subtlest,#626f86)}
25
25
  ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}
26
26
  ._9oik1r31:hover{text-decoration-color:currentColor}
27
27
  ._jf4cnqa1:hover{text-decoration-style:solid}
28
+ ._1iohnqa1:active, ._5goinqa1:focus, ._jf4cnqa1:hover, ._1726nqa1:visited{text-decoration-style:solid}
29
+ ._1nrm1r31:active, ._1a3b1r31:focus, ._9oik1r31:hover, ._1ydc1r31:visited{text-decoration-color:currentColor}
28
30
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
29
31
  ._9h8h1fxt:active{color:var(--ds-text,#172b4d)}
32
+ ._9h8h1gjq:active, ._f8pj1gjq:focus, ._30l31gjq:hover, ._10531gjq:visited{color:var(--ds-text-subtle,#44546f)}
33
+ ._c2wa8stv:active, ._4fpr8stv:focus, ._1bnx8stv:hover, ._1x288stv:visited{text-decoration-line:underline}
30
34
  a._1ray131l:active, a._dlb7131l:focus, a._rnxt131l:hover, a._1h4d131l:visited{color:var(--ds-text-subtlest,#626f86)}
31
35
  a._fjv61r31:active, a._93u91r31:focus, a._g2lk1r31:hover, a._pnzf1r31:visited{text-decoration-color:currentColor}
32
36
  a._hlwq8stv:active, a._1e2m8stv:focus, a._1l4b8stv:hover, a._ue8d8stv:visited{text-decoration-line:underline}
@@ -6,6 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
6
6
  /* eslint-disable @atlaskit/design-system/use-tokens-typography */
7
7
 
8
8
  import React, { useMemo } from 'react';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import Tooltip from '@atlaskit/tooltip';
10
11
  import { SmartLinkSize, SmartLinkTheme } from '../../../../../../constants';
11
12
  import { useMouseDownEvent } from '../../../../../../state/analytics/useLinkClicked';
@@ -56,11 +57,20 @@ const anchorLinkLineHeight2Map = {
56
57
  medium: "_102kviql",
57
58
  small: "_102kviql"
58
59
  };
59
- const themeStyleMap = {
60
+
61
+ /**
62
+ * Remove on FG clean up of twg-graphyte-smart-card-link-theme-fix
63
+ */
64
+ const themeStyleMapOld = {
60
65
  grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
61
66
  black: "_syaz1gjq _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31gjq _9h8h1fxt",
62
67
  link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
63
68
  };
69
+ const themeStyleMap = {
70
+ grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
71
+ black: "_syaz1gjq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2wa8stv _4fpr8stv _1bnx8stv _1x288stv _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _9h8h1gjq _f8pj1gjq _30l31gjq _10531gjq",
72
+ link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
73
+ };
64
74
  /**
65
75
  * A base element that represent an anchor.
66
76
  * @internal
@@ -92,7 +102,7 @@ const BaseLinkElement = ({
92
102
  href: url
93
103
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
94
104
  ,
95
- className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], themeStyleMap[theme], className])
105
+ className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], fg('twg-graphyte-smart-card-link-theme-fix') ? themeStyleMap[theme] : themeStyleMapOld[theme], className])
96
106
  // We do not want set the target if it is the default value of '_self'. This prevents link
97
107
  // click issues in Confluence and Trello which rely on it not being set unless necessary.
98
108
  }, target !== '_self' && {
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "40.7.0",
12
+ packageVersion: "40.7.1",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const Anchor = withLinkClickedEvent('a');
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "40.7.0"
7
+ packageVersion: "40.7.1"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -25,8 +25,12 @@ a._ye10131l{color:var(--ds-text-subtlest,#626f86)}
25
25
  ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}
26
26
  ._9oik1r31:hover{text-decoration-color:currentColor}
27
27
  ._jf4cnqa1:hover{text-decoration-style:solid}
28
+ ._1iohnqa1:active, ._5goinqa1:focus, ._jf4cnqa1:hover, ._1726nqa1:visited{text-decoration-style:solid}
29
+ ._1nrm1r31:active, ._1a3b1r31:focus, ._9oik1r31:hover, ._1ydc1r31:visited{text-decoration-color:currentColor}
28
30
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
29
31
  ._9h8h1fxt:active{color:var(--ds-text,#172b4d)}
32
+ ._9h8h1gjq:active, ._f8pj1gjq:focus, ._30l31gjq:hover, ._10531gjq:visited{color:var(--ds-text-subtle,#44546f)}
33
+ ._c2wa8stv:active, ._4fpr8stv:focus, ._1bnx8stv:hover, ._1x288stv:visited{text-decoration-line:underline}
30
34
  a._1ray131l:active, a._dlb7131l:focus, a._rnxt131l:hover, a._1h4d131l:visited{color:var(--ds-text-subtlest,#626f86)}
31
35
  a._fjv61r31:active, a._93u91r31:focus, a._g2lk1r31:hover, a._pnzf1r31:visited{text-decoration-color:currentColor}
32
36
  a._hlwq8stv:active, a._1e2m8stv:focus, a._1l4b8stv:hover, a._ue8d8stv:visited{text-decoration-line:underline}
@@ -6,6 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
6
6
  /* eslint-disable @atlaskit/design-system/use-tokens-typography */
7
7
 
8
8
  import React, { useMemo } from 'react';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import Tooltip from '@atlaskit/tooltip';
10
11
  import { SmartLinkSize, SmartLinkTheme } from '../../../../../../constants';
11
12
  import { useMouseDownEvent } from '../../../../../../state/analytics/useLinkClicked';
@@ -58,11 +59,20 @@ var anchorLinkLineHeight2Map = {
58
59
  medium: "_102kviql",
59
60
  small: "_102kviql"
60
61
  };
61
- var themeStyleMap = {
62
+
63
+ /**
64
+ * Remove on FG clean up of twg-graphyte-smart-card-link-theme-fix
65
+ */
66
+ var themeStyleMapOld = {
62
67
  grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
63
68
  black: "_syaz1gjq _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31gjq _9h8h1fxt",
64
69
  link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
65
70
  };
71
+ var themeStyleMap = {
72
+ grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
73
+ black: "_syaz1gjq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2wa8stv _4fpr8stv _1bnx8stv _1x288stv _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _9h8h1gjq _f8pj1gjq _30l31gjq _10531gjq",
74
+ link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
75
+ };
66
76
  /**
67
77
  * A base element that represent an anchor.
68
78
  * @internal
@@ -100,7 +110,7 @@ var BaseLinkElement = function BaseLinkElement(_ref) {
100
110
  href: url
101
111
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
102
112
  ,
103
- className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], themeStyleMap[theme], className])
113
+ className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], fg('twg-graphyte-smart-card-link-theme-fix') ? themeStyleMap[theme] : themeStyleMapOld[theme], className])
104
114
  // We do not want set the target if it is the default value of '_self'. This prevents link
105
115
  // click issues in Confluence and Trello which rely on it not being set unless necessary.
106
116
  }, target !== '_self' && {
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "40.7.0",
15
+ packageVersion: "40.7.1",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "40.7.1",
3
+ "version": "40.7.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -96,7 +96,7 @@
96
96
  "@atlaskit/analytics-listeners": "^9.0.0",
97
97
  "@atlaskit/css-reset": "^7.3.0",
98
98
  "@atlaskit/media-test-helpers": "^37.0.0",
99
- "@atlaskit/react-ufo": "^4.1.0",
99
+ "@atlaskit/react-ufo": "^4.2.0",
100
100
  "@atlaskit/ssr": "workspace:^",
101
101
  "@atlaskit/visual-regression": "workspace:^",
102
102
  "@atlassian/analytics-tooling": "^0.5.0",
@@ -127,7 +127,6 @@
127
127
  "react-intl-next": "npm:react-intl@^5.18.1",
128
128
  "react-test-renderer": "^18.2.0",
129
129
  "ts-jest": "^29.2.2",
130
- "typescript": "~5.4.2",
131
130
  "xhr-mock": "^2.4.0"
132
131
  },
133
132
  "techstack": {
@@ -220,6 +219,9 @@
220
219
  "platform_renderer_blindspots": {
221
220
  "type": "boolean"
222
221
  },
222
+ "twg-graphyte-smart-card-link-theme-fix": {
223
+ "type": "boolean"
224
+ },
223
225
  "platform_editor_preview_panel_linking": {
224
226
  "type": "boolean"
225
227
  },