@atlaskit/smart-card 34.6.0 → 34.6.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,19 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 34.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 34.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#105947](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105947)
14
+ [`ccae19cf89be9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ccae19cf89be9) -
15
+ [ux] Migrate inline card unresolved view default icon
16
+
3
17
  ## 34.6.0
4
18
 
5
19
  ### Minor 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: "34.6.0"
14
+ packageVersion: "34.6.2"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -16,6 +16,7 @@ var _reactIntlNext = require("react-intl-next");
16
16
  var _button = _interopRequireDefault(require("@atlaskit/button"));
17
17
  var _error = _interopRequireDefault(require("@atlaskit/icon/utility/migration/error"));
18
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
+ var _primitives = require("@atlaskit/primitives");
19
20
  var _colors = require("@atlaskit/theme/colors");
20
21
  var _messages = require("../../../messages");
21
22
  var _HoverCard = require("../../HoverCard");
@@ -28,6 +29,9 @@ var _styledEmotion = require("../styled-emotion");
28
29
  var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
29
30
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
30
31
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
32
+ var iconWrapperStyles = (0, _primitives.xcss)({
33
+ marginRight: 'space.negative.025'
34
+ });
31
35
  var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
32
36
  function InlineCardErroredView() {
33
37
  var _this;
@@ -77,12 +81,20 @@ var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/functio
77
81
  ref: this.frameRef,
78
82
  truncateInline: truncateInline
79
83
  }, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
80
- icon: icon || /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(_error.default, {
84
+ icon: icon || ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
85
+ as: "span",
86
+ xcss: iconWrapperStyles
87
+ }, /*#__PURE__*/_react.default.createElement(_error.default, {
88
+ color: "var(--ds-icon-danger, #C9372C)",
89
+ label: "error",
90
+ LEGACY_size: "small",
91
+ testId: "errored-view-default-icon"
92
+ })) : /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(_error.default, {
81
93
  label: "error",
82
94
  LEGACY_size: "small",
83
95
  color: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
84
96
  testId: "errored-view-default-icon"
85
- })),
97
+ }))),
86
98
  link: url,
87
99
  title: url,
88
100
  onClick: onClick,
@@ -15,9 +15,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _reactIntlNext = require("react-intl-next");
17
17
  var _button = _interopRequireDefault(require("@atlaskit/button"));
18
+ var _lockLocked = _interopRequireDefault(require("@atlaskit/icon/core/lock-locked"));
18
19
  var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
19
20
  var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
20
21
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
+ var _primitives = require("@atlaskit/primitives");
21
23
  var _colors = require("@atlaskit/theme/colors");
22
24
  var _messages = require("../../../messages");
23
25
  var _HoverCard = require("../../HoverCard");
@@ -31,16 +33,37 @@ var _styledEmotion = require("../styled-emotion");
31
33
  var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
32
34
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
33
35
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
36
+ var iconWrapperStyles = (0, _primitives.xcss)({
37
+ marginRight: 'space.negative.025'
38
+ });
34
39
  var fallbackForbiddenIcon = function fallbackForbiddenIcon() {
35
40
  if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
36
- return /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
41
+ return (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
42
+ as: "span",
43
+ xcss: iconWrapperStyles
44
+ }, /*#__PURE__*/_react.default.createElement(_lockLocked.default, {
45
+ label: "error",
46
+ color: "var(--ds-icon-danger, #C9372C)",
47
+ LEGACY_fallbackIcon: _lockFilled.default,
48
+ LEGACY_size: "small",
49
+ testId: "forbidden-view-fallback-icon"
50
+ })) : /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
37
51
  label: "error",
38
52
  size: "small",
39
53
  primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
40
54
  testId: "forbidden-view-fallback-icon"
41
55
  }));
42
56
  } else {
43
- return /*#__PURE__*/_react.default.createElement(_IconEmotion.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
57
+ return (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
58
+ as: "span",
59
+ xcss: iconWrapperStyles
60
+ }, /*#__PURE__*/_react.default.createElement(_lockLocked.default, {
61
+ label: "error",
62
+ color: "var(--ds-icon-danger, #C9372C)",
63
+ LEGACY_fallbackIcon: _lockFilled.default,
64
+ LEGACY_size: "small",
65
+ testId: "forbidden-view-fallback-icon"
66
+ })) : /*#__PURE__*/_react.default.createElement(_IconEmotion.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
44
67
  label: "error",
45
68
  size: "small",
46
69
  primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
@@ -28,9 +28,9 @@ var Icon = exports.Icon = _styled.default.img({
28
28
  transform: 'translate(-50%, -50%)'
29
29
  });
30
30
 
31
+ // TODO: Remove on platform-smart-card-icon-migration or bandicoots-compiled-migration-smartcard cleanup
31
32
  // Used for 'untrue' icons which claim to be 16x16 but
32
33
  // are less than that in height/width.
33
- // TODO: Replace this override with proper AtlasKit solution.
34
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
35
35
  var AKIconWrapper = exports.AKIconWrapper = _styled.default.span({
36
36
  marginRight: "var(--ds-space-negative-025, -2px)"
@@ -35,9 +35,9 @@ var Icon = exports.Icon = (0, _react.forwardRef)(function (_ref, __cmplr) {
35
35
  }));
36
36
  });
37
37
 
38
+ // TODO: Remove on platform-smart-card-icon-migration cleanup
38
39
  // Used for 'untrue' icons which claim to be 16x16 but
39
40
  // are less than that in height/width.
40
- // TODO: Replace this override with proper AtlasKit solution.
41
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
42
42
  if (process.env.NODE_ENV !== 'production') {
43
43
  Icon.displayName = 'Icon';
@@ -9,8 +9,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _reactIntlNext = require("react-intl-next");
11
11
  var _button = _interopRequireDefault(require("@atlaskit/button"));
12
+ var _lockLocked = _interopRequireDefault(require("@atlaskit/icon/core/lock-locked"));
12
13
  var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
13
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
+ var _primitives = require("@atlaskit/primitives");
14
16
  var _colors = require("@atlaskit/theme/colors");
15
17
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
16
18
  var _messages = require("../../../messages");
@@ -22,15 +24,34 @@ var _IconAndTitleLayout = require("../IconAndTitleLayout");
22
24
  var _styled = require("../styled");
23
25
  var _styledEmotion = require("../styled-emotion");
24
26
  var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
27
+ var iconWrapperStyles = (0, _primitives.xcss)({
28
+ marginRight: 'space.negative.025'
29
+ });
25
30
  var fallbackUnauthorizedIcon = function fallbackUnauthorizedIcon() {
26
31
  if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
27
- return /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
32
+ return (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
33
+ as: "span",
34
+ xcss: iconWrapperStyles
35
+ }, /*#__PURE__*/_react.default.createElement(_lockLocked.default, {
36
+ color: "var(--ds-icon-danger, #C9372C)",
37
+ label: "error",
38
+ LEGACY_fallbackIcon: _lockFilled.default,
39
+ LEGACY_size: "small"
40
+ })) : /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
28
41
  label: "error",
29
42
  size: "small",
30
43
  primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
31
44
  }));
32
45
  } else {
33
- return /*#__PURE__*/_react.default.createElement(_IconEmotion.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
46
+ return (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
47
+ as: "span",
48
+ xcss: iconWrapperStyles
49
+ }, /*#__PURE__*/_react.default.createElement(_lockLocked.default, {
50
+ color: "var(--ds-icon-danger, #C9372C)",
51
+ label: "error",
52
+ LEGACY_fallbackIcon: _lockFilled.default,
53
+ LEGACY_size: "small"
54
+ })) : /*#__PURE__*/_react.default.createElement(_IconEmotion.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
34
55
  label: "error",
35
56
  size: "small",
36
57
  primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "34.6.0",
23
+ packageVersion: "34.6.2",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  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: "34.6.0"
5
+ packageVersion: "34.6.2"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -4,6 +4,7 @@ import { FormattedMessage } from 'react-intl-next';
4
4
  import Button from '@atlaskit/button';
5
5
  import ErrorIcon from '@atlaskit/icon/utility/migration/error';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
+ import { Box, xcss } from '@atlaskit/primitives';
7
8
  import { R300 } from '@atlaskit/theme/colors';
8
9
  import { messages } from '../../../messages';
9
10
  import { HoverCard } from '../../HoverCard';
@@ -14,6 +15,9 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
14
15
  import { IconStyledButton } from '../styled';
15
16
  import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
16
17
  import withFrameStyleControl from '../utils/withFrameStyleControl';
18
+ const iconWrapperStyles = xcss({
19
+ marginRight: 'space.negative.025'
20
+ });
17
21
  export class InlineCardErroredView extends React.Component {
18
22
  constructor(...args) {
19
23
  super(...args);
@@ -58,12 +62,20 @@ export class InlineCardErroredView extends React.Component {
58
62
  ref: this.frameRef,
59
63
  truncateInline: truncateInline
60
64
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
61
- icon: icon || /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
65
+ icon: icon || (fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
66
+ as: "span",
67
+ xcss: iconWrapperStyles
68
+ }, /*#__PURE__*/React.createElement(ErrorIcon, {
69
+ color: "var(--ds-icon-danger, #C9372C)",
70
+ label: "error",
71
+ LEGACY_size: "small",
72
+ testId: "errored-view-default-icon"
73
+ })) : /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
62
74
  label: "error",
63
75
  LEGACY_size: "small",
64
76
  color: `var(--ds-icon-danger, ${R300})`,
65
77
  testId: "errored-view-default-icon"
66
- })),
78
+ }))),
67
79
  link: url,
68
80
  title: url,
69
81
  onClick: onClick,
@@ -3,9 +3,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
4
  import { FormattedMessage } from 'react-intl-next';
5
5
  import Button from '@atlaskit/button';
6
- import LockIcon from '@atlaskit/icon/glyph/lock-filled';
6
+ import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
7
+ import LegacyLockIcon from '@atlaskit/icon/glyph/lock-filled';
7
8
  import Lozenge from '@atlaskit/lozenge';
8
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
+ import { Box, xcss } from '@atlaskit/primitives';
9
11
  import { N500, R400 } from '@atlaskit/theme/colors';
10
12
  import { messages } from '../../../messages';
11
13
  import { HoverCard } from '../../HoverCard';
@@ -17,16 +19,37 @@ import { LozengeWrapper } from '../IconAndTitleLayout/styled';
17
19
  import { IconStyledButton } from '../styled';
18
20
  import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
19
21
  import withFrameStyleControl from '../utils/withFrameStyleControl';
22
+ const iconWrapperStyles = xcss({
23
+ marginRight: 'space.negative.025'
24
+ });
20
25
  const fallbackForbiddenIcon = () => {
21
26
  if (fg('bandicoots-compiled-migration-smartcard')) {
22
- return /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
27
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
28
+ as: "span",
29
+ xcss: iconWrapperStyles
30
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
31
+ label: "error",
32
+ color: "var(--ds-icon-danger, #C9372C)",
33
+ LEGACY_fallbackIcon: LegacyLockIcon,
34
+ LEGACY_size: "small",
35
+ testId: "forbidden-view-fallback-icon"
36
+ })) : /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
23
37
  label: "error",
24
38
  size: "small",
25
39
  primaryColor: `var(--ds-icon-danger, ${R400})`,
26
40
  testId: "forbidden-view-fallback-icon"
27
41
  }));
28
42
  } else {
29
- return /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LockIcon, {
43
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
44
+ as: "span",
45
+ xcss: iconWrapperStyles
46
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
47
+ label: "error",
48
+ color: "var(--ds-icon-danger, #C9372C)",
49
+ LEGACY_fallbackIcon: LegacyLockIcon,
50
+ LEGACY_size: "small",
51
+ testId: "forbidden-view-fallback-icon"
52
+ })) : /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
30
53
  label: "error",
31
54
  size: "small",
32
55
  primaryColor: `var(--ds-icon-danger, ${R400})`,
@@ -21,9 +21,9 @@ export const Icon = styled.img({
21
21
  transform: 'translate(-50%, -50%)'
22
22
  });
23
23
 
24
+ // TODO: Remove on platform-smart-card-icon-migration or bandicoots-compiled-migration-smartcard cleanup
24
25
  // Used for 'untrue' icons which claim to be 16x16 but
25
26
  // are less than that in height/width.
26
- // TODO: Replace this override with proper AtlasKit solution.
27
27
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
28
28
  export const AKIconWrapper = styled.span({
29
29
  marginRight: "var(--ds-space-negative-025, -2px)"
@@ -23,9 +23,9 @@ export const Icon = forwardRef(({
23
23
  }));
24
24
  });
25
25
 
26
+ // TODO: Remove on platform-smart-card-icon-migration cleanup
26
27
  // Used for 'untrue' icons which claim to be 16x16 but
27
28
  // are less than that in height/width.
28
- // TODO: Replace this override with proper AtlasKit solution.
29
29
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
30
30
  if (process.env.NODE_ENV !== 'production') {
31
31
  Icon.displayName = 'Icon';
@@ -2,8 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
4
  import Button from '@atlaskit/button';
5
- import LockIcon from '@atlaskit/icon/glyph/lock-filled';
5
+ import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
6
+ import LegacyLockIcon from '@atlaskit/icon/glyph/lock-filled';
6
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { Box, xcss } from '@atlaskit/primitives';
7
9
  import { N500, R400 } from '@atlaskit/theme/colors';
8
10
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
9
11
  import { messages } from '../../../messages';
@@ -15,15 +17,34 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
15
17
  import { IconStyledButton } from '../styled';
16
18
  import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
17
19
  import withFrameStyleControl from '../utils/withFrameStyleControl';
20
+ const iconWrapperStyles = xcss({
21
+ marginRight: 'space.negative.025'
22
+ });
18
23
  const fallbackUnauthorizedIcon = () => {
19
24
  if (fg('bandicoots-compiled-migration-smartcard')) {
20
- return /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
25
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
26
+ as: "span",
27
+ xcss: iconWrapperStyles
28
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
29
+ color: "var(--ds-icon-danger, #C9372C)",
30
+ label: "error",
31
+ LEGACY_fallbackIcon: LegacyLockIcon,
32
+ LEGACY_size: "small"
33
+ })) : /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
21
34
  label: "error",
22
35
  size: "small",
23
36
  primaryColor: `var(--ds-icon-danger, ${R400})`
24
37
  }));
25
38
  } else {
26
- return /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LockIcon, {
39
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
40
+ as: "span",
41
+ xcss: iconWrapperStyles
42
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
43
+ color: "var(--ds-icon-danger, #C9372C)",
44
+ label: "error",
45
+ LEGACY_fallbackIcon: LegacyLockIcon,
46
+ LEGACY_size: "small"
47
+ })) : /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
27
48
  label: "error",
28
49
  size: "small",
29
50
  primaryColor: `var(--ds-icon-danger, ${R400})`
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "34.6.0",
13
+ packageVersion: "34.6.2",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  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: "34.6.0"
7
+ packageVersion: "34.6.2"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -11,6 +11,7 @@ import { FormattedMessage } from 'react-intl-next';
11
11
  import Button from '@atlaskit/button';
12
12
  import ErrorIcon from '@atlaskit/icon/utility/migration/error';
13
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { Box, xcss } from '@atlaskit/primitives';
14
15
  import { R300 } from '@atlaskit/theme/colors';
15
16
  import { messages } from '../../../messages';
16
17
  import { HoverCard } from '../../HoverCard';
@@ -21,6 +22,9 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
21
22
  import { IconStyledButton } from '../styled';
22
23
  import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
23
24
  import withFrameStyleControl from '../utils/withFrameStyleControl';
25
+ var iconWrapperStyles = xcss({
26
+ marginRight: 'space.negative.025'
27
+ });
24
28
  export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
25
29
  function InlineCardErroredView() {
26
30
  var _this;
@@ -70,12 +74,20 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
70
74
  ref: this.frameRef,
71
75
  truncateInline: truncateInline
72
76
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
73
- icon: icon || /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
77
+ icon: icon || (fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
78
+ as: "span",
79
+ xcss: iconWrapperStyles
80
+ }, /*#__PURE__*/React.createElement(ErrorIcon, {
81
+ color: "var(--ds-icon-danger, #C9372C)",
82
+ label: "error",
83
+ LEGACY_size: "small",
84
+ testId: "errored-view-default-icon"
85
+ })) : /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
74
86
  label: "error",
75
87
  LEGACY_size: "small",
76
88
  color: "var(--ds-icon-danger, ".concat(R300, ")"),
77
89
  testId: "errored-view-default-icon"
78
- })),
90
+ }))),
79
91
  link: url,
80
92
  title: url,
81
93
  onClick: onClick,
@@ -10,9 +10,11 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  import React from 'react';
11
11
  import { FormattedMessage } from 'react-intl-next';
12
12
  import Button from '@atlaskit/button';
13
- import LockIcon from '@atlaskit/icon/glyph/lock-filled';
13
+ import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
14
+ import LegacyLockIcon from '@atlaskit/icon/glyph/lock-filled';
14
15
  import Lozenge from '@atlaskit/lozenge';
15
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
+ import { Box, xcss } from '@atlaskit/primitives';
16
18
  import { N500, R400 } from '@atlaskit/theme/colors';
17
19
  import { messages } from '../../../messages';
18
20
  import { HoverCard } from '../../HoverCard';
@@ -24,16 +26,37 @@ import { LozengeWrapper } from '../IconAndTitleLayout/styled';
24
26
  import { IconStyledButton } from '../styled';
25
27
  import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
26
28
  import withFrameStyleControl from '../utils/withFrameStyleControl';
29
+ var iconWrapperStyles = xcss({
30
+ marginRight: 'space.negative.025'
31
+ });
27
32
  var fallbackForbiddenIcon = function fallbackForbiddenIcon() {
28
33
  if (fg('bandicoots-compiled-migration-smartcard')) {
29
- return /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
34
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
35
+ as: "span",
36
+ xcss: iconWrapperStyles
37
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
38
+ label: "error",
39
+ color: "var(--ds-icon-danger, #C9372C)",
40
+ LEGACY_fallbackIcon: LegacyLockIcon,
41
+ LEGACY_size: "small",
42
+ testId: "forbidden-view-fallback-icon"
43
+ })) : /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
30
44
  label: "error",
31
45
  size: "small",
32
46
  primaryColor: "var(--ds-icon-danger, ".concat(R400, ")"),
33
47
  testId: "forbidden-view-fallback-icon"
34
48
  }));
35
49
  } else {
36
- return /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LockIcon, {
50
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
51
+ as: "span",
52
+ xcss: iconWrapperStyles
53
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
54
+ label: "error",
55
+ color: "var(--ds-icon-danger, #C9372C)",
56
+ LEGACY_fallbackIcon: LegacyLockIcon,
57
+ LEGACY_size: "small",
58
+ testId: "forbidden-view-fallback-icon"
59
+ })) : /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
37
60
  label: "error",
38
61
  size: "small",
39
62
  primaryColor: "var(--ds-icon-danger, ".concat(R400, ")"),
@@ -21,9 +21,9 @@ export var Icon = styled.img({
21
21
  transform: 'translate(-50%, -50%)'
22
22
  });
23
23
 
24
+ // TODO: Remove on platform-smart-card-icon-migration or bandicoots-compiled-migration-smartcard cleanup
24
25
  // Used for 'untrue' icons which claim to be 16x16 but
25
26
  // are less than that in height/width.
26
- // TODO: Replace this override with proper AtlasKit solution.
27
27
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
28
28
  export var AKIconWrapper = styled.span({
29
29
  marginRight: "var(--ds-space-negative-025, -2px)"
@@ -26,9 +26,9 @@ export var Icon = forwardRef(function (_ref, __cmplr) {
26
26
  }));
27
27
  });
28
28
 
29
+ // TODO: Remove on platform-smart-card-icon-migration cleanup
29
30
  // Used for 'untrue' icons which claim to be 16x16 but
30
31
  // are less than that in height/width.
31
- // TODO: Replace this override with proper AtlasKit solution.
32
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
33
33
  if (process.env.NODE_ENV !== 'production') {
34
34
  Icon.displayName = 'Icon';
@@ -2,8 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
4
  import Button from '@atlaskit/button';
5
- import LockIcon from '@atlaskit/icon/glyph/lock-filled';
5
+ import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
6
+ import LegacyLockIcon from '@atlaskit/icon/glyph/lock-filled';
6
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { Box, xcss } from '@atlaskit/primitives';
7
9
  import { N500, R400 } from '@atlaskit/theme/colors';
8
10
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
9
11
  import { messages } from '../../../messages';
@@ -15,15 +17,34 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
15
17
  import { IconStyledButton } from '../styled';
16
18
  import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
17
19
  import withFrameStyleControl from '../utils/withFrameStyleControl';
20
+ var iconWrapperStyles = xcss({
21
+ marginRight: 'space.negative.025'
22
+ });
18
23
  var fallbackUnauthorizedIcon = function fallbackUnauthorizedIcon() {
19
24
  if (fg('bandicoots-compiled-migration-smartcard')) {
20
- return /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
25
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
26
+ as: "span",
27
+ xcss: iconWrapperStyles
28
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
29
+ color: "var(--ds-icon-danger, #C9372C)",
30
+ label: "error",
31
+ LEGACY_fallbackIcon: LegacyLockIcon,
32
+ LEGACY_size: "small"
33
+ })) : /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
21
34
  label: "error",
22
35
  size: "small",
23
36
  primaryColor: "var(--ds-icon-danger, ".concat(R400, ")")
24
37
  }));
25
38
  } else {
26
- return /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LockIcon, {
39
+ return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
40
+ as: "span",
41
+ xcss: iconWrapperStyles
42
+ }, /*#__PURE__*/React.createElement(LockLockedIcon, {
43
+ color: "var(--ds-icon-danger, #C9372C)",
44
+ label: "error",
45
+ LEGACY_fallbackIcon: LegacyLockIcon,
46
+ LEGACY_size: "small"
47
+ })) : /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LegacyLockIcon, {
27
48
  label: "error",
28
49
  size: "small",
29
50
  primaryColor: "var(--ds-icon-danger, ".concat(R400, ")")
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "34.6.0",
16
+ packageVersion: "34.6.2",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "34.6.0",
3
+ "version": "34.6.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "@atlaskit/analytics-gas-types": "^5.1.0",
31
31
  "@atlaskit/analytics-next": "^10.2.0",
32
32
  "@atlaskit/avatar": "^21.17.0",
33
- "@atlaskit/avatar-group": "^10.1.0",
33
+ "@atlaskit/avatar-group": "^11.0.0",
34
34
  "@atlaskit/badge": "^17.0.0",
35
35
  "@atlaskit/button": "^20.3.0",
36
36
  "@atlaskit/checkbox": "^15.2.0",