@atlaskit/editor-common 66.0.4 → 67.0.1
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 +31 -0
- package/card/package.json +1 -0
- package/collab/package.json +1 -0
- package/cypress-config/package.json +1 -0
- package/dist/cjs/styles/shared/annotation.js +12 -7
- package/dist/cjs/styles/shared/blockquote.js +3 -1
- package/dist/cjs/styles/shared/code-mark.js +4 -2
- package/dist/cjs/styles/shared/rule.js +4 -2
- package/dist/cjs/styles/shared/table.js +18 -16
- package/dist/cjs/ui/Caption/index.js +4 -2
- package/dist/cjs/ui/Expand/index.js +20 -18
- package/dist/cjs/ui/Messages/index.js +5 -3
- package/dist/cjs/ui/UnsupportedBlock/index.js +3 -1
- package/dist/cjs/ui/UnsupportedInline/index.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/styles/shared/annotation.js +17 -7
- package/dist/es2019/styles/shared/blockquote.js +3 -1
- package/dist/es2019/styles/shared/code-mark.js +3 -2
- package/dist/es2019/styles/shared/panel.js +2 -0
- package/dist/es2019/styles/shared/rule.js +3 -2
- package/dist/es2019/styles/shared/shadow.js +2 -0
- package/dist/es2019/styles/shared/table.js +19 -15
- package/dist/es2019/ui/Caption/index.js +3 -2
- package/dist/es2019/ui/Expand/index.js +19 -17
- package/dist/es2019/ui/Messages/index.js +4 -3
- package/dist/es2019/ui/UnsupportedBlock/index.js +3 -2
- package/dist/es2019/ui/UnsupportedInline/index.js +3 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/styles/shared/annotation.js +11 -7
- package/dist/esm/styles/shared/blockquote.js +2 -1
- package/dist/esm/styles/shared/code-mark.js +3 -2
- package/dist/esm/styles/shared/panel.js +2 -0
- package/dist/esm/styles/shared/rule.js +3 -2
- package/dist/esm/styles/shared/shadow.js +2 -0
- package/dist/esm/styles/shared/table.js +20 -16
- package/dist/esm/ui/Caption/index.js +3 -2
- package/dist/esm/ui/Expand/index.js +19 -18
- package/dist/esm/ui/Messages/index.js +4 -3
- package/dist/esm/ui/UnsupportedBlock/index.js +2 -1
- package/dist/esm/ui/UnsupportedInline/index.js +2 -1
- package/dist/esm/version.json +1 -1
- package/emoji/package.json +1 -0
- package/extensions/package.json +1 -0
- package/icons/package.json +1 -0
- package/in-product/package.json +1 -0
- package/mention/package.json +1 -0
- package/messages/package.json +1 -0
- package/normalize-feature-flags/package.json +1 -0
- package/package.json +12 -10
- package/panel/package.json +1 -0
- package/provider-factory/package.json +1 -0
- package/provider-helpers/package.json +1 -0
- package/safe-plugin/package.json +1 -0
- package/styles/package.json +1 -0
- package/type-ahead/package.json +1 -0
- package/types/package.json +1 -0
- package/ufo/package.json +1 -0
- package/ui/package.json +1 -0
- package/utils/package.json +1 -0
- package/validator/package.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 67.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 67.0.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`025ee31e9bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/025ee31e9bc) - [ux] Instrumented `@atlaskit/editor-common` with the new theming package, `@atlaskit/tokens`.
|
|
14
|
+
|
|
15
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
16
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking change.
|
|
17
|
+
|
|
18
|
+
- [`bd24b9d71d2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bd24b9d71d2) - [ux] Instrumented `@atlaskit/renderer` with the new theming package, `@atlaskit/tokens`.
|
|
19
|
+
|
|
20
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
21
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`facd9f48e88`](https://bitbucket.org/atlassian/atlassian-frontend/commits/facd9f48e88) - Fixed confluence inline comment missing background colour.
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
28
|
+
## 66.0.5
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
|
|
3
34
|
## 66.0.4
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/card/package.json
CHANGED
package/collab/package.json
CHANGED
|
@@ -15,6 +15,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
15
|
|
|
16
16
|
var _components = require("@atlaskit/theme/components");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _templateObject, _templateObject2, _templateObject3;
|
|
19
21
|
|
|
20
22
|
var annotationPrefix = 'ak-editor-annotation';
|
|
@@ -34,20 +36,23 @@ var DY200 = '#82641c';
|
|
|
34
36
|
|
|
35
37
|
var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
|
|
36
38
|
return {
|
|
37
|
-
|
|
39
|
+
/* eslint-disable */
|
|
40
|
+
focus: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid\n ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
|
|
38
41
|
light: _colors.Y75,
|
|
39
42
|
dark: DY75
|
|
40
43
|
})(props), (0, _components.themed)({
|
|
41
|
-
light: _colors.Y300,
|
|
42
|
-
dark: DY300
|
|
43
|
-
})(props), _colors.N60A, _colors.N60A),
|
|
44
|
-
blur: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-bottom: 2px solid
|
|
44
|
+
light: (0, _tokens.token)('color.border.accent.yellow', _colors.Y300),
|
|
45
|
+
dark: (0, _tokens.token)('color.border.accent.yellow', DY300)
|
|
46
|
+
})(props), (0, _tokens.token)('elevation.shadow.overlay', "1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A))),
|
|
47
|
+
blur: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-bottom: 2px solid\n ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
|
|
45
48
|
light: Y75a,
|
|
46
49
|
dark: DY75a
|
|
47
50
|
})(props), (0, _components.themed)({
|
|
48
|
-
light: Y200a,
|
|
49
|
-
dark: DY200
|
|
51
|
+
light: (0, _tokens.token)('color.border.accent.yellow', Y200a),
|
|
52
|
+
dark: (0, _tokens.token)('color.border.accent.yellow', DY200)
|
|
50
53
|
})(props))
|
|
54
|
+
/* eslint-enable */
|
|
55
|
+
|
|
51
56
|
};
|
|
52
57
|
};
|
|
53
58
|
|
|
@@ -15,7 +15,9 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
15
15
|
|
|
16
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _templateObject;
|
|
19
21
|
|
|
20
|
-
var blockquoteSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\n border-left: 2px solid
|
|
22
|
+
var blockquoteSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\n border-left: 2px solid\n ", ";\n margin: ", " 0 0 0;\n margin-right: 0;\n\n [dir='rtl'] & {\n padding-left: 0;\n padding-right: ", "px;\n }\n\n &:first-child {\n margin-top: 0;\n }\n\n &::before {\n content: '';\n }\n\n &::after {\n content: none;\n }\n\n & p {\n display: block;\n }\n\n & table,\n & table:last-child {\n display: inline-table;\n }\n }\n"])), (0, _constants.gridSize)() * 2, (0, _tokens.token)('color.border', _editorSharedStyles.akEditorBlockquoteBorderColor), _editorSharedStyles.blockNodesVerticalMargin, (0, _constants.gridSize)() * 2);
|
|
21
23
|
exports.blockquoteSharedStyles = blockquoteSharedStyles;
|
|
@@ -17,13 +17,15 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
|
|
18
18
|
var _components = require("@atlaskit/theme/components");
|
|
19
19
|
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
20
22
|
var _templateObject;
|
|
21
23
|
|
|
22
24
|
var codeMarkSharedStyles = function codeMarkSharedStyles(props) {
|
|
23
25
|
var theme = (0, _components.getTheme)(props);
|
|
24
26
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), (0, _components.themed)({
|
|
25
|
-
light: _colors.N30A,
|
|
26
|
-
dark: _colors.DN70
|
|
27
|
+
light: (0, _tokens.token)('color.background.neutral', _colors.N30A),
|
|
28
|
+
dark: (0, _tokens.token)('color.background.neutral', _colors.DN70)
|
|
27
29
|
})(props), (0, _inline.getCodeStyles)(theme));
|
|
28
30
|
};
|
|
29
31
|
|
|
@@ -17,11 +17,13 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
|
|
18
18
|
var _components = require("@atlaskit/theme/components");
|
|
19
19
|
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
20
22
|
var _templateObject;
|
|
21
23
|
|
|
22
24
|
var divider = (0, _components.themed)({
|
|
23
|
-
light: _colors.N30A,
|
|
24
|
-
dark: _colors.DN50
|
|
25
|
+
light: (0, _tokens.token)('color.border', _colors.N30A),
|
|
26
|
+
dark: (0, _tokens.token)('color.border', _colors.DN50)
|
|
25
27
|
}); // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
26
28
|
|
|
27
29
|
var ruleSharedStyles = function ruleSharedStyles(props) {
|
|
@@ -21,6 +21,8 @@ var _components = require("@atlaskit/theme/components");
|
|
|
21
21
|
|
|
22
22
|
var _constants = require("@atlaskit/theme/constants");
|
|
23
23
|
|
|
24
|
+
var _tokens = require("@atlaskit/tokens");
|
|
25
|
+
|
|
24
26
|
var _browser = _interopRequireDefault(require("../../utils/browser"));
|
|
25
27
|
|
|
26
28
|
var _templateObject;
|
|
@@ -57,17 +59,17 @@ var TableSharedCssClassName = {
|
|
|
57
59
|
exports.TableSharedCssClassName = TableSharedCssClassName;
|
|
58
60
|
|
|
59
61
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
60
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-child > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color:
|
|
61
|
-
light: _editorSharedStyles.akEditorTableBorder,
|
|
62
|
-
dark: _editorSharedStyles.akEditorTableBorderDark
|
|
63
|
-
})(props), tableCellMinWidth, (0, _components.themed)({
|
|
64
|
-
light: _editorSharedStyles.akEditorTableBorder,
|
|
65
|
-
dark: _editorSharedStyles.akEditorTableBorderDark
|
|
62
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-child > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]) {\n .code-block {\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n background-color: ", ";\n\n .line-number-gutter {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, (0, _components.themed)({
|
|
63
|
+
light: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorder),
|
|
64
|
+
dark: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorderDark)
|
|
65
|
+
})(props), (0, _tokens.token)('color.background.neutral.subtle', 'white'), tableCellMinWidth, (0, _components.themed)({
|
|
66
|
+
light: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorder),
|
|
67
|
+
dark: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorderDark)
|
|
66
68
|
})(props), tableCellPadding, _browser.default.gecko || _browser.default.ie || _browser.default.mac && _browser.default.chrome ? 'background-clip: padding-box;' : '', (0, _components.themed)({
|
|
67
69
|
dark: _editorSharedStyles.getTableCellBackgroundDarkModeColors
|
|
68
70
|
})(props), (0, _components.themed)({
|
|
69
|
-
light: _editorSharedStyles.akEditorTableToolbar,
|
|
70
|
-
dark: _editorSharedStyles.akEditorTableToolbarDark
|
|
71
|
+
light: (0, _tokens.token)('color.background.neutral', _editorSharedStyles.akEditorTableToolbar),
|
|
72
|
+
dark: (0, _tokens.token)('color.background.neutral', _editorSharedStyles.akEditorTableToolbarDark)
|
|
71
73
|
})(props), (0, _editorSharedStyles.overflowShadow)({
|
|
72
74
|
background: (0, _components.themed)({
|
|
73
75
|
light: 'rgb(235, 237, 240)',
|
|
@@ -75,11 +77,11 @@ var tableSharedStyle = function tableSharedStyle(props) {
|
|
|
75
77
|
})(props),
|
|
76
78
|
width: "".concat((0, _constants.gridSize)(), "px")
|
|
77
79
|
}), (0, _components.themed)({
|
|
78
|
-
light: 'rgb(235, 237, 240)',
|
|
79
|
-
dark: 'rgb(36, 47, 66)'
|
|
80
|
+
light: (0, _tokens.token)('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
81
|
+
dark: (0, _tokens.token)('color.background.neutral', 'rgb(36, 47, 66)')
|
|
80
82
|
})(props), (0, _components.themed)({
|
|
81
|
-
light: 'rgb(226, 229, 233)',
|
|
82
|
-
dark: _colors.DN20
|
|
83
|
+
light: (0, _tokens.token)('color.background.neutral', 'rgb(226, 229, 233)'),
|
|
84
|
+
dark: (0, _tokens.token)('color.background.neutral', _colors.DN20)
|
|
83
85
|
})(props), (0, _editorSharedStyles.overflowShadow)({
|
|
84
86
|
background: (0, _components.themed)({
|
|
85
87
|
light: 'rgb(235, 237, 240)',
|
|
@@ -87,11 +89,11 @@ var tableSharedStyle = function tableSharedStyle(props) {
|
|
|
87
89
|
})(props),
|
|
88
90
|
width: "".concat((0, _constants.gridSize)(), "px")
|
|
89
91
|
}), (0, _components.themed)({
|
|
90
|
-
light: 'rgb(235, 237, 240)',
|
|
91
|
-
dark: 'rgb(36, 47, 66)'
|
|
92
|
+
light: (0, _tokens.token)('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
93
|
+
dark: (0, _tokens.token)('color.background.neutral', 'rgb(36, 47, 66)')
|
|
92
94
|
})(props), (0, _components.themed)({
|
|
93
|
-
light: 'rgb(226, 229, 233)',
|
|
94
|
-
dark: _colors.DN20
|
|
95
|
+
light: (0, _tokens.token)('color.background.neutral', 'rgb(226, 229, 233)'),
|
|
96
|
+
dark: (0, _tokens.token)('color.background.neutral', _colors.DN20)
|
|
95
97
|
})(props));
|
|
96
98
|
};
|
|
97
99
|
|
|
@@ -29,6 +29,8 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
29
29
|
|
|
30
30
|
var _colors = require("@atlaskit/theme/colors");
|
|
31
31
|
|
|
32
|
+
var _tokens = require("@atlaskit/tokens");
|
|
33
|
+
|
|
32
34
|
var _messages = require("./messages");
|
|
33
35
|
|
|
34
36
|
var _templateObject, _templateObject2;
|
|
@@ -37,8 +39,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
37
39
|
|
|
38
40
|
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; } }
|
|
39
41
|
|
|
40
|
-
var captionWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 8px;\n text-align: center;\n position: relative;\n color: ", ";\n"])), _colors.N400);
|
|
41
|
-
var placeholderStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])), _colors.N200);
|
|
42
|
+
var captionWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 8px;\n text-align: center;\n position: relative;\n color: ", ";\n"])), (0, _tokens.token)('color.text.subtle', _colors.N400));
|
|
43
|
+
var placeholderStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])), (0, _tokens.token)('color.text.subtlest', _colors.N200));
|
|
42
44
|
|
|
43
45
|
var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
44
46
|
(0, _inherits2.default)(CaptionComponent, _React$Component);
|
|
@@ -29,6 +29,8 @@ var _components = require("@atlaskit/theme/components");
|
|
|
29
29
|
|
|
30
30
|
var _constants = require("@atlaskit/theme/constants");
|
|
31
31
|
|
|
32
|
+
var _tokens = require("@atlaskit/tokens");
|
|
33
|
+
|
|
32
34
|
var _excluded = ["children"];
|
|
33
35
|
|
|
34
36
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
@@ -61,16 +63,16 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
61
63
|
});
|
|
62
64
|
exports.messages = messages;
|
|
63
65
|
var BORDER_RADIUS = (0, _constants.gridSize)() / 2;
|
|
64
|
-
var EXPAND_COLLAPSED_BACKGROUND = 'transparent';
|
|
66
|
+
var EXPAND_COLLAPSED_BACKGROUND = (0, _tokens.token)('color.background.neutral.subtle', 'transparent');
|
|
65
67
|
var EXPAND_SELECTED_BACKGROUND = (0, _components.themed)({
|
|
66
|
-
light: 'rgba(255, 255, 255, 0.6)',
|
|
67
|
-
dark: 'rgba(9, 10, 11, 0.29)'
|
|
68
|
+
light: (0, _tokens.token)('elevation.surface', 'rgba(255, 255, 255, 0.6)'),
|
|
69
|
+
dark: (0, _tokens.token)('elevation.surface', 'rgba(9, 10, 11, 0.29)')
|
|
68
70
|
});
|
|
69
|
-
var EXPAND_FOCUSED_BORDER_COLOR = colors.B300;
|
|
71
|
+
var EXPAND_FOCUSED_BORDER_COLOR = (0, _tokens.token)('color.border.focused', colors.B300);
|
|
70
72
|
var EXPAND_COLLAPSED_BORDER_COLOR = 'transparent';
|
|
71
73
|
var EXPAND_EXPANDED_BORDER_COLOR = (0, _components.themed)({
|
|
72
|
-
light: colors.N40A,
|
|
73
|
-
dark: colors.DN50
|
|
74
|
+
light: (0, _tokens.token)('color.border', colors.N40A),
|
|
75
|
+
dark: (0, _tokens.token)('color.border', colors.DN50)
|
|
74
76
|
});
|
|
75
77
|
|
|
76
78
|
var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
|
|
@@ -87,9 +89,9 @@ exports.ExpandIconWrapper = ExpandIconWrapper;
|
|
|
87
89
|
|
|
88
90
|
var expandIconWrapperStyle = function expandIconWrapperStyle(props) {
|
|
89
91
|
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n display: flex;\n color: ", ";\n border-radius: ", "px;\n width: 24px;\n height: 24px;\n\n &:hover {\n background: ", ";\n }\n\n svg {\n transition: transform 0.2s ", ";\n }\n"])), (0, _components.themed)({
|
|
90
|
-
light: colors.N90,
|
|
91
|
-
dark: '#d9dde3'
|
|
92
|
-
})(props), (0, _constants.gridSize)() / 2, colors.N30A, _editorSharedStyles.akEditorSwoopCubicBezier);
|
|
92
|
+
light: (0, _tokens.token)('color.icon', colors.N90),
|
|
93
|
+
dark: (0, _tokens.token)('color.icon', '#d9dde3')
|
|
94
|
+
})(props), (0, _constants.gridSize)() / 2, (0, _tokens.token)('color.background.neutral.subtle.hovered', colors.N30A), _editorSharedStyles.akEditorSwoopCubicBezier);
|
|
93
95
|
};
|
|
94
96
|
|
|
95
97
|
var expandIconWrapperExpandedStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n svg {\n transform: rotate(90deg);\n }\n"])));
|
|
@@ -116,9 +118,9 @@ var containerStyles = function containerStyles(styleProps) {
|
|
|
116
118
|
var marginHorizontal = styleProps['data-node-type'] === 'expand' ? "-".concat(_editorSharedStyles.akLayoutGutterOffset, "px") : 0;
|
|
117
119
|
var margin = "".concat(marginTop, " ").concat(marginHorizontal, " ").concat(marginBottom);
|
|
118
120
|
return function (themeProps) {
|
|
119
|
-
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", "px;\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", "px;\n\n &:hover {\n border: 1px solid\n ", ";\n background: ", ";\n }\n\n td > &:first-child {\n margin-top: 0;\n }\n "])), focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR(themeProps) : EXPAND_COLLAPSED_BORDER_COLOR, BORDER_RADIUS, !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND(themeProps), margin, _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorSwoopCubicBezier, (0, _constants.gridSize)(), (0, _components.themed)({
|
|
120
|
-
light: colors.N50A,
|
|
121
|
-
dark: colors.DN50
|
|
121
|
+
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", "px;\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", "px;\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4152\n &:hover {\n border: 1px solid\n ", ";\n background: ", ";\n }\n\n td > &:first-child {\n margin-top: 0;\n }\n "])), focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR(themeProps) : EXPAND_COLLAPSED_BORDER_COLOR, BORDER_RADIUS, !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND(themeProps), margin, _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorSwoopCubicBezier, (0, _constants.gridSize)(), (0, _components.themed)({
|
|
122
|
+
light: (0, _tokens.token)('color.border', colors.N50A),
|
|
123
|
+
dark: (0, _tokens.token)('color.border', colors.DN50)
|
|
122
124
|
})(themeProps), EXPAND_SELECTED_BACKGROUND(themeProps));
|
|
123
125
|
};
|
|
124
126
|
};
|
|
@@ -131,18 +133,18 @@ var contentStyles = function contentStyles(styleProps) {
|
|
|
131
133
|
|
|
132
134
|
var titleInputStyles = function titleInputStyles(props) {
|
|
133
135
|
return (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n outline: none;\n border: none;\n font-size: ", ";\n line-height: ", ";\n font-weight: normal;\n color: ", ";\n background: transparent;\n display: flex;\n flex: 1;\n padding: 0 0 0 ", "px;\n width: 100%;\n\n &::placeholder {\n opacity: 0.6;\n color: ", ";\n }\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), _editorSharedStyles.akEditorLineHeight, (0, _components.themed)({
|
|
134
|
-
light: colors.N200A,
|
|
135
|
-
dark: colors.DN600
|
|
136
|
+
light: (0, _tokens.token)('color.text.subtlest', colors.N200A),
|
|
137
|
+
dark: (0, _tokens.token)('color.text.subtlest', colors.DN600)
|
|
136
138
|
})(props), (0, _constants.gridSize)() / 2, (0, _components.themed)({
|
|
137
|
-
light: colors.N200A,
|
|
138
|
-
dark: colors.DN600
|
|
139
|
+
light: (0, _tokens.token)('color.text.subtlest', colors.N200A),
|
|
140
|
+
dark: (0, _tokens.token)('color.text.subtlest', colors.DN600)
|
|
139
141
|
})(props));
|
|
140
142
|
};
|
|
141
143
|
|
|
142
144
|
var titleContainerStyles = function titleContainerStyles(props) {
|
|
143
145
|
return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0;\n display: flex;\n align-items: flex-start;\n background: none;\n border: none;\n font-size: ", ";\n width: 100%;\n color: ", ";\n overflow: hidden;\n cursor: pointer;\n // Prevent browser selection being inside the title container\n user-select: none;\n\n &:focus {\n outline: 0;\n }\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
|
|
144
|
-
light: colors.N300A,
|
|
145
|
-
dark: colors.DN600
|
|
146
|
+
light: (0, _tokens.token)('color.text.subtle', colors.N300A),
|
|
147
|
+
dark: (0, _tokens.token)('color.text.subtle', colors.DN600)
|
|
146
148
|
})(props));
|
|
147
149
|
};
|
|
148
150
|
|
|
@@ -21,13 +21,15 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
21
21
|
|
|
22
22
|
var _typography = require("@atlaskit/theme/typography");
|
|
23
23
|
|
|
24
|
+
var _tokens = require("@atlaskit/tokens");
|
|
25
|
+
|
|
24
26
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
25
27
|
|
|
26
|
-
var errorColor = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _colors.R400);
|
|
27
|
-
var validColor = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _colors.G400);
|
|
28
|
+
var errorColor = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _tokens.token)('color.text.danger', _colors.R400));
|
|
29
|
+
var validColor = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _tokens.token)('color.text.success', _colors.G400));
|
|
28
30
|
|
|
29
31
|
var messageStyle = function messageStyle(props) {
|
|
30
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", "px;\n display: flex;\n justify-content: baseline;\n"])), (0, _typography.h200)(props), _colors.N200, (0, _constants.gridSize)() / 2);
|
|
32
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", "px;\n display: flex;\n justify-content: baseline;\n"])), (0, _typography.h200)(props), (0, _tokens.token)('color.text.subtlest', _colors.N200), (0, _constants.gridSize)() / 2);
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
var iconWrapperStyle = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-right: 4px;\n"])));
|
|
@@ -25,6 +25,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
25
25
|
|
|
26
26
|
var _constants = require("@atlaskit/theme/constants");
|
|
27
27
|
|
|
28
|
+
var _tokens = require("@atlaskit/tokens");
|
|
29
|
+
|
|
28
30
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
29
31
|
|
|
30
32
|
var _unsupportedContent = require("../../messages/unsupportedContent");
|
|
@@ -41,7 +43,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
41
43
|
|
|
42
44
|
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; }
|
|
43
45
|
|
|
44
|
-
var blockNodeStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n font-size: ", ";\n margin: 10px 0;\n min-height: 24px;\n padding: 10px;\n text-align: center;\n vertical-align: text-bottom;\n min-width: 120px;\n align-items: center;\n justify-content: center;\n"])), _colors.N30, _colors.N50, (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
46
|
+
var blockNodeStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n font-size: ", ";\n margin: 10px 0;\n min-height: 24px;\n padding: 10px;\n text-align: center;\n vertical-align: text-bottom;\n min-width: 120px;\n align-items: center;\n justify-content: center;\n"])), (0, _tokens.token)('color.background.disabled', _colors.N30), (0, _tokens.token)('color.border.disabled', _colors.N50), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
45
47
|
|
|
46
48
|
var UnsupportedBlockNode = function UnsupportedBlockNode(_ref) {
|
|
47
49
|
var node = _ref.node,
|
|
@@ -25,6 +25,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
25
25
|
|
|
26
26
|
var _constants = require("@atlaskit/theme/constants");
|
|
27
27
|
|
|
28
|
+
var _tokens = require("@atlaskit/tokens");
|
|
29
|
+
|
|
28
30
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
29
31
|
|
|
30
32
|
var _unsupportedContent = require("../../messages/unsupportedContent");
|
|
@@ -41,7 +43,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
41
43
|
|
|
42
44
|
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; }
|
|
43
45
|
|
|
44
|
-
var inlineNodeStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 10px;\n vertical-align: middle;\n white-space: nowrap;\n"])), _colors.N30, _colors.N50, (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
46
|
+
var inlineNodeStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 10px;\n vertical-align: middle;\n white-space: nowrap;\n"])), (0, _tokens.token)('color.background.disabled', _colors.N30), (0, _tokens.token)('color.border.disabled', _colors.N50), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
45
47
|
|
|
46
48
|
var UnsupportedInlineNode = function UnsupportedInlineNode(_ref) {
|
|
47
49
|
var node = _ref.node,
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
|
|
3
3
|
import { themed } from '@atlaskit/theme/components';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
export const annotationPrefix = 'ak-editor-annotation';
|
|
5
6
|
export const AnnotationSharedClassNames = {
|
|
6
7
|
focus: `${annotationPrefix}-focus`,
|
|
@@ -14,16 +15,22 @@ const Y200a = 'rgba(255, 196, 0, 0.82)';
|
|
|
14
15
|
const DY75a = 'rgba(111, 92, 37, 0.5)';
|
|
15
16
|
const DY200 = '#82641c';
|
|
16
17
|
export const AnnotationSharedCSSByState = props => ({
|
|
18
|
+
/* eslint-disable */
|
|
17
19
|
focus: css`
|
|
20
|
+
// Background is not coming through in confluence, suspecting to be caused by some specific combination of
|
|
21
|
+
// emotion and token look up
|
|
22
|
+
|
|
18
23
|
background: ${themed({
|
|
19
24
|
light: Y75,
|
|
20
25
|
dark: DY75
|
|
21
26
|
})(props)};
|
|
22
|
-
border-bottom: 2px solid
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
border-bottom: 2px solid
|
|
28
|
+
${themed({
|
|
29
|
+
light: token('color.border.accent.yellow', Y300),
|
|
30
|
+
dark: token('color.border.accent.yellow', DY300)
|
|
25
31
|
})(props)};
|
|
26
|
-
|
|
32
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4147
|
|
33
|
+
box-shadow: ${token('elevation.shadow.overlay', `1px 2px 3px ${N60A}, -1px 2px 3px ${N60A}`)};
|
|
27
34
|
cursor: pointer;
|
|
28
35
|
`,
|
|
29
36
|
blur: css`
|
|
@@ -31,12 +38,15 @@ export const AnnotationSharedCSSByState = props => ({
|
|
|
31
38
|
light: Y75a,
|
|
32
39
|
dark: DY75a
|
|
33
40
|
})(props)};
|
|
34
|
-
border-bottom: 2px solid
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
border-bottom: 2px solid
|
|
42
|
+
${themed({
|
|
43
|
+
light: token('color.border.accent.yellow', Y200a),
|
|
44
|
+
dark: token('color.border.accent.yellow', DY200)
|
|
37
45
|
})(props)};
|
|
38
46
|
cursor: pointer;
|
|
39
47
|
`
|
|
48
|
+
/* eslint-enable */
|
|
49
|
+
|
|
40
50
|
});
|
|
41
51
|
export const annotationSharedStyles = props => css`
|
|
42
52
|
.ProseMirror {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
export const blockquoteSharedStyles = css`
|
|
5
6
|
& blockquote {
|
|
6
7
|
box-sizing: border-box;
|
|
7
8
|
padding-left: ${gridSize() * 2}px;
|
|
8
|
-
border-left: 2px solid
|
|
9
|
+
border-left: 2px solid
|
|
10
|
+
${token('color.border', akEditorBlockquoteBorderColor)};
|
|
9
11
|
margin: ${blockNodesVerticalMargin} 0 0 0;
|
|
10
12
|
margin-right: 0;
|
|
11
13
|
|
|
@@ -2,13 +2,14 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { getCodeStyles } from '@atlaskit/code/inline';
|
|
3
3
|
import { DN70, N30A } from '@atlaskit/theme/colors';
|
|
4
4
|
import { getTheme, themed } from '@atlaskit/theme/components';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
export const codeMarkSharedStyles = props => {
|
|
6
7
|
const theme = getTheme(props);
|
|
7
8
|
return css`
|
|
8
9
|
.code {
|
|
9
10
|
--ds--code--bg-color: ${themed({
|
|
10
|
-
light: N30A,
|
|
11
|
-
dark: DN70
|
|
11
|
+
light: token('color.background.neutral', N30A),
|
|
12
|
+
dark: token('color.background.neutral', DN70)
|
|
12
13
|
})(props)};
|
|
13
14
|
${getCodeStyles(theme)}
|
|
14
15
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4066
|
|
1
3
|
import { css } from '@emotion/react';
|
|
2
4
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
3
5
|
import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
@@ -2,9 +2,10 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { DN50, N30A } from '@atlaskit/theme/colors';
|
|
4
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
const divider = themed({
|
|
6
|
-
light: N30A,
|
|
7
|
-
dark: DN50
|
|
7
|
+
light: token('color.border', N30A),
|
|
8
|
+
dark: token('color.border', DN50)
|
|
8
9
|
}); // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
9
10
|
|
|
10
11
|
export const ruleSharedStyles = props => css`
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4116
|
|
1
3
|
import { css } from '@emotion/react';
|
|
2
4
|
import { akEditorShadowZIndex } from '@atlaskit/editor-shared-styles';
|
|
3
5
|
import { N40A } from '@atlaskit/theme/colors';
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4118
|
|
3
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4153
|
|
1
4
|
import { css } from '@emotion/react';
|
|
2
5
|
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
|
|
3
6
|
import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorTableToolbarDark, akEditorWideLayoutWidth, getTableCellBackgroundDarkModeColors, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
4
7
|
import { DN20 } from '@atlaskit/theme/colors';
|
|
5
8
|
import { themed } from '@atlaskit/theme/components';
|
|
6
9
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
7
11
|
import browser from '../../utils/browser';
|
|
8
12
|
export const tableMarginTop = 24;
|
|
9
13
|
export const tableMarginBottom = 16;
|
|
@@ -60,8 +64,8 @@ const tableSharedStyle = props => css`
|
|
|
60
64
|
border-collapse: collapse;
|
|
61
65
|
border: ${tableCellBorderWidth}px solid
|
|
62
66
|
${themed({
|
|
63
|
-
light: akEditorTableBorder,
|
|
64
|
-
dark: akEditorTableBorderDark
|
|
67
|
+
light: token('color.border', akEditorTableBorder),
|
|
68
|
+
dark: token('color.border', akEditorTableBorderDark)
|
|
65
69
|
})(props)};
|
|
66
70
|
table-layout: fixed;
|
|
67
71
|
font-size: 1em;
|
|
@@ -83,7 +87,7 @@ const tableSharedStyle = props => css`
|
|
|
83
87
|
border-bottom: none;
|
|
84
88
|
}
|
|
85
89
|
th td {
|
|
86
|
-
background-color: white;
|
|
90
|
+
background-color: ${token('color.background.neutral.subtle', 'white')};
|
|
87
91
|
}
|
|
88
92
|
th,
|
|
89
93
|
td {
|
|
@@ -92,8 +96,8 @@ const tableSharedStyle = props => css`
|
|
|
92
96
|
vertical-align: top;
|
|
93
97
|
border: 1px solid
|
|
94
98
|
${themed({
|
|
95
|
-
light: akEditorTableBorder,
|
|
96
|
-
dark: akEditorTableBorderDark
|
|
99
|
+
light: token('color.border', akEditorTableBorder),
|
|
100
|
+
dark: token('color.border', akEditorTableBorderDark)
|
|
97
101
|
})(props)};
|
|
98
102
|
border-right-width: 0;
|
|
99
103
|
border-bottom-width: 0;
|
|
@@ -124,8 +128,8 @@ const tableSharedStyle = props => css`
|
|
|
124
128
|
}
|
|
125
129
|
th {
|
|
126
130
|
background-color: ${themed({
|
|
127
|
-
light: akEditorTableToolbar,
|
|
128
|
-
dark: akEditorTableToolbarDark
|
|
131
|
+
light: token('color.background.neutral', akEditorTableToolbar),
|
|
132
|
+
dark: token('color.background.neutral', akEditorTableToolbarDark)
|
|
129
133
|
})(props)};
|
|
130
134
|
text-align: left;
|
|
131
135
|
|
|
@@ -143,14 +147,14 @@ const tableSharedStyle = props => css`
|
|
|
143
147
|
background-attachment: local, scroll, scroll;
|
|
144
148
|
background-position: 100% 0, 100% 0, 0 0;
|
|
145
149
|
background-color: ${themed({
|
|
146
|
-
light: 'rgb(235, 237, 240)',
|
|
147
|
-
dark: 'rgb(36, 47, 66)'
|
|
150
|
+
light: token('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
151
|
+
dark: token('color.background.neutral', 'rgb(36, 47, 66)')
|
|
148
152
|
})(props)};
|
|
149
153
|
|
|
150
154
|
.line-number-gutter {
|
|
151
155
|
background-color: ${themed({
|
|
152
|
-
light: 'rgb(226, 229, 233)',
|
|
153
|
-
dark: DN20
|
|
156
|
+
light: token('color.background.neutral', 'rgb(226, 229, 233)'),
|
|
157
|
+
dark: token('color.background.neutral', DN20)
|
|
154
158
|
})(props)};
|
|
155
159
|
}
|
|
156
160
|
|
|
@@ -165,14 +169,14 @@ const tableSharedStyle = props => css`
|
|
|
165
169
|
})}!important;
|
|
166
170
|
|
|
167
171
|
background-color: ${themed({
|
|
168
|
-
light: 'rgb(235, 237, 240)',
|
|
169
|
-
dark: 'rgb(36, 47, 66)'
|
|
172
|
+
light: token('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
173
|
+
dark: token('color.background.neutral', 'rgb(36, 47, 66)')
|
|
170
174
|
})(props)}!important;
|
|
171
175
|
|
|
172
176
|
// selector lives inside @atlaskit/code
|
|
173
177
|
--ds--code--line-number-bg-color: ${themed({
|
|
174
|
-
light: 'rgb(226, 229, 233)',
|
|
175
|
-
dark: DN20
|
|
178
|
+
light: token('color.background.neutral', 'rgb(226, 229, 233)'),
|
|
179
|
+
dark: token('color.background.neutral', DN20)
|
|
176
180
|
})(props)};
|
|
177
181
|
}
|
|
178
182
|
}
|