@atlaskit/editor-common 66.0.5 → 67.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/styles/shared/annotation.js +12 -7
  3. package/dist/cjs/styles/shared/blockquote.js +3 -1
  4. package/dist/cjs/styles/shared/code-mark.js +4 -2
  5. package/dist/cjs/styles/shared/rule.js +4 -2
  6. package/dist/cjs/styles/shared/table.js +18 -16
  7. package/dist/cjs/ui/Caption/index.js +4 -2
  8. package/dist/cjs/ui/Expand/index.js +20 -18
  9. package/dist/cjs/ui/Messages/index.js +5 -3
  10. package/dist/cjs/ui/UnsupportedBlock/index.js +3 -1
  11. package/dist/cjs/ui/UnsupportedInline/index.js +3 -1
  12. package/dist/cjs/version.json +1 -1
  13. package/dist/es2019/styles/shared/annotation.js +17 -7
  14. package/dist/es2019/styles/shared/blockquote.js +3 -1
  15. package/dist/es2019/styles/shared/code-mark.js +3 -2
  16. package/dist/es2019/styles/shared/panel.js +2 -0
  17. package/dist/es2019/styles/shared/rule.js +3 -2
  18. package/dist/es2019/styles/shared/shadow.js +2 -0
  19. package/dist/es2019/styles/shared/table.js +19 -15
  20. package/dist/es2019/ui/Caption/index.js +3 -2
  21. package/dist/es2019/ui/Expand/index.js +19 -17
  22. package/dist/es2019/ui/Messages/index.js +4 -3
  23. package/dist/es2019/ui/UnsupportedBlock/index.js +3 -2
  24. package/dist/es2019/ui/UnsupportedInline/index.js +3 -2
  25. package/dist/es2019/version.json +1 -1
  26. package/dist/esm/styles/shared/annotation.js +11 -7
  27. package/dist/esm/styles/shared/blockquote.js +2 -1
  28. package/dist/esm/styles/shared/code-mark.js +3 -2
  29. package/dist/esm/styles/shared/panel.js +2 -0
  30. package/dist/esm/styles/shared/rule.js +3 -2
  31. package/dist/esm/styles/shared/shadow.js +2 -0
  32. package/dist/esm/styles/shared/table.js +20 -16
  33. package/dist/esm/ui/Caption/index.js +3 -2
  34. package/dist/esm/ui/Expand/index.js +19 -18
  35. package/dist/esm/ui/Messages/index.js +4 -3
  36. package/dist/esm/ui/UnsupportedBlock/index.js +2 -1
  37. package/dist/esm/ui/UnsupportedInline/index.js +2 -1
  38. package/dist/esm/version.json +1 -1
  39. package/package.json +12 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 67.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`025ee31e9bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/025ee31e9bc) - [ux] Instrumented `@atlaskit/editor-common` with the new theming package, `@atlaskit/tokens`.
8
+
9
+ New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
10
+ These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking change.
11
+
12
+ - [`bd24b9d71d2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bd24b9d71d2) - [ux] Instrumented `@atlaskit/renderer` with the new theming package, `@atlaskit/tokens`.
13
+
14
+ New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
15
+ These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
16
+
17
+ ### Patch Changes
18
+
19
+ - [`facd9f48e88`](https://bitbucket.org/atlassian/atlassian-frontend/commits/facd9f48e88) - Fixed confluence inline comment missing background colour.
20
+ - Updated dependencies
21
+
3
22
  ## 66.0.5
4
23
 
5
24
  ### Patch Changes
@@ -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
- focus: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-bottom: 2px solid ", ";\n box-shadow: 1px 2px 3px ", ", -1px 2px 3px ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
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 ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
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 ", ";\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, _editorSharedStyles.akEditorBlockquoteBorderColor, _editorSharedStyles.blockNodesVerticalMargin, (0, _constants.gridSize)() * 2);
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: white;\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)({
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,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "66.0.5",
3
+ "version": "67.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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 ${themed({
23
- light: Y300,
24
- dark: DY300
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
- box-shadow: 1px 2px 3px ${N60A}, -1px 2px 3px ${N60A};
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 ${themed({
35
- light: Y200a,
36
- dark: DY200
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 ${akEditorBlockquoteBorderColor};
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
  }
@@ -5,15 +5,16 @@ import React from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import { injectIntl } from 'react-intl-next';
7
7
  import { N200, N400 } from '@atlaskit/theme/colors';
8
+ import { token } from '@atlaskit/tokens';
8
9
  import { messages } from './messages';
9
10
  const captionWrapperStyle = css`
10
11
  margin-top: 8px;
11
12
  text-align: center;
12
13
  position: relative;
13
- color: ${N400};
14
+ color: ${token('color.text.subtle', N400)};
14
15
  `;
15
16
  const placeholderStyle = css`
16
- color: ${N200};
17
+ color: ${token('color.text.subtlest', N200)};
17
18
  position: absolute;
18
19
  top: 0;
19
20
  width: 100%;
@@ -8,6 +8,7 @@ import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, rel
8
8
  import * as colors from '@atlaskit/theme/colors';
9
9
  import { themed } from '@atlaskit/theme/components';
10
10
  import { fontSize, gridSize } from '@atlaskit/theme/constants';
11
+ import { token } from '@atlaskit/tokens';
11
12
  export const messages = defineMessages({
12
13
  collapseNode: {
13
14
  id: 'fabric.editor.collapseNode',
@@ -31,16 +32,16 @@ export const messages = defineMessages({
31
32
  }
32
33
  });
33
34
  const BORDER_RADIUS = gridSize() / 2;
34
- const EXPAND_COLLAPSED_BACKGROUND = 'transparent';
35
+ const EXPAND_COLLAPSED_BACKGROUND = token('color.background.neutral.subtle', 'transparent');
35
36
  const EXPAND_SELECTED_BACKGROUND = themed({
36
- light: 'rgba(255, 255, 255, 0.6)',
37
- dark: 'rgba(9, 10, 11, 0.29)'
37
+ light: token('elevation.surface', 'rgba(255, 255, 255, 0.6)'),
38
+ dark: token('elevation.surface', 'rgba(9, 10, 11, 0.29)')
38
39
  });
39
- const EXPAND_FOCUSED_BORDER_COLOR = colors.B300;
40
+ const EXPAND_FOCUSED_BORDER_COLOR = token('color.border.focused', colors.B300);
40
41
  const EXPAND_COLLAPSED_BORDER_COLOR = 'transparent';
41
42
  const EXPAND_EXPANDED_BORDER_COLOR = themed({
42
- light: colors.N40A,
43
- dark: colors.DN50
43
+ light: token('color.border', colors.N40A),
44
+ dark: token('color.border', colors.DN50)
44
45
  });
45
46
  export const ExpandIconWrapper = ({
46
47
  children,
@@ -55,15 +56,15 @@ const expandIconWrapperStyle = props => css`
55
56
  cursor: pointer;
56
57
  display: flex;
57
58
  color: ${themed({
58
- light: colors.N90,
59
- dark: '#d9dde3'
59
+ light: token('color.icon', colors.N90),
60
+ dark: token('color.icon', '#d9dde3')
60
61
  })(props)};
61
62
  border-radius: ${gridSize() / 2}px;
62
63
  width: 24px;
63
64
  height: 24px;
64
65
 
65
66
  &:hover {
66
- background: ${colors.N30A};
67
+ background: ${token('color.background.neutral.subtle.hovered', colors.N30A)};
67
68
  }
68
69
 
69
70
  svg {
@@ -116,11 +117,12 @@ const containerStyles = styleProps => {
116
117
  border-color 0.3s ${akEditorSwoopCubicBezier};
117
118
  padding: ${gridSize()}px;
118
119
 
120
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4152
119
121
  &:hover {
120
122
  border: 1px solid
121
123
  ${themed({
122
- light: colors.N50A,
123
- dark: colors.DN50
124
+ light: token('color.border', colors.N50A),
125
+ dark: token('color.border', colors.DN50)
124
126
  })(themeProps)};
125
127
  background: ${EXPAND_SELECTED_BACKGROUND(themeProps)};
126
128
  }
@@ -166,8 +168,8 @@ const titleInputStyles = props => css`
166
168
  line-height: ${akEditorLineHeight};
167
169
  font-weight: normal;
168
170
  color: ${themed({
169
- light: colors.N200A,
170
- dark: colors.DN600
171
+ light: token('color.text.subtlest', colors.N200A),
172
+ dark: token('color.text.subtlest', colors.DN600)
171
173
  })(props)};
172
174
  background: transparent;
173
175
  display: flex;
@@ -178,8 +180,8 @@ const titleInputStyles = props => css`
178
180
  &::placeholder {
179
181
  opacity: 0.6;
180
182
  color: ${themed({
181
- light: colors.N200A,
182
- dark: colors.DN600
183
+ light: token('color.text.subtlest', colors.N200A),
184
+ dark: token('color.text.subtlest', colors.DN600)
183
185
  })(props)};
184
186
  }
185
187
  `;
@@ -193,8 +195,8 @@ const titleContainerStyles = props => css`
193
195
  font-size: ${relativeFontSizeToBase16(fontSize())};
194
196
  width: 100%;
195
197
  color: ${themed({
196
- light: colors.N300A,
197
- dark: colors.DN600
198
+ light: token('color.text.subtle', colors.N300A),
199
+ dark: token('color.text.subtle', colors.DN600)
198
200
  })(props)};
199
201
  overflow: hidden;
200
202
  cursor: pointer;
@@ -5,16 +5,17 @@ import ErrorIcon from '@atlaskit/icon/glyph/error';
5
5
  import { G400, N200, R400 } from '@atlaskit/theme/colors';
6
6
  import { gridSize } from '@atlaskit/theme/constants';
7
7
  import { h200 } from '@atlaskit/theme/typography';
8
+ import { token } from '@atlaskit/tokens';
8
9
  const errorColor = css`
9
- color: ${R400};
10
+ color: ${token('color.text.danger', R400)};
10
11
  `;
11
12
  const validColor = css`
12
- color: ${G400};
13
+ color: ${token('color.text.success', G400)};
13
14
  `;
14
15
 
15
16
  const messageStyle = props => css`
16
17
  ${h200(props)} font-weight: normal;
17
- color: ${N200};
18
+ color: ${token('color.text.subtlest', N200)};
18
19
  margin-top: ${gridSize() / 2}px;
19
20
  display: flex;
20
21
  justify-content: baseline;
@@ -6,14 +6,15 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
6
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
7
7
  import { N30, N50 } from '@atlaskit/theme/colors';
8
8
  import { borderRadius, fontSize } from '@atlaskit/theme/constants';
9
+ import { token } from '@atlaskit/tokens';
9
10
  import Tooltip from '@atlaskit/tooltip';
10
11
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
11
12
  import { ACTION_SUBJECT_ID } from '../../utils/analytics';
12
13
  import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
13
14
  import { getUnsupportedContent } from '../unsupported-content-helper';
14
15
  const blockNodeStyle = css`
15
- background: ${N30};
16
- border: 1px dashed ${N50};
16
+ background: ${token('color.background.disabled', N30)};
17
+ border: 1px dashed ${token('color.border.disabled', N50)};
17
18
  border-radius: ${borderRadius()}px;
18
19
  box-sizing: border-box;
19
20
  cursor: default;
@@ -6,6 +6,7 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
6
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
7
7
  import { N30, N50 } from '@atlaskit/theme/colors';
8
8
  import { borderRadius, fontSize } from '@atlaskit/theme/constants';
9
+ import { token } from '@atlaskit/tokens';
9
10
  import Tooltip from '@atlaskit/tooltip';
10
11
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
11
12
  import { ACTION_SUBJECT_ID } from '../../utils/analytics';
@@ -13,8 +14,8 @@ import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-un
13
14
  import { getUnsupportedContent } from '../unsupported-content-helper';
14
15
  const inlineNodeStyle = css`
15
16
  align-items: center;
16
- background: ${N30};
17
- border: 1px dashed ${N50};
17
+ background: ${token('color.background.disabled', N30)};
18
+ border: 1px dashed ${token('color.border.disabled', N50)};
18
19
  border-radius: ${borderRadius()}px;
19
20
  box-sizing: border-box;
20
21
  cursor: default;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "66.0.5",
3
+ "version": "67.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -5,6 +5,7 @@ var _templateObject, _templateObject2, _templateObject3;
5
5
  import { css } from '@emotion/react';
6
6
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
7
7
  import { themed } from '@atlaskit/theme/components';
8
+ import { token } from '@atlaskit/tokens';
8
9
  export var annotationPrefix = 'ak-editor-annotation';
9
10
  export var AnnotationSharedClassNames = {
10
11
  focus: "".concat(annotationPrefix, "-focus"),
@@ -19,20 +20,23 @@ var DY75a = 'rgba(111, 92, 37, 0.5)';
19
20
  var DY200 = '#82641c';
20
21
  export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
21
22
  return {
22
- focus: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid ", ";\n box-shadow: 1px 2px 3px ", ", -1px 2px 3px ", ";\n cursor: pointer;\n "])), themed({
23
+ /* eslint-disable */
24
+ focus: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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 "])), themed({
23
25
  light: Y75,
24
26
  dark: DY75
25
27
  })(props), themed({
26
- light: Y300,
27
- dark: DY300
28
- })(props), N60A, N60A),
29
- blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n "])), themed({
28
+ light: token('color.border.accent.yellow', Y300),
29
+ dark: token('color.border.accent.yellow', DY300)
30
+ })(props), token('elevation.shadow.overlay', "1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A))),
31
+ blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid\n ", ";\n cursor: pointer;\n "])), themed({
30
32
  light: Y75a,
31
33
  dark: DY75a
32
34
  })(props), themed({
33
- light: Y200a,
34
- dark: DY200
35
+ light: token('color.border.accent.yellow', Y200a),
36
+ dark: token('color.border.accent.yellow', DY200)
35
37
  })(props))
38
+ /* eslint-enable */
39
+
36
40
  };
37
41
  };
38
42
  export var annotationSharedStyles = function annotationSharedStyles(props) {
@@ -5,4 +5,5 @@ var _templateObject;
5
5
  import { css } from '@emotion/react';
6
6
  import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
7
7
  import { gridSize } from '@atlaskit/theme/constants';
8
- export var blockquoteSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\n border-left: 2px solid ", ";\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"])), gridSize() * 2, akEditorBlockquoteBorderColor, blockNodesVerticalMargin, gridSize() * 2);
8
+ import { token } from '@atlaskit/tokens';
9
+ export var blockquoteSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), gridSize() * 2, token('color.border', akEditorBlockquoteBorderColor), blockNodesVerticalMargin, gridSize() * 2);
@@ -6,10 +6,11 @@ import { css } from '@emotion/react';
6
6
  import { getCodeStyles } from '@atlaskit/code/inline';
7
7
  import { DN70, N30A } from '@atlaskit/theme/colors';
8
8
  import { getTheme, themed } from '@atlaskit/theme/components';
9
+ import { token } from '@atlaskit/tokens';
9
10
  export var codeMarkSharedStyles = function codeMarkSharedStyles(props) {
10
11
  var theme = getTheme(props);
11
12
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), themed({
12
- light: N30A,
13
- dark: DN70
13
+ light: token('color.background.neutral', N30A),
14
+ dark: token('color.background.neutral', DN70)
14
15
  })(props), getCodeStyles(theme));
15
16
  };
@@ -3,6 +3,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
 
4
4
  var _templateObject, _templateObject2;
5
5
 
6
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
7
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4066
6
8
  import { css } from '@emotion/react';
7
9
  import { PanelType } from '@atlaskit/adf-schema';
8
10
  import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
@@ -6,9 +6,10 @@ import { css } from '@emotion/react';
6
6
  import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
7
7
  import { DN50, N30A } from '@atlaskit/theme/colors';
8
8
  import { themed } from '@atlaskit/theme/components';
9
+ import { token } from '@atlaskit/tokens';
9
10
  var divider = themed({
10
- light: N30A,
11
- dark: DN50
11
+ light: token('color.border', N30A),
12
+ dark: token('color.border', DN50)
12
13
  }); // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
13
14
 
14
15
  export var ruleSharedStyles = function ruleSharedStyles(props) {
@@ -2,6 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
6
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4116
5
7
  import { css } from '@emotion/react';
6
8
  import { akEditorShadowZIndex } from '@atlaskit/editor-shared-styles';
7
9
  import { N40A } from '@atlaskit/theme/colors';
@@ -2,12 +2,16 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
6
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4118
7
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4153
5
8
  import { css } from '@emotion/react';
6
9
  import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
7
10
  import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorTableToolbarDark, akEditorWideLayoutWidth, getTableCellBackgroundDarkModeColors, overflowShadow } from '@atlaskit/editor-shared-styles';
8
11
  import { DN20 } from '@atlaskit/theme/colors';
9
12
  import { themed } from '@atlaskit/theme/components';
10
13
  import { gridSize } from '@atlaskit/theme/constants';
14
+ import { token } from '@atlaskit/tokens';
11
15
  import browser from '../../utils/browser';
12
16
  export var tableMarginTop = 24;
13
17
  export var tableMarginBottom = 16;
@@ -32,17 +36,17 @@ export var TableSharedCssClassName = {
32
36
  };
33
37
 
34
38
  var tableSharedStyle = function tableSharedStyle(props) {
35
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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: white;\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, 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, themed({
36
- light: akEditorTableBorder,
37
- dark: akEditorTableBorderDark
38
- })(props), tableCellMinWidth, themed({
39
- light: akEditorTableBorder,
40
- dark: akEditorTableBorderDark
39
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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, 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, themed({
40
+ light: token('color.border', akEditorTableBorder),
41
+ dark: token('color.border', akEditorTableBorderDark)
42
+ })(props), token('color.background.neutral.subtle', 'white'), tableCellMinWidth, themed({
43
+ light: token('color.border', akEditorTableBorder),
44
+ dark: token('color.border', akEditorTableBorderDark)
41
45
  })(props), tableCellPadding, browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', themed({
42
46
  dark: getTableCellBackgroundDarkModeColors
43
47
  })(props), themed({
44
- light: akEditorTableToolbar,
45
- dark: akEditorTableToolbarDark
48
+ light: token('color.background.neutral', akEditorTableToolbar),
49
+ dark: token('color.background.neutral', akEditorTableToolbarDark)
46
50
  })(props), overflowShadow({
47
51
  background: themed({
48
52
  light: 'rgb(235, 237, 240)',
@@ -50,11 +54,11 @@ var tableSharedStyle = function tableSharedStyle(props) {
50
54
  })(props),
51
55
  width: "".concat(gridSize(), "px")
52
56
  }), themed({
53
- light: 'rgb(235, 237, 240)',
54
- dark: 'rgb(36, 47, 66)'
57
+ light: token('color.background.neutral', 'rgb(235, 237, 240)'),
58
+ dark: token('color.background.neutral', 'rgb(36, 47, 66)')
55
59
  })(props), themed({
56
- light: 'rgb(226, 229, 233)',
57
- dark: DN20
60
+ light: token('color.background.neutral', 'rgb(226, 229, 233)'),
61
+ dark: token('color.background.neutral', DN20)
58
62
  })(props), overflowShadow({
59
63
  background: themed({
60
64
  light: 'rgb(235, 237, 240)',
@@ -62,11 +66,11 @@ var tableSharedStyle = function tableSharedStyle(props) {
62
66
  })(props),
63
67
  width: "".concat(gridSize(), "px")
64
68
  }), themed({
65
- light: 'rgb(235, 237, 240)',
66
- dark: 'rgb(36, 47, 66)'
69
+ light: token('color.background.neutral', 'rgb(235, 237, 240)'),
70
+ dark: token('color.background.neutral', 'rgb(36, 47, 66)')
67
71
  })(props), themed({
68
- light: 'rgb(226, 229, 233)',
69
- dark: DN20
72
+ light: token('color.background.neutral', 'rgb(226, 229, 233)'),
73
+ dark: token('color.background.neutral', DN20)
70
74
  })(props));
71
75
  };
72
76
 
@@ -17,9 +17,10 @@ import React from 'react';
17
17
  import { css, jsx } from '@emotion/react';
18
18
  import { injectIntl } from 'react-intl-next';
19
19
  import { N200, N400 } from '@atlaskit/theme/colors';
20
+ import { token } from '@atlaskit/tokens';
20
21
  import { messages } from './messages';
21
- var captionWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: 8px;\n text-align: center;\n position: relative;\n color: ", ";\n"])), N400);
22
- var placeholderStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])), N200);
22
+ var captionWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: 8px;\n text-align: center;\n position: relative;\n color: ", ";\n"])), token('color.text.subtle', N400));
23
+ var placeholderStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])), token('color.text.subtlest', N200));
23
24
  export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
24
25
  _inherits(CaptionComponent, _React$Component);
25
26
 
@@ -13,6 +13,7 @@ import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, rel
13
13
  import * as colors from '@atlaskit/theme/colors';
14
14
  import { themed } from '@atlaskit/theme/components';
15
15
  import { fontSize, gridSize } from '@atlaskit/theme/constants';
16
+ import { token } from '@atlaskit/tokens';
16
17
  export var messages = defineMessages({
17
18
  collapseNode: {
18
19
  id: 'fabric.editor.collapseNode',
@@ -36,16 +37,16 @@ export var messages = defineMessages({
36
37
  }
37
38
  });
38
39
  var BORDER_RADIUS = gridSize() / 2;
39
- var EXPAND_COLLAPSED_BACKGROUND = 'transparent';
40
+ var EXPAND_COLLAPSED_BACKGROUND = token('color.background.neutral.subtle', 'transparent');
40
41
  var EXPAND_SELECTED_BACKGROUND = themed({
41
- light: 'rgba(255, 255, 255, 0.6)',
42
- dark: 'rgba(9, 10, 11, 0.29)'
42
+ light: token('elevation.surface', 'rgba(255, 255, 255, 0.6)'),
43
+ dark: token('elevation.surface', 'rgba(9, 10, 11, 0.29)')
43
44
  });
44
- var EXPAND_FOCUSED_BORDER_COLOR = colors.B300;
45
+ var EXPAND_FOCUSED_BORDER_COLOR = token('color.border.focused', colors.B300);
45
46
  var EXPAND_COLLAPSED_BORDER_COLOR = 'transparent';
46
47
  var EXPAND_EXPANDED_BORDER_COLOR = themed({
47
- light: colors.N40A,
48
- dark: colors.DN50
48
+ light: token('color.border', colors.N40A),
49
+ dark: token('color.border', colors.DN50)
49
50
  });
50
51
  export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
51
52
  var children = _ref.children,
@@ -59,9 +60,9 @@ export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
59
60
 
60
61
  var expandIconWrapperStyle = function expandIconWrapperStyle(props) {
61
62
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), themed({
62
- light: colors.N90,
63
- dark: '#d9dde3'
64
- })(props), gridSize() / 2, colors.N30A, akEditorSwoopCubicBezier);
63
+ light: token('color.icon', colors.N90),
64
+ dark: token('color.icon', '#d9dde3')
65
+ })(props), gridSize() / 2, token('color.background.neutral.subtle.hovered', colors.N30A), akEditorSwoopCubicBezier);
65
66
  };
66
67
 
67
68
  var expandIconWrapperExpandedStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n svg {\n transform: rotate(90deg);\n }\n"])));
@@ -87,9 +88,9 @@ var containerStyles = function containerStyles(styleProps) {
87
88
  var marginHorizontal = styleProps['data-node-type'] === 'expand' ? "-".concat(akLayoutGutterOffset, "px") : 0;
88
89
  var margin = "".concat(marginTop, " ").concat(marginHorizontal, " ").concat(marginBottom);
89
90
  return function (themeProps) {
90
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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, akEditorSwoopCubicBezier, akEditorSwoopCubicBezier, gridSize(), themed({
91
- light: colors.N50A,
92
- dark: colors.DN50
91
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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, akEditorSwoopCubicBezier, akEditorSwoopCubicBezier, gridSize(), themed({
92
+ light: token('color.border', colors.N50A),
93
+ dark: token('color.border', colors.DN50)
93
94
  })(themeProps), EXPAND_SELECTED_BACKGROUND(themeProps));
94
95
  };
95
96
  };
@@ -102,18 +103,18 @@ var contentStyles = function contentStyles(styleProps) {
102
103
 
103
104
  var titleInputStyles = function titleInputStyles(props) {
104
105
  return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\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"])), relativeFontSizeToBase16(fontSize()), akEditorLineHeight, themed({
105
- light: colors.N200A,
106
- dark: colors.DN600
106
+ light: token('color.text.subtlest', colors.N200A),
107
+ dark: token('color.text.subtlest', colors.DN600)
107
108
  })(props), gridSize() / 2, themed({
108
- light: colors.N200A,
109
- dark: colors.DN600
109
+ light: token('color.text.subtlest', colors.N200A),
110
+ dark: token('color.text.subtlest', colors.DN600)
110
111
  })(props));
111
112
  };
112
113
 
113
114
  var titleContainerStyles = function titleContainerStyles(props) {
114
115
  return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\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"])), relativeFontSizeToBase16(fontSize()), themed({
115
- light: colors.N300A,
116
- dark: colors.DN600
116
+ light: token('color.text.subtle', colors.N300A),
117
+ dark: token('color.text.subtle', colors.DN600)
117
118
  })(props));
118
119
  };
119
120
 
@@ -9,11 +9,12 @@ import ErrorIcon from '@atlaskit/icon/glyph/error';
9
9
  import { G400, N200, R400 } from '@atlaskit/theme/colors';
10
10
  import { gridSize } from '@atlaskit/theme/constants';
11
11
  import { h200 } from '@atlaskit/theme/typography';
12
- var errorColor = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), R400);
13
- var validColor = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), G400);
12
+ import { token } from '@atlaskit/tokens';
13
+ var errorColor = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), token('color.text.danger', R400));
14
+ var validColor = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), token('color.text.success', G400));
14
15
 
15
16
  var messageStyle = function messageStyle(props) {
16
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", "px;\n display: flex;\n justify-content: baseline;\n"])), h200(props), N200, gridSize() / 2);
17
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", "px;\n display: flex;\n justify-content: baseline;\n"])), h200(props), token('color.text.subtlest', N200), gridSize() / 2);
17
18
  };
18
19
 
19
20
  var iconWrapperStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n margin-right: 4px;\n"])));
@@ -10,12 +10,13 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
10
10
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
11
11
  import { N30, N50 } from '@atlaskit/theme/colors';
12
12
  import { borderRadius, fontSize } from '@atlaskit/theme/constants';
13
+ import { token } from '@atlaskit/tokens';
13
14
  import Tooltip from '@atlaskit/tooltip';
14
15
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
15
16
  import { ACTION_SUBJECT_ID } from '../../utils/analytics';
16
17
  import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
17
18
  import { getUnsupportedContent } from '../unsupported-content-helper';
18
- var blockNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), N30, N50, borderRadius(), relativeFontSizeToBase16(fontSize()));
19
+ var blockNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), token('color.background.disabled', N30), token('color.border.disabled', N50), borderRadius(), relativeFontSizeToBase16(fontSize()));
19
20
 
20
21
  var UnsupportedBlockNode = function UnsupportedBlockNode(_ref) {
21
22
  var node = _ref.node,
@@ -10,12 +10,13 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
10
10
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
11
11
  import { N30, N50 } from '@atlaskit/theme/colors';
12
12
  import { borderRadius, fontSize } from '@atlaskit/theme/constants';
13
+ import { token } from '@atlaskit/tokens';
13
14
  import Tooltip from '@atlaskit/tooltip';
14
15
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
15
16
  import { ACTION_SUBJECT_ID } from '../../utils/analytics';
16
17
  import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
17
18
  import { getUnsupportedContent } from '../unsupported-content-helper';
18
- var inlineNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), N30, N50, borderRadius(), relativeFontSizeToBase16(fontSize()));
19
+ var inlineNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), token('color.background.disabled', N30), token('color.border.disabled', N50), borderRadius(), relativeFontSizeToBase16(fontSize()));
19
20
 
20
21
  var UnsupportedInlineNode = function UnsupportedInlineNode(_ref) {
21
22
  var node = _ref.node,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "66.0.5",
3
+ "version": "67.0.0",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "66.0.5",
3
+ "version": "67.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -50,19 +50,20 @@
50
50
  "@atlaskit/analytics-next": "^8.2.0",
51
51
  "@atlaskit/code": "^14.3.0",
52
52
  "@atlaskit/editor-json-transformer": "^8.7.0",
53
- "@atlaskit/editor-shared-styles": "^2.0.0",
54
- "@atlaskit/emoji": "^64.5.0",
53
+ "@atlaskit/editor-shared-styles": "^2.1.0",
54
+ "@atlaskit/emoji": "^64.6.0",
55
55
  "@atlaskit/icon": "^21.10.0",
56
56
  "@atlaskit/in-product-testing": "^0.1.0",
57
- "@atlaskit/media-card": "^73.5.0",
58
- "@atlaskit/media-client": "^15.1.0",
59
- "@atlaskit/media-picker": "^61.0.0",
57
+ "@atlaskit/media-card": "^73.6.0",
58
+ "@atlaskit/media-client": "^16.0.0",
59
+ "@atlaskit/media-picker": "^62.0.0",
60
60
  "@atlaskit/mention": "^21.0.0",
61
61
  "@atlaskit/profilecard": "^16.4.0",
62
- "@atlaskit/smart-card": "^19.0.0",
62
+ "@atlaskit/smart-card": "^19.1.0",
63
63
  "@atlaskit/smart-user-picker": "^5.0.2",
64
64
  "@atlaskit/task-decision": "^17.4.0",
65
65
  "@atlaskit/theme": "^12.1.0",
66
+ "@atlaskit/tokens": "^0.9.0",
66
67
  "@atlaskit/tooltip": "^17.5.0",
67
68
  "@atlaskit/ufo": "^0.1.0",
68
69
  "@atlaskit/width-detector": "^4.0.0",
@@ -84,7 +85,7 @@
84
85
  "react-loadable": "^5.1.0"
85
86
  },
86
87
  "peerDependencies": {
87
- "@atlaskit/media-core": "^32.3.1",
88
+ "@atlaskit/media-core": "^33.0.0",
88
89
  "react": "^16.8.0",
89
90
  "react-dom": "^16.8.0",
90
91
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -92,7 +93,7 @@
92
93
  "devDependencies": {
93
94
  "@atlaskit/editor-json-transformer": "^8.7.0",
94
95
  "@atlaskit/editor-test-helpers": "^17.0.0",
95
- "@atlaskit/media-core": "^32.3.0",
96
+ "@atlaskit/media-core": "^33.0.0",
96
97
  "@atlaskit/util-data-test": "^17.2.0",
97
98
  "@atlaskit/visual-regression": "*",
98
99
  "@atlaskit/webdriver-runner": "*",
@@ -116,7 +117,8 @@
116
117
  "import-structure": "atlassian-conventions"
117
118
  },
118
119
  "@repo/internal": {
119
- "deprecation": "no-deprecated-imports"
120
+ "deprecation": "no-deprecated-imports",
121
+ "theming": "tokens"
120
122
  }
121
123
  },
122
124
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"