@atlaskit/renderer 105.0.0 → 105.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/react/marks/link.js +1 -3
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +4 -6
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +3 -1
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +1 -3
- package/dist/cjs/react/nodes/heading-anchor.js +2 -4
- package/dist/cjs/react/nodes/table/sticky.js +1 -3
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +27 -29
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +2 -4
- package/dist/cjs/ui/SortingIcon.js +2 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/react/marks/link.js +3 -4
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +4 -5
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +3 -1
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +10 -11
- package/dist/es2019/react/nodes/heading-anchor.js +2 -3
- package/dist/es2019/react/nodes/table/sticky.js +3 -4
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +30 -31
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +2 -3
- package/dist/es2019/ui/SortingIcon.js +6 -7
- package/dist/es2019/version.json +1 -1
- package/dist/esm/react/marks/link.js +1 -2
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +4 -5
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +3 -1
- package/dist/esm/react/nodes/codeBlockCopyButton.js +1 -2
- package/dist/esm/react/nodes/heading-anchor.js +2 -3
- package/dist/esm/react/nodes/table/sticky.js +1 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +27 -28
- package/dist/esm/ui/Renderer/truncated-wrapper.js +2 -3
- package/dist/esm/ui/SortingIcon.js +2 -3
- package/dist/esm/version.json +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 105.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving performance.
|
|
8
|
+
|
|
9
|
+
## 105.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d61e8688afd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d61e8688afd) - DSP-8078: Fixes bug where windowed codeblock rendered incorrectly
|
|
14
|
+
|
|
3
15
|
## 105.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
|
@@ -25,15 +25,13 @@ var _events = require("../../analytics/events");
|
|
|
25
25
|
|
|
26
26
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
27
27
|
|
|
28
|
-
var _tokens = require("@atlaskit/tokens");
|
|
29
|
-
|
|
30
28
|
var _templateObject;
|
|
31
29
|
|
|
32
30
|
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); }
|
|
33
31
|
|
|
34
32
|
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; }
|
|
35
33
|
|
|
36
|
-
var anchorStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n"])), (
|
|
34
|
+
var anchorStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n"])), "var(--ds-link, ".concat(_colors.B400, ")"), "var(--ds-link, ".concat(_colors.B300, ")"), "var(--ds-link-pressed, ".concat(_colors.B500, ")"));
|
|
37
35
|
|
|
38
36
|
function Link(props) {
|
|
39
37
|
var href = props.href,
|
|
@@ -23,18 +23,16 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
23
23
|
|
|
24
24
|
var _codeBlockCopyButton = _interopRequireDefault(require("../../codeBlockCopyButton"));
|
|
25
25
|
|
|
26
|
-
var _tokens = require("@atlaskit/tokens");
|
|
27
|
-
|
|
28
26
|
var _templateObject;
|
|
29
27
|
|
|
30
28
|
var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
|
|
31
29
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n tab-size: 4;\n background-color: ", ";\n\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n }\n "])), (0, _components.themed)({
|
|
32
|
-
light: (
|
|
33
|
-
dark: (
|
|
30
|
+
light: "var(--ds-surface-raised, ".concat(_colors.N20, ")"),
|
|
31
|
+
dark: "var(--ds-surface-raised, ".concat(_colors.DN50, ")")
|
|
34
32
|
})(props), _styles.CodeBlockSharedCssClassName.DS_CODEBLOCK, (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _editorSharedStyles.overflowShadow)({
|
|
35
33
|
background: (0, _components.themed)({
|
|
36
|
-
light: (
|
|
37
|
-
dark: (
|
|
34
|
+
light: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
|
|
35
|
+
dark: "var(--ds-background-neutral, ".concat(_colors.DN50, ")")
|
|
38
36
|
})(props),
|
|
39
37
|
leftCoverWidth: "".concat((0, _constants.gridSize)() * 3, "px")
|
|
40
38
|
}));
|
|
@@ -68,6 +68,8 @@ var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
|
|
|
68
68
|
css: [(0, _styles.codeBlockSharedStyles)(theme), lightWeightCodeBlockStyles]
|
|
69
69
|
}, (0, _react2.jsx)("div", {
|
|
70
70
|
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
71
|
+
}, (0, _react2.jsx)("div", {
|
|
72
|
+
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER
|
|
71
73
|
}, (0, _react2.jsx)("div", {
|
|
72
74
|
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
73
75
|
}, textRows.map(function (_, index) {
|
|
@@ -76,7 +78,7 @@ var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
|
|
|
76
78
|
});
|
|
77
79
|
})), (0, _react2.jsx)("div", {
|
|
78
80
|
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
79
|
-
}, (0, _react2.jsx)("code", null, renderBidiWarnings(text)))));
|
|
81
|
+
}, (0, _react2.jsx)("code", null, renderBidiWarnings(text))))));
|
|
80
82
|
});
|
|
81
83
|
var _default = LightWeightCodeBlock;
|
|
82
84
|
exports.default = _default;
|
|
@@ -31,15 +31,13 @@ var _clipboard = require("../utils/clipboard");
|
|
|
31
31
|
|
|
32
32
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
33
33
|
|
|
34
|
-
var _tokens = require("@atlaskit/tokens");
|
|
35
|
-
|
|
36
34
|
var _templateObject;
|
|
37
35
|
|
|
38
36
|
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); }
|
|
39
37
|
|
|
40
38
|
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; }
|
|
41
39
|
|
|
42
|
-
var copyButtonWrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", " !important;\n }\n\n button:hover {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button:active {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n button.clicked:hover {\n background-color: ", ";\n }\n"])), (
|
|
40
|
+
var copyButtonWrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", " !important;\n }\n\n button:hover {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button:active {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n button.clicked:hover {\n background-color: ", ";\n }\n"])), "var(--ds-border, #fff)", "var(--ds-surface-overlay, ".concat(_colors.N20, ")"), "var(--ds-text, rgb(66, 82, 110))", "var(--ds-border, transparent)", "var(--ds-surface-overlay-hovered, ".concat(_colors.N30, ")"), "var(--ds-border, transparent)", "var(--ds-surface-overlay-pressed, ".concat(_colors.N30, ")"), "var(--ds-surface-overlay, ".concat(_colors.N700, ")"), "var(--ds-text, #fff)", "var(--ds-surface-overlay-hovered, ".concat(_colors.N700, ")"));
|
|
43
41
|
|
|
44
42
|
var CopyButton = function CopyButton(_ref) {
|
|
45
43
|
var content = _ref.content,
|
|
@@ -45,8 +45,6 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
45
45
|
|
|
46
46
|
var _messages = require("../../messages");
|
|
47
47
|
|
|
48
|
-
var _tokens = require("@atlaskit/tokens");
|
|
49
|
-
|
|
50
48
|
var _templateObject;
|
|
51
49
|
|
|
52
50
|
var _excluded = ["children"];
|
|
@@ -67,7 +65,7 @@ var CopyAnchorWrapperWithRef = /*#__PURE__*/_react.default.forwardRef(function (
|
|
|
67
65
|
}), children);
|
|
68
66
|
});
|
|
69
67
|
|
|
70
|
-
var copyAnchorButtonStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline;\n outline: none;\n background-color: transparent;\n border: none;\n color: ", ";\n cursor: pointer;\n right: 0;\n"])), (
|
|
68
|
+
var copyAnchorButtonStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline;\n outline: none;\n background-color: transparent;\n border: none;\n color: ", ";\n cursor: pointer;\n right: 0;\n"])), "var(--ds-icon, ".concat(_colors.N500, ")"));
|
|
71
69
|
|
|
72
70
|
var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
73
71
|
(0, _inherits2.default)(HeadingAnchor, _React$PureComponent);
|
|
@@ -150,7 +148,7 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
150
148
|
}, (0, _react2.jsx)(_link.default, {
|
|
151
149
|
label: _this.getCopyAriaLabel(),
|
|
152
150
|
size: _this.props.level > 3 ? 'small' : 'medium',
|
|
153
|
-
primaryColor: _this.state.isClicked ? (
|
|
151
|
+
primaryColor: _this.state.isClicked ? "var(--ds-icon-selected, ".concat(_colors.B400, ")") : "var(--ds-icon-subtle, ".concat(_colors.N200, ")")
|
|
154
152
|
}));
|
|
155
153
|
});
|
|
156
154
|
return _this;
|
|
@@ -25,8 +25,6 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
25
25
|
|
|
26
26
|
var _colors = require("@atlaskit/theme/colors");
|
|
27
27
|
|
|
28
|
-
var _tokens = require("@atlaskit/tokens");
|
|
29
|
-
|
|
30
28
|
var _table = require("./table");
|
|
31
29
|
|
|
32
30
|
var _injectProps = require("../../utils/inject-props");
|
|
@@ -42,7 +40,7 @@ var modeSpecficStyles = {
|
|
|
42
40
|
}; // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
43
41
|
|
|
44
42
|
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
|
|
45
|
-
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding, (
|
|
43
|
+
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(_colors.N40A), ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
|
|
46
44
|
};
|
|
47
45
|
|
|
48
46
|
var FixedTableDiv = function FixedTableDiv(props) {
|
|
@@ -102,7 +102,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
|
|
|
102
102
|
var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
103
103
|
exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
|
|
104
104
|
var packageName = "@atlaskit/renderer";
|
|
105
|
-
var packageVersion = "105.0.
|
|
105
|
+
var packageVersion = "105.0.2";
|
|
106
106
|
|
|
107
107
|
var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
108
108
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
@@ -21,8 +21,6 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
|
21
21
|
|
|
22
22
|
var _typography = require("@atlaskit/theme/typography");
|
|
23
23
|
|
|
24
|
-
var _tokens = require("@atlaskit/tokens");
|
|
25
|
-
|
|
26
24
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
27
25
|
|
|
28
26
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -100,7 +98,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
|
100
98
|
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(_headingAnchor.HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
|
|
101
99
|
}
|
|
102
100
|
|
|
103
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), _consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN, _styles.tableCellPadding, (
|
|
101
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), _consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN, _styles.tableCellPadding, "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
104
102
|
};
|
|
105
103
|
|
|
106
104
|
var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
|
|
@@ -131,41 +129,41 @@ var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
131
129
|
theme: theme
|
|
132
130
|
};
|
|
133
131
|
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), (0, _editorSharedStyles.editorFontSize)(themeProps), (0, _components.themed)({
|
|
134
|
-
light: (
|
|
135
|
-
dark: (
|
|
136
|
-
})(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), (
|
|
137
|
-
light: (
|
|
138
|
-
dark: (
|
|
132
|
+
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
133
|
+
dark: "var(--ds-text, #B8C7E0)"
|
|
134
|
+
})(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), colors.placeholderText(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(themeProps), (0, _styles.ruleSharedStyles)(themeProps), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(themeProps), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
|
|
135
|
+
light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
|
|
136
|
+
dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
|
|
139
137
|
})(themeProps), (0, _constants.borderRadius)(), (0, _components.themed)({
|
|
140
|
-
light: (
|
|
141
|
-
dark: (
|
|
142
|
-
})(themeProps), (
|
|
143
|
-
light: (
|
|
144
|
-
dark: (
|
|
138
|
+
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
139
|
+
dark: "var(--ds-text, ".concat(colors.DN600, ")")
|
|
140
|
+
})(themeProps), "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), (0, _constants.gridSize)() * 3, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), _styles.mediaSingleSharedStyle, _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, _consts.RendererCssClassName.EXTENSION, _consts.RendererCssClassName.DOCUMENT, _consts.RendererCssClassName.EXTENSION, _editorSharedStyles.blockNodesVerticalMargin, _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, _ui.shadowObserverClassNames.SHADOW_CONTAINER, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, (0, _styles.tableSharedStyle)(themeProps), _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, _styles.tableMarginTop - 1, _styles.tableMarginTop, _editorSharedStyles.akEditorStickyHeaderZIndex, _ui.shadowObserverClassNames.SENTINEL_LEFT, _ui.shadowObserverClassNames.SENTINEL_RIGHT, _styles.tableMarginTop, tableSortableColumnStyle(wrapperProps), _consts.RendererCssClassName.NUMBER_COLUMN, (0, _components.themed)({
|
|
141
|
+
light: "var(--ds-background-neutral, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"),
|
|
142
|
+
dark: "var(--ds-background-neutral, ".concat(_editorSharedStyles.akEditorTableToolbarDark, ")")
|
|
145
143
|
})(themeProps), (0, _components.themed)({
|
|
146
|
-
light: (
|
|
147
|
-
dark: (
|
|
144
|
+
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorder, ")"),
|
|
145
|
+
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorderDark, ")")
|
|
148
146
|
})(themeProps), _editorSharedStyles.akEditorTableNumberColumnWidth, (0, _components.themed)({
|
|
149
|
-
light: (
|
|
150
|
-
dark: (
|
|
147
|
+
light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
148
|
+
dark: "var(--ds-text-subtlest, ".concat(colors.DN400, ")")
|
|
151
149
|
})(themeProps), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), _consts.RendererCssClassName.NUMBER_COLUMN, _editorSharedStyles.akEditorStickyHeaderZIndex, (0, _components.themed)({
|
|
152
|
-
light: (
|
|
153
|
-
dark: (
|
|
150
|
+
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorder, ")"),
|
|
151
|
+
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorderDark, ")")
|
|
154
152
|
})(themeProps), (0, _components.themed)({
|
|
155
|
-
light: (
|
|
156
|
-
dark: (
|
|
153
|
+
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorder, ")"),
|
|
154
|
+
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorderDark, ")")
|
|
157
155
|
})(themeProps), _editorSharedStyles.akEditorStickyHeaderZIndex, (0, _components.themed)({
|
|
158
|
-
light: (
|
|
159
|
-
dark: (
|
|
156
|
+
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorder, ")"),
|
|
157
|
+
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorderDark, ")")
|
|
160
158
|
})(themeProps), (0, _components.themed)({
|
|
161
|
-
light: (
|
|
162
|
-
dark: (
|
|
159
|
+
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorder, ")"),
|
|
160
|
+
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableBorderDark, ")")
|
|
163
161
|
})(themeProps), (0, _components.themed)({
|
|
164
|
-
light: (
|
|
165
|
-
dark: (
|
|
162
|
+
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"),
|
|
163
|
+
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableToolbarDark, ")")
|
|
166
164
|
})(themeProps), (0, _components.themed)({
|
|
167
|
-
light: (
|
|
168
|
-
dark: (
|
|
165
|
+
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"),
|
|
166
|
+
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableToolbarDark, ")")
|
|
169
167
|
})(themeProps), (0, _constants.borderRadius)(), _editorSharedStyles.blockNodesVerticalMargin, (0, _lightWeightCodeBlock.getLightWeightCodeBlockStylesForRootRendererStyleSheet)(), _styles.columnLayoutSharedStyle, (0, _constants.gridSize)() * 2.5, (0, _constants.gridSize)() * 4, _editorSharedStyles.gridMediumMaxWidth, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
170
168
|
};
|
|
171
169
|
};
|
|
@@ -23,8 +23,6 @@ var _react = require("@emotion/react");
|
|
|
23
23
|
|
|
24
24
|
var _react2 = require("react");
|
|
25
25
|
|
|
26
|
-
var _tokens = require("@atlaskit/tokens");
|
|
27
|
-
|
|
28
26
|
var _templateObject;
|
|
29
27
|
|
|
30
28
|
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); }; }
|
|
@@ -32,7 +30,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
32
30
|
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; } }
|
|
33
31
|
|
|
34
32
|
var fadeOutStyles = function fadeOutStyles(maxHeight, top, backgroundColor) {
|
|
35
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow-y: hidden;\n max-height: ", "px;\n &::after {\n content: '';\n position: absolute;\n top: ", "px;\n bottom: 0;\n left: 0;\n right: 0;\n background-image: linear-gradient(\n ", ",\n ", "\n );\n }\n"])), maxHeight, top, (
|
|
33
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow-y: hidden;\n max-height: ", "px;\n &::after {\n content: '';\n position: absolute;\n top: ", "px;\n bottom: 0;\n left: 0;\n right: 0;\n background-image: linear-gradient(\n ", ",\n ", "\n );\n }\n"])), maxHeight, top, "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0))", backgroundColor);
|
|
36
34
|
};
|
|
37
35
|
|
|
38
36
|
var FadeOut = function FadeOut(props) {
|
|
@@ -67,7 +65,7 @@ var TruncatedWrapper = /*#__PURE__*/function (_Component) {
|
|
|
67
65
|
_this$props$fadeHeigh = _this$props.fadeHeight,
|
|
68
66
|
fadeHeight = _this$props$fadeHeigh === void 0 ? 24 : _this$props$fadeHeigh,
|
|
69
67
|
_this$props$backgroun = _this$props.backgroundColor,
|
|
70
|
-
backgroundColor = _this$props$backgroun === void 0 ? (
|
|
68
|
+
backgroundColor = _this$props$backgroun === void 0 ? "var(--ds-surface, white)" : _this$props$backgroun,
|
|
71
69
|
children = _this$props.children;
|
|
72
70
|
return (0, _react.jsx)(FadeOut, {
|
|
73
71
|
height: height,
|
|
@@ -23,8 +23,6 @@ var _messages = require("../messages");
|
|
|
23
23
|
|
|
24
24
|
var _reactIntlNext = require("react-intl-next");
|
|
25
25
|
|
|
26
|
-
var _tokens = require("@atlaskit/tokens");
|
|
27
|
-
|
|
28
26
|
var _consts = require("../consts");
|
|
29
27
|
|
|
30
28
|
var _templateObject, _templateObject2, _templateObject3;
|
|
@@ -39,12 +37,12 @@ exports.StatusClassNames = StatusClassNames;
|
|
|
39
37
|
StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
|
|
40
38
|
})(StatusClassNames || (exports.StatusClassNames = StatusClassNames = {}));
|
|
41
39
|
|
|
42
|
-
var buttonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &.", "__not-allowed {\n cursor: not-allowed;\n }\n"])), (
|
|
40
|
+
var buttonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &.", "__not-allowed {\n cursor: not-allowed;\n }\n"])), "var(--ds-border, #fff)", (0, _constants.gridSize)() / 2, "var(--ds-surface-overlay, ".concat(_colors.N20, ")"), "var(--ds-surface-overlay-hovered, ".concat(_colors.N30, ")"), "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))", _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
43
41
|
var iconWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n display: flex;\n justify-content: center;\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.7;\n }\n"])), StatusClassNames.DESC, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON); // The icon is created with CSS due to the following Firefox issue: https://product-fabric.atlassian.net/browse/ED-8001
|
|
44
42
|
// The TL;DR is that svg's in tables mess up how HTML is copied in Firefox. Using a styled div instead solves the problem.
|
|
45
43
|
// For this reason, svg's should be avoided in tables until this issue is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
|
|
46
44
|
|
|
47
|
-
var iconStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 2px;\n border-radius: 50px;\n background: ", ";\n\n &::before,\n &::after {\n background: ", ";\n content: '';\n height: 2px;\n width: 6px;\n position: absolute;\n border-radius: 50px;\n }\n\n &::before {\n transform: rotate(45deg) translate(3.4px, 8.5px);\n }\n\n &::after {\n transform: rotate(-45deg) translate(-6.3px, 5.7px);\n }\n"])), (
|
|
45
|
+
var iconStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 2px;\n border-radius: 50px;\n background: ", ";\n\n &::before,\n &::after {\n background: ", ";\n content: '';\n height: 2px;\n width: 6px;\n position: absolute;\n border-radius: 50px;\n }\n\n &::before {\n transform: rotate(45deg) translate(3.4px, 8.5px);\n }\n\n &::after {\n transform: rotate(-45deg) translate(-6.3px, 5.7px);\n }\n"])), "var(--ds-icon, #42526E)", "var(--ds-icon, #42526E)");
|
|
48
46
|
|
|
49
47
|
var getIconClassName = function getIconClassName(isSortingAllowed, sortOrdered) {
|
|
50
48
|
var activated = sortOrdered !== _types.SortOrder.NO_ORDER;
|
package/dist/cjs/version.json
CHANGED
|
@@ -7,17 +7,16 @@ import { B400, B300, B500 } from '@atlaskit/theme/colors';
|
|
|
7
7
|
import { getEventHandler } from '../../utils';
|
|
8
8
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
9
9
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
const anchorStyles = css`
|
|
12
|
-
color: ${
|
|
11
|
+
color: ${`var(--ds-link, ${B400})`};
|
|
13
12
|
|
|
14
13
|
&:hover {
|
|
15
|
-
color: ${
|
|
14
|
+
color: ${`var(--ds-link, ${B300})`};
|
|
16
15
|
text-decoration: underline;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
&:active {
|
|
20
|
-
color: ${
|
|
19
|
+
color: ${`var(--ds-link-pressed, ${B500})`};
|
|
21
20
|
}
|
|
22
21
|
`;
|
|
23
22
|
export default function Link(props) {
|
|
@@ -6,13 +6,12 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
6
6
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
8
|
import CopyButton from '../../codeBlockCopyButton';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
|
|
11
10
|
const codeBlockStyleOverrides = props => css`
|
|
12
11
|
tab-size: 4;
|
|
13
12
|
background-color: ${themed({
|
|
14
|
-
light:
|
|
15
|
-
dark:
|
|
13
|
+
light: `var(--ds-surface-raised, ${N20})`,
|
|
14
|
+
dark: `var(--ds-surface-raised, ${DN50})`
|
|
16
15
|
})(props)};
|
|
17
16
|
|
|
18
17
|
${CodeBlockSharedCssClassName.DS_CODEBLOCK} {
|
|
@@ -20,8 +19,8 @@ const codeBlockStyleOverrides = props => css`
|
|
|
20
19
|
line-height: 1.5rem;
|
|
21
20
|
background-image: ${overflowShadow({
|
|
22
21
|
background: themed({
|
|
23
|
-
light:
|
|
24
|
-
dark:
|
|
22
|
+
light: `var(--ds-background-neutral, ${N20})`,
|
|
23
|
+
dark: `var(--ds-background-neutral, ${DN50})`
|
|
25
24
|
})(props),
|
|
26
25
|
leftCoverWidth: `${gridSize() * 3}px`
|
|
27
26
|
})};
|
|
@@ -47,12 +47,14 @@ const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
|
|
|
47
47
|
css: [codeBlockSharedStyles(theme), lightWeightCodeBlockStyles]
|
|
48
48
|
}, jsx("div", {
|
|
49
49
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
50
|
+
}, jsx("div", {
|
|
51
|
+
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER
|
|
50
52
|
}, jsx("div", {
|
|
51
53
|
className: CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
52
54
|
}, textRows.map((_, index) => jsx("span", {
|
|
53
55
|
key: index
|
|
54
56
|
}))), jsx("div", {
|
|
55
57
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
56
|
-
}, jsx("code", null, renderBidiWarnings(text)))));
|
|
58
|
+
}, jsx("code", null, renderBidiWarnings(text))))));
|
|
57
59
|
});
|
|
58
60
|
export default LightWeightCodeBlock;
|
|
@@ -8,7 +8,6 @@ import CopyIcon from '@atlaskit/icon/glyph/copy';
|
|
|
8
8
|
import { N20, N30, N700 } from '@atlaskit/theme/colors';
|
|
9
9
|
import { copyTextToClipboard } from '../utils/clipboard';
|
|
10
10
|
import { codeBlockCopyButtonMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
-
import { token } from '@atlaskit/tokens';
|
|
12
11
|
const copyButtonWrapperStyles = css`
|
|
13
12
|
display: flex;
|
|
14
13
|
position: sticky;
|
|
@@ -26,28 +25,28 @@ const copyButtonWrapperStyles = css`
|
|
|
26
25
|
padding: 2px;
|
|
27
26
|
opacity: 0;
|
|
28
27
|
transition: opacity 0.2s ease 0s;
|
|
29
|
-
border: 2px solid ${
|
|
28
|
+
border: 2px solid ${"var(--ds-border, #fff)"};
|
|
30
29
|
border-radius: 4px;
|
|
31
|
-
background-color: ${
|
|
32
|
-
color: ${
|
|
30
|
+
background-color: ${`var(--ds-surface-overlay, ${N20})`};
|
|
31
|
+
color: ${"var(--ds-text, rgb(66, 82, 110))"} !important;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
button:hover {
|
|
36
|
-
border: 2px solid ${
|
|
37
|
-
background-color: ${
|
|
35
|
+
border: 2px solid ${"var(--ds-border, transparent)"};
|
|
36
|
+
background-color: ${`var(--ds-surface-overlay-hovered, ${N30})`};
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
button:active {
|
|
41
|
-
border: 2px solid ${
|
|
42
|
-
background-color: ${
|
|
40
|
+
border: 2px solid ${"var(--ds-border, transparent)"};
|
|
41
|
+
background-color: ${`var(--ds-surface-overlay-pressed, ${N30})`};
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
button.clicked {
|
|
46
|
-
background-color: ${
|
|
47
|
-
color: ${
|
|
45
|
+
background-color: ${`var(--ds-surface-overlay, ${N700})`};
|
|
46
|
+
color: ${"var(--ds-text, #fff)"} !important;
|
|
48
47
|
}
|
|
49
48
|
button.clicked:hover {
|
|
50
|
-
background-color: ${
|
|
49
|
+
background-color: ${`var(--ds-surface-overlay-hovered, ${N700})`};
|
|
51
50
|
}
|
|
52
51
|
`;
|
|
53
52
|
|
|
@@ -9,7 +9,6 @@ import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
|
9
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { headingAnchorLinkMessages } from '../../messages';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
export const HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
14
13
|
const CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
15
14
|
const {
|
|
@@ -26,7 +25,7 @@ const copyAnchorButtonStyles = css`
|
|
|
26
25
|
outline: none;
|
|
27
26
|
background-color: transparent;
|
|
28
27
|
border: none;
|
|
29
|
-
color: ${
|
|
28
|
+
color: ${`var(--ds-icon, ${N500})`};
|
|
30
29
|
cursor: pointer;
|
|
31
30
|
right: 0;
|
|
32
31
|
`;
|
|
@@ -83,7 +82,7 @@ class HeadingAnchor extends React.PureComponent {
|
|
|
83
82
|
}, jsx(LinkIcon, {
|
|
84
83
|
label: this.getCopyAriaLabel(),
|
|
85
84
|
size: this.props.level > 3 ? 'small' : 'medium',
|
|
86
|
-
primaryColor: this.state.isClicked ?
|
|
85
|
+
primaryColor: this.state.isClicked ? `var(--ds-icon-selected, ${B400})` : `var(--ds-icon-subtle, ${N200})`
|
|
87
86
|
}));
|
|
88
87
|
});
|
|
89
88
|
}
|
|
@@ -6,7 +6,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
6
6
|
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { N40A } from '@atlaskit/theme/colors';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { Table } from './table';
|
|
11
10
|
import { recursivelyInjectProps } from '../../utils/inject-props';
|
|
12
11
|
export const tableStickyPadding = 8;
|
|
@@ -36,9 +35,9 @@ const fixedTableDivStaticStyles = (top, width) => css`
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
border-top: ${tableStickyPadding}px solid
|
|
39
|
-
${
|
|
40
|
-
background: ${
|
|
41
|
-
box-shadow: ${
|
|
38
|
+
${"var(--ds-surface, white)"};
|
|
39
|
+
background: ${"var(--ds-surface-overlay, white)"};
|
|
40
|
+
box-shadow: ${`var(--ds-shadow-overflow, ${`0 6px 4px -4px ${N40A}`})`};
|
|
42
41
|
|
|
43
42
|
div[data-expanded='false'] & {
|
|
44
43
|
display: none;
|
|
@@ -36,7 +36,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
36
36
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
37
37
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
38
38
|
const packageName = "@atlaskit/renderer";
|
|
39
|
-
const packageVersion = "105.0.
|
|
39
|
+
const packageVersion = "105.0.2";
|
|
40
40
|
export class Renderer extends PureComponent {
|
|
41
41
|
/**
|
|
42
42
|
* This is used in measuring the Renderer Mount time and is then
|
|
@@ -3,7 +3,6 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
3
3
|
import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
5
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
8
7
|
import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
9
8
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
@@ -218,7 +217,7 @@ const tableSortableColumnStyle = ({
|
|
|
218
217
|
outline: unset;
|
|
219
218
|
}
|
|
220
219
|
&:focus-visible {
|
|
221
|
-
border-color: ${
|
|
220
|
+
border-color: ${`var(--ds-border-focused, ${colors.B300})`};
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
223
|
|
|
@@ -297,8 +296,8 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
297
296
|
font-size: ${editorFontSize(themeProps)}px;
|
|
298
297
|
line-height: 1.5rem;
|
|
299
298
|
color: ${themed({
|
|
300
|
-
light:
|
|
301
|
-
dark:
|
|
299
|
+
light: `var(--ds-text, ${colors.N800})`,
|
|
300
|
+
dark: "var(--ds-text, #B8C7E0)"
|
|
302
301
|
})(themeProps)};
|
|
303
302
|
|
|
304
303
|
.${RendererCssClassName.DOCUMENT}::after {
|
|
@@ -340,16 +339,16 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
340
339
|
}
|
|
341
340
|
|
|
342
341
|
& span.akActionMark {
|
|
343
|
-
color: ${
|
|
342
|
+
color: ${`var(--ds-link, ${colors.B400})`};
|
|
344
343
|
text-decoration: none;
|
|
345
344
|
|
|
346
345
|
&:hover {
|
|
347
|
-
color: ${
|
|
346
|
+
color: ${`var(--ds-link, ${colors.B300})`};
|
|
348
347
|
text-decoration: underline;
|
|
349
348
|
}
|
|
350
349
|
|
|
351
350
|
&:active {
|
|
352
|
-
color: ${
|
|
351
|
+
color: ${`var(--ds-link-pressed, ${colors.B500})`};
|
|
353
352
|
}
|
|
354
353
|
}
|
|
355
354
|
|
|
@@ -386,13 +385,13 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
386
385
|
|
|
387
386
|
& span.date-node {
|
|
388
387
|
background: ${themed({
|
|
389
|
-
light:
|
|
390
|
-
dark:
|
|
388
|
+
light: `var(--ds-background-neutral, ${colors.N30A})`,
|
|
389
|
+
dark: `var(--ds-background-neutral, ${colors.DN70})`
|
|
391
390
|
})(themeProps)};
|
|
392
391
|
border-radius: ${borderRadius()}px;
|
|
393
392
|
color: ${themed({
|
|
394
|
-
light:
|
|
395
|
-
dark:
|
|
393
|
+
light: `var(--ds-text, ${colors.N800})`,
|
|
394
|
+
dark: `var(--ds-text, ${colors.DN600})`
|
|
396
395
|
})(themeProps)};
|
|
397
396
|
padding: 2px 4px;
|
|
398
397
|
margin: 0 1px;
|
|
@@ -400,8 +399,8 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
400
399
|
}
|
|
401
400
|
|
|
402
401
|
& span.date-node-highlighted {
|
|
403
|
-
background: ${
|
|
404
|
-
color: ${
|
|
402
|
+
background: ${`var(--ds-background-danger, ${colors.R50})`};
|
|
403
|
+
color: ${`var(--ds-text-danger, ${colors.R500})`};
|
|
405
404
|
}
|
|
406
405
|
|
|
407
406
|
& .renderer-image {
|
|
@@ -531,19 +530,19 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
531
530
|
table[data-number-column='true'] {
|
|
532
531
|
.${RendererCssClassName.NUMBER_COLUMN} {
|
|
533
532
|
background-color: ${themed({
|
|
534
|
-
light:
|
|
535
|
-
dark:
|
|
533
|
+
light: `var(--ds-background-neutral, ${akEditorTableToolbar})`,
|
|
534
|
+
dark: `var(--ds-background-neutral, ${akEditorTableToolbarDark})`
|
|
536
535
|
})(themeProps)};
|
|
537
536
|
border-right: 1px solid
|
|
538
537
|
${themed({
|
|
539
|
-
light:
|
|
540
|
-
dark:
|
|
538
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
539
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
541
540
|
})(themeProps)};
|
|
542
541
|
width: ${akEditorTableNumberColumnWidth}px;
|
|
543
542
|
text-align: center;
|
|
544
543
|
color: ${themed({
|
|
545
|
-
light:
|
|
546
|
-
dark:
|
|
544
|
+
light: `var(--ds-text-subtlest, ${colors.N200})`,
|
|
545
|
+
dark: `var(--ds-text-subtlest, ${colors.DN400})`
|
|
547
546
|
})(themeProps)};
|
|
548
547
|
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
549
548
|
}
|
|
@@ -562,13 +561,13 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
562
561
|
|
|
563
562
|
border-right: 1px solid
|
|
564
563
|
${themed({
|
|
565
|
-
light:
|
|
566
|
-
dark:
|
|
564
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
565
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
567
566
|
})(themeProps)};
|
|
568
567
|
border-bottom: 1px solid
|
|
569
568
|
${themed({
|
|
570
|
-
light:
|
|
571
|
-
dark:
|
|
569
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
570
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
572
571
|
})(themeProps)};
|
|
573
572
|
|
|
574
573
|
/* this is to compensate for the table border */
|
|
@@ -594,20 +593,20 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
594
593
|
.sticky td {
|
|
595
594
|
box-shadow: 0px 1px
|
|
596
595
|
${themed({
|
|
597
|
-
light:
|
|
598
|
-
dark:
|
|
596
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
597
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
599
598
|
})(themeProps)},
|
|
600
599
|
0px -0.5px ${themed({
|
|
601
|
-
light:
|
|
602
|
-
dark:
|
|
600
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
601
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
603
602
|
})(themeProps)},
|
|
604
603
|
inset -1px 0px ${themed({
|
|
605
|
-
light:
|
|
606
|
-
dark:
|
|
604
|
+
light: `var(--ds-border, ${akEditorTableToolbar})`,
|
|
605
|
+
dark: `var(--ds-border, ${akEditorTableToolbarDark})`
|
|
607
606
|
})(themeProps)},
|
|
608
607
|
0px -1px ${themed({
|
|
609
|
-
light:
|
|
610
|
-
dark:
|
|
608
|
+
light: `var(--ds-border, ${akEditorTableToolbar})`,
|
|
609
|
+
dark: `var(--ds-border, ${akEditorTableToolbarDark})`
|
|
611
610
|
})(themeProps)};
|
|
612
611
|
}
|
|
613
612
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { Component } from 'react';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
|
|
6
5
|
const fadeOutStyles = (maxHeight, top, backgroundColor) => css`
|
|
7
6
|
position: relative;
|
|
@@ -15,7 +14,7 @@ const fadeOutStyles = (maxHeight, top, backgroundColor) => css`
|
|
|
15
14
|
left: 0;
|
|
16
15
|
right: 0;
|
|
17
16
|
background-image: linear-gradient(
|
|
18
|
-
${
|
|
17
|
+
${"var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0))"},
|
|
19
18
|
${backgroundColor}
|
|
20
19
|
);
|
|
21
20
|
}
|
|
@@ -45,7 +44,7 @@ export class TruncatedWrapper extends Component {
|
|
|
45
44
|
const {
|
|
46
45
|
height = 95,
|
|
47
46
|
fadeHeight = 24,
|
|
48
|
-
backgroundColor =
|
|
47
|
+
backgroundColor = "var(--ds-surface, white)",
|
|
49
48
|
children
|
|
50
49
|
} = this.props;
|
|
51
50
|
return jsx(FadeOut, {
|
|
@@ -6,7 +6,6 @@ import { N20, N30 } from '@atlaskit/theme/colors';
|
|
|
6
6
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
7
7
|
import { sortingIconMessages } from '../messages';
|
|
8
8
|
import { injectIntl } from 'react-intl-next';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { RendererCssClassName } from '../consts';
|
|
11
10
|
export let StatusClassNames;
|
|
12
11
|
|
|
@@ -25,19 +24,19 @@ const buttonStyles = css`
|
|
|
25
24
|
margin: 6px;
|
|
26
25
|
right: 0;
|
|
27
26
|
top: 0;
|
|
28
|
-
border: 2px solid ${
|
|
27
|
+
border: 2px solid ${"var(--ds-border, #fff)"};
|
|
29
28
|
border-radius: ${gridSize() / 2}px;
|
|
30
|
-
background-color: ${
|
|
29
|
+
background-color: ${`var(--ds-surface-overlay, ${N20})`};
|
|
31
30
|
justify-content: center;
|
|
32
31
|
align-items: center;
|
|
33
32
|
cursor: pointer;
|
|
34
33
|
|
|
35
34
|
&:hover {
|
|
36
|
-
background-color: ${
|
|
35
|
+
background-color: ${`var(--ds-surface-overlay-hovered, ${N30})`};
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
&:active {
|
|
40
|
-
background-color: ${
|
|
39
|
+
background-color: ${"var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))"};
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
&.${RendererCssClassName.SORTABLE_COLUMN_ICON}__not-allowed {
|
|
@@ -67,11 +66,11 @@ const iconStyles = css`
|
|
|
67
66
|
height: 100%;
|
|
68
67
|
width: 2px;
|
|
69
68
|
border-radius: 50px;
|
|
70
|
-
background: ${
|
|
69
|
+
background: ${"var(--ds-icon, #42526E)"};
|
|
71
70
|
|
|
72
71
|
&::before,
|
|
73
72
|
&::after {
|
|
74
|
-
background: ${
|
|
73
|
+
background: ${"var(--ds-icon, #42526E)"};
|
|
75
74
|
content: '';
|
|
76
75
|
height: 2px;
|
|
77
76
|
width: 6px;
|
package/dist/es2019/version.json
CHANGED
|
@@ -10,8 +10,7 @@ import { B400, B300, B500 } from '@atlaskit/theme/colors';
|
|
|
10
10
|
import { getEventHandler } from '../../utils';
|
|
11
11
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
12
12
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
13
|
-
|
|
14
|
-
var anchorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n"])), token('color.link', B400), token('color.link', B300), token('color.link.pressed', B500));
|
|
13
|
+
var anchorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n"])), "var(--ds-link, ".concat(B400, ")"), "var(--ds-link, ".concat(B300, ")"), "var(--ds-link-pressed, ".concat(B500, ")"));
|
|
15
14
|
export default function Link(props) {
|
|
16
15
|
var href = props.href,
|
|
17
16
|
target = props.target,
|
|
@@ -10,16 +10,15 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
10
10
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
11
11
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import CopyButton from '../../codeBlockCopyButton';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
13
|
|
|
15
14
|
var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
|
|
16
15
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n background-color: ", ";\n\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n }\n "])), themed({
|
|
17
|
-
light:
|
|
18
|
-
dark:
|
|
16
|
+
light: "var(--ds-surface-raised, ".concat(N20, ")"),
|
|
17
|
+
dark: "var(--ds-surface-raised, ".concat(DN50, ")")
|
|
19
18
|
})(props), CodeBlockSharedCssClassName.DS_CODEBLOCK, relativeFontSizeToBase16(fontSize()), overflowShadow({
|
|
20
19
|
background: themed({
|
|
21
|
-
light:
|
|
22
|
-
dark:
|
|
20
|
+
light: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
21
|
+
dark: "var(--ds-background-neutral, ".concat(DN50, ")")
|
|
23
22
|
})(props),
|
|
24
23
|
leftCoverWidth: "".concat(gridSize() * 3, "px")
|
|
25
24
|
}));
|
|
@@ -44,6 +44,8 @@ var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
44
44
|
css: [codeBlockSharedStyles(theme), lightWeightCodeBlockStyles]
|
|
45
45
|
}, jsx("div", {
|
|
46
46
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
47
|
+
}, jsx("div", {
|
|
48
|
+
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER
|
|
47
49
|
}, jsx("div", {
|
|
48
50
|
className: CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
49
51
|
}, textRows.map(function (_, index) {
|
|
@@ -52,6 +54,6 @@ var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
52
54
|
});
|
|
53
55
|
})), jsx("div", {
|
|
54
56
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
55
|
-
}, jsx("code", null, renderBidiWarnings(text)))));
|
|
57
|
+
}, jsx("code", null, renderBidiWarnings(text))))));
|
|
56
58
|
});
|
|
57
59
|
export default LightWeightCodeBlock;
|
|
@@ -13,8 +13,7 @@ import CopyIcon from '@atlaskit/icon/glyph/copy';
|
|
|
13
13
|
import { N20, N30, N700 } from '@atlaskit/theme/colors';
|
|
14
14
|
import { copyTextToClipboard } from '../utils/clipboard';
|
|
15
15
|
import { codeBlockCopyButtonMessages } from '@atlaskit/editor-common/messages';
|
|
16
|
-
|
|
17
|
-
var copyButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", " !important;\n }\n\n button:hover {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button:active {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n button.clicked:hover {\n background-color: ", ";\n }\n"])), token('color.border', '#fff'), token('elevation.surface.overlay', N20), token('color.text', 'rgb(66, 82, 110)'), token('color.border', 'transparent'), token('elevation.surface.overlay.hovered', N30), token('color.border', 'transparent'), token('elevation.surface.overlay.pressed', N30), token('elevation.surface.overlay', N700), token('color.text', '#fff'), token('elevation.surface.overlay.hovered', N700));
|
|
16
|
+
var copyButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", " !important;\n }\n\n button:hover {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button:active {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n button.clicked:hover {\n background-color: ", ";\n }\n"])), "var(--ds-border, #fff)", "var(--ds-surface-overlay, ".concat(N20, ")"), "var(--ds-text, rgb(66, 82, 110))", "var(--ds-border, transparent)", "var(--ds-surface-overlay-hovered, ".concat(N30, ")"), "var(--ds-border, transparent)", "var(--ds-surface-overlay-pressed, ".concat(N30, ")"), "var(--ds-surface-overlay, ".concat(N700, ")"), "var(--ds-text, #fff)", "var(--ds-surface-overlay-hovered, ".concat(N700, ")"));
|
|
18
17
|
|
|
19
18
|
var CopyButton = function CopyButton(_ref) {
|
|
20
19
|
var content = _ref.content,
|
|
@@ -27,7 +27,6 @@ import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
|
27
27
|
import Tooltip from '@atlaskit/tooltip';
|
|
28
28
|
import { injectIntl } from 'react-intl-next';
|
|
29
29
|
import { headingAnchorLinkMessages } from '../../messages';
|
|
30
|
-
import { token } from '@atlaskit/tokens';
|
|
31
30
|
export var HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
32
31
|
var CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
33
32
|
var children = props.children,
|
|
@@ -38,7 +37,7 @@ var CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
38
37
|
ref: ref
|
|
39
38
|
}), children);
|
|
40
39
|
});
|
|
41
|
-
var copyAnchorButtonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline;\n outline: none;\n background-color: transparent;\n border: none;\n color: ", ";\n cursor: pointer;\n right: 0;\n"])),
|
|
40
|
+
var copyAnchorButtonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline;\n outline: none;\n background-color: transparent;\n border: none;\n color: ", ";\n cursor: pointer;\n right: 0;\n"])), "var(--ds-icon, ".concat(N500, ")"));
|
|
42
41
|
|
|
43
42
|
var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
44
43
|
_inherits(HeadingAnchor, _React$PureComponent);
|
|
@@ -127,7 +126,7 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
127
126
|
}, jsx(LinkIcon, {
|
|
128
127
|
label: _this.getCopyAriaLabel(),
|
|
129
128
|
size: _this.props.level > 3 ? 'small' : 'medium',
|
|
130
|
-
primaryColor: _this.state.isClicked ?
|
|
129
|
+
primaryColor: _this.state.isClicked ? "var(--ds-icon-selected, ".concat(B400, ")") : "var(--ds-icon-subtle, ".concat(N200, ")")
|
|
131
130
|
}));
|
|
132
131
|
});
|
|
133
132
|
|
|
@@ -11,7 +11,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
13
13
|
import { N40A } from '@atlaskit/theme/colors';
|
|
14
|
-
import { token } from '@atlaskit/tokens';
|
|
15
14
|
import { Table } from './table';
|
|
16
15
|
import { recursivelyInjectProps } from '../../utils/inject-props';
|
|
17
16
|
export var tableStickyPadding = 8;
|
|
@@ -22,7 +21,7 @@ var modeSpecficStyles = {
|
|
|
22
21
|
}; // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
23
22
|
|
|
24
23
|
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
|
|
25
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, akEditorStickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding,
|
|
24
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, akEditorStickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
export var FixedTableDiv = function FixedTableDiv(props) {
|
|
@@ -50,7 +50,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
50
50
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
51
51
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
52
52
|
var packageName = "@atlaskit/renderer";
|
|
53
|
-
var packageVersion = "105.0.
|
|
53
|
+
var packageVersion = "105.0.2";
|
|
54
54
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
55
55
|
_inherits(Renderer, _PureComponent);
|
|
56
56
|
|
|
@@ -7,7 +7,6 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
7
7
|
import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/constants';
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
9
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
12
11
|
import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
13
12
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
@@ -71,7 +70,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
|
71
70
|
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
|
|
72
71
|
}
|
|
73
72
|
|
|
74
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, tableCellPadding,
|
|
73
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, tableCellPadding, "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
75
74
|
};
|
|
76
75
|
|
|
77
76
|
var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
|
|
@@ -102,41 +101,41 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
102
101
|
theme: theme
|
|
103
102
|
};
|
|
104
103
|
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), editorFontSize(themeProps), themed({
|
|
105
|
-
light:
|
|
106
|
-
dark:
|
|
107
|
-
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'),
|
|
108
|
-
light:
|
|
109
|
-
dark:
|
|
104
|
+
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
105
|
+
dark: "var(--ds-text, #B8C7E0)"
|
|
106
|
+
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), colors.placeholderText(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
107
|
+
light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
|
|
108
|
+
dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
|
|
110
109
|
})(themeProps), borderRadius(), themed({
|
|
111
|
-
light:
|
|
112
|
-
dark:
|
|
113
|
-
})(themeProps),
|
|
114
|
-
light:
|
|
115
|
-
dark:
|
|
110
|
+
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
111
|
+
dark: "var(--ds-text, ".concat(colors.DN600, ")")
|
|
112
|
+
})(themeProps), "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), gridSize() * 3, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(themeProps), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
|
|
113
|
+
light: "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"),
|
|
114
|
+
dark: "var(--ds-background-neutral, ".concat(akEditorTableToolbarDark, ")")
|
|
116
115
|
})(themeProps), themed({
|
|
117
|
-
light:
|
|
118
|
-
dark:
|
|
116
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
117
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
119
118
|
})(themeProps), akEditorTableNumberColumnWidth, themed({
|
|
120
|
-
light:
|
|
121
|
-
dark:
|
|
119
|
+
light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
120
|
+
dark: "var(--ds-text-subtlest, ".concat(colors.DN400, ")")
|
|
122
121
|
})(themeProps), relativeFontSizeToBase16(fontSize()), RendererCssClassName.NUMBER_COLUMN, akEditorStickyHeaderZIndex, themed({
|
|
123
|
-
light:
|
|
124
|
-
dark:
|
|
122
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
123
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
125
124
|
})(themeProps), themed({
|
|
126
|
-
light:
|
|
127
|
-
dark:
|
|
125
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
126
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
128
127
|
})(themeProps), akEditorStickyHeaderZIndex, themed({
|
|
129
|
-
light:
|
|
130
|
-
dark:
|
|
128
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
129
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
131
130
|
})(themeProps), themed({
|
|
132
|
-
light:
|
|
133
|
-
dark:
|
|
131
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
132
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
134
133
|
})(themeProps), themed({
|
|
135
|
-
light:
|
|
136
|
-
dark:
|
|
134
|
+
light: "var(--ds-border, ".concat(akEditorTableToolbar, ")"),
|
|
135
|
+
dark: "var(--ds-border, ".concat(akEditorTableToolbarDark, ")")
|
|
137
136
|
})(themeProps), themed({
|
|
138
|
-
light:
|
|
139
|
-
dark:
|
|
137
|
+
light: "var(--ds-border, ".concat(akEditorTableToolbar, ")"),
|
|
138
|
+
dark: "var(--ds-border, ".concat(akEditorTableToolbarDark, ")")
|
|
140
139
|
})(themeProps), borderRadius(), blockNodesVerticalMargin, getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, gridSize() * 2.5, gridSize() * 4, gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, browser.safari ? codeBlockInListSafariFix : '');
|
|
141
140
|
};
|
|
142
141
|
};
|
|
@@ -14,10 +14,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
14
14
|
/** @jsx jsx */
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { Component } from 'react';
|
|
17
|
-
import { token } from '@atlaskit/tokens';
|
|
18
17
|
|
|
19
18
|
var fadeOutStyles = function fadeOutStyles(maxHeight, top, backgroundColor) {
|
|
20
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow-y: hidden;\n max-height: ", "px;\n &::after {\n content: '';\n position: absolute;\n top: ", "px;\n bottom: 0;\n left: 0;\n right: 0;\n background-image: linear-gradient(\n ", ",\n ", "\n );\n }\n"])), maxHeight, top,
|
|
19
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow-y: hidden;\n max-height: ", "px;\n &::after {\n content: '';\n position: absolute;\n top: ", "px;\n bottom: 0;\n left: 0;\n right: 0;\n background-image: linear-gradient(\n ", ",\n ", "\n );\n }\n"])), maxHeight, top, "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0))", backgroundColor);
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
var FadeOut = function FadeOut(props) {
|
|
@@ -53,7 +52,7 @@ export var TruncatedWrapper = /*#__PURE__*/function (_Component) {
|
|
|
53
52
|
_this$props$fadeHeigh = _this$props.fadeHeight,
|
|
54
53
|
fadeHeight = _this$props$fadeHeigh === void 0 ? 24 : _this$props$fadeHeigh,
|
|
55
54
|
_this$props$backgroun = _this$props.backgroundColor,
|
|
56
|
-
backgroundColor = _this$props$backgroun === void 0 ?
|
|
55
|
+
backgroundColor = _this$props$backgroun === void 0 ? "var(--ds-surface, white)" : _this$props$backgroun,
|
|
57
56
|
children = _this$props.children;
|
|
58
57
|
return jsx(FadeOut, {
|
|
59
58
|
height: height,
|
|
@@ -10,7 +10,6 @@ import { N20, N30 } from '@atlaskit/theme/colors';
|
|
|
10
10
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
11
11
|
import { sortingIconMessages } from '../messages';
|
|
12
12
|
import { injectIntl } from 'react-intl-next';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
13
|
import { RendererCssClassName } from '../consts';
|
|
15
14
|
export var StatusClassNames;
|
|
16
15
|
|
|
@@ -21,12 +20,12 @@ export var StatusClassNames;
|
|
|
21
20
|
StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
|
|
22
21
|
})(StatusClassNames || (StatusClassNames = {}));
|
|
23
22
|
|
|
24
|
-
var buttonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &.", "__not-allowed {\n cursor: not-allowed;\n }\n"])),
|
|
23
|
+
var buttonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &.", "__not-allowed {\n cursor: not-allowed;\n }\n"])), "var(--ds-border, #fff)", gridSize() / 2, "var(--ds-surface-overlay, ".concat(N20, ")"), "var(--ds-surface-overlay-hovered, ".concat(N30, ")"), "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))", RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
25
24
|
var iconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n display: flex;\n justify-content: center;\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.7;\n }\n"])), StatusClassNames.DESC, RendererCssClassName.SORTABLE_COLUMN_ICON); // The icon is created with CSS due to the following Firefox issue: https://product-fabric.atlassian.net/browse/ED-8001
|
|
26
25
|
// The TL;DR is that svg's in tables mess up how HTML is copied in Firefox. Using a styled div instead solves the problem.
|
|
27
26
|
// For this reason, svg's should be avoided in tables until this issue is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
|
|
28
27
|
|
|
29
|
-
var iconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 100%;\n width: 2px;\n border-radius: 50px;\n background: ", ";\n\n &::before,\n &::after {\n background: ", ";\n content: '';\n height: 2px;\n width: 6px;\n position: absolute;\n border-radius: 50px;\n }\n\n &::before {\n transform: rotate(45deg) translate(3.4px, 8.5px);\n }\n\n &::after {\n transform: rotate(-45deg) translate(-6.3px, 5.7px);\n }\n"])),
|
|
28
|
+
var iconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 100%;\n width: 2px;\n border-radius: 50px;\n background: ", ";\n\n &::before,\n &::after {\n background: ", ";\n content: '';\n height: 2px;\n width: 6px;\n position: absolute;\n border-radius: 50px;\n }\n\n &::before {\n transform: rotate(45deg) translate(3.4px, 8.5px);\n }\n\n &::after {\n transform: rotate(-45deg) translate(-6.3px, 5.7px);\n }\n"])), "var(--ds-icon, #42526E)", "var(--ds-icon, #42526E)");
|
|
30
29
|
|
|
31
30
|
var getIconClassName = function getIconClassName(isSortingAllowed, sortOrdered) {
|
|
32
31
|
var activated = sortOrdered !== SortOrder.NO_ORDER;
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "105.0.
|
|
3
|
+
"version": "105.0.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/media-filmstrip": "^46.1.0",
|
|
44
44
|
"@atlaskit/media-ui": "^22.2.0",
|
|
45
45
|
"@atlaskit/media-viewer": "^47.3.0",
|
|
46
|
-
"@atlaskit/smart-card": "^23.
|
|
46
|
+
"@atlaskit/smart-card": "^23.11.0",
|
|
47
47
|
"@atlaskit/status": "^1.2.0",
|
|
48
48
|
"@atlaskit/task-decision": "^17.5.0",
|
|
49
49
|
"@atlaskit/theme": "^12.2.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@atlaskit/media-test-helpers": "^30.1.0",
|
|
81
81
|
"@atlaskit/mention": "^21.0.0",
|
|
82
82
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
83
|
-
"@atlaskit/profilecard": "^18.
|
|
83
|
+
"@atlaskit/profilecard": "^18.1.0",
|
|
84
84
|
"@atlaskit/radio": "^5.4.0",
|
|
85
85
|
"@atlaskit/range": "^7.0.0",
|
|
86
86
|
"@atlaskit/ssr": "*",
|