@atlaskit/editor-common 66.0.3 → 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.
- package/CHANGELOG.md +31 -0
- package/card/package.json +1 -0
- package/collab/package.json +1 -0
- package/cypress-config/package.json +1 -0
- package/dist/cjs/styles/shared/annotation.js +12 -7
- package/dist/cjs/styles/shared/blockquote.js +3 -1
- package/dist/cjs/styles/shared/code-mark.js +4 -2
- package/dist/cjs/styles/shared/rule.js +4 -2
- package/dist/cjs/styles/shared/table.js +18 -16
- package/dist/cjs/ui/Caption/index.js +4 -2
- package/dist/cjs/ui/Expand/index.js +20 -18
- package/dist/cjs/ui/Messages/index.js +5 -3
- package/dist/cjs/ui/UnsupportedBlock/index.js +3 -1
- package/dist/cjs/ui/UnsupportedInline/index.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/styles/shared/annotation.js +17 -7
- package/dist/es2019/styles/shared/blockquote.js +3 -1
- package/dist/es2019/styles/shared/code-mark.js +3 -2
- package/dist/es2019/styles/shared/panel.js +2 -0
- package/dist/es2019/styles/shared/rule.js +3 -2
- package/dist/es2019/styles/shared/shadow.js +2 -0
- package/dist/es2019/styles/shared/table.js +19 -15
- package/dist/es2019/ui/Caption/index.js +3 -2
- package/dist/es2019/ui/Expand/index.js +19 -17
- package/dist/es2019/ui/Messages/index.js +4 -3
- package/dist/es2019/ui/UnsupportedBlock/index.js +3 -2
- package/dist/es2019/ui/UnsupportedInline/index.js +3 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/styles/shared/annotation.js +11 -7
- package/dist/esm/styles/shared/blockquote.js +2 -1
- package/dist/esm/styles/shared/code-mark.js +3 -2
- package/dist/esm/styles/shared/panel.js +2 -0
- package/dist/esm/styles/shared/rule.js +3 -2
- package/dist/esm/styles/shared/shadow.js +2 -0
- package/dist/esm/styles/shared/table.js +20 -16
- package/dist/esm/ui/Caption/index.js +3 -2
- package/dist/esm/ui/Expand/index.js +19 -18
- package/dist/esm/ui/Messages/index.js +4 -3
- package/dist/esm/ui/UnsupportedBlock/index.js +2 -1
- package/dist/esm/ui/UnsupportedInline/index.js +2 -1
- package/dist/esm/version.json +1 -1
- package/emoji/package.json +1 -0
- package/extensions/package.json +1 -0
- package/icons/package.json +1 -0
- package/in-product/package.json +1 -0
- package/mention/package.json +1 -0
- package/messages/package.json +1 -0
- package/normalize-feature-flags/package.json +1 -0
- package/package.json +12 -10
- package/panel/package.json +1 -0
- package/provider-factory/package.json +1 -0
- package/provider-helpers/package.json +1 -0
- package/safe-plugin/package.json +1 -0
- package/styles/package.json +1 -0
- package/type-ahead/package.json +1 -0
- package/types/package.json +1 -0
- package/ufo/package.json +1 -0
- package/ui/package.json +1 -0
- package/utils/package.json +1 -0
- package/validator/package.json +1 -0
|
@@ -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;
|
package/dist/es2019/version.json
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
13
|
-
var
|
|
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,
|
package/dist/esm/version.json
CHANGED
package/emoji/package.json
CHANGED
package/extensions/package.json
CHANGED
package/icons/package.json
CHANGED
package/in-product/package.json
CHANGED
package/mention/package.json
CHANGED
package/messages/package.json
CHANGED