@atlaskit/smart-card 26.23.0 → 26.23.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 (39) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/extractors/flexible/index.js +1 -3
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/BlockCard/components/Emoji.js +1 -1
  5. package/dist/cjs/view/EmbedCard/components/styled.js +1 -1
  6. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +1 -1
  7. package/dist/cjs/view/FlexibleCard/index.js +1 -9
  8. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -3
  9. package/dist/cjs/view/InlineCard/Icon.js +1 -1
  10. package/dist/cjs/view/LinkUrl/index.js +1 -1
  11. package/dist/cjs/view/RedesignedInlineCard/Icon.js +1 -1
  12. package/dist/cjs/view/RedesignedInlineCard/styled.js +0 -1
  13. package/dist/es2019/extractors/flexible/index.js +1 -3
  14. package/dist/es2019/utils/analytics/analytics.js +1 -1
  15. package/dist/es2019/view/BlockCard/components/Emoji.js +1 -1
  16. package/dist/es2019/view/EmbedCard/components/styled.js +1 -1
  17. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -3
  18. package/dist/es2019/view/FlexibleCard/index.js +1 -7
  19. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -3
  20. package/dist/es2019/view/InlineCard/Icon.js +1 -1
  21. package/dist/es2019/view/LinkUrl/index.js +1 -1
  22. package/dist/es2019/view/RedesignedInlineCard/Icon.js +1 -1
  23. package/dist/es2019/view/RedesignedInlineCard/styled.js +0 -1
  24. package/dist/esm/extractors/flexible/index.js +1 -3
  25. package/dist/esm/utils/analytics/analytics.js +1 -1
  26. package/dist/esm/view/BlockCard/components/Emoji.js +1 -1
  27. package/dist/esm/view/EmbedCard/components/styled.js +1 -1
  28. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +1 -1
  29. package/dist/esm/view/FlexibleCard/index.js +1 -9
  30. package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -3
  31. package/dist/esm/view/InlineCard/Icon.js +1 -1
  32. package/dist/esm/view/LinkUrl/index.js +1 -1
  33. package/dist/esm/view/RedesignedInlineCard/Icon.js +1 -1
  34. package/dist/esm/view/RedesignedInlineCard/styled.js +0 -1
  35. package/dist/types/extractors/flexible/index.d.ts +1 -1
  36. package/dist/types/view/FlexibleCard/types.d.ts +1 -2
  37. package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
  38. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +1 -2
  39. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.23.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4c919248f12`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4c919248f12) - cleanup: remove usages of useLozengeAction feature flag
8
+ - Updated dependencies
9
+
10
+ ## 26.23.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
15
+
3
16
  ## 26.23.0
4
17
 
5
18
  ### Minor Changes
@@ -20,7 +20,6 @@ var _extractDownloadAction = require("./actions/extract-download-action");
20
20
  var _extractViewAction = require("./actions/extract-view-action");
21
21
  var extractFlexibleUiContext = function extractFlexibleUiContext() {
22
22
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
23
- featureFlags = _ref.featureFlags,
24
23
  id = _ref.id,
25
24
  renderers = _ref.renderers,
26
25
  showServerActions = _ref.showServerActions,
@@ -30,7 +29,6 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
30
29
  }
31
30
  var data = response.data;
32
31
  var url = (0, _linkExtractors.extractLink)(data);
33
- var showLozengeAction = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.useLozengeAction) === 'experiment';
34
32
  return {
35
33
  assignedToGroup: (0, _utils.extractPersonAssignedToAsArray)(data),
36
34
  attachmentCount: (0, _utils.extractAttachmentCount)(data),
@@ -64,7 +62,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
64
62
  snippet: (0, _primitives.extractSummary)(data) || undefined,
65
63
  // Explicitly set here to remove an empty string
66
64
  sourceBranch: (0, _utils.extractSourceBranch)(data),
67
- state: (0, _extractState.default)(response, showServerActions || showLozengeAction, id),
65
+ state: (0, _extractState.default)(response, showServerActions, id),
68
66
  subscriberCount: (0, _utils.extractSubscriberCount)(data),
69
67
  subTasksProgress: (0, _utils.extractSubTasksProgress)(data),
70
68
  storyPoints: (0, _utils.extractStoryPoints)(data),
@@ -21,7 +21,7 @@ exports.ANALYTICS_CHANNEL = ANALYTICS_CHANNEL;
21
21
  var context = {
22
22
  componentName: 'smart-cards',
23
23
  packageName: "@atlaskit/smart-card",
24
- packageVersion: "26.23.0"
24
+ packageVersion: "26.23.2"
25
25
  };
26
26
  exports.context = context;
27
27
  var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
@@ -19,7 +19,7 @@ var Emoji = function Emoji(_ref) {
19
19
  display: 'flex',
20
20
  alignItems: 'center',
21
21
  justifyContent: 'center',
22
- marginTop: '-2px'
22
+ marginTop: "var(--ds-space-negative-025, -2px)"
23
23
  }
24
24
  }, emoji);
25
25
  };
@@ -66,7 +66,7 @@ var height = function height(_ref5) {
66
66
  return inheritDimensions ? 'height: 100%;' : "height: ".concat((0, _utils.gs)(54));
67
67
  };
68
68
  var wrapperStyles = function wrapperStyles(props) {
69
- return "\n ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat((0, _constants.fontFamily)(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ", "var(--ds-space-200, 16px)", ");\n height: calc(100% + ", "var(--ds-space-100, 8px)", ");\n left: calc(-1 * ", "var(--ds-space-100, 8px)", ");\n ").concat((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : "background: transparent;\n ".concat(borderRadius), "\n }\n");
69
+ return "\n ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat((0, _constants.fontFamily)(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ", "var(--ds-space-200, 16px)", ");\n height: calc(100% + ", "var(--ds-space-100, 8px)", ");\n left: ", "var(--ds-space-negative-100, -8px)", ";\n ").concat((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : "background: transparent;\n ".concat(borderRadius), "\n }\n");
70
70
  };
71
71
  var visibleStyles = "\n ".concat((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? "" : "background-color: ".concat("var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), ";"), "\n\n &:after {\n ").concat((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? "border: 1px solid ".concat("var(--ds-border-input, ".concat(colors.N40, ")"), ";\n background-color: ", (0, _components.themed)({
72
72
  light: "var(--ds-surface-raised, white)",
@@ -12,7 +12,7 @@ var triggerButtonStyles = (0, _react.css)(_templateObject || (_templateObject =
12
12
 
13
13
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
14
14
  exports.triggerButtonStyles = triggerButtonStyles;
15
- var triggerLozengeStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: calc(-1 * ", ")\n calc(-1 * ", ")\n calc(-1 * ", ") -1px;\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)");
15
+ var triggerLozengeStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: ", "\n ", "\n ", " -1px;\n }\n"])), "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-100, -8px)", "var(--ds-space-negative-050, -4px)");
16
16
  exports.triggerLozengeStyles = triggerLozengeStyles;
17
17
  var dropdownItemGroupStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n max-height: 300px;\n overflow-y: auto;\n\n button {\n padding: ", " ", ";\n min-height: 28px;\n width: 220px;\n\n &:hover {\n background-color: inherit;\n }\n\n &:focus,\n &:focus-visible {\n background-color: ", ";\n box-sizing: border-box;\n box-shadow: inset 2px 0 0 ", ";\n outline: none;\n }\n }\n"])), "var(--ds-space-075, 6px)", "var(--ds-space-150, 12px)", "var(--ds-background-neutral-subtle-hovered, #091E420F)", "var(--ds-border-selected, #0C66E4)");
18
18
  exports.dropdownItemGroupStyles = dropdownItemGroupStyles;
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _linkProvider = require("@atlaskit/link-provider");
12
11
  var _constants = require("../../constants");
13
12
  var _container = _interopRequireDefault(require("./components/container"));
14
13
  var _flexibleUiContext = require("../../state/flexible-ui-context");
@@ -40,23 +39,16 @@ var FlexibleCard = function FlexibleCard(_ref) {
40
39
  var cardType = cardState.status,
41
40
  details = cardState.details;
42
41
  var status = cardType;
43
- var useLozengeAction = (0, _linkProvider.useFeatureFlag)('useLozengeAction');
44
- var featureFlags = (0, _react.useMemo)(function () {
45
- return {
46
- useLozengeAction: useLozengeAction
47
- };
48
- }, [useLozengeAction]);
49
42
  var context = (0, _react.useMemo)(function () {
50
43
  return (0, _utils.getContextByStatus)({
51
44
  response: details,
52
- featureFlags: featureFlags,
53
45
  id: id,
54
46
  renderers: renderers,
55
47
  showServerActions: showServerActions,
56
48
  status: status,
57
49
  url: url
58
50
  });
59
- }, [details, featureFlags, id, renderers, showServerActions, status, url]);
51
+ }, [details, id, renderers, showServerActions, status, url]);
60
52
  var retry = (0, _utils.getRetryOptions)(url, status, details, onAuthorize);
61
53
  var _ref2 = context || {},
62
54
  title = _ref2.title;
@@ -26,7 +26,6 @@ var _reactIntlNext = require("react-intl-next");
26
26
  var _messages = require("../../../messages");
27
27
  var _click = require("../../../utils/analytics/click");
28
28
  var _store = require("../../../state/store");
29
- var _linkProvider = require("@atlaskit/link-provider");
30
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
32
31
  /** @jsx jsx */
@@ -81,7 +80,6 @@ var HoverCardContent = function HoverCardContent(_ref) {
81
80
  onMouseEnter = _ref.onMouseEnter,
82
81
  onMouseLeave = _ref.onMouseLeave,
83
82
  showServerActions = _ref.showServerActions;
84
- var useLozengeAction = (0, _linkProvider.useFeatureFlag)('useLozengeAction');
85
83
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
86
84
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
87
85
  var defaultAnalytics = (0, _analytics2.useSmartLinkAnalytics)(url, undefined, id);
@@ -156,7 +154,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
156
154
  onClick: onClick,
157
155
  onResolve: onResolve,
158
156
  renderers: renderers,
159
- showServerActions: useLozengeAction === 'experiment' || showServerActions ? {
157
+ showServerActions: showServerActions ? {
160
158
  showStateActionFeatureDiscovery: true
161
159
  } : false,
162
160
  ui: _styled.flexibleUiOptions,
@@ -21,7 +21,7 @@ var Icon = _styled.default.img(_templateObject || (_templateObject = (0, _tagged
21
21
  // are less than that in height/width.
22
22
  // TODO: Replace this override with proper AtlasKit solution.
23
23
  exports.Icon = Icon;
24
- var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
24
+ var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n"])), "var(--ds-space-negative-025, -2px)");
25
25
  exports.AKIconWrapper = AKIconWrapper;
26
26
  var Shimmer = function Shimmer(_ref) {
27
27
  var testId = _ref.testId;
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
18
18
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
19
19
  var PACKAGE_DATA = {
20
20
  packageName: "@atlaskit/smart-card",
21
- packageVersion: "26.23.0",
21
+ packageVersion: "26.23.2",
22
22
  componentName: 'linkUrl'
23
23
  };
24
24
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -21,7 +21,7 @@ var Icon = _styled.default.img(_templateObject || (_templateObject = (0, _tagged
21
21
  // are less than that in height/width.
22
22
  // TODO: Replace this override with proper AtlasKit solution.
23
23
  exports.Icon = Icon;
24
- var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
24
+ var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n"])), "var(--ds-space-negative-025, -2px)");
25
25
  exports.AKIconWrapper = AKIconWrapper;
26
26
  var Shimmer = function Shimmer(_ref) {
27
27
  var testId = _ref.testId;
@@ -14,7 +14,6 @@ var LINK_COLOR_DARK = '#4794FF';
14
14
 
15
15
  // By default buttons will hide overflow and ellipsis content instead of wrapping.
16
16
  // This basically turns the button back into inline content
17
- // There is a workaround for negative token spacing suggested by the design system team. calc(${token} * -1)
18
17
  var IconStyledButton = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &&& {\n text-align: initial;\n display: inline;\n vertical-align: baseline;\n border-radius: ", ";\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n padding: ", " ", ";\n background-clip: padding-box;\n box-decoration-break: clone;\n }\n > span {\n display: inline;\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])), "var(--ds-border-radius-100, 2px)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)");
19
18
  exports.IconStyledButton = IconStyledButton;
20
19
  var NoLinkAppearance = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n margin-left: ", ";\n"])), (0, _components.themed)({
@@ -12,7 +12,6 @@ import { extractPreviewAction } from './actions/extract-preview-action';
12
12
  import { extractDownloadAction } from './actions/extract-download-action';
13
13
  import { extractViewAction } from './actions/extract-view-action';
14
14
  const extractFlexibleUiContext = ({
15
- featureFlags,
16
15
  id,
17
16
  renderers,
18
17
  showServerActions,
@@ -23,7 +22,6 @@ const extractFlexibleUiContext = ({
23
22
  }
24
23
  const data = response.data;
25
24
  const url = extractLink(data);
26
- const showLozengeAction = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.useLozengeAction) === 'experiment';
27
25
  return {
28
26
  assignedToGroup: extractPersonAssignedToAsArray(data),
29
27
  attachmentCount: extractAttachmentCount(data),
@@ -57,7 +55,7 @@ const extractFlexibleUiContext = ({
57
55
  snippet: extractSummary(data) || undefined,
58
56
  // Explicitly set here to remove an empty string
59
57
  sourceBranch: extractSourceBranch(data),
60
- state: extractState(response, showServerActions || showLozengeAction, id),
58
+ state: extractState(response, showServerActions, id),
61
59
  subscriberCount: extractSubscriberCount(data),
62
60
  subTasksProgress: extractSubTasksProgress(data),
63
61
  storyPoints: extractStoryPoints(data),
@@ -3,7 +3,7 @@ export const ANALYTICS_CHANNEL = 'media';
3
3
  export const context = {
4
4
  componentName: 'smart-cards',
5
5
  packageName: "@atlaskit/smart-card",
6
- packageVersion: "26.23.0"
6
+ packageVersion: "26.23.2"
7
7
  };
8
8
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
9
9
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -12,7 +12,7 @@ export const Emoji = ({
12
12
  display: 'flex',
13
13
  alignItems: 'center',
14
14
  justifyContent: 'center',
15
- marginTop: '-2px'
15
+ marginTop: "var(--ds-space-negative-025, -2px)"
16
16
  }
17
17
  }, emoji);
18
18
  };
@@ -113,7 +113,7 @@ const wrapperStyles = props => `
113
113
  position: absolute;
114
114
  width: calc(100% + ${"var(--ds-space-200, 16px)"});
115
115
  height: calc(100% + ${"var(--ds-space-100, 8px)"});
116
- left: calc(-1 * ${"var(--ds-space-100, 8px)"});
116
+ left: ${"var(--ds-space-negative-100, -8px)"};
117
117
  ${getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : `background: transparent;
118
118
  ${borderRadius}`}
119
119
  }
@@ -31,9 +31,9 @@ export const triggerLozengeStyles = css`
31
31
  display: flex;
32
32
 
33
33
  span[role='img'] {
34
- margin: calc(-1 * ${"var(--ds-space-050, 4px)"})
35
- calc(-1 * ${"var(--ds-space-100, 8px)"})
36
- calc(-1 * ${"var(--ds-space-050, 4px)"}) -1px;
34
+ margin: ${"var(--ds-space-negative-050, -4px)"}
35
+ ${"var(--ds-space-negative-100, -8px)"}
36
+ ${"var(--ds-space-negative-050, -4px)"} -1px;
37
37
  }
38
38
  `;
39
39
  export const dropdownItemGroupStyles = css`
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect, useMemo } from 'react';
3
- import { useFeatureFlag } from '@atlaskit/link-provider';
4
3
  import { SmartLinkStatus } from '../../constants';
5
4
  import Container from './components/container';
6
5
  import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
@@ -34,19 +33,14 @@ const FlexibleCard = ({
34
33
  details
35
34
  } = cardState;
36
35
  const status = cardType;
37
- const useLozengeAction = useFeatureFlag('useLozengeAction');
38
- const featureFlags = useMemo(() => ({
39
- useLozengeAction
40
- }), [useLozengeAction]);
41
36
  const context = useMemo(() => getContextByStatus({
42
37
  response: details,
43
- featureFlags,
44
38
  id,
45
39
  renderers,
46
40
  showServerActions,
47
41
  status,
48
42
  url
49
- }), [details, featureFlags, id, renderers, showServerActions, status, url]);
43
+ }), [details, id, renderers, showServerActions, status, url]);
50
44
  const retry = getRetryOptions(url, status, details, onAuthorize);
51
45
  const {
52
46
  title
@@ -17,7 +17,6 @@ import { FormattedMessage } from 'react-intl-next';
17
17
  import { messages } from '../../../messages';
18
18
  import { fireLinkClickedEvent } from '../../../utils/analytics/click';
19
19
  import { useSmartCardState } from '../../../state/store';
20
- import { useFeatureFlag } from '@atlaskit/link-provider';
21
20
  export const hoverCardClassName = 'smart-links-hover-preview';
22
21
  export const getCopyAction = url => ({
23
22
  name: ActionName.CustomAction,
@@ -44,7 +43,6 @@ const HoverCardContent = ({
44
43
  showServerActions
45
44
  }) => {
46
45
  var _linkState$status, _cardState$details;
47
- const useLozengeAction = useFeatureFlag('useLozengeAction');
48
46
  const {
49
47
  createAnalyticsEvent
50
48
  } = useAnalyticsEvents();
@@ -117,7 +115,7 @@ const HoverCardContent = ({
117
115
  onClick: onClick,
118
116
  onResolve: onResolve,
119
117
  renderers: renderers,
120
- showServerActions: useLozengeAction === 'experiment' || showServerActions ? {
118
+ showServerActions: showServerActions ? {
121
119
  showStateActionFeatureDiscovery: true
122
120
  } : false,
123
121
  ui: flexibleUiOptions,
@@ -23,7 +23,7 @@ export const Icon = styled.img`
23
23
  // are less than that in height/width.
24
24
  // TODO: Replace this override with proper AtlasKit solution.
25
25
  export const AKIconWrapper = styled.span`
26
- margin-right: calc(-1 * ${"var(--ds-space-025, 2px)"});
26
+ margin-right: ${"var(--ds-space-negative-025, -2px)"};
27
27
  `;
28
28
  export const Shimmer = ({
29
29
  testId
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
8
8
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
9
  const PACKAGE_DATA = {
10
10
  packageName: "@atlaskit/smart-card",
11
- packageVersion: "26.23.0",
11
+ packageVersion: "26.23.2",
12
12
  componentName: 'linkUrl'
13
13
  };
14
14
  const Link = withLinkClickedEvent('a');
@@ -23,7 +23,7 @@ export const Icon = styled.img`
23
23
  // are less than that in height/width.
24
24
  // TODO: Replace this override with proper AtlasKit solution.
25
25
  export const AKIconWrapper = styled.span`
26
- margin-right: calc(-1 * ${"var(--ds-space-025, 2px)"});
26
+ margin-right: ${"var(--ds-space-negative-025, -2px)"};
27
27
  `;
28
28
  export const Shimmer = ({
29
29
  testId
@@ -5,7 +5,6 @@ const LINK_COLOR_DARK = '#4794FF';
5
5
 
6
6
  // By default buttons will hide overflow and ellipsis content instead of wrapping.
7
7
  // This basically turns the button back into inline content
8
- // There is a workaround for negative token spacing suggested by the design system team. calc(${token} * -1)
9
8
  export const IconStyledButton = styled.span`
10
9
  &&& {
11
10
  text-align: initial;
@@ -13,7 +13,6 @@ import { extractDownloadAction } from './actions/extract-download-action';
13
13
  import { extractViewAction } from './actions/extract-view-action';
14
14
  var extractFlexibleUiContext = function extractFlexibleUiContext() {
15
15
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
16
- featureFlags = _ref.featureFlags,
17
16
  id = _ref.id,
18
17
  renderers = _ref.renderers,
19
18
  showServerActions = _ref.showServerActions,
@@ -23,7 +22,6 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
23
22
  }
24
23
  var data = response.data;
25
24
  var url = extractLink(data);
26
- var showLozengeAction = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.useLozengeAction) === 'experiment';
27
25
  return {
28
26
  assignedToGroup: extractPersonAssignedToAsArray(data),
29
27
  attachmentCount: extractAttachmentCount(data),
@@ -57,7 +55,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
57
55
  snippet: extractSummary(data) || undefined,
58
56
  // Explicitly set here to remove an empty string
59
57
  sourceBranch: extractSourceBranch(data),
60
- state: extractState(response, showServerActions || showLozengeAction, id),
58
+ state: extractState(response, showServerActions, id),
61
59
  subscriberCount: extractSubscriberCount(data),
62
60
  subTasksProgress: extractSubTasksProgress(data),
63
61
  storyPoints: extractStoryPoints(data),
@@ -13,7 +13,7 @@ export var ANALYTICS_CHANNEL = 'media';
13
13
  export var context = {
14
14
  componentName: 'smart-cards',
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "26.23.0"
16
+ packageVersion: "26.23.2"
17
17
  };
18
18
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
19
19
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -11,7 +11,7 @@ export var Emoji = function Emoji(_ref) {
11
11
  display: 'flex',
12
12
  alignItems: 'center',
13
13
  justifyContent: 'center',
14
- marginTop: '-2px'
14
+ marginTop: "var(--ds-space-negative-025, -2px)"
15
15
  }
16
16
  }, emoji);
17
17
  };
@@ -53,7 +53,7 @@ var height = function height(_ref5) {
53
53
  return inheritDimensions ? 'height: 100%;' : "height: ".concat(gridSize(54));
54
54
  };
55
55
  var wrapperStyles = function wrapperStyles(props) {
56
- return "\n ".concat(getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat(fontFamily(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ", "var(--ds-space-200, 16px)", ");\n height: calc(100% + ", "var(--ds-space-100, 8px)", ");\n left: calc(-1 * ", "var(--ds-space-100, 8px)", ");\n ").concat(getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : "background: transparent;\n ".concat(borderRadius), "\n }\n");
56
+ return "\n ".concat(getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat(fontFamily(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ", "var(--ds-space-200, 16px)", ");\n height: calc(100% + ", "var(--ds-space-100, 8px)", ");\n left: ", "var(--ds-space-negative-100, -8px)", ";\n ").concat(getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? wrapperBorderRadius : "background: transparent;\n ".concat(borderRadius), "\n }\n");
57
57
  };
58
58
  var visibleStyles = "\n ".concat(getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? "" : "background-color: ".concat("var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), ";"), "\n\n &:after {\n ").concat(getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? "border: 1px solid ".concat("var(--ds-border-input, ".concat(N40, ")"), ";\n background-color: ", themed({
59
59
  light: "var(--ds-surface-raised, white)",
@@ -4,5 +4,5 @@ import { css } from '@emotion/react';
4
4
  export var triggerButtonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n all: unset;\n background-color: transparent;\n color: unset;\n cursor: pointer;\n font-family: unset;\n font-size: unset;\n font-style: unset;\n font-weight: unset;\n font-variant: unset;\n line-height: 0;\n padding: 0;\n text-transform: unset;\n\n border: 2px solid transparent;\n margin: ", ";\n\n &:focus-visible,\n &:focus-within,\n &[aria-expanded='true'] {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n border-radius: 5px;\n }\n"])), "var(--ds-space-025, 2px)", "var(--ds-border-focused, #388BFF)");
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
7
- export var triggerLozengeStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: calc(-1 * ", ")\n calc(-1 * ", ")\n calc(-1 * ", ") -1px;\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)");
7
+ export var triggerLozengeStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: ", "\n ", "\n ", " -1px;\n }\n"])), "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-100, -8px)", "var(--ds-space-negative-050, -4px)");
8
8
  export var dropdownItemGroupStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n max-height: 300px;\n overflow-y: auto;\n\n button {\n padding: ", " ", ";\n min-height: 28px;\n width: 220px;\n\n &:hover {\n background-color: inherit;\n }\n\n &:focus,\n &:focus-visible {\n background-color: ", ";\n box-sizing: border-box;\n box-shadow: inset 2px 0 0 ", ";\n outline: none;\n }\n }\n"])), "var(--ds-space-075, 6px)", "var(--ds-space-150, 12px)", "var(--ds-background-neutral-subtle-hovered, #091E420F)", "var(--ds-border-selected, #0C66E4)");
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect, useMemo } from 'react';
3
- import { useFeatureFlag } from '@atlaskit/link-provider';
4
3
  import { SmartLinkStatus } from '../../constants';
5
4
  import Container from './components/container';
6
5
  import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
@@ -31,23 +30,16 @@ var FlexibleCard = function FlexibleCard(_ref) {
31
30
  var cardType = cardState.status,
32
31
  details = cardState.details;
33
32
  var status = cardType;
34
- var useLozengeAction = useFeatureFlag('useLozengeAction');
35
- var featureFlags = useMemo(function () {
36
- return {
37
- useLozengeAction: useLozengeAction
38
- };
39
- }, [useLozengeAction]);
40
33
  var context = useMemo(function () {
41
34
  return getContextByStatus({
42
35
  response: details,
43
- featureFlags: featureFlags,
44
36
  id: id,
45
37
  renderers: renderers,
46
38
  showServerActions: showServerActions,
47
39
  status: status,
48
40
  url: url
49
41
  });
50
- }, [details, featureFlags, id, renderers, showServerActions, status, url]);
42
+ }, [details, id, renderers, showServerActions, status, url]);
51
43
  var retry = getRetryOptions(url, status, details, onAuthorize);
52
44
  var _ref2 = context || {},
53
45
  title = _ref2.title;
@@ -19,7 +19,6 @@ import { FormattedMessage } from 'react-intl-next';
19
19
  import { messages } from '../../../messages';
20
20
  import { fireLinkClickedEvent } from '../../../utils/analytics/click';
21
21
  import { useSmartCardState } from '../../../state/store';
22
- import { useFeatureFlag } from '@atlaskit/link-provider';
23
22
  export var hoverCardClassName = 'smart-links-hover-preview';
24
23
  export var getCopyAction = function getCopyAction(url) {
25
24
  return {
@@ -68,7 +67,6 @@ var HoverCardContent = function HoverCardContent(_ref) {
68
67
  onMouseEnter = _ref.onMouseEnter,
69
68
  onMouseLeave = _ref.onMouseLeave,
70
69
  showServerActions = _ref.showServerActions;
71
- var useLozengeAction = useFeatureFlag('useLozengeAction');
72
70
  var _useAnalyticsEvents = useAnalyticsEvents(),
73
71
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
74
72
  var defaultAnalytics = useSmartLinkAnalytics(url, undefined, id);
@@ -143,7 +141,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
143
141
  onClick: onClick,
144
142
  onResolve: onResolve,
145
143
  renderers: renderers,
146
- showServerActions: useLozengeAction === 'experiment' || showServerActions ? {
144
+ showServerActions: showServerActions ? {
147
145
  showStateActionFeatureDiscovery: true
148
146
  } : false,
149
147
  ui: flexibleUiOptions,
@@ -14,7 +14,7 @@ export var Icon = styled.img(_templateObject || (_templateObject = _taggedTempla
14
14
  // Used for 'untrue' icons which claim to be 16x16 but
15
15
  // are less than that in height/width.
16
16
  // TODO: Replace this override with proper AtlasKit solution.
17
- export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
17
+ export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), "var(--ds-space-negative-025, -2px)");
18
18
  export var Shimmer = function Shimmer(_ref) {
19
19
  var testId = _ref.testId;
20
20
  var skeletonCustomStyles = {
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
11
11
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
12
  var PACKAGE_DATA = {
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "26.23.0",
14
+ packageVersion: "26.23.2",
15
15
  componentName: 'linkUrl'
16
16
  };
17
17
  var Link = withLinkClickedEvent('a');
@@ -14,7 +14,7 @@ export var Icon = styled.img(_templateObject || (_templateObject = _taggedTempla
14
14
  // Used for 'untrue' icons which claim to be 16x16 but
15
15
  // are less than that in height/width.
16
16
  // TODO: Replace this override with proper AtlasKit solution.
17
- export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
17
+ export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), "var(--ds-space-negative-025, -2px)");
18
18
  export var Shimmer = function Shimmer(_ref) {
19
19
  var testId = _ref.testId;
20
20
  var skeletonCustomStyles = {
@@ -7,7 +7,6 @@ var LINK_COLOR_DARK = '#4794FF';
7
7
 
8
8
  // By default buttons will hide overflow and ellipsis content instead of wrapping.
9
9
  // This basically turns the button back into inline content
10
- // There is a workaround for negative token spacing suggested by the design system team. calc(${token} * -1)
11
10
  export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &&& {\n text-align: initial;\n display: inline;\n vertical-align: baseline;\n border-radius: ", ";\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n padding: ", " ", ";\n background-clip: padding-box;\n box-decoration-break: clone;\n }\n > span {\n display: inline;\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])), "var(--ds-border-radius-100, 2px)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)");
12
11
  export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n margin-left: ", ";\n"])), themed({
13
12
  light: "var(--ds-text-subtlest, ".concat(N200, ")"),
@@ -1,4 +1,4 @@
1
1
  import { FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
2
2
  import { ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
3
- declare const extractFlexibleUiContext: ({ featureFlags, id, renderers, showServerActions, response, }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
3
+ declare const extractFlexibleUiContext: ({ id, renderers, showServerActions, response, }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
4
4
  export default extractFlexibleUiContext;
@@ -139,8 +139,7 @@ export type FlexibleUiOptions = {
139
139
  export type ServerActionOptions = {
140
140
  /**
141
141
  * DO NOT USE: This prop is part of an experiment. It will be removed once
142
- * the experiment is completed. To be cleaned up on
143
- * https://product-fabric.atlassian.net/browse/EDM-5795
142
+ * the experiment is completed.
144
143
  * @see https://team.atlassian.com/project/ATLAS-13099/about
145
144
  * @internal
146
145
  * @deprecated
@@ -1,4 +1,4 @@
1
1
  import { FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
2
2
  import { ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
3
- declare const extractFlexibleUiContext: ({ featureFlags, id, renderers, showServerActions, response, }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
3
+ declare const extractFlexibleUiContext: ({ id, renderers, showServerActions, response, }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
4
4
  export default extractFlexibleUiContext;
@@ -139,8 +139,7 @@ export type FlexibleUiOptions = {
139
139
  export type ServerActionOptions = {
140
140
  /**
141
141
  * DO NOT USE: This prop is part of an experiment. It will be removed once
142
- * the experiment is completed. To be cleaned up on
143
- * https://product-fabric.atlassian.net/browse/EDM-5795
142
+ * the experiment is completed.
144
143
  * @see https://team.atlassian.com/project/ATLAS-13099/about
145
144
  * @internal
146
145
  * @deprecated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.23.0",
3
+ "version": "26.23.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/link-analytics": "^8.2.0",
39
39
  "@atlaskit/link-client-extension": "^1.6.0",
40
40
  "@atlaskit/link-extractors": "^1.1.0",
41
- "@atlaskit/linking-common": "^4.6.0",
41
+ "@atlaskit/linking-common": "^4.7.0",
42
42
  "@atlaskit/linking-types": "^8.3.0",
43
43
  "@atlaskit/logo": "^13.14.0",
44
44
  "@atlaskit/lozenge": "^11.4.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/popup": "^1.9.0",
49
49
  "@atlaskit/spinner": "^15.5.0",
50
50
  "@atlaskit/theme": "^12.6.0",
51
- "@atlaskit/tokens": "^1.21.0",
51
+ "@atlaskit/tokens": "^1.22.0",
52
52
  "@atlaskit/tooltip": "^17.8.0",
53
53
  "@atlaskit/ufo": "^0.2.0",
54
54
  "@babel/runtime": "^7.0.0",