@atlaskit/smart-card 29.0.3 → 29.1.0

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 (28) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +4 -7
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +14 -8
  5. package/dist/cjs/view/BlockCard/views/ResolvingView.js +6 -5
  6. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  7. package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +1 -0
  8. package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -0
  9. package/dist/cjs/view/LinkUrl/index.js +1 -1
  10. package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +4 -7
  11. package/dist/es2019/utils/analytics/analytics.js +1 -1
  12. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +14 -8
  13. package/dist/es2019/view/BlockCard/views/ResolvingView.js +5 -4
  14. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  15. package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +1 -0
  16. package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -0
  17. package/dist/es2019/view/LinkUrl/index.js +1 -1
  18. package/dist/esm/extractors/common/detail/extractSubscriberCount.js +4 -7
  19. package/dist/esm/utils/analytics/analytics.js +1 -1
  20. package/dist/esm/view/BlockCard/views/ForbiddenView.js +14 -8
  21. package/dist/esm/view/BlockCard/views/ResolvingView.js +5 -4
  22. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  23. package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +1 -0
  24. package/dist/esm/view/FlexibleCard/components/container/index.js +1 -0
  25. package/dist/esm/view/LinkUrl/index.js +1 -1
  26. package/dist/types/view/Card/types.d.ts +22 -4
  27. package/dist/types-ts4.5/view/Card/types.d.ts +22 -4
  28. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 29.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#149644](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149644)
8
+ [`5a157fb05e298`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5a157fb05e298) -
9
+ [ux] Enable new icons behind a feature flag.
10
+ - [#148475](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148475)
11
+ [`09e912b75c96d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/09e912b75c96d) -
12
+ [ux] Enable new icons behind a feature flag.
13
+ - [#148475](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148475)
14
+ [`8a89b1fabdecc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8a89b1fabdecc) -
15
+ [ux] Enable new icons behind a feature flag.
16
+
3
17
  ## 29.0.3
4
18
 
5
19
  ### Patch Changes
@@ -7,19 +7,16 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.extractSubscriberCount = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _colors = require("@atlaskit/theme/colors");
10
- var _people = _interopRequireDefault(require("@atlaskit/icon/glyph/people"));
10
+ var _peopleGroupPeople = _interopRequireDefault(require("@atlaskit/icon/core/migration/people-group--people"));
11
11
  var extractSubscriberCount = exports.extractSubscriberCount = function extractSubscriberCount(jsonLd) {
12
12
  var subscriberCount = jsonLd['atlassian:subscriberCount'];
13
13
  if (subscriberCount) {
14
14
  return {
15
15
  text: subscriberCount.toString(),
16
- icon:
17
- /*#__PURE__*/
18
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19499
19
- _react.default.createElement(_people.default, {
20
- size: "small",
16
+ icon: /*#__PURE__*/_react.default.createElement(_peopleGroupPeople.default, {
17
+ LEGACY_size: "small",
21
18
  label: "subscribers",
22
- primaryColor: "var(--ds-icon-subtle, ".concat(_colors.N600, ")")
19
+ color: "var(--ds-icon-subtle, ".concat(_colors.N600, ")")
23
20
  })
24
21
  };
25
22
  }
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "29.0.3"
25
+ packageVersion: "29.1.0"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,7 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _react = require("@emotion/react");
11
11
  var _reactIntlNext = require("react-intl-next");
12
12
  var _colors = require("@atlaskit/theme/colors");
13
- var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
13
+ var _lockLockedLockFilled = _interopRequireDefault(require("@atlaskit/icon/utility/migration/lock-locked--lock-filled"));
14
14
  var _Frame = require("../components/Frame");
15
15
  var _Provider = require("../components/Provider");
16
16
  var _Byline = require("../../common/Byline");
@@ -22,12 +22,16 @@ var _ContentHeader = require("../components/ContentHeader");
22
22
  var _handlers = require("../utils/handlers");
23
23
  var _Link = require("../components/Link");
24
24
  var _UnresolvedText = require("../components/UnresolvedText");
25
+ var _primitives = require("@atlaskit/primitives");
25
26
  /**
26
27
  * @jsxRuntime classic
27
28
  * @jsx jsx
28
29
  */
29
30
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
30
31
 
32
+ var iconWrapperStyles = (0, _primitives.xcss)({
33
+ marginRight: 'space.050'
34
+ });
31
35
  /**
32
36
  * Class name for selecting non-flexible forbidden block card
33
37
  *
@@ -90,14 +94,16 @@ var ForbiddenView = exports.ForbiddenView = function ForbiddenView(_ref) {
90
94
  ,
91
95
  className: blockCardForbiddenViewLinkClassName
92
96
  })), (0, _react.jsx)(_Byline.Byline, null, (0, _react.jsx)(_UnresolvedText.UnresolvedText, {
93
- icon:
94
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19497
95
- (0, _react.jsx)(_lockFilled.default, {
97
+ icon: (0, _react.jsx)(_primitives.Flex, {
98
+ alignItems: "center",
99
+ xcss: iconWrapperStyles
100
+ }, (0, _react.jsx)(_lockLockedLockFilled.default, {
96
101
  label: "forbidden-lock-icon",
97
- size: "small",
98
- primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
99
- testId: "".concat(testId, "-lock-icon")
100
- }),
102
+ LEGACY_size: "small",
103
+ color: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
104
+ testId: "".concat(testId, "-lock-icon"),
105
+ LEGACY_margin: "0 ".concat("var(--ds-space-negative-050, -4px)", " 0 0")
106
+ })),
101
107
  text: (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[descriptiveMessageKey], {
102
108
  values: {
103
109
  product: context.text,
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.blockCardResolvingViewClassName = exports.ResolvingView = void 0;
8
8
  var _react = require("@emotion/react");
9
- var _documentFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/document-filled"));
9
+ var _fileEditorFile = _interopRequireDefault(require("@atlaskit/icon/core/migration/file--editor-file"));
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
  var _constants = require("@atlaskit/theme/constants");
12
12
  var _Frame = require("../components/Frame");
@@ -46,10 +46,11 @@ var ResolvingView = exports.ResolvingView = function ResolvingView(_ref) {
46
46
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
47
47
  ,
48
48
  className: blockCardResolvingViewClassName
49
- }, (0, _react.jsx)(_documentFilled.default, {
50
- size: "small",
51
- primaryColor: "var(--ds-icon-subtle, ".concat(_colors.N50, ")"),
52
- label: "document-icon"
49
+ }, (0, _react.jsx)(_fileEditorFile.default, {
50
+ LEGACY_size: "medium",
51
+ color: "var(--ds-icon-subtle, ".concat(_colors.N50, ")"),
52
+ label: "document-icon",
53
+ LEGACY_margin: "0 -4.3px 0 -4px"
53
54
  }), (0, _react.jsx)("span", {
54
55
  css: messageStyles
55
56
  }, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.loading)));
@@ -22,6 +22,7 @@ var _messages = require("../../../../../messages");
22
22
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
23
23
  var _actionGroupItem = _interopRequireDefault(require("./action-group-item"));
24
24
  var _utils2 = require("../utils");
25
+ var _reactMagneticDi = require("react-magnetic-di");
25
26
  var _excluded = ["triggerRef"];
26
27
  /**
27
28
  * @jsxRuntime classic
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.AIFooterMetadata = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
10
+ var _reactMagneticDi = require("react-magnetic-di");
10
11
  var _reactIntlNext = require("react-intl-next");
11
12
  var _primitives = require("@atlaskit/primitives");
12
13
  var _aiIcon = _interopRequireDefault(require("../../../../../common/ai-icon"));
@@ -16,6 +16,7 @@ var _layeredLink = _interopRequireDefault(require("./layered-link"));
16
16
  var _hoverCardControl = _interopRequireDefault(require("./hover-card-control"));
17
17
  var _utils = require("../../../../state/flexible-ui-context/utils");
18
18
  var _colors = require("@atlaskit/theme/colors");
19
+ var _reactMagneticDi = require("react-magnetic-di");
19
20
  var _templateObject;
20
21
  /**
21
22
  * @jsxRuntime classic
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "29.0.3",
20
+ packageVersion: "29.1.0",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -1,18 +1,15 @@
1
1
  import React from 'react';
2
2
  import { N600 } from '@atlaskit/theme/colors';
3
- import PeopleIcon from '@atlaskit/icon/glyph/people';
3
+ import PeopleIcon from '@atlaskit/icon/core/migration/people-group--people';
4
4
  export const extractSubscriberCount = jsonLd => {
5
5
  const subscriberCount = jsonLd['atlassian:subscriberCount'];
6
6
  if (subscriberCount) {
7
7
  return {
8
8
  text: subscriberCount.toString(),
9
- icon:
10
- /*#__PURE__*/
11
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19499
12
- React.createElement(PeopleIcon, {
13
- size: "small",
9
+ icon: /*#__PURE__*/React.createElement(PeopleIcon, {
10
+ LEGACY_size: "small",
14
11
  label: "subscribers",
15
- primaryColor: `var(--ds-icon-subtle, ${N600})`
12
+ color: `var(--ds-icon-subtle, ${N600})`
16
13
  })
17
14
  };
18
15
  }
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "29.0.3"
7
+ packageVersion: "29.1.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -7,7 +7,7 @@ import _extends from "@babel/runtime/helpers/extends";
7
7
  import { jsx } from '@emotion/react';
8
8
  import { FormattedMessage } from 'react-intl-next';
9
9
  import { R300 } from '@atlaskit/theme/colors';
10
- import LockIcon from '@atlaskit/icon/glyph/lock-filled';
10
+ import LockIcon from '@atlaskit/icon/utility/migration/lock-locked--lock-filled';
11
11
  import { Frame } from '../components/Frame';
12
12
  import { Provider } from '../components/Provider';
13
13
  import { Byline } from '../../common/Byline';
@@ -19,6 +19,10 @@ import { ContentHeader } from '../components/ContentHeader';
19
19
  import { handleClickCommon } from '../utils/handlers';
20
20
  import { Link } from '../components/Link';
21
21
  import { UnresolvedText } from '../components/UnresolvedText';
22
+ import { Flex, xcss } from '@atlaskit/primitives';
23
+ const iconWrapperStyles = xcss({
24
+ marginRight: 'space.050'
25
+ });
22
26
  /**
23
27
  * Class name for selecting non-flexible forbidden block card
24
28
  *
@@ -73,14 +77,16 @@ export const ForbiddenView = ({
73
77
  ,
74
78
  className: blockCardForbiddenViewLinkClassName
75
79
  })), jsx(Byline, null, jsx(UnresolvedText, {
76
- icon:
77
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19497
78
- jsx(LockIcon, {
80
+ icon: jsx(Flex, {
81
+ alignItems: "center",
82
+ xcss: iconWrapperStyles
83
+ }, jsx(LockIcon, {
79
84
  label: "forbidden-lock-icon",
80
- size: "small",
81
- primaryColor: `var(--ds-icon-danger, ${R300})`,
82
- testId: `${testId}-lock-icon`
83
- }),
85
+ LEGACY_size: "small",
86
+ color: `var(--ds-icon-danger, ${R300})`,
87
+ testId: `${testId}-lock-icon`,
88
+ LEGACY_margin: `0 ${"var(--ds-space-negative-050, -4px)"} 0 0`
89
+ })),
84
90
  text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
85
91
  values: {
86
92
  product: context.text,
@@ -4,7 +4,7 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
- import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
7
+ import DocumentFilledIcon from '@atlaskit/icon/core/migration/file--editor-file';
8
8
  import { N50, N90 } from '@atlaskit/theme/colors';
9
9
  import { fontSize } from '@atlaskit/theme/constants';
10
10
  import { Frame } from '../components/Frame';
@@ -37,9 +37,10 @@ export const ResolvingView = ({
37
37
  ,
38
38
  className: blockCardResolvingViewClassName
39
39
  }, jsx(DocumentFilledIcon, {
40
- size: "small",
41
- primaryColor: `var(--ds-icon-subtle, ${N50})`,
42
- label: "document-icon"
40
+ LEGACY_size: "medium",
41
+ color: `var(--ds-icon-subtle, ${N50})`,
42
+ label: "document-icon",
43
+ LEGACY_margin: "0 -4.3px 0 -4px"
43
44
  }), jsx("span", {
44
45
  css: messageStyles
45
46
  }, jsx(FormattedMessage, messages.loading)));
@@ -19,6 +19,7 @@ import { messages } from '../../../../../messages';
19
19
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
20
20
  import ActionGroupItem from './action-group-item';
21
21
  import { filterActionItems } from '../utils';
22
+ import { di } from 'react-magnetic-di';
22
23
  const styles = css({
23
24
  display: 'inline-flex',
24
25
  lineHeight: '1rem',
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import Tooltip from '@atlaskit/tooltip';
3
+ import { di } from 'react-magnetic-di';
3
4
  import { FormattedMessage } from 'react-intl-next';
4
5
  import { Box, Inline } from '@atlaskit/primitives';
5
6
  import AIIcon from '../../../../../common/ai-icon';
@@ -12,6 +12,7 @@ import LayeredLink from './layered-link';
12
12
  import HoverCardControl from './hover-card-control';
13
13
  import { isFlexUiPreviewPresent } from '../../../../state/flexible-ui-context/utils';
14
14
  import { N40 } from '@atlaskit/theme/colors';
15
+ import { di } from 'react-magnetic-di';
15
16
  const elevationStyles = css({
16
17
  border: `1px solid ${`var(--ds-border, ${N40})`}`,
17
18
  borderRadius: "var(--ds-border-radius-200, 8px)",
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "29.0.3",
10
+ packageVersion: "29.1.0",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -1,18 +1,15 @@
1
1
  import React from 'react';
2
2
  import { N600 } from '@atlaskit/theme/colors';
3
- import PeopleIcon from '@atlaskit/icon/glyph/people';
3
+ import PeopleIcon from '@atlaskit/icon/core/migration/people-group--people';
4
4
  export var extractSubscriberCount = function extractSubscriberCount(jsonLd) {
5
5
  var subscriberCount = jsonLd['atlassian:subscriberCount'];
6
6
  if (subscriberCount) {
7
7
  return {
8
8
  text: subscriberCount.toString(),
9
- icon:
10
- /*#__PURE__*/
11
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19499
12
- React.createElement(PeopleIcon, {
13
- size: "small",
9
+ icon: /*#__PURE__*/React.createElement(PeopleIcon, {
10
+ LEGACY_size: "small",
14
11
  label: "subscribers",
15
- primaryColor: "var(--ds-icon-subtle, ".concat(N600, ")")
12
+ color: "var(--ds-icon-subtle, ".concat(N600, ")")
16
13
  })
17
14
  };
18
15
  }
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "29.0.3"
18
+ packageVersion: "29.1.0"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,7 +8,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
8
8
  import { jsx } from '@emotion/react';
9
9
  import { FormattedMessage } from 'react-intl-next';
10
10
  import { R300 } from '@atlaskit/theme/colors';
11
- import LockIcon from '@atlaskit/icon/glyph/lock-filled';
11
+ import LockIcon from '@atlaskit/icon/utility/migration/lock-locked--lock-filled';
12
12
  import { Frame } from '../components/Frame';
13
13
  import { Provider } from '../components/Provider';
14
14
  import { Byline } from '../../common/Byline';
@@ -20,6 +20,10 @@ import { ContentHeader } from '../components/ContentHeader';
20
20
  import { handleClickCommon } from '../utils/handlers';
21
21
  import { Link } from '../components/Link';
22
22
  import { UnresolvedText } from '../components/UnresolvedText';
23
+ import { Flex, xcss } from '@atlaskit/primitives';
24
+ var iconWrapperStyles = xcss({
25
+ marginRight: 'space.050'
26
+ });
23
27
  /**
24
28
  * Class name for selecting non-flexible forbidden block card
25
29
  *
@@ -82,14 +86,16 @@ export var ForbiddenView = function ForbiddenView(_ref) {
82
86
  ,
83
87
  className: blockCardForbiddenViewLinkClassName
84
88
  })), jsx(Byline, null, jsx(UnresolvedText, {
85
- icon:
86
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19497
87
- jsx(LockIcon, {
89
+ icon: jsx(Flex, {
90
+ alignItems: "center",
91
+ xcss: iconWrapperStyles
92
+ }, jsx(LockIcon, {
88
93
  label: "forbidden-lock-icon",
89
- size: "small",
90
- primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
91
- testId: "".concat(testId, "-lock-icon")
92
- }),
94
+ LEGACY_size: "small",
95
+ color: "var(--ds-icon-danger, ".concat(R300, ")"),
96
+ testId: "".concat(testId, "-lock-icon"),
97
+ LEGACY_margin: "0 ".concat("var(--ds-space-negative-050, -4px)", " 0 0")
98
+ })),
93
99
  text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
94
100
  values: {
95
101
  product: context.text,
@@ -4,7 +4,7 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
- import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
7
+ import DocumentFilledIcon from '@atlaskit/icon/core/migration/file--editor-file';
8
8
  import { N50, N90 } from '@atlaskit/theme/colors';
9
9
  import { fontSize } from '@atlaskit/theme/constants';
10
10
  import { Frame } from '../components/Frame';
@@ -39,9 +39,10 @@ export var ResolvingView = function ResolvingView(_ref) {
39
39
  ,
40
40
  className: blockCardResolvingViewClassName
41
41
  }, jsx(DocumentFilledIcon, {
42
- size: "small",
43
- primaryColor: "var(--ds-icon-subtle, ".concat(N50, ")"),
44
- label: "document-icon"
42
+ LEGACY_size: "medium",
43
+ color: "var(--ds-icon-subtle, ".concat(N50, ")"),
44
+ label: "document-icon",
45
+ LEGACY_margin: "0 -4.3px 0 -4px"
45
46
  }), jsx("span", {
46
47
  css: messageStyles
47
48
  }, jsx(FormattedMessage, messages.loading)));
@@ -22,6 +22,7 @@ import { messages } from '../../../../../messages';
22
22
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
23
23
  import ActionGroupItem from './action-group-item';
24
24
  import { filterActionItems } from '../utils';
25
+ import { di } from 'react-magnetic-di';
25
26
  var styles = css({
26
27
  display: 'inline-flex',
27
28
  lineHeight: '1rem',
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import Tooltip from '@atlaskit/tooltip';
3
+ import { di } from 'react-magnetic-di';
3
4
  import { FormattedMessage } from 'react-intl-next';
4
5
  import { Box, Inline } from '@atlaskit/primitives';
5
6
  import AIIcon from '../../../../../common/ai-icon';
@@ -14,6 +14,7 @@ import LayeredLink from './layered-link';
14
14
  import HoverCardControl from './hover-card-control';
15
15
  import { isFlexUiPreviewPresent } from '../../../../state/flexible-ui-context/utils';
16
16
  import { N40 } from '@atlaskit/theme/colors';
17
+ import { di } from 'react-magnetic-di';
17
18
  var elevationStyles = css({
18
19
  border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")")),
19
20
  borderRadius: "var(--ds-border-radius-200, 8px)",
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "29.0.3",
13
+ packageVersion: "29.1.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -40,8 +40,17 @@ interface ActionProps {
40
40
  actionOptions?: CardActionOptions;
41
41
  }
42
42
  interface HoverPreviewProps extends ActionProps {
43
+ /**
44
+ * Flag to display hover preview on hover.
45
+ */
43
46
  showHoverPreview?: boolean;
47
+ /**
48
+ * Configuration for hover card.
49
+ */
44
50
  hoverPreviewOptions?: HoverPreviewOptions;
51
+ /**
52
+ * Flag to display unresolved views on hover preview.
53
+ */
45
54
  showAuthTooltip?: boolean;
46
55
  }
47
56
  export interface BaseCardProps {
@@ -102,13 +111,20 @@ export interface BaseCardProps {
102
111
  url?: string;
103
112
  }
104
113
  export interface InlineProps extends HoverPreviewProps {
114
+ /**
115
+ * By default, inline resolving states show a frame with a spinner on the left.
116
+ * An alternative is to remove the frame and place the spinner on the right by setting this value to `on-right-without-skeleton`.
117
+ * This property is specific to inline links in the editor.
118
+ */
105
119
  inlinePreloaderStyle?: InlinePreloaderStyle;
106
- /** A flag that determines whether a card is in a hover state in edit mode. Currently used for inline links only */
120
+ /**
121
+ * A flag that determines whether a card is in a hover state. Currently used for inline links in editor only.
122
+ */
107
123
  isHovered?: boolean;
108
124
  /**
109
125
  * When set to true, the text fragment will be removed from the title.
110
126
  * This will have no impact on the url and text highlighting will still persist in the url,
111
- * however the the text fragment will be stripped from the title of the smart card.
127
+ * however the text fragment will be stripped from the title of the smart card.
112
128
  * For example, when set to true: "my name | :~:text=highlight this" will be displayed as "my name"
113
129
  */
114
130
  removeTextHighlightingFromTitle?: boolean;
@@ -116,7 +132,9 @@ export interface InlineProps extends HoverPreviewProps {
116
132
  * When defined, this placeholder will be displayed while the smart card is resolving. This is only useful for inline cards.
117
133
  */
118
134
  resolvingPlaceholder?: string;
119
- /** When set to true, inline cards will be truncated to one line. */
135
+ /**
136
+ * When set to true, inline cards will be truncated to one line
137
+ */
120
138
  truncateInline?: boolean;
121
139
  }
122
140
  export interface BlockProps extends ActionProps {
@@ -154,7 +172,7 @@ export interface EmbedProps {
154
172
  inheritDimensions?: boolean;
155
173
  /**
156
174
  * Informs Smart Link of the device it is rendered in. Available values are `web` and `mobile`.
157
- * It is used together with link response `data.preview['atlassian:supportedPlatforms']`.
175
+ * It is used together with link response `data.preview["atlassian:supportedPlatforms"]`.
158
176
  * To make embed content available on all supported urls, use `web`.
159
177
  */
160
178
  platform?: CardPlatform;
@@ -40,8 +40,17 @@ interface ActionProps {
40
40
  actionOptions?: CardActionOptions;
41
41
  }
42
42
  interface HoverPreviewProps extends ActionProps {
43
+ /**
44
+ * Flag to display hover preview on hover.
45
+ */
43
46
  showHoverPreview?: boolean;
47
+ /**
48
+ * Configuration for hover card.
49
+ */
44
50
  hoverPreviewOptions?: HoverPreviewOptions;
51
+ /**
52
+ * Flag to display unresolved views on hover preview.
53
+ */
45
54
  showAuthTooltip?: boolean;
46
55
  }
47
56
  export interface BaseCardProps {
@@ -102,13 +111,20 @@ export interface BaseCardProps {
102
111
  url?: string;
103
112
  }
104
113
  export interface InlineProps extends HoverPreviewProps {
114
+ /**
115
+ * By default, inline resolving states show a frame with a spinner on the left.
116
+ * An alternative is to remove the frame and place the spinner on the right by setting this value to `on-right-without-skeleton`.
117
+ * This property is specific to inline links in the editor.
118
+ */
105
119
  inlinePreloaderStyle?: InlinePreloaderStyle;
106
- /** A flag that determines whether a card is in a hover state in edit mode. Currently used for inline links only */
120
+ /**
121
+ * A flag that determines whether a card is in a hover state. Currently used for inline links in editor only.
122
+ */
107
123
  isHovered?: boolean;
108
124
  /**
109
125
  * When set to true, the text fragment will be removed from the title.
110
126
  * This will have no impact on the url and text highlighting will still persist in the url,
111
- * however the the text fragment will be stripped from the title of the smart card.
127
+ * however the text fragment will be stripped from the title of the smart card.
112
128
  * For example, when set to true: "my name | :~:text=highlight this" will be displayed as "my name"
113
129
  */
114
130
  removeTextHighlightingFromTitle?: boolean;
@@ -116,7 +132,9 @@ export interface InlineProps extends HoverPreviewProps {
116
132
  * When defined, this placeholder will be displayed while the smart card is resolving. This is only useful for inline cards.
117
133
  */
118
134
  resolvingPlaceholder?: string;
119
- /** When set to true, inline cards will be truncated to one line. */
135
+ /**
136
+ * When set to true, inline cards will be truncated to one line
137
+ */
120
138
  truncateInline?: boolean;
121
139
  }
122
140
  export interface BlockProps extends ActionProps {
@@ -154,7 +172,7 @@ export interface EmbedProps {
154
172
  inheritDimensions?: boolean;
155
173
  /**
156
174
  * Informs Smart Link of the device it is rendered in. Available values are `web` and `mobile`.
157
- * It is used together with link response `data.preview['atlassian:supportedPlatforms']`.
175
+ * It is used together with link response `data.preview["atlassian:supportedPlatforms"]`.
158
176
  * To make embed content available on all supported urls, use `web`.
159
177
  */
160
178
  platform?: CardPlatform;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "29.0.3",
3
+ "version": "29.1.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,11 +32,11 @@
32
32
  "@atlaskit/badge": "^16.4.0",
33
33
  "@atlaskit/button": "^20.2.0",
34
34
  "@atlaskit/checkbox": "^14.0.0",
35
- "@atlaskit/dropdown-menu": "^12.18.0",
35
+ "@atlaskit/dropdown-menu": "^12.19.0",
36
36
  "@atlaskit/form": "^10.5.0",
37
37
  "@atlaskit/frontend-utilities": "^2.7.0",
38
38
  "@atlaskit/heading": "^2.4.0",
39
- "@atlaskit/icon": "^22.20.0",
39
+ "@atlaskit/icon": "^22.22.0",
40
40
  "@atlaskit/icon-file-type": "^6.5.0",
41
41
  "@atlaskit/icon-object": "^6.5.0",
42
42
  "@atlaskit/icon-priority": "^6.3.0",