@atlaskit/editor-common 66.0.5 → 68.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 +44 -0
- package/dist/cjs/styles/shared/annotation.js +12 -7
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/blockquote.js +3 -1
- package/dist/cjs/styles/shared/code-mark.js +4 -2
- package/dist/cjs/styles/shared/column-layout.js +1 -1
- package/dist/cjs/styles/shared/rule.js +4 -2
- package/dist/cjs/styles/shared/shadow.js +3 -1
- package/dist/cjs/styles/shared/table.js +18 -16
- package/dist/cjs/styles/shared/task-decision.js +1 -1
- package/dist/cjs/ui/BaseTheme/index.js +4 -21
- 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/OverflowShadow/index.js +49 -11
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +107 -0
- package/dist/cjs/ui/UnsupportedBlock/index.js +3 -1
- package/dist/cjs/ui/UnsupportedInline/index.js +3 -1
- package/dist/cjs/ui/index.js +14 -0
- package/dist/cjs/utils/breakout.js +2 -2
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
- package/dist/cjs/utils/validate-using-spec.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/styles/shared/annotation.js +17 -7
- package/dist/es2019/styles/shared/block-marks.js +1 -1
- package/dist/es2019/styles/shared/blockquote.js +3 -1
- package/dist/es2019/styles/shared/code-mark.js +3 -2
- package/dist/es2019/styles/shared/column-layout.js +1 -0
- 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 +14 -0
- package/dist/es2019/styles/shared/table.js +22 -18
- package/dist/es2019/styles/shared/task-decision.js +1 -0
- package/dist/es2019/ui/BaseTheme/index.js +3 -21
- 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/OverflowShadow/index.js +48 -12
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +82 -0
- package/dist/es2019/ui/UnsupportedBlock/index.js +3 -2
- package/dist/es2019/ui/UnsupportedInline/index.js +3 -2
- package/dist/es2019/ui/index.js +1 -0
- package/dist/es2019/utils/breakout.js +1 -1
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/es2019/utils/validate-using-spec.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/styles/shared/annotation.js +11 -7
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/blockquote.js +2 -1
- package/dist/esm/styles/shared/code-mark.js +3 -2
- package/dist/esm/styles/shared/column-layout.js +1 -1
- 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 +4 -1
- package/dist/esm/styles/shared/table.js +20 -16
- package/dist/esm/styles/shared/task-decision.js +1 -1
- package/dist/esm/ui/BaseTheme/index.js +4 -22
- 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/OverflowShadow/index.js +50 -11
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +98 -0
- package/dist/esm/ui/UnsupportedBlock/index.js +2 -1
- package/dist/esm/ui/UnsupportedInline/index.js +2 -1
- package/dist/esm/ui/index.js +1 -0
- package/dist/esm/utils/breakout.js +2 -2
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/esm/utils/validate-using-spec.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/extensions/manifest-helpers.d.ts +1 -1
- package/dist/types/extensions/module-helpers.d.ts +1 -1
- package/dist/types/extensions/types/extension-handler.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest-toolbar-item.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest.d.ts +1 -1
- package/dist/types/extensions/types/utils.d.ts +1 -1
- package/dist/types/provider-factory/autoformatting-provider.d.ts +1 -1
- package/dist/types/ui/BaseTheme/index.d.ts +2 -4
- package/dist/types/ui/OverflowShadow/index.d.ts +10 -3
- package/dist/types/ui/OverflowShadow/shadowObserver.d.ts +27 -0
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +1 -1
- package/dist/types/utils/validate-using-spec.d.ts +2 -1
- package/package.json +15 -13
|
@@ -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;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import { ShadowObserver, shadowObserverClassNames } from './shadowObserver';
|
|
5
5
|
export const shadowClassNames = {
|
|
6
6
|
RIGHT_SHADOW: 'right-shadow',
|
|
7
7
|
LEFT_SHADOW: 'left-shadow'
|
|
8
8
|
};
|
|
9
|
-
const isIE11 = browser.ie_version === 11;
|
|
10
9
|
export default function overflowShadow(Component, options) {
|
|
11
10
|
return class OverflowShadow extends React.Component {
|
|
12
11
|
constructor(...args) {
|
|
13
12
|
super(...args);
|
|
14
13
|
|
|
14
|
+
_defineProperty(this, "overflowContainerWidth", 0);
|
|
15
|
+
|
|
15
16
|
_defineProperty(this, "state", {
|
|
16
17
|
showLeftShadow: false,
|
|
17
18
|
showRightShadow: false
|
|
18
19
|
});
|
|
19
20
|
|
|
20
21
|
_defineProperty(this, "handleScroll", event => {
|
|
21
|
-
if (!this.overflowContainer || event.target !== this.overflowContainer) {
|
|
22
|
+
if (!this.overflowContainer || event.target !== this.overflowContainer || options.useShadowObserver) {
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -26,6 +27,10 @@ export default function overflowShadow(Component, options) {
|
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
_defineProperty(this, "updateShadows", () => {
|
|
30
|
+
if (options.useShadowObserver) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
this.setState(prevState => {
|
|
30
35
|
if (!this.overflowContainer) {
|
|
31
36
|
return;
|
|
@@ -90,20 +95,22 @@ export default function overflowShadow(Component, options) {
|
|
|
90
95
|
this.overflowContainer = container;
|
|
91
96
|
}
|
|
92
97
|
|
|
93
|
-
if (options.
|
|
94
|
-
this.
|
|
98
|
+
if (options.useShadowObserver) {
|
|
99
|
+
this.initShadowObserver();
|
|
100
|
+
return;
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
this.updateShadows();
|
|
98
|
-
|
|
99
|
-
if (!isIE11) {
|
|
100
|
-
this.overflowContainer.addEventListener('scroll', this.handleScroll);
|
|
101
|
-
}
|
|
104
|
+
this.overflowContainer.addEventListener('scroll', this.handleScroll);
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
componentWillUnmount() {
|
|
106
|
-
if (
|
|
109
|
+
if (options.useShadowObserver) {
|
|
110
|
+
return this.shadowObserver && this.shadowObserver.dispose();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (this.overflowContainer) {
|
|
107
114
|
this.overflowContainer.removeEventListener('scroll', this.handleScroll);
|
|
108
115
|
}
|
|
109
116
|
|
|
@@ -111,7 +118,36 @@ export default function overflowShadow(Component, options) {
|
|
|
111
118
|
}
|
|
112
119
|
|
|
113
120
|
componentDidUpdate() {
|
|
114
|
-
|
|
121
|
+
if (!options.useShadowObserver) {
|
|
122
|
+
this.updateShadows();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
initShadowObserver() {
|
|
127
|
+
if (this.shadowObserver || !this.overflowContainer) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
this.shadowObserver = new ShadowObserver({
|
|
132
|
+
scrollContainer: this.overflowContainer,
|
|
133
|
+
onUpdateShadows: shadowStates => {
|
|
134
|
+
this.setState(prevState => {
|
|
135
|
+
const {
|
|
136
|
+
showLeftShadow,
|
|
137
|
+
showRightShadow
|
|
138
|
+
} = shadowStates;
|
|
139
|
+
|
|
140
|
+
if (showLeftShadow !== prevState.showLeftShadow || showRightShadow !== prevState.showRightShadow) {
|
|
141
|
+
return {
|
|
142
|
+
showLeftShadow,
|
|
143
|
+
showRightShadow
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return null;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
115
151
|
}
|
|
116
152
|
|
|
117
153
|
render() {
|
|
@@ -119,7 +155,7 @@ export default function overflowShadow(Component, options) {
|
|
|
119
155
|
showLeftShadow,
|
|
120
156
|
showRightShadow
|
|
121
157
|
} = this.state;
|
|
122
|
-
|
|
158
|
+
let classNames = [showRightShadow && shadowClassNames.RIGHT_SHADOW, showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
|
|
123
159
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
124
160
|
handleRef: this.handleContainer,
|
|
125
161
|
shadowClassNames: classNames
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
export let ShadowKeys;
|
|
3
|
+
|
|
4
|
+
(function (ShadowKeys) {
|
|
5
|
+
ShadowKeys["SHOW_LEFT_SHADOW"] = "showLeftShadow";
|
|
6
|
+
ShadowKeys["SHOW_RIGHT_SHADOW"] = "showRightShadow";
|
|
7
|
+
})(ShadowKeys || (ShadowKeys = {}));
|
|
8
|
+
|
|
9
|
+
export const shadowObserverClassNames = {
|
|
10
|
+
SENTINEL_LEFT: 'sentinel-left',
|
|
11
|
+
SENTINEL_RIGHT: 'sentinel-right',
|
|
12
|
+
SHADOW_CONTAINER: 'with-shadow-observer'
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const requestIdleCallback = fn => {
|
|
16
|
+
return window.requestIdleCallback ? window.requestIdleCallback(fn) : window.requestAnimationFrame(fn);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const cancelIdleCallback = id => {
|
|
20
|
+
return window.cancelIdleCallback ? window.cancelIdleCallback(id) : window.cancelAnimationFrame(id);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export class ShadowObserver {
|
|
24
|
+
constructor({
|
|
25
|
+
scrollContainer,
|
|
26
|
+
onUpdateShadows
|
|
27
|
+
}) {
|
|
28
|
+
_defineProperty(this, "sentinels", {});
|
|
29
|
+
|
|
30
|
+
_defineProperty(this, "shadowStates", {
|
|
31
|
+
[ShadowKeys.SHOW_LEFT_SHADOW]: false,
|
|
32
|
+
[ShadowKeys.SHOW_RIGHT_SHADOW]: false
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
_defineProperty(this, "init", () => {
|
|
36
|
+
if (!this.scrollContainer || this.intersectionObserver) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
this.sentinels.right = document.createElement('div');
|
|
41
|
+
this.sentinels.right.classList.add(shadowObserverClassNames.SENTINEL_RIGHT);
|
|
42
|
+
this.scrollContainer.appendChild(this.sentinels.right);
|
|
43
|
+
this.sentinels.left = document.createElement('div');
|
|
44
|
+
this.sentinels.left.classList.add(shadowObserverClassNames.SENTINEL_LEFT);
|
|
45
|
+
this.scrollContainer.prepend(this.sentinels.left);
|
|
46
|
+
this.intersectionObserver = new IntersectionObserver((entries, _) => {
|
|
47
|
+
entries.forEach(this.onIntersect);
|
|
48
|
+
}, {
|
|
49
|
+
root: this.scrollContainer
|
|
50
|
+
});
|
|
51
|
+
this.intersectionObserver.observe(this.sentinels.left);
|
|
52
|
+
this.intersectionObserver.observe(this.sentinels.right);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
_defineProperty(this, "onIntersect", entry => {
|
|
56
|
+
this.requestCallbackId = requestIdleCallback(() => {
|
|
57
|
+
if (entry.target.classList.contains(shadowObserverClassNames.SENTINEL_LEFT)) {
|
|
58
|
+
this.shadowStates[ShadowKeys.SHOW_LEFT_SHADOW] = !entry.isIntersecting;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (entry.target.classList.contains(shadowObserverClassNames.SENTINEL_RIGHT)) {
|
|
62
|
+
this.shadowStates[ShadowKeys.SHOW_RIGHT_SHADOW] = !entry.isIntersecting;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
this.onUpdateShadows(this.shadowStates);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
this.scrollContainer = scrollContainer;
|
|
70
|
+
this.onUpdateShadows = onUpdateShadows;
|
|
71
|
+
this.init();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
dispose() {
|
|
75
|
+
if (this.intersectionObserver) {
|
|
76
|
+
this.intersectionObserver.disconnect();
|
|
77
|
+
this.intersectionObserver = undefined;
|
|
78
|
+
this.requestCallbackId && cancelIdleCallback(this.requestCallbackId);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|
|
@@ -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/ui/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { BaseTheme, mapBreakpointToLayoutMaxWidth } from './BaseTheme';
|
|
|
10
10
|
export { default as withOuterListeners } from './with-outer-listeners';
|
|
11
11
|
export { WidthConsumer, WidthProvider, getBreakpoint } from './WidthProvider';
|
|
12
12
|
export { default as overflowShadow, shadowClassNames } from './OverflowShadow';
|
|
13
|
+
export { shadowObserverClassNames, ShadowObserver } from './OverflowShadow/shadowObserver';
|
|
13
14
|
export { WithCreateAnalyticsEvent } from './WithCreateAnalyticsEvent';
|
|
14
15
|
export { messages as expandMessages, sharedExpandStyles, ExpandIconWrapper, expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef } from './Expand';
|
|
15
16
|
export { ErrorMessage, HelperMessage, ValidMessage } from './Messages';
|
|
@@ -29,7 +29,7 @@ const breakoutConsts = {
|
|
|
29
29
|
return '100%';
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
calcLineLength: (
|
|
32
|
+
calcLineLength: () => breakoutConsts.defaultLayoutWidth,
|
|
33
33
|
calcWideWidth: (containerWidth = breakoutConsts.defaultLayoutWidth, maxWidth = Infinity, fallback = '100%') => {
|
|
34
34
|
const effectiveFullWidth = containerWidth - breakoutConsts.padding;
|
|
35
35
|
const layoutMaxWidth = breakoutConsts.mapBreakpointToLayoutMaxWidth(breakoutConsts.getBreakpoint(containerWidth));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { validator } from '@atlaskit/adf-utils';
|
|
1
|
+
import { validator } from '@atlaskit/adf-utils/validator';
|
|
2
2
|
export const UNSUPPORTED_NODE_ATTRIBUTE = 'unsupportedNodeAttribute';
|
|
3
3
|
import { ACTION_SUBJECT_ID } from './analytics';
|
|
4
4
|
import { fireUnsupportedEvent } from './track-unsupported-content';
|
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) {
|
|
@@ -3,4 +3,4 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
|
-
export var blockMarksSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks */\n *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-
|
|
6
|
+
export var blockMarksSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks */\n *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-of-type {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n &:first-child {\n margin-top: 0;\n }\n }\n }\n"])));
|
|
@@ -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
|
};
|
|
@@ -4,5 +4,5 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
var columnLayoutSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [data-layout-section] {\n display: flex;\n flex-direction: row;\n & > * {\n flex: 1;\n min-width: 0;\n }\n\n & > .unsupportedBlockView-content-wrap {\n min-width: initial;\n }\n\n @media screen and (max-width: ", "px) {\n flex-direction: column;\n }\n }\n"])), gridMediumMaxWidth);
|
|
7
|
+
var columnLayoutSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [data-layout-section] {\n position: relative;\n display: flex;\n flex-direction: row;\n & > * {\n flex: 1;\n min-width: 0;\n }\n\n & > .unsupportedBlockView-content-wrap {\n min-width: initial;\n }\n\n @media screen and (max-width: ", "px) {\n flex-direction: column;\n }\n }\n"])), gridMediumMaxWidth);
|
|
8
8
|
export { columnLayoutSharedStyle };
|
|
@@ -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,10 +2,13 @@ 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';
|
|
8
10
|
import { shadowClassNames } from '../../ui/OverflowShadow';
|
|
11
|
+
import { shadowObserverClassNames } from '../../ui/OverflowShadow/shadowObserver';
|
|
9
12
|
var shadowWidth = 8;
|
|
10
13
|
/**
|
|
11
14
|
* TODO: This is close to working and removes a tone of JS from OverflowShadow component
|
|
@@ -21,5 +24,5 @@ var shadowWidth = 8;
|
|
|
21
24
|
* background-attachment: local, local, scroll, scroll;
|
|
22
25
|
*/
|
|
23
26
|
|
|
24
|
-
var shadowSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(to left, rgba(99, 114, 130, 0) 0, ", " 100%);\n top: 0px;\n left: 0;\n display: block;\n }\n\n & .", "::after {\n background: linear-gradient(\n to right,\n rgba(99, 114, 130, 0) 0,\n ", " 100%\n );\n left: calc(100% - ", "px);\n top: 0px;\n display: block;\n }\n"])), shadowClassNames.RIGHT_SHADOW, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW, akEditorShadowZIndex, shadowWidth, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW, N40A, shadowClassNames.RIGHT_SHADOW, N40A, shadowWidth);
|
|
27
|
+
var shadowSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(to left, rgba(99, 114, 130, 0) 0, ", " 100%);\n top: 0px;\n left: 0;\n display: block;\n }\n\n & .", "::after {\n background: linear-gradient(\n to right,\n rgba(99, 114, 130, 0) 0,\n ", " 100%\n );\n left: calc(100% - ", "px);\n top: 0px;\n display: block;\n }\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n"])), shadowClassNames.RIGHT_SHADOW, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW, akEditorShadowZIndex, shadowWidth, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW, N40A, shadowClassNames.RIGHT_SHADOW, N40A, shadowWidth, shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT);
|
|
25
28
|
export { shadowSharedStyle };
|
|
@@ -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-
|
|
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-of-type > 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-of-type + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-of-type + 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
|
|
|
@@ -7,4 +7,4 @@ import { akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
|
7
7
|
export var TaskDecisionSharedCssClassName = {
|
|
8
8
|
DECISION_CONTAINER: 'decisionItemView-content-wrap'
|
|
9
9
|
};
|
|
10
|
-
export var tasksAndDecisionsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n }\n\n div[data-task-list-local-id] {\n margin: 12px 0 0 0;\n }\n\n div[data-task-list-local-id]:first-child {\n margin-top: 0;\n }\n\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: 0px;\n margin-left: 24px;\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER);
|
|
10
|
+
export var tasksAndDecisionsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n }\n\n div[data-task-list-local-id] {\n margin: 12px 0 0 0;\n }\n\n // If task list is first in the document then set margin top to zero.\n div[data-task-list-local-id]:first-child {\n margin-top: 0;\n }\n\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: 0px;\n margin-left: 24px;\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER);
|