@atlaskit/smart-card 26.42.8 → 26.42.9
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 +7 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/styled.js +3 -7
- package/dist/cjs/view/{InlineCard/ResolvingView → BlockCard/views}/styled.js +3 -3
- package/dist/cjs/view/CardWithData/component.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +1 -3
- package/dist/cjs/view/EmbedCard/components/styled.js +12 -20
- package/dist/cjs/view/EmbedCard/index.js +1 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/cjs/view/HoverCard/styled.js +2 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/LinkView/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/styled.js +6 -13
- package/dist/es2019/view/BlockCard/views/styled.js +7 -0
- package/dist/es2019/view/CardWithData/component.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +1 -3
- package/dist/es2019/view/EmbedCard/components/styled.js +9 -30
- package/dist/es2019/view/EmbedCard/index.js +1 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/es2019/view/HoverCard/styled.js +6 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/LinkView/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/styled.js +3 -7
- package/dist/esm/view/BlockCard/views/styled.js +5 -0
- package/dist/esm/view/CardWithData/component.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +1 -3
- package/dist/esm/view/EmbedCard/components/styled.js +12 -20
- package/dist/esm/view/EmbedCard/index.js +1 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/esm/view/HoverCard/styled.js +2 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/LinkView/index.js +1 -1
- package/dist/types/extractors/inline/index.d.ts +1 -1
- package/dist/types/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types/view/LinkView/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/inline/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types-ts4.5/view/LinkView/index.d.ts +1 -1
- package/package.json +5 -8
- package/dist/cjs/view/InlineCard/ErroredView/index.js +0 -89
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +0 -128
- package/dist/cjs/view/InlineCard/Frame/index.js +0 -61
- package/dist/cjs/view/InlineCard/Frame/styled.js +0 -66
- package/dist/cjs/view/InlineCard/Icon.js +0 -40
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +0 -150
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +0 -47
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +0 -82
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +0 -68
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +0 -110
- package/dist/cjs/view/InlineCard/index.js +0 -182
- package/dist/cjs/view/InlineCard/styled.js +0 -26
- package/dist/cjs/view/InlineCard/types.js +0 -5
- package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -65
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +0 -107
- package/dist/es2019/view/InlineCard/Frame/index.js +0 -54
- package/dist/es2019/view/InlineCard/Frame/styled.js +0 -93
- package/dist/es2019/view/InlineCard/Icon.js +0 -45
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -124
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +0 -101
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +0 -55
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +0 -44
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +0 -6
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +0 -84
- package/dist/es2019/view/InlineCard/index.js +0 -149
- package/dist/es2019/view/InlineCard/styled.js +0 -35
- package/dist/es2019/view/InlineCard/types.js +0 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +0 -82
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +0 -121
- package/dist/esm/view/InlineCard/Frame/index.js +0 -52
- package/dist/esm/view/InlineCard/Frame/styled.js +0 -59
- package/dist/esm/view/InlineCard/Icon.js +0 -34
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +0 -143
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +0 -40
- package/dist/esm/view/InlineCard/ResolvedView/index.js +0 -75
- package/dist/esm/view/InlineCard/ResolvingView/index.js +0 -61
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +0 -5
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +0 -103
- package/dist/esm/view/InlineCard/index.js +0 -146
- package/dist/esm/view/InlineCard/styled.js +0 -19
- package/dist/esm/view/InlineCard/types.js +0 -1
- package/dist/types/view/InlineCard/ErroredView/index.d.ts +0 -21
- package/dist/types/view/InlineCard/ForbiddenView/index.d.ts +0 -28
- package/dist/types/view/InlineCard/Frame/index.d.ts +0 -15
- package/dist/types/view/InlineCard/Frame/styled.d.ts +0 -15
- package/dist/types/view/InlineCard/Icon.d.ts +0 -12
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +0 -28
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +0 -40
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +0 -32
- package/dist/types/view/InlineCard/ResolvingView/index.d.ts +0 -17
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +0 -9
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +0 -31
- package/dist/types/view/InlineCard/index.d.ts +0 -9
- package/dist/types/view/InlineCard/styled.d.ts +0 -17
- package/dist/types/view/InlineCard/types.d.ts +0 -25
- package/dist/types-ts4.5/view/InlineCard/ErroredView/index.d.ts +0 -21
- package/dist/types-ts4.5/view/InlineCard/ForbiddenView/index.d.ts +0 -28
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +0 -15
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +0 -15
- package/dist/types-ts4.5/view/InlineCard/Icon.d.ts +0 -12
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +0 -28
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +0 -40
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +0 -32
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/index.d.ts +0 -17
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +0 -9
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +0 -31
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +0 -9
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +0 -17
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -25
- package/tmp/api-report-tmp.d.ts +0 -1007
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.42.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#57101](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/57101) [`80da63d8b9d5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/80da63d8b9d5) - [ux] Feature flag cleanup (platform.linking-platform.smart-card.show-smart-links-refreshed-design) for Smart Links refresh design. This surfaces rounder corner and styling changes on Smart Links.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 26.42.8
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -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: "26.42.
|
|
25
|
+
packageVersion: "26.42.9"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -18,7 +18,7 @@ var _Emoji = require("../components/Emoji");
|
|
|
18
18
|
var _Icon = require("../../common/Icon");
|
|
19
19
|
var _Content = require("../components/Content");
|
|
20
20
|
var _MetadataList = require("../../common/MetadataList");
|
|
21
|
-
var _styled = require("
|
|
21
|
+
var _styled = require("./styled");
|
|
22
22
|
var _ContentHeader = require("../components/ContentHeader");
|
|
23
23
|
var _ContentFooter = require("../components/ContentFooter");
|
|
24
24
|
var _utils = require("../../common/utils");
|
|
@@ -6,16 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.titleBlockCss = exports.metadataBlockCss = exports.footerBlockCss = exports.flexibleBlockCardStyle = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _token = require("../../../../utils/token");
|
|
10
9
|
var _react = require("@emotion/react");
|
|
11
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
-
var
|
|
13
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
14
12
|
// in editor prosemirror adds padding-left so we need to overwrite it
|
|
15
13
|
// renderer overwrites the margin-right so we need to add it here
|
|
16
14
|
var metadataBlockCss = exports.metadataBlockCss = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* primary element group */\n span[data-smart-element-avatar-group] {\n > ul {\n padding-left: 0px;\n margin-right: 0.5rem;\n }\n }\n [data-smart-element-group] {\n line-height: 1rem;\n }\n"])));
|
|
17
|
-
var titleBlockCss = exports.titleBlockCss = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n gap: 0.5em;\n
|
|
15
|
+
var titleBlockCss = exports.titleBlockCss = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n gap: 0.5em;\n\n [data-smart-element='Title'] {\n font-weight: 600;\n }\n"])));
|
|
18
16
|
var footerBlockCss = exports.footerBlockCss = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: 1.5rem;\n\n .actions-button-group {\n button,\n button:hover,\n button:focus,\n button:active {\n font-size: 0.875rem;\n }\n }\n"])));
|
|
19
|
-
var
|
|
20
|
-
var refreshedFlexibleBlockCardStyle = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n & > div {\n border-radius: ", ";\n border: 1px solid ", ";\n }\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(_colors.N40, ")"));
|
|
21
|
-
var flexibleBlockCardStyle = exports.flexibleBlockCardStyle = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? refreshedFlexibleBlockCardStyle : flexibleBlockCardElevationStyle;
|
|
17
|
+
var flexibleBlockCardStyle = exports.flexibleBlockCardStyle = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n & > div {\n border-radius: ", ";\n border: 1px solid ", ";\n }\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(_colors.N40, ")"));
|
|
@@ -4,9 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.LozengeBlockWrapper = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
-
var _styled2 = require("../IconAndTitleLayout/styled");
|
|
11
10
|
var _templateObject;
|
|
12
|
-
|
|
11
|
+
// TODO: Replace overrides with proper AtlasKit solution.
|
|
12
|
+
var LozengeBlockWrapper = exports.LozengeBlockWrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & > span {\n margin-left: ", ";\n }\n"])), "var(--ds-space-050, 4px)");
|
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
var _jsonld = require("../../utils/jsonld");
|
|
16
16
|
var _inline = require("../../extractors/inline");
|
|
17
17
|
var _block = require("../../extractors/block");
|
|
18
|
-
var _ResolvedView = require("../
|
|
18
|
+
var _ResolvedView = require("../RedesignedInlineCard/ResolvedView");
|
|
19
19
|
var _BlockCard = require("../BlockCard");
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
21
21
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -14,9 +14,7 @@ var measure = _interopRequireWildcard(require("../../utils/performance"));
|
|
|
14
14
|
var _helpers = require("../../state/helpers");
|
|
15
15
|
var _state = require("../../state");
|
|
16
16
|
var _BlockCard = require("../BlockCard");
|
|
17
|
-
var _InlineCard = require("../InlineCard");
|
|
18
17
|
var _RedesignedInlineCard = require("../RedesignedInlineCard");
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
18
|
var _EmbedCard = require("../EmbedCard");
|
|
21
19
|
var _flexible = require("../../utils/flexible");
|
|
22
20
|
var _FlexibleCard = _interopRequireDefault(require("../FlexibleCard"));
|
|
@@ -226,7 +224,7 @@ function Component(_ref) {
|
|
|
226
224
|
showAuthTooltip: showAuthTooltip,
|
|
227
225
|
showServerActions: showServerActions
|
|
228
226
|
};
|
|
229
|
-
return
|
|
227
|
+
return /*#__PURE__*/_react.default.createElement(_RedesignedInlineCard.InlineCard, inlineProps);
|
|
230
228
|
case 'block':
|
|
231
229
|
return /*#__PURE__*/_react.default.createElement(_BlockCard.BlockCard, {
|
|
232
230
|
id: id,
|
|
@@ -13,7 +13,6 @@ var _colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
|
13
13
|
var colors = _colors;
|
|
14
14
|
var _utils = require("../../common/utils");
|
|
15
15
|
var _components = require("@atlaskit/theme/components");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
18
17
|
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); }
|
|
19
18
|
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; }
|
|
@@ -56,19 +55,19 @@ function getInteractiveStyles(_ref3) {
|
|
|
56
55
|
function selected(_ref4) {
|
|
57
56
|
var isSelected = _ref4.isSelected,
|
|
58
57
|
frameStyle = _ref4.frameStyle;
|
|
59
|
-
return isSelected && frameStyle !== 'hide' ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ", "var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n content: '';\n border: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(
|
|
58
|
+
return isSelected && frameStyle !== 'hide' ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ", "var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n content: '';\n border: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(wrapperBorderRadius, "\n }\n ") : isSelected && frameStyle === 'hide' ? contentBorderRadius : '';
|
|
60
59
|
}
|
|
61
60
|
var height = function height(_ref5) {
|
|
62
61
|
var inheritDimensions = _ref5.inheritDimensions;
|
|
63
62
|
return inheritDimensions ? 'height: 100%;' : "height: ".concat((0, _utils.gs)(54));
|
|
64
63
|
};
|
|
65
64
|
var wrapperStyles = function wrapperStyles(props) {
|
|
66
|
-
return "\n ".concat(
|
|
65
|
+
return "\n ".concat(wrapperBorderRadius, "\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(wrapperBorderRadius, "\n }\n");
|
|
67
66
|
};
|
|
68
|
-
var visibleStyles = "\n
|
|
67
|
+
var visibleStyles = "\n &:after {\n border: 1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"), ";\n background-color: ", (0, _components.themed)({
|
|
69
68
|
light: "var(--ds-surface-raised, white)",
|
|
70
69
|
dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
71
|
-
})(), "
|
|
70
|
+
})(), ";\n }\n .embed-header {\n opacity: 1;\n }");
|
|
72
71
|
function visible(_ref6) {
|
|
73
72
|
var frameStyle = _ref6.frameStyle;
|
|
74
73
|
return frameStyle === 'show' ? visibleStyles : '';
|
|
@@ -102,22 +101,15 @@ var TextWrapper = exports.TextWrapper = _styled.default.div(_templateObject5 ||
|
|
|
102
101
|
// NB: `overflow` is kept as `hidden` since
|
|
103
102
|
// the internal contents of the `iframe` should
|
|
104
103
|
// manage scrolling behaviour.
|
|
105
|
-
var Content = exports.Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "
|
|
106
|
-
var
|
|
107
|
-
if (isInteractive && !(0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design')) {
|
|
108
|
-
return "\n .".concat(className, ":hover & {\n box-shadow: ", "var(--ds-shadow-overlay, 0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25))", ";\n }\n ");
|
|
109
|
-
} else {
|
|
110
|
-
return '';
|
|
111
|
-
}
|
|
112
|
-
}, function (_ref10) {
|
|
113
|
-
var allowScrollBar = _ref10.allowScrollBar;
|
|
104
|
+
var Content = exports.Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border: 1px solid ", ";\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", "\n\n ", "\n"])), contentBorderRadius, "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-surface-raised, white)", function (_ref9) {
|
|
105
|
+
var allowScrollBar = _ref9.allowScrollBar;
|
|
114
106
|
return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
|
|
115
|
-
}, function (
|
|
116
|
-
var frameStyle =
|
|
107
|
+
}, function (_ref10) {
|
|
108
|
+
var frameStyle = _ref10.frameStyle;
|
|
117
109
|
return frameStyle === 'hide' ? 'height: 100%;' : "\n height: calc(100% - ".concat("var(--ds-space-400, 32px)", ");\n top: ", "var(--ds-space-400, 32px)", ";\n ");
|
|
118
110
|
});
|
|
119
|
-
var Image = exports.Image = _styled.default.img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (
|
|
120
|
-
var size =
|
|
111
|
+
var Image = exports.Image = _styled.default.img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (_ref11) {
|
|
112
|
+
var size = _ref11.size;
|
|
121
113
|
return csssize(size);
|
|
122
114
|
}, borderRadius);
|
|
123
115
|
var maxAvatarCount = exports.maxAvatarCount = 6;
|
|
@@ -128,8 +120,8 @@ var Byline = exports.Byline = _styled.default.div(_templateObject10 || (_templat
|
|
|
128
120
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
129
121
|
var Description = exports.Description = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N800, ")"), 18 / 12, 18 * 3);
|
|
130
122
|
var ResolvedViewIconWrapper = exports.ResolvedViewIconWrapper = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
131
|
-
var Thumbnail = exports.Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (
|
|
132
|
-
var src =
|
|
123
|
+
var Thumbnail = exports.Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref12) {
|
|
124
|
+
var src = _ref12.src;
|
|
133
125
|
return src;
|
|
134
126
|
});
|
|
135
127
|
var UsersWrapper = exports.UsersWrapper = _styled.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
@@ -16,7 +16,7 @@ var _block = require("../../extractors/block");
|
|
|
16
16
|
var _helpers = require("../../state/helpers");
|
|
17
17
|
var _context = require("../../extractors/common/context");
|
|
18
18
|
var _BlockCard = require("../BlockCard");
|
|
19
|
-
var _ResolvedView = require("../
|
|
19
|
+
var _ResolvedView = require("../RedesignedInlineCard/ResolvedView");
|
|
20
20
|
var _ForbiddenView = require("./views/ForbiddenView");
|
|
21
21
|
var _NotFoundView = require("./views/NotFoundView");
|
|
22
22
|
var _ResolvedView2 = require("./views/ResolvedView");
|
|
@@ -22,7 +22,6 @@ var _SmartLinkAnalyticsContext = require("../../../utils/analytics/SmartLinkAnal
|
|
|
22
22
|
var _actions = require("../../../state/actions");
|
|
23
23
|
var _analytics = require("../../../state/analytics");
|
|
24
24
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
25
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
25
|
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); }
|
|
27
26
|
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; }
|
|
28
27
|
/** @jsx jsx */
|
|
@@ -232,7 +231,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
232
231
|
"data-testid": "hover-card-trigger-wrapper"
|
|
233
232
|
}), children));
|
|
234
233
|
}, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
|
|
235
|
-
return (0, _react.jsx)(_popup.default,
|
|
234
|
+
return (0, _react.jsx)(_popup.default, {
|
|
236
235
|
testId: "hover-card",
|
|
237
236
|
isOpen: isOpen && canOpen,
|
|
238
237
|
onClose: hideCard,
|
|
@@ -241,8 +240,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
241
240
|
autoFocus: false,
|
|
242
241
|
content: content,
|
|
243
242
|
trigger: trigger,
|
|
244
|
-
zIndex: zIndex
|
|
245
|
-
}, (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.show-smart-links-refreshed-design') && {
|
|
243
|
+
zIndex: zIndex,
|
|
246
244
|
popupComponent: _CustomPopupContainer.default
|
|
247
|
-
})
|
|
245
|
+
});
|
|
248
246
|
};
|
|
@@ -11,7 +11,6 @@ var _index = require("../../index");
|
|
|
11
11
|
var _constants = require("../../constants");
|
|
12
12
|
var _constants2 = require("@atlaskit/theme/constants");
|
|
13
13
|
var _components = require("@atlaskit/theme/components");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
16
15
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
17
16
|
var HOVER_CARD_Z_INDEX = exports.HOVER_CARD_Z_INDEX = _constants2.layers.modal();
|
|
@@ -29,7 +28,7 @@ var blockGap = '0.5rem';
|
|
|
29
28
|
var elementGap = '0.5rem';
|
|
30
29
|
var separatorCss = exports.separatorCss = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n [data-separator] + [data-separator]:before {\n margin-right: ", ";\n }\n"])), elementGap);
|
|
31
30
|
var HoverCardContainer = exports.HoverCardContainer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: none;\n border-width: 0;\n box-sizing: border-box;\n width: ", "rem;\n\n .", " {\n display: none;\n }\n"])), CARD_WIDTH_REM, _index.loadingPlaceholderClassName);
|
|
32
|
-
var titleBlockCss = exports.titleBlockCss = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n gap: ", ";\n\n ", "\n\n // title and subtitle element group\n [data-smart-element-group] {\n // gap between title and subtitle\n gap: 0.06rem;\n display: flex;\n /* subtitle element group */\n > [data-smart-element-group] {\n > span {\n margin-right: ", ";\n }\n }\n }\n\n
|
|
31
|
+
var titleBlockCss = exports.titleBlockCss = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n gap: ", ";\n\n ", "\n\n // title and subtitle element group\n [data-smart-element-group] {\n // gap between title and subtitle\n gap: 0.06rem;\n display: flex;\n /* subtitle element group */\n > [data-smart-element-group] {\n > span {\n margin-right: ", ";\n }\n }\n }\n\n [data-smart-element='Title'] {\n font-weight: 600;\n }\n"])), blockGap, separatorCss, elementGap);
|
|
33
32
|
var getTransitionStyles = exports.getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
34
33
|
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n transition: height 300ms ease-in-out;\n height: ", "px;\n"])), snippetHeight);
|
|
35
34
|
};
|
|
@@ -41,5 +40,5 @@ var popupContainerStyles = exports.popupContainerStyles = (0, _react.css)(_templ
|
|
|
41
40
|
dark: "var(--ds-shadow-overlay, 0px 0px 0px rgba(188, 214, 240, 0.12),0px 8px 12px rgba(3, 4, 4, 0.36),0px 0px 1px rgba(3, 4, 4, 0.5))"
|
|
42
41
|
})());
|
|
43
42
|
var getPreviewBlockStyles = exports.getPreviewBlockStyles = function getPreviewBlockStyles(previewHeight) {
|
|
44
|
-
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n
|
|
43
|
+
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n margin-bottom: ", ";\n"])), previewHeight ? "height: ".concat(previewHeight, "px;") : '', "var(--ds-border-radius-200, 8px)", "var(--ds-border-radius-200, 8px)", blockGap);
|
|
45
44
|
};
|
|
@@ -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: "26.42.
|
|
20
|
+
packageVersion: "26.42.9",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -12,7 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var _Frame = require("../
|
|
15
|
+
var _Frame = require("../RedesignedInlineCard/Frame");
|
|
16
16
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
17
17
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
18
|
var CardLinkView = exports.CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -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: "26.42.
|
|
7
|
+
packageVersion: "26.42.9"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,7 +12,7 @@ import { Emoji } from '../components/Emoji';
|
|
|
12
12
|
import { Icon } from '../../common/Icon';
|
|
13
13
|
import { Content } from '../components/Content';
|
|
14
14
|
import { MetadataList } from '../../common/MetadataList';
|
|
15
|
-
import { LozengeBlockWrapper } from '
|
|
15
|
+
import { LozengeBlockWrapper } from './styled';
|
|
16
16
|
import { ContentHeader } from '../components/ContentHeader';
|
|
17
17
|
import { ContentFooter } from '../components/ContentFooter';
|
|
18
18
|
import { gs } from '../../common/utils';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { tokens } from '../../../../utils/token';
|
|
2
1
|
import { css } from '@emotion/react';
|
|
3
2
|
import { N40 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
3
|
|
|
6
4
|
// in editor prosemirror adds padding-left so we need to overwrite it
|
|
7
5
|
// renderer overwrites the margin-right so we need to add it here
|
|
@@ -19,9 +17,10 @@ export const metadataBlockCss = css`
|
|
|
19
17
|
`;
|
|
20
18
|
export const titleBlockCss = css`
|
|
21
19
|
gap: 0.5em;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
|
|
21
|
+
[data-smart-element='Title'] {
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
}
|
|
25
24
|
`;
|
|
26
25
|
export const footerBlockCss = css`
|
|
27
26
|
height: 1.5rem;
|
|
@@ -35,15 +34,9 @@ export const footerBlockCss = css`
|
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
`;
|
|
38
|
-
const
|
|
39
|
-
border-radius: 1.5px;
|
|
40
|
-
box-shadow: ${tokens.elevation};
|
|
41
|
-
margin: ${"var(--ds-space-025, 2px)"};
|
|
42
|
-
`;
|
|
43
|
-
const refreshedFlexibleBlockCardStyle = css`
|
|
37
|
+
export const flexibleBlockCardStyle = css`
|
|
44
38
|
& > div {
|
|
45
39
|
border-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
46
40
|
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
47
41
|
}
|
|
48
|
-
`;
|
|
49
|
-
export const flexibleBlockCardStyle = getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? refreshedFlexibleBlockCardStyle : flexibleBlockCardElevationStyle;
|
|
42
|
+
`;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { getEmptyJsonLd } from '../../utils/jsonld';
|
|
4
4
|
import { extractInlineProps } from '../../extractors/inline';
|
|
5
5
|
import { extractBlockProps } from '../../extractors/block';
|
|
6
|
-
import { InlineCardResolvedView } from '../
|
|
6
|
+
import { InlineCardResolvedView } from '../RedesignedInlineCard/ResolvedView';
|
|
7
7
|
import { BlockCardResolvedView } from '../BlockCard';
|
|
8
8
|
export class CardWithDataContent extends React.Component {
|
|
9
9
|
render() {
|
|
@@ -6,9 +6,7 @@ import * as measure from '../../utils/performance';
|
|
|
6
6
|
import { getDefinitionId, getServices, isFinalState, getClickUrl, getResourceType, getExtensionKey, getSubproduct, getProduct, getCanBeDatasource } from '../../state/helpers';
|
|
7
7
|
import { useSmartLink } from '../../state';
|
|
8
8
|
import { BlockCard } from '../BlockCard';
|
|
9
|
-
import { InlineCard } from '../InlineCard';
|
|
10
9
|
import { InlineCard as RedesignedInlineCard } from '../RedesignedInlineCard';
|
|
11
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
10
|
import { EmbedCard } from '../EmbedCard';
|
|
13
11
|
import { isFlexibleUiCard } from '../../utils/flexible';
|
|
14
12
|
import FlexibleCard from '../FlexibleCard';
|
|
@@ -213,7 +211,7 @@ function Component({
|
|
|
213
211
|
showAuthTooltip: showAuthTooltip,
|
|
214
212
|
showServerActions: showServerActions
|
|
215
213
|
};
|
|
216
|
-
return
|
|
214
|
+
return /*#__PURE__*/React.createElement(RedesignedInlineCard, inlineProps);
|
|
217
215
|
case 'block':
|
|
218
216
|
return /*#__PURE__*/React.createElement(BlockCard, {
|
|
219
217
|
id: id,
|
|
@@ -4,7 +4,6 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { gs as gridSize } from '../../common/utils';
|
|
5
5
|
import { N40 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { themed } from '@atlaskit/theme/components';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
export const className = 'media-card-frame';
|
|
9
8
|
export const borderRadius = `
|
|
10
9
|
border-radius: ${akBorderRadius()}px;
|
|
@@ -79,18 +78,15 @@ function selected({
|
|
|
79
78
|
height: 100%;
|
|
80
79
|
width: 100%;
|
|
81
80
|
left: 0;
|
|
82
|
-
${
|
|
81
|
+
${wrapperBorderRadius}
|
|
83
82
|
}
|
|
84
|
-
` : isSelected && frameStyle === 'hide' ?
|
|
85
|
-
${getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? contentBorderRadius : `box-shadow: 0 0 0 3px ${`var(--ds-border-selected, ${colors.B100})`};
|
|
86
|
-
${borderRadius}`}
|
|
87
|
-
` : '';
|
|
83
|
+
` : isSelected && frameStyle === 'hide' ? contentBorderRadius : '';
|
|
88
84
|
}
|
|
89
85
|
const height = ({
|
|
90
86
|
inheritDimensions
|
|
91
87
|
}) => inheritDimensions ? 'height: 100%;' : `height: ${gridSize(54)}`;
|
|
92
88
|
const wrapperStyles = props => `
|
|
93
|
-
${
|
|
89
|
+
${wrapperBorderRadius}
|
|
94
90
|
${minWidth(props)}
|
|
95
91
|
${maxWidth(props)}
|
|
96
92
|
${getInteractiveStyles(props)}
|
|
@@ -114,19 +110,16 @@ const wrapperStyles = props => `
|
|
|
114
110
|
width: calc(100% + ${"var(--ds-space-200, 16px)"});
|
|
115
111
|
height: calc(100% + ${"var(--ds-space-100, 8px)"});
|
|
116
112
|
left: ${"var(--ds-space-negative-100, -8px)"};
|
|
117
|
-
${
|
|
118
|
-
${borderRadius}`}
|
|
113
|
+
${wrapperBorderRadius}
|
|
119
114
|
}
|
|
120
115
|
`;
|
|
121
116
|
const visibleStyles = `
|
|
122
|
-
${getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? `` : `background-color: ${`var(--ds-background-neutral-subtle, ${colors.N30})`};`}
|
|
123
|
-
|
|
124
117
|
&:after {
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
119
|
+
background-color: ${themed({
|
|
127
120
|
light: "var(--ds-surface-raised, white)",
|
|
128
121
|
dark: `var(--ds-surface-raised, ${BACKGROUND_COLOR_DARK})`
|
|
129
|
-
})()}
|
|
122
|
+
})()};
|
|
130
123
|
}
|
|
131
124
|
.embed-header {
|
|
132
125
|
opacity: 1;
|
|
@@ -197,8 +190,8 @@ export const TextWrapper = styled.div`
|
|
|
197
190
|
// the internal contents of the `iframe` should
|
|
198
191
|
// manage scrolling behaviour.
|
|
199
192
|
export const Content = styled.div`
|
|
200
|
-
${
|
|
201
|
-
|
|
193
|
+
${contentBorderRadius};
|
|
194
|
+
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
202
195
|
background-color: ${"var(--ds-surface-raised, white)"};
|
|
203
196
|
position: absolute;
|
|
204
197
|
z-index: 1;
|
|
@@ -216,20 +209,6 @@ export const Content = styled.div`
|
|
|
216
209
|
margin: 0 auto;
|
|
217
210
|
}
|
|
218
211
|
|
|
219
|
-
${({
|
|
220
|
-
isInteractive
|
|
221
|
-
}) => {
|
|
222
|
-
if (isInteractive && !getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design')) {
|
|
223
|
-
return `
|
|
224
|
-
.${className}:hover & {
|
|
225
|
-
box-shadow: ${"var(--ds-shadow-overlay, 0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25))"};
|
|
226
|
-
}
|
|
227
|
-
`;
|
|
228
|
-
} else {
|
|
229
|
-
return '';
|
|
230
|
-
}
|
|
231
|
-
}};
|
|
232
|
-
|
|
233
212
|
${({
|
|
234
213
|
allowScrollBar
|
|
235
214
|
}) => allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;'}
|
|
@@ -9,7 +9,7 @@ import { extractBlockProps } from '../../extractors/block';
|
|
|
9
9
|
import { getExtensionKey } from '../../state/helpers';
|
|
10
10
|
import { extractRequestAccessContext } from '../../extractors/common/context';
|
|
11
11
|
import { BlockCardResolvedView, BlockCardResolvingView } from '../BlockCard';
|
|
12
|
-
import { InlineCardResolvedView } from '../
|
|
12
|
+
import { InlineCardResolvedView } from '../RedesignedInlineCard/ResolvedView';
|
|
13
13
|
import { EmbedCardForbiddenView } from './views/ForbiddenView';
|
|
14
14
|
import { EmbedCardNotFoundView } from './views/NotFoundView';
|
|
15
15
|
import { EmbedCardResolvedView } from './views/ResolvedView';
|
|
@@ -14,7 +14,6 @@ import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAna
|
|
|
14
14
|
import { useSmartCardActions } from '../../../state/actions';
|
|
15
15
|
import { useSmartLinkAnalytics } from '../../../state/analytics';
|
|
16
16
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
17
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
const HOVER_CARD_SOURCE = 'smartLinkPreviewHoverCard';
|
|
19
18
|
const FADE_IN_DELAY = 500;
|
|
20
19
|
const FADE_OUT_DELAY = 300;
|
|
@@ -203,7 +202,7 @@ export const HoverCardComponent = ({
|
|
|
203
202
|
onContextMenu: onContextMenuClick,
|
|
204
203
|
"data-testid": "hover-card-trigger-wrapper"
|
|
205
204
|
}), children)), [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
|
|
206
|
-
return jsx(Popup,
|
|
205
|
+
return jsx(Popup, {
|
|
207
206
|
testId: "hover-card",
|
|
208
207
|
isOpen: isOpen && canOpen,
|
|
209
208
|
onClose: hideCard,
|
|
@@ -212,8 +211,7 @@ export const HoverCardComponent = ({
|
|
|
212
211
|
autoFocus: false,
|
|
213
212
|
content: content,
|
|
214
213
|
trigger: trigger,
|
|
215
|
-
zIndex: zIndex
|
|
216
|
-
}, getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') && {
|
|
214
|
+
zIndex: zIndex,
|
|
217
215
|
popupComponent: CustomPopupContainer
|
|
218
|
-
})
|
|
216
|
+
});
|
|
219
217
|
};
|
|
@@ -3,7 +3,6 @@ import { loadingPlaceholderClassName } from '../../index';
|
|
|
3
3
|
import { SmartLinkSize } from '../../constants';
|
|
4
4
|
import { layers } from '@atlaskit/theme/constants';
|
|
5
5
|
import { themed } from '@atlaskit/theme/components';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
|
|
8
7
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
9
8
|
export const HOVER_CARD_Z_INDEX = layers.modal();
|
|
@@ -52,9 +51,9 @@ export const titleBlockCss = css`
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
[data-smart-element='Title'] {
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
}
|
|
58
57
|
`;
|
|
59
58
|
export const getTransitionStyles = snippetHeight => css`
|
|
60
59
|
transition: height 300ms ease-in-out;
|
|
@@ -73,9 +72,7 @@ export const popupContainerStyles = css`
|
|
|
73
72
|
`;
|
|
74
73
|
export const getPreviewBlockStyles = previewHeight => css`
|
|
75
74
|
${previewHeight ? `height: ${previewHeight}px;` : ''}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
margin-bottom: ${blockGap};
|
|
80
|
-
}` : ``}
|
|
75
|
+
border-top-left-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
76
|
+
border-top-right-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
77
|
+
margin-bottom: ${blockGap};
|
|
81
78
|
`;
|
|
@@ -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: "26.42.
|
|
10
|
+
packageVersion: "26.42.9",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Frame } from '../
|
|
3
|
+
import { Frame } from '../RedesignedInlineCard/Frame';
|
|
4
4
|
export class CardLinkView extends React.PureComponent {
|
|
5
5
|
render() {
|
|
6
6
|
return /*#__PURE__*/React.createElement(Frame, _extends({
|
|
@@ -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: "26.42.
|
|
18
|
+
packageVersion: "26.42.9"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,7 +12,7 @@ import { Emoji } from '../components/Emoji';
|
|
|
12
12
|
import { Icon } from '../../common/Icon';
|
|
13
13
|
import { Content } from '../components/Content';
|
|
14
14
|
import { MetadataList } from '../../common/MetadataList';
|
|
15
|
-
import { LozengeBlockWrapper } from '
|
|
15
|
+
import { LozengeBlockWrapper } from './styled';
|
|
16
16
|
import { ContentHeader } from '../components/ContentHeader';
|
|
17
17
|
import { ContentFooter } from '../components/ContentFooter';
|
|
18
18
|
import { gs } from '../../common/utils';
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4
|
|
3
|
-
import { tokens } from '../../../../utils/token';
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import { N40 } from '@atlaskit/theme/colors';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
|
|
8
6
|
// in editor prosemirror adds padding-left so we need to overwrite it
|
|
9
7
|
// renderer overwrites the margin-right so we need to add it here
|
|
10
8
|
export var metadataBlockCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* primary element group */\n span[data-smart-element-avatar-group] {\n > ul {\n padding-left: 0px;\n margin-right: 0.5rem;\n }\n }\n [data-smart-element-group] {\n line-height: 1rem;\n }\n"])));
|
|
11
|
-
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n gap: 0.5em;\n
|
|
9
|
+
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n gap: 0.5em;\n\n [data-smart-element='Title'] {\n font-weight: 600;\n }\n"])));
|
|
12
10
|
export var footerBlockCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 1.5rem;\n\n .actions-button-group {\n button,\n button:hover,\n button:focus,\n button:active {\n font-size: 0.875rem;\n }\n }\n"])));
|
|
13
|
-
var
|
|
14
|
-
var refreshedFlexibleBlockCardStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n & > div {\n border-radius: ", ";\n border: 1px solid ", ";\n }\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(N40, ")"));
|
|
15
|
-
export var flexibleBlockCardStyle = getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? refreshedFlexibleBlockCardStyle : flexibleBlockCardElevationStyle;
|
|
11
|
+
export var flexibleBlockCardStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n & > div {\n border-radius: ", ";\n border: 1px solid ", ";\n }\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(N40, ")"));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
// TODO: Replace overrides with proper AtlasKit solution.
|
|
5
|
+
export var LozengeBlockWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & > span {\n margin-left: ", ";\n }\n"])), "var(--ds-space-050, 4px)");
|