@atlaskit/editor-common 72.0.0 → 72.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 +7 -0
- package/dist/cjs/keymaps/index.js +1 -3
- package/dist/cjs/styles/shared/annotation.js +9 -11
- package/dist/cjs/styles/shared/blockquote.js +1 -3
- package/dist/cjs/styles/shared/code-block.js +11 -13
- package/dist/cjs/styles/shared/code-mark.js +2 -4
- package/dist/cjs/styles/shared/panel.js +24 -28
- package/dist/cjs/styles/shared/rule.js +2 -4
- package/dist/cjs/styles/shared/shadow.js +1 -3
- package/dist/cjs/styles/shared/table.js +22 -24
- package/dist/cjs/ui/Caption/index.js +2 -4
- package/dist/cjs/ui/DropList/index.js +5 -7
- package/dist/cjs/ui/Expand/index.js +17 -19
- package/dist/cjs/ui/Messages/index.js +3 -5
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -3
- package/dist/cjs/ui/UnsupportedInline/index.js +1 -3
- package/dist/cjs/ui-color/ColorPalette/index.js +1 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/keymaps/index.js +1 -2
- package/dist/es2019/styles/shared/annotation.js +9 -10
- package/dist/es2019/styles/shared/blockquote.js +1 -2
- package/dist/es2019/styles/shared/code-block.js +11 -12
- package/dist/es2019/styles/shared/code-mark.js +2 -3
- package/dist/es2019/styles/shared/panel.js +24 -27
- package/dist/es2019/styles/shared/rule.js +2 -3
- package/dist/es2019/styles/shared/shadow.js +4 -5
- package/dist/es2019/styles/shared/table.js +22 -23
- package/dist/es2019/ui/Caption/index.js +2 -3
- package/dist/es2019/ui/DropList/index.js +5 -6
- package/dist/es2019/ui/Expand/index.js +17 -18
- package/dist/es2019/ui/Messages/index.js +3 -4
- package/dist/es2019/ui/UnsupportedBlock/index.js +2 -3
- package/dist/es2019/ui/UnsupportedInline/index.js +2 -3
- package/dist/es2019/ui-color/ColorPalette/index.js +2 -2
- package/dist/es2019/ui-menu/DropdownMenu/index.js +11 -12
- package/dist/es2019/version.json +1 -1
- package/dist/esm/keymaps/index.js +1 -2
- package/dist/esm/styles/shared/annotation.js +9 -10
- package/dist/esm/styles/shared/blockquote.js +1 -2
- package/dist/esm/styles/shared/code-block.js +11 -12
- package/dist/esm/styles/shared/code-mark.js +2 -3
- package/dist/esm/styles/shared/panel.js +24 -27
- package/dist/esm/styles/shared/rule.js +2 -3
- package/dist/esm/styles/shared/shadow.js +1 -2
- package/dist/esm/styles/shared/table.js +22 -23
- package/dist/esm/ui/Caption/index.js +2 -3
- package/dist/esm/ui/DropList/index.js +5 -6
- package/dist/esm/ui/Expand/index.js +17 -18
- package/dist/esm/ui/Messages/index.js +3 -4
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -2
- package/dist/esm/ui/UnsupportedInline/index.js +1 -2
- package/dist/esm/ui-color/ColorPalette/index.js +2 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +10 -11
- package/dist/esm/version.json +1 -1
- package/package.json +3 -3
|
@@ -25,8 +25,6 @@ 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
|
-
|
|
30
28
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
31
29
|
|
|
32
30
|
var _analytics = require("../../analytics");
|
|
@@ -43,7 +41,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
43
41
|
|
|
44
42
|
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; }
|
|
45
43
|
|
|
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"])), (
|
|
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"])), "var(--ds-background-disabled, ".concat(_colors.N30, ")"), "var(--ds-border-disabled, ".concat(_colors.N50, ")"), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
47
45
|
|
|
48
46
|
var UnsupportedInlineNode = function UnsupportedInlineNode(_ref) {
|
|
49
47
|
var node = _ref.node,
|
|
@@ -50,7 +50,7 @@ function getCheckMarkColor(color, textPalette) {
|
|
|
50
50
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
return contrastColor === _colors.N0 ? (
|
|
53
|
+
return contrastColor === _colors.N0 ? "var(--ds-icon-inverse, ".concat(_colors.N0, ")") : "var(--ds-icon, ".concat(_colors.N500, ")");
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
var ColorPalette = function ColorPalette(props) {
|
|
@@ -41,8 +41,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
41
41
|
|
|
42
42
|
var _components = require("@atlaskit/theme/components");
|
|
43
43
|
|
|
44
|
-
var _tokens = require("@atlaskit/tokens");
|
|
45
|
-
|
|
46
44
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
47
45
|
|
|
48
46
|
var _uiReact = require("../../ui-react");
|
|
@@ -66,7 +64,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
66
64
|
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; } }
|
|
67
65
|
|
|
68
66
|
var wrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* tooltip in ToolbarButton is display:block */\n & > div > div {\n display: flex;\n }\n"])));
|
|
69
|
-
var focusedMenuItemStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n"])), (
|
|
67
|
+
var focusedMenuItemStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n"])), "var(--ds-border-focused, ".concat(_colors.B100, ")"));
|
|
70
68
|
|
|
71
69
|
var buttonStyles = function buttonStyles(isActive) {
|
|
72
70
|
return function (theme) {
|
|
@@ -74,20 +72,20 @@ var buttonStyles = function buttonStyles(isActive) {
|
|
|
74
72
|
/**
|
|
75
73
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
76
74
|
*/
|
|
77
|
-
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n > span,\n > span:hover,\n > span:active {\n background: ", ";\n color: ", ";\n }\n :focus > span[aria-disabled='false'] {\n ", ";\n }\n :focus-visible,\n :focus-visible > span[aria-disabled='false'] {\n outline: none;\n }\n "])), (
|
|
75
|
+
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n > span,\n > span:hover,\n > span:active {\n background: ", ";\n color: ", ";\n }\n :focus > span[aria-disabled='false'] {\n ", ";\n }\n :focus-visible,\n :focus-visible > span[aria-disabled='false'] {\n outline: none;\n }\n "])), "var(--ds-background-selected, #6c798f)", "var(--ds-text, #fff)", focusedMenuItemStyle);
|
|
78
76
|
} else {
|
|
79
77
|
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n > span:hover[aria-disabled='false'] {\n color: ", ";\n background-color: ", ";\n }\n > span:active[aria-disabled='false'] {\n background-color: ", ";\n }\n > span[aria-disabled='true'] {\n color: ", ";\n }\n :focus > span[aria-disabled='false'] {\n ", ";\n }\n :focus-visible,\n :focus-visible > span[aria-disabled='false'] {\n outline: none;\n }\n "])), (0, _components.themed)({
|
|
80
|
-
light: (
|
|
81
|
-
dark: (
|
|
78
|
+
light: "var(--ds-text, ".concat(_colors.N900, ")"),
|
|
79
|
+
dark: "var(--ds-text, ".concat(_colors.DN600, ")")
|
|
82
80
|
})(theme), (0, _components.themed)({
|
|
83
|
-
light: (
|
|
84
|
-
dark: (
|
|
81
|
+
light: "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))",
|
|
82
|
+
dark: "var(--ds-background-neutral-subtle-hovered, rgb(59, 71, 92))"
|
|
85
83
|
})(theme), (0, _components.themed)({
|
|
86
|
-
light: (
|
|
87
|
-
dark: (
|
|
84
|
+
light: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))",
|
|
85
|
+
dark: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))"
|
|
88
86
|
})(theme), (0, _components.themed)({
|
|
89
|
-
light: (
|
|
90
|
-
dark: (
|
|
87
|
+
light: "var(--ds-text-disabled, ".concat(_colors.N70, ")"),
|
|
88
|
+
dark: "var(--ds-text-disabled, ".concat(_colors.DN80, ")")
|
|
91
89
|
})(theme), focusedMenuItemStyle); // The deafut focus-visible style is removed to ensure consistency across browsers
|
|
92
90
|
}
|
|
93
91
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { N400 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { browser } from '../utils';
|
|
7
6
|
export const addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
|
|
8
7
|
export const toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
|
|
@@ -75,7 +74,7 @@ const arrowKeysMap = {
|
|
|
75
74
|
};
|
|
76
75
|
const tooltipShortcutStyle = css`
|
|
77
76
|
border-radius: 2px;
|
|
78
|
-
background-color: ${
|
|
77
|
+
background-color: ${`var(--ds-background-inverse-subtle, ${N400})`};
|
|
79
78
|
padding: 0 2px;
|
|
80
79
|
|
|
81
80
|
/* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
export const annotationPrefix = 'ak-editor-annotation';
|
|
6
5
|
export const AnnotationSharedClassNames = {
|
|
7
6
|
focus: `${annotationPrefix}-focus`,
|
|
@@ -20,27 +19,27 @@ export const AnnotationSharedCSSByState = props => ({
|
|
|
20
19
|
// emotion and token look up
|
|
21
20
|
|
|
22
21
|
background: ${themed({
|
|
23
|
-
light:
|
|
24
|
-
dark:
|
|
22
|
+
light: `var(--ds-background-accent-yellow-subtler, ${Y75})`,
|
|
23
|
+
dark: `var(--ds-background-accent-yellow-subtler, ${DY75})`
|
|
25
24
|
})(props)};
|
|
26
25
|
border-bottom: 2px solid
|
|
27
26
|
${themed({
|
|
28
|
-
light:
|
|
29
|
-
dark:
|
|
27
|
+
light: `var(--ds-border-accent-yellow, ${Y300})`,
|
|
28
|
+
dark: `var(--ds-border-accent-yellow, ${DY300})`
|
|
30
29
|
})(props)};
|
|
31
30
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4147
|
|
32
|
-
box-shadow: ${
|
|
31
|
+
box-shadow: ${`var(--ds-shadow-overlay, ${`1px 2px 3px ${N60A}, -1px 2px 3px ${N60A}`})`};
|
|
33
32
|
cursor: pointer;
|
|
34
33
|
`,
|
|
35
34
|
blur: css`
|
|
36
35
|
background: ${themed({
|
|
37
|
-
light:
|
|
38
|
-
dark:
|
|
36
|
+
light: `var(--ds-background-accent-yellow-subtlest, ${Y75a})`,
|
|
37
|
+
dark: `var(--ds-background-accent-yellow-subtlest, ${DY75a})`
|
|
39
38
|
})(props)};
|
|
40
39
|
border-bottom: 2px solid
|
|
41
40
|
${themed({
|
|
42
|
-
light:
|
|
43
|
-
dark:
|
|
41
|
+
light: `var(--ds-border-accent-yellow, ${Y200a})`,
|
|
42
|
+
dark: `var(--ds-border-accent-yellow, ${DY200})`
|
|
44
43
|
})(props)};
|
|
45
44
|
cursor: pointer;
|
|
46
45
|
`
|
|
@@ -1,13 +1,12 @@
|
|
|
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';
|
|
5
4
|
export const blockquoteSharedStyles = css`
|
|
6
5
|
& blockquote {
|
|
7
6
|
box-sizing: border-box;
|
|
8
7
|
padding-left: ${gridSize() * 2}px;
|
|
9
8
|
border-left: 2px solid
|
|
10
|
-
${
|
|
9
|
+
${`var(--ds-border, ${akEditorBlockquoteBorderColor})`};
|
|
11
10
|
margin: ${blockNodesVerticalMargin} 0 0 0;
|
|
12
11
|
margin-right: 0;
|
|
13
12
|
|
|
@@ -3,7 +3,6 @@ import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth,
|
|
|
3
3
|
import { DN20, DN400, DN50, DN800, N20, N30, N400, N800 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
5
|
import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
export const CodeBlockSharedCssClassName = {
|
|
8
7
|
CODEBLOCK_CONTAINER: 'code-block',
|
|
9
8
|
CODEBLOCK_START: 'code-block--start',
|
|
@@ -16,7 +15,7 @@ export const CodeBlockSharedCssClassName = {
|
|
|
16
15
|
export const codeBlockSharedStyles = props => css`
|
|
17
16
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
|
|
18
17
|
position: relative;
|
|
19
|
-
background-color: ${
|
|
18
|
+
background-color: ${"var(--ds-surface-raised, transparent)"};
|
|
20
19
|
border-radius: ${borderRadius()}px;
|
|
21
20
|
margin: ${blockNodesVerticalMargin} 0 0 0;
|
|
22
21
|
font-family: ${akEditorCodeFontFamily};
|
|
@@ -46,8 +45,8 @@ export const codeBlockSharedStyles = props => css`
|
|
|
46
45
|
|
|
47
46
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
|
|
48
47
|
background-color: ${themed({
|
|
49
|
-
light:
|
|
50
|
-
dark:
|
|
48
|
+
light: `var(--ds-background-neutral, ${N20})`,
|
|
49
|
+
dark: `var(--ds-background-neutral, ${DN50})`
|
|
51
50
|
})(props)};
|
|
52
51
|
display: flex;
|
|
53
52
|
border-radius: ${borderRadius()}px;
|
|
@@ -57,8 +56,8 @@ export const codeBlockSharedStyles = props => css`
|
|
|
57
56
|
|
|
58
57
|
background-image: ${overflowShadow({
|
|
59
58
|
background: themed({
|
|
60
|
-
light:
|
|
61
|
-
dark:
|
|
59
|
+
light: `var(--ds-background-neutral, ${N20})`,
|
|
60
|
+
dark: `var(--ds-background-neutral, ${DN50})`
|
|
62
61
|
})(props),
|
|
63
62
|
leftCoverWidth: `${gridSize() * 3}px`
|
|
64
63
|
})};
|
|
@@ -79,8 +78,8 @@ export const codeBlockSharedStyles = props => css`
|
|
|
79
78
|
flex-shrink: 0;
|
|
80
79
|
text-align: right;
|
|
81
80
|
background-color: ${themed({
|
|
82
|
-
light:
|
|
83
|
-
dark:
|
|
81
|
+
light: `var(--ds-background-neutral, ${N30})`,
|
|
82
|
+
dark: `var(--ds-background-neutral, ${DN20})`
|
|
84
83
|
})(props)};
|
|
85
84
|
padding: ${gridSize()}px;
|
|
86
85
|
position: relative;
|
|
@@ -95,8 +94,8 @@ export const codeBlockSharedStyles = props => css`
|
|
|
95
94
|
content: counter(line);
|
|
96
95
|
counter-increment: line;
|
|
97
96
|
color: ${themed({
|
|
98
|
-
light:
|
|
99
|
-
dark:
|
|
97
|
+
light: `var(--ds-text-subtlest, ${N400})`,
|
|
98
|
+
dark: `var(--ds-text-subtlest, ${DN400})`
|
|
100
99
|
})(props)};
|
|
101
100
|
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
102
101
|
line-height: 1.5rem;
|
|
@@ -113,8 +112,8 @@ export const codeBlockSharedStyles = props => css`
|
|
|
113
112
|
tab-size: 4;
|
|
114
113
|
cursor: text;
|
|
115
114
|
color: ${themed({
|
|
116
|
-
light:
|
|
117
|
-
dark:
|
|
115
|
+
light: `var(--ds-text, ${N800})`,
|
|
116
|
+
dark: `var(--ds-text, ${DN800})`
|
|
118
117
|
})(props)};
|
|
119
118
|
border-radius: ${borderRadius()}px;
|
|
120
119
|
margin: ${gridSize()}px;
|
|
@@ -2,14 +2,13 @@ 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';
|
|
6
5
|
export const codeMarkSharedStyles = props => {
|
|
7
6
|
const theme = getTheme(props);
|
|
8
7
|
return css`
|
|
9
8
|
.code {
|
|
10
9
|
--ds--code--bg-color: ${themed({
|
|
11
|
-
light:
|
|
12
|
-
dark:
|
|
10
|
+
light: `var(--ds-background-neutral, ${N30A})`,
|
|
11
|
+
dark: `var(--ds-background-neutral, ${DN70})`
|
|
13
12
|
})(props)};
|
|
14
13
|
${getCodeStyles(theme)}
|
|
15
14
|
}
|
|
@@ -8,16 +8,7 @@ import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
9
|
import { themed } from '@atlaskit/theme/components';
|
|
10
10
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
11
|
-
|
|
12
|
-
const tokenPanelColor = {
|
|
13
|
-
info: 'color.background.information',
|
|
14
|
-
note: 'color.background.discovery',
|
|
15
|
-
tip: 'color.background.success',
|
|
16
|
-
success: 'color.background.success',
|
|
17
|
-
warning: 'color.background.warning',
|
|
18
|
-
error: 'color.background.danger'
|
|
19
|
-
};
|
|
20
|
-
const lightPanelColor = {
|
|
11
|
+
const lightPanelColors = {
|
|
21
12
|
info: colors.B50,
|
|
22
13
|
note: colors.P50,
|
|
23
14
|
tip: colors.G50,
|
|
@@ -88,20 +79,28 @@ export const darkPanelColors = {
|
|
|
88
79
|
TextColor: '#D9DDE3'
|
|
89
80
|
};
|
|
90
81
|
const lightIconColor = {
|
|
91
|
-
info:
|
|
92
|
-
note:
|
|
93
|
-
tip:
|
|
94
|
-
success:
|
|
95
|
-
warning:
|
|
96
|
-
error:
|
|
82
|
+
info: `var(--ds-icon-information, ${colors.B400})`,
|
|
83
|
+
note: `var(--ds-icon-discovery, ${colors.P400})`,
|
|
84
|
+
tip: `var(--ds-icon-success, ${colors.G400})`,
|
|
85
|
+
success: `var(--ds-icon-success, ${colors.G400})`,
|
|
86
|
+
warning: `var(--ds-icon-warning, ${colors.Y400})`,
|
|
87
|
+
error: `var(--ds-icon-danger, ${colors.R400})`
|
|
97
88
|
};
|
|
98
89
|
const darkIconColor = {
|
|
99
|
-
info:
|
|
100
|
-
note:
|
|
101
|
-
tip:
|
|
102
|
-
success:
|
|
103
|
-
warning:
|
|
104
|
-
error:
|
|
90
|
+
info: `var(--ds-icon-information, ${colors.B100})`,
|
|
91
|
+
note: `var(--ds-icon-discovery, ${colors.P100})`,
|
|
92
|
+
tip: `var(--ds-icon-success, ${colors.G200})`,
|
|
93
|
+
success: `var(--ds-icon-success, ${colors.G200})`,
|
|
94
|
+
warning: `var(--ds-icon-warning, ${colors.Y100})`,
|
|
95
|
+
error: `var(--ds-icon-danger, ${colors.R200})`
|
|
96
|
+
};
|
|
97
|
+
const tokenDarkPanelColors = {
|
|
98
|
+
info: `var(--ds-background-information, ${darkPanelColors['info']})`,
|
|
99
|
+
note: `var(--ds-background-discovery, ${darkPanelColors['note']})`,
|
|
100
|
+
tip: `var(--ds-background-success, ${darkPanelColors['tip']})`,
|
|
101
|
+
success: `var(--ds-background-success, ${darkPanelColors['success']})`,
|
|
102
|
+
warning: `var(--ds-background-warning, ${darkPanelColors['warning']})`,
|
|
103
|
+
error: `var(--ds-background-danger, ${darkPanelColors['error']})`
|
|
105
104
|
}; // New custom icons are a little smaller than predefined icons.
|
|
106
105
|
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
107
106
|
|
|
@@ -168,7 +167,7 @@ const iconDynamicStyles = panelType => props => {
|
|
|
168
167
|
|
|
169
168
|
|
|
170
169
|
export const getPanelTypeBackgroundNoTokens = (panelType, props = {}) => {
|
|
171
|
-
const light =
|
|
170
|
+
const light = lightPanelColors[panelType];
|
|
172
171
|
const dark = darkPanelColors[panelType];
|
|
173
172
|
const background = themed({
|
|
174
173
|
light,
|
|
@@ -177,11 +176,9 @@ export const getPanelTypeBackgroundNoTokens = (panelType, props = {}) => {
|
|
|
177
176
|
return background || 'none';
|
|
178
177
|
};
|
|
179
178
|
export const getPanelTypeBackground = (panelType, props = {}) => {
|
|
180
|
-
//
|
|
179
|
+
const light = hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]); // hexToEditorBackgroundPaletteColor has a light mode as a fallback color - for legacy dark mode we define the tokens locally
|
|
181
180
|
|
|
182
|
-
|
|
183
|
-
const light = hexToEditorBackgroundPaletteColor(lightPanelColor[panelType]);
|
|
184
|
-
const dark = token(tokenPanelColor[panelType], darkPanelColors[panelType]);
|
|
181
|
+
const dark = tokenDarkPanelColors[panelType];
|
|
185
182
|
const background = themed({
|
|
186
183
|
light,
|
|
187
184
|
dark
|
|
@@ -2,10 +2,9 @@ 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';
|
|
6
5
|
const divider = themed({
|
|
7
|
-
light:
|
|
8
|
-
dark:
|
|
6
|
+
light: `var(--ds-border, ${N30A})`,
|
|
7
|
+
dark: `var(--ds-border, ${DN50})`
|
|
9
8
|
}); // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
10
9
|
|
|
11
10
|
export const ruleSharedStyles = props => css`
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorShadowZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { N40A } from '@atlaskit/theme/colors';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { shadowClassNames } from '../../ui/OverflowShadow';
|
|
7
6
|
import { shadowObserverClassNames } from '../../ui/OverflowShadow/shadowObserver';
|
|
8
7
|
const shadowWidth = 8;
|
|
@@ -44,11 +43,11 @@ const shadowSharedStyle = css`
|
|
|
44
43
|
background: linear-gradient(
|
|
45
44
|
to left,
|
|
46
45
|
transparent 0,
|
|
47
|
-
${
|
|
46
|
+
${`var(--ds-shadow-overflow-spread, ${N40A})`} 100%
|
|
48
47
|
),
|
|
49
48
|
linear-gradient(
|
|
50
49
|
to right,
|
|
51
|
-
${
|
|
50
|
+
${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
|
|
52
51
|
transparent 1px
|
|
53
52
|
);
|
|
54
53
|
top: 0px;
|
|
@@ -60,11 +59,11 @@ const shadowSharedStyle = css`
|
|
|
60
59
|
background: linear-gradient(
|
|
61
60
|
to right,
|
|
62
61
|
transparent 0,
|
|
63
|
-
${
|
|
62
|
+
${`var(--ds-shadow-overflow-spread, ${N40A})`} 100%
|
|
64
63
|
),
|
|
65
64
|
linear-gradient(
|
|
66
65
|
to left,
|
|
67
|
-
${
|
|
66
|
+
${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
|
|
68
67
|
transparent 1px
|
|
69
68
|
);
|
|
70
69
|
left: calc(100% - ${shadowWidth}px);
|
|
@@ -5,7 +5,6 @@ import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelected
|
|
|
5
5
|
import { DN20 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { themed } from '@atlaskit/theme/components';
|
|
7
7
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
8
|
-
import { token } from '@atlaskit/tokens';
|
|
9
8
|
import browser from '../../utils/browser';
|
|
10
9
|
import { CodeBlockSharedCssClassName } from './code-block';
|
|
11
10
|
export const tableMarginTop = 24;
|
|
@@ -65,8 +64,8 @@ const tableSharedStyle = props => css`
|
|
|
65
64
|
border-collapse: collapse;
|
|
66
65
|
border: ${tableCellBorderWidth}px solid
|
|
67
66
|
${themed({
|
|
68
|
-
light:
|
|
69
|
-
dark:
|
|
67
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
68
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
70
69
|
})(props)};
|
|
71
70
|
table-layout: fixed;
|
|
72
71
|
font-size: 1em;
|
|
@@ -88,7 +87,7 @@ const tableSharedStyle = props => css`
|
|
|
88
87
|
border-bottom: none;
|
|
89
88
|
}
|
|
90
89
|
th td {
|
|
91
|
-
background-color: ${
|
|
90
|
+
background-color: ${"var(--ds-background-neutral-subtle, white)"};
|
|
92
91
|
}
|
|
93
92
|
th,
|
|
94
93
|
td {
|
|
@@ -97,8 +96,8 @@ const tableSharedStyle = props => css`
|
|
|
97
96
|
vertical-align: top;
|
|
98
97
|
border: 1px solid
|
|
99
98
|
${themed({
|
|
100
|
-
light:
|
|
101
|
-
dark:
|
|
99
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
100
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
102
101
|
})(props)};
|
|
103
102
|
border-right-width: 0;
|
|
104
103
|
border-bottom-width: 0;
|
|
@@ -132,8 +131,8 @@ const tableSharedStyle = props => css`
|
|
|
132
131
|
}
|
|
133
132
|
th {
|
|
134
133
|
background-color: ${themed({
|
|
135
|
-
light:
|
|
136
|
-
dark:
|
|
134
|
+
light: `var(--ds-background-neutral, ${akEditorTableToolbar})`,
|
|
135
|
+
dark: `var(--ds-background-neutral, ${akEditorTableToolbarDark})`
|
|
137
136
|
})(props)};
|
|
138
137
|
text-align: left;
|
|
139
138
|
|
|
@@ -142,34 +141,34 @@ const tableSharedStyle = props => css`
|
|
|
142
141
|
&:not([style]):not(.danger) {
|
|
143
142
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER}:not(.danger) {
|
|
144
143
|
background-color: ${themed({
|
|
145
|
-
light:
|
|
146
|
-
dark:
|
|
144
|
+
light: "var(--ds-surface-raised, rgb(235, 237, 240))",
|
|
145
|
+
dark: "var(--ds-surface-raised, rgb(36, 47, 66))"
|
|
147
146
|
})(props)};
|
|
148
147
|
|
|
149
148
|
:not(.${akEditorSelectedNodeClassName}) {
|
|
150
149
|
box-shadow: 0px 0px 0px 1px
|
|
151
|
-
${
|
|
150
|
+
${"var(--ds-border, transparent)"};
|
|
152
151
|
}
|
|
153
152
|
|
|
154
153
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
|
|
155
154
|
background-image: ${overflowShadow({
|
|
156
155
|
background: themed({
|
|
157
|
-
light:
|
|
158
|
-
dark:
|
|
156
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
157
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
159
158
|
})(props),
|
|
160
159
|
leftCoverWidth: `${gridSize() * 3}px`
|
|
161
160
|
})};
|
|
162
161
|
|
|
163
162
|
background-color: ${themed({
|
|
164
|
-
light:
|
|
165
|
-
dark:
|
|
163
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
164
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
166
165
|
})(props)};
|
|
167
166
|
}
|
|
168
167
|
|
|
169
168
|
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
170
169
|
background-color: ${themed({
|
|
171
|
-
light:
|
|
172
|
-
dark:
|
|
170
|
+
light: "var(--ds-background-neutral, rgb(226, 229, 233))",
|
|
171
|
+
dark: `var(--ds-background-neutral, ${DN20})`
|
|
173
172
|
})(props)};
|
|
174
173
|
}
|
|
175
174
|
|
|
@@ -177,21 +176,21 @@ const tableSharedStyle = props => css`
|
|
|
177
176
|
> [data-ds--code--code-block] {
|
|
178
177
|
background-image: ${overflowShadow({
|
|
179
178
|
background: themed({
|
|
180
|
-
light:
|
|
181
|
-
dark:
|
|
179
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
180
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
182
181
|
})(props),
|
|
183
182
|
leftCoverWidth: `${gridSize() * 3}px`
|
|
184
183
|
})}!important;
|
|
185
184
|
|
|
186
185
|
background-color: ${themed({
|
|
187
|
-
light:
|
|
188
|
-
dark:
|
|
186
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
187
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
189
188
|
})(props)}!important;
|
|
190
189
|
|
|
191
190
|
// selector lives inside @atlaskit/code
|
|
192
191
|
--ds--code--line-number-bg-color: ${themed({
|
|
193
|
-
light:
|
|
194
|
-
dark:
|
|
192
|
+
light: "var(--ds-background-neutral, rgb(226, 229, 233))",
|
|
193
|
+
dark: `var(--ds-background-neutral, ${DN20})`
|
|
195
194
|
})(props)};
|
|
196
195
|
}
|
|
197
196
|
}
|
|
@@ -5,16 +5,15 @@ 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';
|
|
9
8
|
import { messages } from './messages';
|
|
10
9
|
const captionWrapperStyle = css`
|
|
11
10
|
margin-top: 8px;
|
|
12
11
|
text-align: center;
|
|
13
12
|
position: relative;
|
|
14
|
-
color: ${
|
|
13
|
+
color: ${`var(--ds-text-subtle, ${N400})`};
|
|
15
14
|
`;
|
|
16
15
|
const placeholderStyle = css`
|
|
17
|
-
color: ${
|
|
16
|
+
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
18
17
|
position: absolute;
|
|
19
18
|
top: 0;
|
|
20
19
|
width: 100%;
|
|
@@ -7,10 +7,9 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { DN50, DN600, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
9
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
import Layer from '../Layer';
|
|
12
11
|
const packageName = "@atlaskit/editor-common";
|
|
13
|
-
const packageVersion = "72.0.
|
|
12
|
+
const packageVersion = "72.0.1";
|
|
14
13
|
const halfFocusRing = 1;
|
|
15
14
|
const dropOffset = `0, ${gridSize()}px`;
|
|
16
15
|
|
|
@@ -33,12 +32,12 @@ class DropList extends Component {
|
|
|
33
32
|
_defineProperty(this, "menuWrapper", theme => {
|
|
34
33
|
return css`
|
|
35
34
|
color: ${themed({
|
|
36
|
-
light:
|
|
37
|
-
dark:
|
|
35
|
+
light: `var(--ds-text, ${N900})`,
|
|
36
|
+
dark: `var(--ds-text, ${DN600})`
|
|
38
37
|
})(theme)};
|
|
39
38
|
background-color: ${themed({
|
|
40
|
-
light:
|
|
41
|
-
dark:
|
|
39
|
+
light: `var(--ds-surface-overlay, ${N0})`,
|
|
40
|
+
dark: `var(--ds-surface-overlay, ${DN50})`
|
|
42
41
|
})(theme)};
|
|
43
42
|
border-radius: ${borderRadius()}px;
|
|
44
43
|
box-shadow: 0 ${gridSize() / 2}px ${gridSize()}px -${gridSize() / 4}px ${N50A},
|