@atlaskit/editor-common 72.0.0 → 72.1.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 +79 -0
- package/dist/cjs/analytics/types/enums.js +1 -1
- 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/PortalProvider/PortalProviderThemesProvider.js +5 -12
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -3
- package/dist/cjs/ui/UnsupportedInline/index.js +1 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -7
- package/dist/cjs/ui-color/ColorPalette/index.js +1 -1
- package/dist/cjs/ui-color/index.js +0 -6
- package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/types/enums.js +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/PortalProvider/PortalProviderThemesProvider.js +5 -12
- package/dist/es2019/ui/UnsupportedBlock/index.js +2 -3
- package/dist/es2019/ui/UnsupportedInline/index.js +2 -3
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -5
- package/dist/es2019/ui-color/ColorPalette/index.js +2 -2
- package/dist/es2019/ui-color/index.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +11 -12
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/types/enums.js +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/PortalProvider/PortalProviderThemesProvider.js +5 -12
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -2
- package/dist/esm/ui/UnsupportedInline/index.js +1 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -5
- package/dist/esm/ui-color/ColorPalette/index.js +2 -2
- package/dist/esm/ui-color/index.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +10 -11
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -1
- package/dist/types/analytics/types/events.d.ts +3 -2
- package/dist/types/analytics/types/experimental-events.d.ts +0 -1
- package/dist/types/analytics/types/general-events.d.ts +3 -1
- package/dist/types/types/feature-flags.d.ts +15 -5
- package/dist/types/types/floating-toolbar.d.ts +2 -0
- package/dist/types/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +0 -1
- package/dist/types/ui-color/index.d.ts +1 -1
- package/package.json +6 -6
- package/report.api.md +16 -0
|
@@ -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.
|
|
12
|
+
const packageVersion = "72.1.0";
|
|
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},
|
|
@@ -8,7 +8,6 @@ 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';
|
|
12
11
|
export const messages = defineMessages({
|
|
13
12
|
collapseNode: {
|
|
14
13
|
id: 'fabric.editor.collapseNode',
|
|
@@ -32,16 +31,16 @@ export const messages = defineMessages({
|
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
33
|
const BORDER_RADIUS = gridSize() / 2;
|
|
35
|
-
const EXPAND_COLLAPSED_BACKGROUND =
|
|
34
|
+
const EXPAND_COLLAPSED_BACKGROUND = "var(--ds-background-neutral-subtle, transparent)";
|
|
36
35
|
const EXPAND_SELECTED_BACKGROUND = themed({
|
|
37
|
-
light:
|
|
38
|
-
dark:
|
|
36
|
+
light: "var(--ds-surface, rgba(255, 255, 255, 0.6))",
|
|
37
|
+
dark: "var(--ds-surface, rgba(9, 10, 11, 0.29))"
|
|
39
38
|
});
|
|
40
|
-
const EXPAND_FOCUSED_BORDER_COLOR =
|
|
39
|
+
const EXPAND_FOCUSED_BORDER_COLOR = `var(--ds-border-focused, ${colors.B300})`;
|
|
41
40
|
const EXPAND_COLLAPSED_BORDER_COLOR = 'transparent';
|
|
42
41
|
const EXPAND_EXPANDED_BORDER_COLOR = themed({
|
|
43
|
-
light:
|
|
44
|
-
dark:
|
|
42
|
+
light: `var(--ds-border, ${colors.N40A})`,
|
|
43
|
+
dark: `var(--ds-border, ${colors.DN50})`
|
|
45
44
|
});
|
|
46
45
|
export const ExpandIconWrapper = ({
|
|
47
46
|
children,
|
|
@@ -56,15 +55,15 @@ const expandIconWrapperStyle = props => css`
|
|
|
56
55
|
cursor: pointer;
|
|
57
56
|
display: flex;
|
|
58
57
|
color: ${themed({
|
|
59
|
-
light:
|
|
60
|
-
dark:
|
|
58
|
+
light: `var(--ds-icon, ${colors.N90})`,
|
|
59
|
+
dark: "var(--ds-icon, #d9dde3)"
|
|
61
60
|
})(props)};
|
|
62
61
|
border-radius: ${gridSize() / 2}px;
|
|
63
62
|
width: 24px;
|
|
64
63
|
height: 24px;
|
|
65
64
|
|
|
66
65
|
&:hover {
|
|
67
|
-
background: ${
|
|
66
|
+
background: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N30A})`};
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
svg {
|
|
@@ -123,8 +122,8 @@ const containerStyles = styleProps => {
|
|
|
123
122
|
// https://product-fabric.atlassian.net/browse/DSP-4152
|
|
124
123
|
border: 1px solid
|
|
125
124
|
${themed({
|
|
126
|
-
light:
|
|
127
|
-
dark:
|
|
125
|
+
light: `var(--ds-border, ${colors.N50A})`,
|
|
126
|
+
dark: `var(--ds-border, ${colors.DN50})`
|
|
128
127
|
})(themeProps)};
|
|
129
128
|
background: ${EXPAND_SELECTED_BACKGROUND(themeProps)};
|
|
130
129
|
}
|
|
@@ -171,8 +170,8 @@ const titleInputStyles = props => css`
|
|
|
171
170
|
line-height: ${akEditorLineHeight};
|
|
172
171
|
font-weight: normal;
|
|
173
172
|
color: ${themed({
|
|
174
|
-
light:
|
|
175
|
-
dark:
|
|
173
|
+
light: `var(--ds-text-subtlest, ${colors.N200A})`,
|
|
174
|
+
dark: `var(--ds-text-subtlest, ${colors.DN600})`
|
|
176
175
|
})(props)};
|
|
177
176
|
background: transparent;
|
|
178
177
|
display: flex;
|
|
@@ -183,8 +182,8 @@ const titleInputStyles = props => css`
|
|
|
183
182
|
&::placeholder {
|
|
184
183
|
opacity: 0.6;
|
|
185
184
|
color: ${themed({
|
|
186
|
-
light:
|
|
187
|
-
dark:
|
|
185
|
+
light: `var(--ds-text-subtlest, ${colors.N200A})`,
|
|
186
|
+
dark: `var(--ds-text-subtlest, ${colors.DN600})`
|
|
188
187
|
})(props)};
|
|
189
188
|
}
|
|
190
189
|
`;
|
|
@@ -198,8 +197,8 @@ const titleContainerStyles = props => css`
|
|
|
198
197
|
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
199
198
|
width: 100%;
|
|
200
199
|
color: ${themed({
|
|
201
|
-
light:
|
|
202
|
-
dark:
|
|
200
|
+
light: `var(--ds-text-subtle, ${colors.N300A})`,
|
|
201
|
+
dark: `var(--ds-text-subtle, ${colors.DN600})`
|
|
203
202
|
})(props)};
|
|
204
203
|
overflow: hidden;
|
|
205
204
|
cursor: pointer;
|
|
@@ -5,17 +5,16 @@ 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';
|
|
9
8
|
const errorColor = css`
|
|
10
|
-
color: ${
|
|
9
|
+
color: ${`var(--ds-text-danger, ${R400})`};
|
|
11
10
|
`;
|
|
12
11
|
const validColor = css`
|
|
13
|
-
color: ${
|
|
12
|
+
color: ${`var(--ds-text-success, ${G400})`};
|
|
14
13
|
`;
|
|
15
14
|
|
|
16
15
|
const messageStyle = props => css`
|
|
17
16
|
${h200(props)} font-weight: normal;
|
|
18
|
-
color: ${
|
|
17
|
+
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
19
18
|
margin-top: ${gridSize() / 2}px;
|
|
20
19
|
display: flex;
|
|
21
20
|
justify-content: baseline;
|
|
@@ -28,16 +28,9 @@ export function PortalProviderThemeProviders(props) {
|
|
|
28
28
|
const atlaskitTheme = React.useCallback(() => ({
|
|
29
29
|
mode
|
|
30
30
|
}), [mode]);
|
|
31
|
-
return (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// </DeprectateStyledComponentsProvider>
|
|
37
|
-
React.createElement(ThemeProvider, {
|
|
38
|
-
theme: styledComponentsAndEmotionTheme
|
|
39
|
-
}, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
|
|
40
|
-
value: atlaskitTheme
|
|
41
|
-
}, children))
|
|
42
|
-
);
|
|
31
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
32
|
+
theme: styledComponentsAndEmotionTheme
|
|
33
|
+
}, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
|
|
34
|
+
value: atlaskitTheme
|
|
35
|
+
}, children));
|
|
43
36
|
}
|
|
@@ -6,15 +6,14 @@ 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';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { ACTION_SUBJECT_ID } from '../../analytics';
|
|
12
11
|
import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
13
12
|
import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
|
|
14
13
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
15
14
|
const blockNodeStyle = css`
|
|
16
|
-
background: ${
|
|
17
|
-
border: 1px dashed ${
|
|
15
|
+
background: ${`var(--ds-background-disabled, ${N30})`};
|
|
16
|
+
border: 1px dashed ${`var(--ds-border-disabled, ${N50})`};
|
|
18
17
|
border-radius: ${borderRadius()}px;
|
|
19
18
|
box-sizing: border-box;
|
|
20
19
|
cursor: default;
|
|
@@ -6,7 +6,6 @@ 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';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { ACTION_SUBJECT_ID } from '../../analytics';
|
|
12
11
|
import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
@@ -14,8 +13,8 @@ import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-un
|
|
|
14
13
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
15
14
|
const inlineNodeStyle = css`
|
|
16
15
|
align-items: center;
|
|
17
|
-
background: ${
|
|
18
|
-
border: 1px dashed ${
|
|
16
|
+
background: ${`var(--ds-background-disabled, ${N30})`};
|
|
17
|
+
border: 1px dashed ${`var(--ds-border-disabled, ${N50})`};
|
|
19
18
|
border-radius: ${borderRadius()}px;
|
|
20
19
|
box-sizing: border-box;
|
|
21
20
|
cursor: default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colorPalette
|
|
1
|
+
import { colorPalette } from '@atlaskit/adf-schema';
|
|
2
2
|
import { DEFAULT_BORDER_COLOR } from './common';
|
|
3
3
|
import getColorMessage from './getColorMessage';
|
|
4
4
|
import paletteMessages from './paletteMessages';
|
|
@@ -16,10 +16,6 @@ const mapPaletteColor = (label, color) => {
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
export const textColorPalette = [];
|
|
19
|
-
export const textColorPaletteExtended = [];
|
|
20
19
|
colorPalette.forEach((label, color) => {
|
|
21
20
|
textColorPalette.push(mapPaletteColor(label, color));
|
|
22
|
-
});
|
|
23
|
-
colorPaletteExtended.forEach((label, color) => {
|
|
24
|
-
textColorPaletteExtended.push(mapPaletteColor(label, color));
|
|
25
21
|
});
|
|
@@ -4,7 +4,7 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import chromatism from 'chromatism';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import { N0, N500 } from '@atlaskit/theme/colors';
|
|
7
|
-
import {
|
|
7
|
+
import { useThemeObserver } from '@atlaskit/tokens';
|
|
8
8
|
import Color from './Color';
|
|
9
9
|
import getColorMessage from './Palettes/getColorMessage';
|
|
10
10
|
import { newDarkPalette, newLightPalette } from './Palettes/paletteMessagesTokenModeNames';
|
|
@@ -29,7 +29,7 @@ function getCheckMarkColor(color, textPalette) {
|
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
return contrastColor === N0 ?
|
|
32
|
+
return contrastColor === N0 ? `var(--ds-icon-inverse, ${N0})` : `var(--ds-icon, ${N500})`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const ColorPalette = props => {
|
|
@@ -4,5 +4,5 @@ export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/c
|
|
|
4
4
|
export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
|
|
5
5
|
export { panelBackgroundPalette, panelDarkModeBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
|
|
6
6
|
export { lightModeStatusColorPalette, darkModeStatusColorPalette } from './ColorPalette/Palettes/statusColorPalette';
|
|
7
|
-
export { textColorPalette
|
|
7
|
+
export { textColorPalette } from './ColorPalette/Palettes/textColorPalette';
|
|
8
8
|
export { DEFAULT_BORDER_COLOR } from './ColorPalette/Palettes/common';
|
|
@@ -8,7 +8,6 @@ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
8
8
|
import { CustomItem, MenuGroup } from '@atlaskit/menu';
|
|
9
9
|
import { B100, DN600, DN80, N70, N900 } from '@atlaskit/theme/colors';
|
|
10
10
|
import { themed } from '@atlaskit/theme/components';
|
|
11
|
-
import { token } from '@atlaskit/tokens';
|
|
12
11
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
12
|
import { withReactEditorViewOuterListeners } from '../../ui-react';
|
|
14
13
|
import DropList from '../../ui/DropList';
|
|
@@ -21,7 +20,7 @@ const wrapper = css`
|
|
|
21
20
|
}
|
|
22
21
|
`;
|
|
23
22
|
const focusedMenuItemStyle = css`
|
|
24
|
-
box-shadow: inset 0px 0px 0px 2px ${
|
|
23
|
+
box-shadow: inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`};
|
|
25
24
|
outline: none;
|
|
26
25
|
`;
|
|
27
26
|
|
|
@@ -34,8 +33,8 @@ const buttonStyles = isActive => theme => {
|
|
|
34
33
|
> span,
|
|
35
34
|
> span:hover,
|
|
36
35
|
> span:active {
|
|
37
|
-
background: ${
|
|
38
|
-
color: ${
|
|
36
|
+
background: ${"var(--ds-background-selected, #6c798f)"};
|
|
37
|
+
color: ${"var(--ds-text, #fff)"};
|
|
39
38
|
}
|
|
40
39
|
:focus > span[aria-disabled='false'] {
|
|
41
40
|
${focusedMenuItemStyle};
|
|
@@ -49,24 +48,24 @@ const buttonStyles = isActive => theme => {
|
|
|
49
48
|
return css`
|
|
50
49
|
> span:hover[aria-disabled='false'] {
|
|
51
50
|
color: ${themed({
|
|
52
|
-
light:
|
|
53
|
-
dark:
|
|
51
|
+
light: `var(--ds-text, ${N900})`,
|
|
52
|
+
dark: `var(--ds-text, ${DN600})`
|
|
54
53
|
})(theme)};
|
|
55
54
|
background-color: ${themed({
|
|
56
|
-
light:
|
|
57
|
-
dark:
|
|
55
|
+
light: "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))",
|
|
56
|
+
dark: "var(--ds-background-neutral-subtle-hovered, rgb(59, 71, 92))"
|
|
58
57
|
})(theme)};
|
|
59
58
|
}
|
|
60
59
|
> span:active[aria-disabled='false'] {
|
|
61
60
|
background-color: ${themed({
|
|
62
|
-
light:
|
|
63
|
-
dark:
|
|
61
|
+
light: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))",
|
|
62
|
+
dark: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))"
|
|
64
63
|
})(theme)};
|
|
65
64
|
}
|
|
66
65
|
> span[aria-disabled='true'] {
|
|
67
66
|
color: ${themed({
|
|
68
|
-
light:
|
|
69
|
-
dark:
|
|
67
|
+
light: `var(--ds-text-disabled, ${N70})`,
|
|
68
|
+
dark: `var(--ds-text-disabled, ${DN80})`
|
|
70
69
|
})(theme)};
|
|
71
70
|
}
|
|
72
71
|
:focus > span[aria-disabled='false'] {
|
package/dist/es2019/version.json
CHANGED
|
@@ -39,7 +39,7 @@ export var ACTION;
|
|
|
39
39
|
ACTION["DISPATCHED_VALID_TRANSACTION"] = "dispatchedValidTransaction";
|
|
40
40
|
ACTION["EDITED"] = "edited";
|
|
41
41
|
ACTION["EDITOR_CRASHED"] = "unhandledErrorCaught";
|
|
42
|
-
ACTION["EDITOR_CRASHED_ADDITIONAL_INFORMATION"] = "
|
|
42
|
+
ACTION["EDITOR_CRASHED_ADDITIONAL_INFORMATION"] = "unhandledErrorCaughtAdditionalInfov2";
|
|
43
43
|
ACTION["EDITOR_MOUNTED"] = "mounted";
|
|
44
44
|
ACTION["EDITOR_TTI"] = "tti";
|
|
45
45
|
ACTION["EDITOR_CONTENT_RETRIEVAL_PERFORMED"] = "contentRetrievalPerformed";
|
|
@@ -7,7 +7,6 @@ var _templateObject;
|
|
|
7
7
|
import React, { Fragment } from 'react';
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { N400 } from '@atlaskit/theme/colors';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
import { browser } from '../utils';
|
|
12
11
|
export var addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
|
|
13
12
|
export var toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
|
|
@@ -78,7 +77,7 @@ var arrowKeysMap = {
|
|
|
78
77
|
ARROWUP: "\u2191",
|
|
79
78
|
ARROWDOWN: "\u2193"
|
|
80
79
|
};
|
|
81
|
-
var tooltipShortcutStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 2px;\n background-color: ", ";\n padding: 0 2px;\n\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: tooltip-shortcut;\n"])),
|
|
80
|
+
var tooltipShortcutStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 2px;\n background-color: ", ";\n padding: 0 2px;\n\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: tooltip-shortcut;\n"])), "var(--ds-background-inverse-subtle, ".concat(N400, ")"));
|
|
82
81
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
83
82
|
|
|
84
83
|
function formatShortcut(keymap) {
|
|
@@ -5,7 +5,6 @@ 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';
|
|
9
8
|
export var annotationPrefix = 'ak-editor-annotation';
|
|
10
9
|
export var AnnotationSharedClassNames = {
|
|
11
10
|
focus: "".concat(annotationPrefix, "-focus"),
|
|
@@ -21,18 +20,18 @@ var DY200 = '#82641c';
|
|
|
21
20
|
export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
|
|
22
21
|
return {
|
|
23
22
|
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({
|
|
24
|
-
light:
|
|
25
|
-
dark:
|
|
23
|
+
light: "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"),
|
|
24
|
+
dark: "var(--ds-background-accent-yellow-subtler, ".concat(DY75, ")")
|
|
26
25
|
})(props), themed({
|
|
27
|
-
light:
|
|
28
|
-
dark:
|
|
29
|
-
})(props),
|
|
26
|
+
light: "var(--ds-border-accent-yellow, ".concat(Y300, ")"),
|
|
27
|
+
dark: "var(--ds-border-accent-yellow, ".concat(DY300, ")")
|
|
28
|
+
})(props), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A), ")")),
|
|
30
29
|
blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid\n ", ";\n cursor: pointer;\n "])), themed({
|
|
31
|
-
light:
|
|
32
|
-
dark:
|
|
30
|
+
light: "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"),
|
|
31
|
+
dark: "var(--ds-background-accent-yellow-subtlest, ".concat(DY75a, ")")
|
|
33
32
|
})(props), themed({
|
|
34
|
-
light:
|
|
35
|
-
dark:
|
|
33
|
+
light: "var(--ds-border-accent-yellow, ".concat(Y200a, ")"),
|
|
34
|
+
dark: "var(--ds-border-accent-yellow, ".concat(DY200, ")")
|
|
36
35
|
})(props))
|
|
37
36
|
};
|
|
38
37
|
};
|
|
@@ -5,5 +5,4 @@ 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
|
-
|
|
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);
|
|
8
|
+
export var blockquoteSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\n border-left: 2px solid\n ", ";\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, "var(--ds-border, ".concat(akEditorBlockquoteBorderColor, ")"), blockNodesVerticalMargin, gridSize() * 2);
|
|
@@ -7,7 +7,6 @@ import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth,
|
|
|
7
7
|
import { DN20, DN400, DN50, DN800, N20, N30, N400, N800 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
9
|
import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
export var CodeBlockSharedCssClassName = {
|
|
12
11
|
CODEBLOCK_CONTAINER: 'code-block',
|
|
13
12
|
CODEBLOCK_START: 'code-block--start',
|
|
@@ -18,24 +17,24 @@ export var CodeBlockSharedCssClassName = {
|
|
|
18
17
|
DS_CODEBLOCK: '[data-ds--code--code-block]'
|
|
19
18
|
};
|
|
20
19
|
export var codeBlockSharedStyles = function codeBlockSharedStyles(props) {
|
|
21
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", "px 100%, ", "px 100%,\n ", "px 100%, ", "px 100%, ", "px 100%,\n 1px 100%, ", "px 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER,
|
|
22
|
-
light:
|
|
23
|
-
dark:
|
|
20
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", "px 100%, ", "px 100%,\n ", "px 100%, ", "px 100%, ", "px 100%,\n 1px 100%, ", "px 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, transparent)", borderRadius(), blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, themed({
|
|
21
|
+
light: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
22
|
+
dark: "var(--ds-background-neutral, ".concat(DN50, ")")
|
|
24
23
|
})(props), borderRadius(), overflowShadow({
|
|
25
24
|
background: themed({
|
|
26
|
-
light:
|
|
27
|
-
dark:
|
|
25
|
+
light: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
26
|
+
dark: "var(--ds-background-neutral, ".concat(DN50, ")")
|
|
28
27
|
})(props),
|
|
29
28
|
leftCoverWidth: "".concat(gridSize() * 3, "px")
|
|
30
29
|
}), gridSize() * 3, gridSize() * 3, gridSize(), gridSize(), gridSize(), gridSize(), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, themed({
|
|
31
|
-
light:
|
|
32
|
-
dark:
|
|
30
|
+
light: "var(--ds-background-neutral, ".concat(N30, ")"),
|
|
31
|
+
dark: "var(--ds-background-neutral, ".concat(DN20, ")")
|
|
33
32
|
})(props), gridSize(), themed({
|
|
34
|
-
light:
|
|
35
|
-
dark:
|
|
33
|
+
light: "var(--ds-text-subtlest, ".concat(N400, ")"),
|
|
34
|
+
dark: "var(--ds-text-subtlest, ".concat(DN400, ")")
|
|
36
35
|
})(props), relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, themed({
|
|
37
|
-
light:
|
|
38
|
-
dark:
|
|
36
|
+
light: "var(--ds-text, ".concat(N800, ")"),
|
|
37
|
+
dark: "var(--ds-text, ".concat(DN800, ")")
|
|
39
38
|
})(props), borderRadius(), gridSize(), relativeFontSizeToBase16(fontSize()));
|
|
40
39
|
};
|
|
41
40
|
export var codeBlockInListSafariFix = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ::before {\n content: ' ';\n line-height: ", ";\n }\n\n > p:first-child,\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: -", "em !important;\n }\n"])), akEditorLineHeight, akEditorLineHeight);
|
|
@@ -6,11 +6,10 @@ 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';
|
|
10
9
|
export var codeMarkSharedStyles = function codeMarkSharedStyles(props) {
|
|
11
10
|
var theme = getTheme(props);
|
|
12
11
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), themed({
|
|
13
|
-
light:
|
|
14
|
-
dark:
|
|
12
|
+
light: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
13
|
+
dark: "var(--ds-background-neutral, ".concat(DN70, ")")
|
|
15
14
|
})(props), getCodeStyles(theme));
|
|
16
15
|
};
|