@atlaskit/smart-card 26.43.2 → 26.43.4
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 +12 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/styled.js +2 -7
- package/dist/cjs/view/HoverCard/styled.js +1 -8
- package/dist/cjs/view/InlineCard/Frame/index.js +0 -5
- package/dist/cjs/view/InlineCard/Frame/styled.js +4 -26
- package/dist/cjs/view/InlineCard/styled.js +2 -11
- package/dist/cjs/view/InlineCard/utils/withFrameStyleControl.js +1 -7
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/utils.js +2 -3
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/styled.js +3 -8
- package/dist/es2019/view/HoverCard/styled.js +2 -10
- package/dist/es2019/view/InlineCard/Frame/index.js +0 -5
- package/dist/es2019/view/InlineCard/Frame/styled.js +8 -33
- package/dist/es2019/view/InlineCard/styled.js +2 -11
- package/dist/es2019/view/InlineCard/utils/withFrameStyleControl.js +2 -8
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/utils.js +2 -3
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/styled.js +3 -8
- package/dist/esm/view/HoverCard/styled.js +1 -9
- package/dist/esm/view/InlineCard/Frame/index.js +0 -5
- package/dist/esm/view/InlineCard/Frame/styled.js +5 -27
- package/dist/esm/view/InlineCard/styled.js +2 -11
- package/dist/esm/view/InlineCard/utils/withFrameStyleControl.js +2 -8
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/utils.js +2 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.43.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 26.43.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#58228](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58228) [`49eac6976147`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/49eac6976147) - Remove legacy theming logic from the Smart Card component.
|
|
14
|
+
|
|
3
15
|
## 26.43.2
|
|
4
16
|
|
|
5
17
|
### 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.43.
|
|
25
|
+
packageVersion: "26.43.4"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,13 +12,11 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
12
12
|
var _colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
13
13
|
var colors = _colors;
|
|
14
14
|
var _utils = require("../../common/utils");
|
|
15
|
-
var _components = require("@atlaskit/theme/components");
|
|
16
15
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
17
16
|
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); }
|
|
18
17
|
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; }
|
|
19
18
|
var className = exports.className = 'media-card-frame';
|
|
20
|
-
var borderRadius = exports.borderRadius = "\n border-radius: ".concat((
|
|
21
|
-
var BACKGROUND_COLOR_DARK = '#262B31';
|
|
19
|
+
var borderRadius = exports.borderRadius = "\n border-radius: ".concat("var(--ds-border-radius, 3px)", ";\n");
|
|
22
20
|
var wrapperBorderRadius = "\n border-radius: ".concat("var(--ds-border-radius-200, 8px)", ";\n");
|
|
23
21
|
var contentBorderRadius = "\n border-radius: ".concat("var(--ds-border-radius-100, 4px)", ";\n");
|
|
24
22
|
var ellipsis = exports.ellipsis = function ellipsis() {
|
|
@@ -64,10 +62,7 @@ var height = function height(_ref5) {
|
|
|
64
62
|
var wrapperStyles = function wrapperStyles(props) {
|
|
65
63
|
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");
|
|
66
64
|
};
|
|
67
|
-
var visibleStyles = "\n &:after {\n border: 1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"), ";\n background-color: ", (
|
|
68
|
-
light: "var(--ds-surface-raised, white)",
|
|
69
|
-
dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
70
|
-
})(), ";\n }\n .embed-header {\n opacity: 1;\n }");
|
|
65
|
+
var visibleStyles = "\n &:after {\n border: 1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"), ";\n background-color: ", "var(--ds-surface-raised, white)", ";\n }\n .embed-header {\n opacity: 1;\n }");
|
|
71
66
|
function visible(_ref6) {
|
|
72
67
|
var frameStyle = _ref6.frameStyle;
|
|
73
68
|
return frameStyle === 'show' ? visibleStyles : '';
|
|
@@ -10,7 +10,6 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _index = require("../../index");
|
|
11
11
|
var _constants = require("../../constants");
|
|
12
12
|
var _constants2 = require("@atlaskit/theme/constants");
|
|
13
|
-
var _components = require("@atlaskit/theme/components");
|
|
14
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
15
14
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
16
15
|
var HOVER_CARD_Z_INDEX = exports.HOVER_CARD_Z_INDEX = _constants2.layers.modal();
|
|
@@ -32,13 +31,7 @@ var titleBlockCss = exports.titleBlockCss = (0, _react.css)(_templateObject3 ||
|
|
|
32
31
|
var getTransitionStyles = exports.getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
33
32
|
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n transition: height 300ms ease-in-out;\n height: ", "px;\n"])), snippetHeight);
|
|
34
33
|
};
|
|
35
|
-
var popupContainerStyles = exports.popupContainerStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", ";\n background-color: ", ";\n box-shadow: ", ";\n"])), "var(--ds-border-radius-200, 8px)", (0,
|
|
36
|
-
light: "var(--ds-surface-raised, white)",
|
|
37
|
-
dark: "var(--ds-surface-raised, #262B31)"
|
|
38
|
-
})(), (0, _components.themed)({
|
|
39
|
-
light: "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))",
|
|
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))"
|
|
41
|
-
})());
|
|
34
|
+
var popupContainerStyles = exports.popupContainerStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", ";\n background-color: ", ";\n box-shadow: ", ";\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-surface-raised, white)", "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))");
|
|
42
35
|
var getPreviewBlockStyles = exports.getPreviewBlockStyles = function getPreviewBlockStyles(previewHeight) {
|
|
43
36
|
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);
|
|
44
37
|
};
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.Frame = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _components = require("@atlaskit/theme/components");
|
|
10
9
|
var _styled = require("./styled");
|
|
11
10
|
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
12
11
|
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); }
|
|
@@ -42,11 +41,7 @@ var Frame = exports.Frame = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
42
41
|
|
|
43
42
|
// Depending on whenever Frame was given onClick or link itself we display span or anchor elements
|
|
44
43
|
var Wrapper = link || onClick ? _styled.WrapperAnchor : _styled.WrapperSpan;
|
|
45
|
-
|
|
46
|
-
// TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
|
|
47
|
-
// It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
|
|
48
44
|
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
49
|
-
theme: (0, _components.useGlobalTheme)(),
|
|
50
45
|
href: link,
|
|
51
46
|
withoutBackground: withoutBackground,
|
|
52
47
|
isSelected: isSelected,
|
|
@@ -8,20 +8,12 @@ exports.WrapperSpan = exports.WrapperAnchor = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var _components = require("@atlaskit/theme/components");
|
|
12
11
|
var _templateObject, _templateObject2;
|
|
13
|
-
var BACKGROUND_COLOR_DARK = '#262B31';
|
|
14
12
|
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat("var(--ds-border-selected, ".concat(_colors.B100, ")"), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n &:hover {\n border: 1px solid ", "var(--ds-border, ".concat(_colors.N40, ")"), ";\n }\n");
|
|
15
13
|
var isInteractive = function isInteractive(_ref) {
|
|
16
14
|
var isInteractive = _ref.isInteractive;
|
|
17
15
|
if (isInteractive) {
|
|
18
|
-
return "\n :
|
|
19
|
-
light: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20, ")"),
|
|
20
|
-
dark: "var(--ds-background-neutral-subtle-hovered, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
21
|
-
}), ";\n }\n :active {\n background-color: ").concat((0, _components.themed)({
|
|
22
|
-
light: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
|
|
23
|
-
dark: "var(--ds-background-selected, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
24
|
-
}), ";\n }\n :focus {\n ").concat(selected, "\n }\n ");
|
|
16
|
+
return "\n :active {\n background-color: ".concat("var(--ds-background-selected, ".concat(_colors.B50, ")"), ";\n }\n :focus {\n ", selected, "\n }\n ");
|
|
25
17
|
} else {
|
|
26
18
|
return '';
|
|
27
19
|
}
|
|
@@ -34,17 +26,12 @@ var isSelected = function isSelected(_ref2) {
|
|
|
34
26
|
return 'user-select: text';
|
|
35
27
|
}
|
|
36
28
|
};
|
|
37
|
-
var hoveredStyles =
|
|
38
|
-
return "\n ".concat((0, _components.themed)({
|
|
39
|
-
light: "border-color: ".concat("var(--ds-border-accent-blue, ".concat(_colors.B200, ")"), ";"),
|
|
40
|
-
dark: "border-color: ".concat("var(--ds-border-accent-blue, ".concat(_colors.B200, ")"), ";")
|
|
41
|
-
})(props), ";\n");
|
|
42
|
-
};
|
|
29
|
+
var hoveredStyles = "border-color: ".concat("var(--ds-border-accent-blue, ".concat(_colors.B200, ")"), ";");
|
|
43
30
|
var activeHoveredFocusedStyles = function activeHoveredFocusedStyles(props) {
|
|
44
31
|
return "\n ".concat(props.withoutBackground ? '' : 'text-decoration: none;', ";\n");
|
|
45
32
|
};
|
|
46
33
|
var hoveredWihBorderStyles = function hoveredWihBorderStyles(props) {
|
|
47
|
-
return "\n ".concat(hoveredStyles
|
|
34
|
+
return "\n ".concat(hoveredStyles, "\n ").concat(activeHoveredFocusedStyles(props), ";\n");
|
|
48
35
|
};
|
|
49
36
|
|
|
50
37
|
/*
|
|
@@ -60,16 +47,7 @@ var hoveredWihBorderStyles = function hoveredWihBorderStyles(props) {
|
|
|
60
47
|
// NB: `display: inline` required for `box-decoration-break` to work.
|
|
61
48
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
62
49
|
var baseWrapperStyle = function baseWrapperStyle(props) {
|
|
63
|
-
return "\n line-height: 22px;\n padding: 2px 0px;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "var(--ds-border-radius-100, 4px)", ";\n color: ").concat((
|
|
64
|
-
light: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
65
|
-
dark: "var(--ds-link, #4794FF)"
|
|
66
|
-
})(props), ";\n\n background-color: ").concat(props.withoutBackground ? '' : (0, _components.themed)({
|
|
67
|
-
light: "var(--ds-surface-raised, white)",
|
|
68
|
-
dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
69
|
-
})(props), ";\n\n ").concat(isSelected(props), ";\n\n ").concat(props.withoutBackground ? '' : (0, _components.themed)({
|
|
70
|
-
light: "border: 1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"), ";"),
|
|
71
|
-
dark: "border: 1px solid ".concat("var(--ds-border, ".concat(_colors.N500, ")"), ";")
|
|
72
|
-
})(props), "\n &:hover {\n ").concat(hoveredStyles(props), "\n }\n &, :hover, :focus, :active {\n ").concat(activeHoveredFocusedStyles(props), "\n }\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n\n ").concat(props.isHovered && hoveredWihBorderStyles(props), ";\n");
|
|
50
|
+
return "\n line-height: 22px;\n padding: 2px 0px;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "var(--ds-border-radius-100, 4px)", ";\n color: ", "var(--ds-link, ".concat(_colors.B400, ")"), ";\n\n background-color: ").concat(props.withoutBackground ? '' : "var(--ds-surface-raised, white)", ";\n\n ").concat(isSelected(props), ";\n\n ").concat(props.withoutBackground ? '' : "border: 1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"), ";"), "\n &:hover {\n ").concat(hoveredStyles, "\n }\n &, :hover, :focus, :active {\n ").concat(activeHoveredFocusedStyles(props), "\n }\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n\n ").concat(props.isHovered && hoveredWihBorderStyles(props), ";\n");
|
|
73
51
|
};
|
|
74
52
|
var WrapperAnchor = exports.WrapperAnchor = _styled.default.a(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n"])), baseWrapperStyle, isInteractive);
|
|
75
53
|
WrapperAnchor.displayName = 'WrapperAnchor';
|
|
@@ -8,19 +8,10 @@ exports.NoLinkAppearance = exports.LowercaseAppearance = exports.LinkAppearance
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var _components = require("@atlaskit/theme/components");
|
|
12
11
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
13
|
-
var LINK_COLOR_DARK = '#4794FF';
|
|
14
|
-
|
|
15
12
|
// By default buttons will hide overflow and ellipsis content instead of wrapping.
|
|
16
13
|
// This basically turns the button back into inline content
|
|
17
14
|
var IconStyledButton = exports.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, 4px)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)");
|
|
18
|
-
var NoLinkAppearance = exports.NoLinkAppearance = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n margin-left: ", ";\n"])), (
|
|
19
|
-
light: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
|
|
20
|
-
dark: "var(--ds-text-subtlest, ".concat(LINK_COLOR_DARK, ")")
|
|
21
|
-
}), "var(--ds-space-050, 4px)");
|
|
15
|
+
var NoLinkAppearance = exports.NoLinkAppearance = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n margin-left: ", ";\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-050, 4px)");
|
|
22
16
|
var LowercaseAppearance = exports.LowercaseAppearance = _styled.default.span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n text-transform: lowercase;\n"])));
|
|
23
|
-
var LinkAppearance = exports.LinkAppearance = _styled.default.a(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n\n &:hover {\n text-decoration: none;\n }\n"])), (
|
|
24
|
-
light: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
25
|
-
dark: "var(--ds-link, ".concat(LINK_COLOR_DARK, ")")
|
|
26
|
-
}));
|
|
17
|
+
var LinkAppearance = exports.LinkAppearance = _styled.default.a(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n\n &:hover {\n text-decoration: none;\n }\n"])), "var(--ds-link, ".concat(_colors.B400, ")"));
|
|
@@ -7,9 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _components = require("@atlaskit/theme/components");
|
|
11
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
13
11
|
/**
|
|
14
12
|
* This HOC serves as a temporary workaround for controlling the style of a parent component.
|
|
15
13
|
* We do not want the Frame to have a hover state when hovering over the action button.
|
|
@@ -19,13 +17,9 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
19
17
|
var _default = exports.default = function _default(Button, frameRef) {
|
|
20
18
|
return function (props) {
|
|
21
19
|
var setBorderStyle = function setBorderStyle() {
|
|
22
|
-
var borderColor = (0, _components.themed)({
|
|
23
|
-
light: "".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
24
|
-
dark: "".concat("var(--ds-border, ".concat(_colors.N500, ")"))
|
|
25
|
-
})();
|
|
26
20
|
var frameNode = frameRef.current;
|
|
27
21
|
if (frameNode) {
|
|
28
|
-
frameNode.style.borderColor =
|
|
22
|
+
frameNode.style.borderColor = "".concat("var(--ds-border, ".concat(_colors.N40, ")"));
|
|
29
23
|
}
|
|
30
24
|
};
|
|
31
25
|
var removeBorderStyle = function removeBorderStyle() {
|
|
@@ -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.43.
|
|
20
|
+
packageVersion: "26.43.4",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -5,13 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.mq = exports.gs = exports.br = void 0;
|
|
8
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
9
8
|
var _facepaint = _interopRequireDefault(require("facepaint"));
|
|
10
9
|
var gs = exports.gs = function gs(times) {
|
|
11
|
-
return "".concat(
|
|
10
|
+
return "".concat(8 * times, "px");
|
|
12
11
|
};
|
|
13
12
|
var br = exports.br = function br() {
|
|
14
13
|
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
15
|
-
return "".concat(
|
|
14
|
+
return "".concat(3 * times, "px");
|
|
16
15
|
};
|
|
17
16
|
var mq = exports.mq = (0, _facepaint.default)(['@media(min-width: 576px)']);
|
|
@@ -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.43.
|
|
7
|
+
packageVersion: "26.43.4"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import {
|
|
2
|
+
import { fontFamily } from '@atlaskit/theme/constants';
|
|
3
3
|
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
|
-
import { themed } from '@atlaskit/theme/components';
|
|
7
6
|
export const className = 'media-card-frame';
|
|
8
7
|
export const borderRadius = `
|
|
9
|
-
border-radius: ${
|
|
8
|
+
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
10
9
|
`;
|
|
11
|
-
const BACKGROUND_COLOR_DARK = '#262B31';
|
|
12
10
|
const wrapperBorderRadius = `
|
|
13
11
|
border-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
14
12
|
`;
|
|
@@ -116,10 +114,7 @@ const wrapperStyles = props => `
|
|
|
116
114
|
const visibleStyles = `
|
|
117
115
|
&:after {
|
|
118
116
|
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
119
|
-
background-color: ${
|
|
120
|
-
light: "var(--ds-surface-raised, white)",
|
|
121
|
-
dark: `var(--ds-surface-raised, ${BACKGROUND_COLOR_DARK})`
|
|
122
|
-
})()};
|
|
117
|
+
background-color: ${"var(--ds-surface-raised, white)"};
|
|
123
118
|
}
|
|
124
119
|
.embed-header {
|
|
125
120
|
opacity: 1;
|
|
@@ -2,8 +2,6 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { loadingPlaceholderClassName } from '../../index';
|
|
3
3
|
import { SmartLinkSize } from '../../constants';
|
|
4
4
|
import { layers } from '@atlaskit/theme/constants';
|
|
5
|
-
import { themed } from '@atlaskit/theme/components';
|
|
6
|
-
|
|
7
5
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
8
6
|
export const HOVER_CARD_Z_INDEX = layers.modal();
|
|
9
7
|
export const flexibleUiOptions = {
|
|
@@ -61,14 +59,8 @@ export const getTransitionStyles = snippetHeight => css`
|
|
|
61
59
|
`;
|
|
62
60
|
export const popupContainerStyles = css`
|
|
63
61
|
border-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
64
|
-
background-color: ${
|
|
65
|
-
|
|
66
|
-
dark: "var(--ds-surface-raised, #262B31)"
|
|
67
|
-
})()};
|
|
68
|
-
box-shadow: ${themed({
|
|
69
|
-
light: "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))",
|
|
70
|
-
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))"
|
|
71
|
-
})()};
|
|
62
|
+
background-color: ${"var(--ds-surface-raised, white)"};
|
|
63
|
+
box-shadow: ${"var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))"};
|
|
72
64
|
`;
|
|
73
65
|
export const getPreviewBlockStyles = previewHeight => css`
|
|
74
66
|
${previewHeight ? `height: ${previewHeight}px;` : ''}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useCallback, forwardRef } from 'react';
|
|
2
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
3
2
|
import { WrapperAnchor, WrapperSpan } from './styled';
|
|
4
3
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
5
4
|
export const Frame = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -35,11 +34,7 @@ export const Frame = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
35
34
|
|
|
36
35
|
// Depending on whenever Frame was given onClick or link itself we display span or anchor elements
|
|
37
36
|
const Wrapper = link || onClick ? WrapperAnchor : WrapperSpan;
|
|
38
|
-
|
|
39
|
-
// TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
|
|
40
|
-
// It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
|
|
41
37
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
42
|
-
theme: useGlobalTheme(),
|
|
43
38
|
href: link,
|
|
44
39
|
withoutBackground: withoutBackground,
|
|
45
40
|
isSelected: isSelected,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { B50, B100, B200, B400,
|
|
3
|
-
import { themed } from '@atlaskit/theme/components';
|
|
4
|
-
const BACKGROUND_COLOR_DARK = '#262B31';
|
|
2
|
+
import { B50, B100, B200, B400, N40 } from '@atlaskit/theme/colors';
|
|
5
3
|
const selected = `
|
|
6
4
|
cursor: pointer;
|
|
7
5
|
box-shadow: 0 0 0 2px ${`var(--ds-border-selected, ${B100})`};
|
|
@@ -19,17 +17,8 @@ const isInteractive = ({
|
|
|
19
17
|
}) => {
|
|
20
18
|
if (isInteractive) {
|
|
21
19
|
return `
|
|
22
|
-
:hover {
|
|
23
|
-
background-color: ${themed({
|
|
24
|
-
light: `var(--ds-background-neutral-subtle-hovered, ${N20})`,
|
|
25
|
-
dark: `var(--ds-background-neutral-subtle-hovered, ${BACKGROUND_COLOR_DARK})`
|
|
26
|
-
})};
|
|
27
|
-
}
|
|
28
20
|
:active {
|
|
29
|
-
background-color: ${
|
|
30
|
-
light: `var(--ds-background-selected, ${B50})`,
|
|
31
|
-
dark: `var(--ds-background-selected, ${BACKGROUND_COLOR_DARK})`
|
|
32
|
-
})};
|
|
21
|
+
background-color: ${`var(--ds-background-selected, ${B50})`};
|
|
33
22
|
}
|
|
34
23
|
:focus {
|
|
35
24
|
${selected}
|
|
@@ -48,17 +37,12 @@ const isSelected = ({
|
|
|
48
37
|
return 'user-select: text';
|
|
49
38
|
}
|
|
50
39
|
};
|
|
51
|
-
const hoveredStyles =
|
|
52
|
-
${themed({
|
|
53
|
-
light: `border-color: ${`var(--ds-border-accent-blue, ${B200})`};`,
|
|
54
|
-
dark: `border-color: ${`var(--ds-border-accent-blue, ${B200})`};`
|
|
55
|
-
})(props)};
|
|
56
|
-
`;
|
|
40
|
+
const hoveredStyles = `border-color: ${`var(--ds-border-accent-blue, ${B200})`};`;
|
|
57
41
|
const activeHoveredFocusedStyles = props => `
|
|
58
42
|
${props.withoutBackground ? '' : 'text-decoration: none;'};
|
|
59
43
|
`;
|
|
60
44
|
const hoveredWihBorderStyles = props => `
|
|
61
|
-
${hoveredStyles
|
|
45
|
+
${hoveredStyles}
|
|
62
46
|
${activeHoveredFocusedStyles(props)};
|
|
63
47
|
`;
|
|
64
48
|
|
|
@@ -81,24 +65,15 @@ const baseWrapperStyle = props => `
|
|
|
81
65
|
display: inline;
|
|
82
66
|
box-decoration-break: clone;
|
|
83
67
|
border-radius: ${"var(--ds-border-radius-100, 4px)"};
|
|
84
|
-
color: ${
|
|
85
|
-
light: `var(--ds-link, ${B400})`,
|
|
86
|
-
dark: "var(--ds-link, #4794FF)"
|
|
87
|
-
})(props)};
|
|
68
|
+
color: ${`var(--ds-link, ${B400})`};
|
|
88
69
|
|
|
89
|
-
background-color: ${props.withoutBackground ? '' :
|
|
90
|
-
light: "var(--ds-surface-raised, white)",
|
|
91
|
-
dark: `var(--ds-surface-raised, ${BACKGROUND_COLOR_DARK})`
|
|
92
|
-
})(props)};
|
|
70
|
+
background-color: ${props.withoutBackground ? '' : "var(--ds-surface-raised, white)"};
|
|
93
71
|
|
|
94
72
|
${isSelected(props)};
|
|
95
73
|
|
|
96
|
-
${props.withoutBackground ? '' :
|
|
97
|
-
light: `border: 1px solid ${`var(--ds-border, ${N40})`};`,
|
|
98
|
-
dark: `border: 1px solid ${`var(--ds-border, ${N500})`};`
|
|
99
|
-
})(props)}
|
|
74
|
+
${props.withoutBackground ? '' : `border: 1px solid ${`var(--ds-border, ${N40})`};`}
|
|
100
75
|
&:hover {
|
|
101
|
-
${hoveredStyles
|
|
76
|
+
${hoveredStyles}
|
|
102
77
|
}
|
|
103
78
|
&, :hover, :focus, :active {
|
|
104
79
|
${activeHoveredFocusedStyles(props)}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { themed } from '@atlaskit/theme/components';
|
|
4
|
-
const LINK_COLOR_DARK = '#4794FF';
|
|
5
|
-
|
|
6
3
|
// By default buttons will hide overflow and ellipsis content instead of wrapping.
|
|
7
4
|
// This basically turns the button back into inline content
|
|
8
5
|
export const IconStyledButton = styled.span`
|
|
@@ -30,20 +27,14 @@ export const IconStyledButton = styled.span`
|
|
|
30
27
|
}
|
|
31
28
|
`;
|
|
32
29
|
export const NoLinkAppearance = styled.span`
|
|
33
|
-
color: ${
|
|
34
|
-
light: `var(--ds-text-subtlest, ${N200})`,
|
|
35
|
-
dark: `var(--ds-text-subtlest, ${LINK_COLOR_DARK})`
|
|
36
|
-
})};
|
|
30
|
+
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
37
31
|
margin-left: ${"var(--ds-space-050, 4px)"};
|
|
38
32
|
`;
|
|
39
33
|
export const LowercaseAppearance = styled.span`
|
|
40
34
|
text-transform: lowercase;
|
|
41
35
|
`;
|
|
42
36
|
export const LinkAppearance = styled.a`
|
|
43
|
-
color: ${
|
|
44
|
-
light: `var(--ds-link, ${B400})`,
|
|
45
|
-
dark: `var(--ds-link, ${LINK_COLOR_DARK})`
|
|
46
|
-
})};
|
|
37
|
+
color: ${`var(--ds-link, ${B400})`};
|
|
47
38
|
|
|
48
39
|
&:hover {
|
|
49
40
|
text-decoration: none;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { themed } from '@atlaskit/theme/components';
|
|
5
|
-
import { N500, N40 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* This HOC serves as a temporary workaround for controlling the style of a parent component.
|
|
@@ -12,13 +10,9 @@ import { N500, N40 } from '@atlaskit/theme/colors';
|
|
|
12
10
|
*/
|
|
13
11
|
export default ((Button, frameRef) => props => {
|
|
14
12
|
const setBorderStyle = () => {
|
|
15
|
-
const borderColor = themed({
|
|
16
|
-
light: `${`var(--ds-border, ${N40})`}`,
|
|
17
|
-
dark: `${`var(--ds-border, ${N500})`}`
|
|
18
|
-
})();
|
|
19
13
|
const frameNode = frameRef.current;
|
|
20
14
|
if (frameNode) {
|
|
21
|
-
frameNode.style.borderColor =
|
|
15
|
+
frameNode.style.borderColor = `${`var(--ds-border, ${N40})`}`;
|
|
22
16
|
}
|
|
23
17
|
};
|
|
24
18
|
const removeBorderStyle = () => {
|
|
@@ -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.43.
|
|
10
|
+
packageVersion: "26.43.4",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { gridSize, borderRadius } from '@atlaskit/theme/constants';
|
|
2
1
|
import facepaint from 'facepaint';
|
|
3
|
-
const gs = times => `${
|
|
4
|
-
const br = (times = 1) => `${
|
|
2
|
+
const gs = times => `${8 * times}px`;
|
|
3
|
+
const br = (times = 1) => `${3 * times}px`;
|
|
5
4
|
const mq = facepaint(['@media(min-width: 576px)']);
|
|
6
5
|
export { gs, br, mq };
|
|
@@ -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.43.
|
|
18
|
+
packageVersion: "26.43.4"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
import {
|
|
4
|
+
import { fontFamily } from '@atlaskit/theme/constants';
|
|
5
5
|
import * as colors from '@atlaskit/theme/colors';
|
|
6
6
|
import { gs as gridSize } from '../../common/utils';
|
|
7
7
|
import { N40 } from '@atlaskit/theme/colors';
|
|
8
|
-
import { themed } from '@atlaskit/theme/components';
|
|
9
8
|
export var className = 'media-card-frame';
|
|
10
|
-
export var borderRadius = "\n border-radius: ".concat(
|
|
11
|
-
var BACKGROUND_COLOR_DARK = '#262B31';
|
|
9
|
+
export var borderRadius = "\n border-radius: ".concat("var(--ds-border-radius, 3px)", ";\n");
|
|
12
10
|
var wrapperBorderRadius = "\n border-radius: ".concat("var(--ds-border-radius-200, 8px)", ";\n");
|
|
13
11
|
var contentBorderRadius = "\n border-radius: ".concat("var(--ds-border-radius-100, 4px)", ";\n");
|
|
14
12
|
export var ellipsis = function ellipsis() {
|
|
@@ -54,10 +52,7 @@ var height = function height(_ref5) {
|
|
|
54
52
|
var wrapperStyles = function wrapperStyles(props) {
|
|
55
53
|
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(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");
|
|
56
54
|
};
|
|
57
|
-
var visibleStyles = "\n &:after {\n border: 1px solid ".concat("var(--ds-border, ".concat(N40, ")"), ";\n background-color: ",
|
|
58
|
-
light: "var(--ds-surface-raised, white)",
|
|
59
|
-
dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
60
|
-
})(), ";\n }\n .embed-header {\n opacity: 1;\n }");
|
|
55
|
+
var visibleStyles = "\n &:after {\n border: 1px solid ".concat("var(--ds-border, ".concat(N40, ")"), ";\n background-color: ", "var(--ds-surface-raised, white)", ";\n }\n .embed-header {\n opacity: 1;\n }");
|
|
61
56
|
function visible(_ref6) {
|
|
62
57
|
var frameStyle = _ref6.frameStyle;
|
|
63
58
|
return frameStyle === 'show' ? visibleStyles : '';
|
|
@@ -4,8 +4,6 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { loadingPlaceholderClassName } from '../../index';
|
|
5
5
|
import { SmartLinkSize } from '../../constants';
|
|
6
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
|
-
import { themed } from '@atlaskit/theme/components';
|
|
8
|
-
|
|
9
7
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
10
8
|
export var HOVER_CARD_Z_INDEX = layers.modal();
|
|
11
9
|
export var flexibleUiOptions = {
|
|
@@ -26,13 +24,7 @@ export var titleBlockCss = css(_templateObject3 || (_templateObject3 = _taggedTe
|
|
|
26
24
|
export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
27
25
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transition: height 300ms ease-in-out;\n height: ", "px;\n"])), snippetHeight);
|
|
28
26
|
};
|
|
29
|
-
export var popupContainerStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background-color: ", ";\n box-shadow: ", ";\n"])), "var(--ds-border-radius-200, 8px)",
|
|
30
|
-
light: "var(--ds-surface-raised, white)",
|
|
31
|
-
dark: "var(--ds-surface-raised, #262B31)"
|
|
32
|
-
})(), themed({
|
|
33
|
-
light: "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))",
|
|
34
|
-
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))"
|
|
35
|
-
})());
|
|
27
|
+
export var popupContainerStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background-color: ", ";\n box-shadow: ", ";\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-surface-raised, white)", "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))");
|
|
36
28
|
export var getPreviewBlockStyles = function getPreviewBlockStyles(previewHeight) {
|
|
37
29
|
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\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);
|
|
38
30
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useCallback, forwardRef } from 'react';
|
|
2
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
3
2
|
import { WrapperAnchor, WrapperSpan } from './styled';
|
|
4
3
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
5
4
|
export var Frame = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
@@ -33,11 +32,7 @@ export var Frame = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
33
32
|
|
|
34
33
|
// Depending on whenever Frame was given onClick or link itself we display span or anchor elements
|
|
35
34
|
var Wrapper = link || onClick ? WrapperAnchor : WrapperSpan;
|
|
36
|
-
|
|
37
|
-
// TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
|
|
38
|
-
// It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
|
|
39
35
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
40
|
-
theme: useGlobalTheme(),
|
|
41
36
|
href: link,
|
|
42
37
|
withoutBackground: withoutBackground,
|
|
43
38
|
isSelected: isSelected,
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
import { B50, B100, B200, B400,
|
|
5
|
-
import { themed } from '@atlaskit/theme/components';
|
|
6
|
-
var BACKGROUND_COLOR_DARK = '#262B31';
|
|
4
|
+
import { B50, B100, B200, B400, N40 } from '@atlaskit/theme/colors';
|
|
7
5
|
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat("var(--ds-border-selected, ".concat(B100, ")"), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n &:hover {\n border: 1px solid ", "var(--ds-border, ".concat(N40, ")"), ";\n }\n");
|
|
8
6
|
var isInteractive = function isInteractive(_ref) {
|
|
9
7
|
var isInteractive = _ref.isInteractive;
|
|
10
8
|
if (isInteractive) {
|
|
11
|
-
return "\n :
|
|
12
|
-
light: "var(--ds-background-neutral-subtle-hovered, ".concat(N20, ")"),
|
|
13
|
-
dark: "var(--ds-background-neutral-subtle-hovered, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
14
|
-
}), ";\n }\n :active {\n background-color: ").concat(themed({
|
|
15
|
-
light: "var(--ds-background-selected, ".concat(B50, ")"),
|
|
16
|
-
dark: "var(--ds-background-selected, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
17
|
-
}), ";\n }\n :focus {\n ").concat(selected, "\n }\n ");
|
|
9
|
+
return "\n :active {\n background-color: ".concat("var(--ds-background-selected, ".concat(B50, ")"), ";\n }\n :focus {\n ", selected, "\n }\n ");
|
|
18
10
|
} else {
|
|
19
11
|
return '';
|
|
20
12
|
}
|
|
@@ -27,17 +19,12 @@ var isSelected = function isSelected(_ref2) {
|
|
|
27
19
|
return 'user-select: text';
|
|
28
20
|
}
|
|
29
21
|
};
|
|
30
|
-
var hoveredStyles =
|
|
31
|
-
return "\n ".concat(themed({
|
|
32
|
-
light: "border-color: ".concat("var(--ds-border-accent-blue, ".concat(B200, ")"), ";"),
|
|
33
|
-
dark: "border-color: ".concat("var(--ds-border-accent-blue, ".concat(B200, ")"), ";")
|
|
34
|
-
})(props), ";\n");
|
|
35
|
-
};
|
|
22
|
+
var hoveredStyles = "border-color: ".concat("var(--ds-border-accent-blue, ".concat(B200, ")"), ";");
|
|
36
23
|
var activeHoveredFocusedStyles = function activeHoveredFocusedStyles(props) {
|
|
37
24
|
return "\n ".concat(props.withoutBackground ? '' : 'text-decoration: none;', ";\n");
|
|
38
25
|
};
|
|
39
26
|
var hoveredWihBorderStyles = function hoveredWihBorderStyles(props) {
|
|
40
|
-
return "\n ".concat(hoveredStyles
|
|
27
|
+
return "\n ".concat(hoveredStyles, "\n ").concat(activeHoveredFocusedStyles(props), ";\n");
|
|
41
28
|
};
|
|
42
29
|
|
|
43
30
|
/*
|
|
@@ -53,16 +40,7 @@ var hoveredWihBorderStyles = function hoveredWihBorderStyles(props) {
|
|
|
53
40
|
// NB: `display: inline` required for `box-decoration-break` to work.
|
|
54
41
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
55
42
|
var baseWrapperStyle = function baseWrapperStyle(props) {
|
|
56
|
-
return "\n line-height: 22px;\n padding: 2px 0px;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "var(--ds-border-radius-100, 4px)", ";\n color: ").concat(
|
|
57
|
-
light: "var(--ds-link, ".concat(B400, ")"),
|
|
58
|
-
dark: "var(--ds-link, #4794FF)"
|
|
59
|
-
})(props), ";\n\n background-color: ").concat(props.withoutBackground ? '' : themed({
|
|
60
|
-
light: "var(--ds-surface-raised, white)",
|
|
61
|
-
dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
62
|
-
})(props), ";\n\n ").concat(isSelected(props), ";\n\n ").concat(props.withoutBackground ? '' : themed({
|
|
63
|
-
light: "border: 1px solid ".concat("var(--ds-border, ".concat(N40, ")"), ";"),
|
|
64
|
-
dark: "border: 1px solid ".concat("var(--ds-border, ".concat(N500, ")"), ";")
|
|
65
|
-
})(props), "\n &:hover {\n ").concat(hoveredStyles(props), "\n }\n &, :hover, :focus, :active {\n ").concat(activeHoveredFocusedStyles(props), "\n }\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n\n ").concat(props.isHovered && hoveredWihBorderStyles(props), ";\n");
|
|
43
|
+
return "\n line-height: 22px;\n padding: 2px 0px;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "var(--ds-border-radius-100, 4px)", ";\n color: ", "var(--ds-link, ".concat(B400, ")"), ";\n\n background-color: ").concat(props.withoutBackground ? '' : "var(--ds-surface-raised, white)", ";\n\n ").concat(isSelected(props), ";\n\n ").concat(props.withoutBackground ? '' : "border: 1px solid ".concat("var(--ds-border, ".concat(N40, ")"), ";"), "\n &:hover {\n ").concat(hoveredStyles, "\n }\n &, :hover, :focus, :active {\n ").concat(activeHoveredFocusedStyles(props), "\n }\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n\n ").concat(props.isHovered && hoveredWihBorderStyles(props), ";\n");
|
|
66
44
|
};
|
|
67
45
|
export var WrapperAnchor = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n"])), baseWrapperStyle, isInteractive);
|
|
68
46
|
WrapperAnchor.displayName = 'WrapperAnchor';
|
|
@@ -2,18 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { themed } from '@atlaskit/theme/components';
|
|
6
|
-
var LINK_COLOR_DARK = '#4794FF';
|
|
7
|
-
|
|
8
5
|
// By default buttons will hide overflow and ellipsis content instead of wrapping.
|
|
9
6
|
// This basically turns the button back into inline content
|
|
10
7
|
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, 4px)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)");
|
|
11
|
-
export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n margin-left: ", ";\n"])),
|
|
12
|
-
light: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
13
|
-
dark: "var(--ds-text-subtlest, ".concat(LINK_COLOR_DARK, ")")
|
|
14
|
-
}), "var(--ds-space-050, 4px)");
|
|
8
|
+
export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n margin-left: ", ";\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-050, 4px)");
|
|
15
9
|
export var LowercaseAppearance = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-transform: lowercase;\n"])));
|
|
16
|
-
export var LinkAppearance = styled.a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n text-decoration: none;\n }\n"])),
|
|
17
|
-
light: "var(--ds-link, ".concat(B400, ")"),
|
|
18
|
-
dark: "var(--ds-link, ".concat(LINK_COLOR_DARK, ")")
|
|
19
|
-
}));
|
|
10
|
+
export var LinkAppearance = styled.a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n text-decoration: none;\n }\n"])), "var(--ds-link, ".concat(B400, ")"));
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { themed } from '@atlaskit/theme/components';
|
|
5
|
-
import { N500, N40 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* This HOC serves as a temporary workaround for controlling the style of a parent component.
|
|
@@ -13,13 +11,9 @@ import { N500, N40 } from '@atlaskit/theme/colors';
|
|
|
13
11
|
export default (function (Button, frameRef) {
|
|
14
12
|
return function (props) {
|
|
15
13
|
var setBorderStyle = function setBorderStyle() {
|
|
16
|
-
var borderColor = themed({
|
|
17
|
-
light: "".concat("var(--ds-border, ".concat(N40, ")")),
|
|
18
|
-
dark: "".concat("var(--ds-border, ".concat(N500, ")"))
|
|
19
|
-
})();
|
|
20
14
|
var frameNode = frameRef.current;
|
|
21
15
|
if (frameNode) {
|
|
22
|
-
frameNode.style.borderColor =
|
|
16
|
+
frameNode.style.borderColor = "".concat("var(--ds-border, ".concat(N40, ")"));
|
|
23
17
|
}
|
|
24
18
|
};
|
|
25
19
|
var removeBorderStyle = function removeBorderStyle() {
|
|
@@ -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: "26.43.
|
|
13
|
+
packageVersion: "26.43.4",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { gridSize, borderRadius } from '@atlaskit/theme/constants';
|
|
2
1
|
import facepaint from 'facepaint';
|
|
3
2
|
var gs = function gs(times) {
|
|
4
|
-
return "".concat(
|
|
3
|
+
return "".concat(8 * times, "px");
|
|
5
4
|
};
|
|
6
5
|
var br = function br() {
|
|
7
6
|
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
8
|
-
return "".concat(
|
|
7
|
+
return "".concat(3 * times, "px");
|
|
9
8
|
};
|
|
10
9
|
var mq = facepaint(['@media(min-width: 576px)']);
|
|
11
10
|
export { gs, br, mq };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.43.
|
|
3
|
+
"version": "26.43.4",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@atlaskit/avatar": "^21.4.0",
|
|
28
28
|
"@atlaskit/avatar-group": "^9.4.0",
|
|
29
29
|
"@atlaskit/badge": "^15.2.0",
|
|
30
|
-
"@atlaskit/button": "^
|
|
30
|
+
"@atlaskit/button": "^17.0.0",
|
|
31
31
|
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
32
32
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
33
33
|
"@atlaskit/icon": "^22.0.0",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
48
48
|
"@atlaskit/popup": "^1.11.0",
|
|
49
|
-
"@atlaskit/primitives": "^1.
|
|
49
|
+
"@atlaskit/primitives": "^1.15.0",
|
|
50
50
|
"@atlaskit/spinner": "^16.0.0",
|
|
51
51
|
"@atlaskit/theme": "^12.6.0",
|
|
52
|
-
"@atlaskit/tokens": "^1.
|
|
52
|
+
"@atlaskit/tokens": "^1.30.0",
|
|
53
53
|
"@atlaskit/tooltip": "^18.0.0",
|
|
54
54
|
"@atlaskit/ufo": "^0.2.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|