@atlaskit/renderer 113.2.0 → 113.2.2
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 +14 -0
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1369 -0
- package/dist/cjs/ui/Renderer/get-base-font-size.js +10 -0
- package/dist/cjs/ui/Renderer/index.js +13 -16
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1742 -0
- package/dist/es2019/ui/Renderer/get-base-font-size.js +4 -0
- package/dist/es2019/ui/Renderer/index.js +14 -17
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +1362 -0
- package/dist/esm/ui/Renderer/get-base-font-size.js +4 -0
- package/dist/esm/ui/Renderer/index.js +14 -17
- package/dist/types/ui/Renderer/RendererStyleContainer.d.ts +11 -0
- package/dist/types/ui/Renderer/get-base-font-size.d.ts +2 -0
- package/dist/types/ui/Renderer/index.d.ts +23 -0
- package/dist/types-ts4.5/ui/Renderer/RendererStyleContainer.d.ts +11 -0
- package/dist/types-ts4.5/ui/Renderer/get-base-font-size.d.ts +2 -0
- package/dist/types-ts4.5/ui/Renderer/index.d.ts +23 -0
- package/package.json +16 -7
|
@@ -0,0 +1,1369 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.RendererStyleContainer = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
+
var _tokens = require("@atlaskit/tokens");
|
|
12
|
+
var _style = require("./style");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
+
var _consts = require("../../consts");
|
|
15
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
16
|
+
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
17
|
+
var _headingAnchor = require("../../react/nodes/heading-anchor");
|
|
18
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
19
|
+
var _adfSchema = require("@atlaskit/adf-schema");
|
|
20
|
+
var _ui = require("@atlaskit/editor-common/ui");
|
|
21
|
+
var _browser = require("@atlaskit/editor-common/browser");
|
|
22
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
23
|
+
var _table = require("../../react/nodes/table");
|
|
24
|
+
var _table2 = require("@atlaskit/editor-common/table");
|
|
25
|
+
var _lightWeightCodeBlock = require("../../react/nodes/codeBlock/components/lightWeightCodeBlock");
|
|
26
|
+
var _ugcTokens = require("@atlaskit/editor-common/ugc-tokens");
|
|
27
|
+
var _getBaseFontSize = require("./get-base-font-size");
|
|
28
|
+
var _css, _css3;
|
|
29
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles */
|
|
30
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
31
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
32
|
+
/**
|
|
33
|
+
* @jsxRuntime classic
|
|
34
|
+
* @jsx jsx
|
|
35
|
+
*/
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
37
|
+
var wrappedMediaBreakoutPoint = 410;
|
|
38
|
+
var TELEPOINTER_ID = 'ai-streaming-telepointer';
|
|
39
|
+
var tableShadowWidth = 32;
|
|
40
|
+
var LAYOUT_BREAKPOINT_RENDERER = 629;
|
|
41
|
+
// originally defined from packages/editor/editor-plugin-table/src/ui/common-styles.ts
|
|
42
|
+
// TODO: tableRowHeight can be moved into `@atlaskit/editor-common/table`
|
|
43
|
+
var tableRowHeight = 44;
|
|
44
|
+
var _getGlobalTheme = (0, _tokens.getGlobalTheme)(),
|
|
45
|
+
typography = _getGlobalTheme.typography;
|
|
46
|
+
var isBackgroundClipBrowserFixNeeded = function isBackgroundClipBrowserFixNeeded() {
|
|
47
|
+
return _browser.browser.isGecko || _browser.browser.isIE || _browser.browser.isMac && _browser.browser.isChrome;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// styles are copied from ./style.tsx
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage
|
|
52
|
+
var baseStyles = (0, _react.css)((_css = {
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
54
|
+
fontSize: 'var(--ak-renderer-base-font-size)',
|
|
55
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
56
|
+
lineHeight: '1.5rem',
|
|
57
|
+
color: "var(--ds-text, ".concat(_colors.N800, ")")
|
|
58
|
+
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css, ".".concat(_consts.RendererCssClassName.DOCUMENT, "::after"), {
|
|
59
|
+
// we add a clearfix after ak-renderer-document in order to
|
|
60
|
+
// contain internal floats (such as media images that are "wrap-left")
|
|
61
|
+
// to just the renderer (and not spill outside of it)
|
|
62
|
+
content: '""',
|
|
63
|
+
visibility: 'hidden',
|
|
64
|
+
display: 'block',
|
|
65
|
+
height: 0,
|
|
66
|
+
clear: 'both'
|
|
67
|
+
}), ".".concat(_consts.RendererCssClassName.DOCUMENT), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
68
|
+
height: '22px',
|
|
69
|
+
transform: "translateY(-2px)"
|
|
70
|
+
}), "h1", (0, _defineProperty2.default)({}, "> .mediaInlineView-content-wrap > .".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
71
|
+
height: '36px',
|
|
72
|
+
transform: "translateY(-3px)"
|
|
73
|
+
})), "h2", (0, _defineProperty2.default)({}, "> .mediaInlineView-content-wrap > .".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
74
|
+
height: '31px',
|
|
75
|
+
transform: "translateY(-3px)"
|
|
76
|
+
})), "h3", (0, _defineProperty2.default)({}, "> .mediaInlineView-content-wrap > .".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
77
|
+
height: '25px',
|
|
78
|
+
transform: "translateY(-2px)"
|
|
79
|
+
})), "h4", (0, _defineProperty2.default)({}, "> .mediaInlineView-content-wrap > .".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
80
|
+
height: '23px',
|
|
81
|
+
transform: "translateY(-2px)"
|
|
82
|
+
})), "h5", (0, _defineProperty2.default)({}, "> .mediaInlineView-content-wrap > .".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
83
|
+
height: '20px',
|
|
84
|
+
transform: "translateY(-2px)"
|
|
85
|
+
})), "h6", (0, _defineProperty2.default)({}, "> .mediaInlineView-content-wrap > .".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ",\n > :is(a, span[data-mark-type='border']) .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
86
|
+
height: '18px',
|
|
87
|
+
transform: "translateY(-2px)"
|
|
88
|
+
}))), '& h1, & h2, & h3, & h4, & h5, & h6', (0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
89
|
+
position: 'absolute',
|
|
90
|
+
marginLeft: "var(--ds-space-075, 6px)",
|
|
91
|
+
button: {
|
|
92
|
+
paddingLeft: 0,
|
|
93
|
+
paddingRight: 0
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* Adds the visibility of the button when in focus through keyboard navigation.
|
|
97
|
+
*/
|
|
98
|
+
'button:focus': {
|
|
99
|
+
opacity: 1,
|
|
100
|
+
transform: 'none !important'
|
|
101
|
+
}
|
|
102
|
+
}), "@media (hover: hover) and (pointer: fine)", (0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
103
|
+
'> button': {
|
|
104
|
+
opacity: 0,
|
|
105
|
+
transform: "translate(-8px, 0px)",
|
|
106
|
+
transition: "opacity 0.2s ease 0s, transform 0.2s ease 0s"
|
|
107
|
+
}
|
|
108
|
+
}), '&:hover', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName, " > button"), {
|
|
109
|
+
opacity: 1,
|
|
110
|
+
transform: 'none !important'
|
|
111
|
+
})))), '& h1', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
112
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
113
|
+
lineHeight: "".concat(28 / 24, "em")
|
|
114
|
+
})), '& h2', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
115
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
116
|
+
lineHeight: "".concat(24 / 20, "em")
|
|
117
|
+
})), '& h3', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
118
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
119
|
+
lineHeight: "".concat(20 / 16, "em")
|
|
120
|
+
})), '& h4', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
121
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
122
|
+
lineHeight: "".concat(16 / 14, "em")
|
|
123
|
+
})), '& h5', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
124
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
125
|
+
lineHeight: "".concat(16 / 12, "em")
|
|
126
|
+
})), '& h6', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
127
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
128
|
+
lineHeight: "".concat(16 / 11, "em")
|
|
129
|
+
})), "& span.akActionMark", {
|
|
130
|
+
color: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
131
|
+
textDecoration: 'none',
|
|
132
|
+
cursor: 'pointer',
|
|
133
|
+
'&:hover': {
|
|
134
|
+
color: "var(--ds-link, ".concat(_colors.B300, ")"),
|
|
135
|
+
textDecoration: 'underline'
|
|
136
|
+
},
|
|
137
|
+
'&:active': {
|
|
138
|
+
color: "var(--ds-link-pressed, ".concat(_colors.B500, ")")
|
|
139
|
+
}
|
|
140
|
+
}), (0, _defineProperty2.default)(_css, '& span[data-placeholder]', {
|
|
141
|
+
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")")
|
|
142
|
+
})));
|
|
143
|
+
var rendererFullPageStyles = (0, _react.css)({
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
145
|
+
maxWidth: "".concat(_editorSharedStyles.akEditorDefaultLayoutWidth, "px"),
|
|
146
|
+
margin: '0 auto',
|
|
147
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
148
|
+
padding: "0 ".concat(_style.FullPagePadding, "px")
|
|
149
|
+
});
|
|
150
|
+
var rendererFullWidthStyles = (0, _react.css)({
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
152
|
+
maxWidth: "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px"),
|
|
153
|
+
margin: "0 auto",
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
155
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
156
|
+
width: '100% !important'
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
var rendererFullWidthStylesForTableResizing = (0, _react.css)({
|
|
160
|
+
'.pm-table-container': {
|
|
161
|
+
width: '100% !important'
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
166
|
+
var telepointerStyles = (0, _react.css)((0, _defineProperty2.default)({}, "#".concat(TELEPOINTER_ID), {
|
|
167
|
+
display: 'inline-block',
|
|
168
|
+
position: 'relative',
|
|
169
|
+
width: '1.5px',
|
|
170
|
+
height: '25px',
|
|
171
|
+
backgroundColor: "var(--ds-background-brand-bold, #0C66E4)",
|
|
172
|
+
marginLeft: "var(--ds-space-025, 2px)",
|
|
173
|
+
'&::after': {
|
|
174
|
+
content: '"AI"',
|
|
175
|
+
position: 'absolute',
|
|
176
|
+
display: 'block',
|
|
177
|
+
top: 0,
|
|
178
|
+
left: 0,
|
|
179
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
180
|
+
fontSize: '10px',
|
|
181
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
182
|
+
width: '12.5px',
|
|
183
|
+
height: '13px',
|
|
184
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
185
|
+
paddingTop: '1px',
|
|
186
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
187
|
+
paddingLeft: '1.5px',
|
|
188
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
189
|
+
lineHeight: 'initial',
|
|
190
|
+
borderRadius: '0px 2px 2px 0px',
|
|
191
|
+
color: "var(--ds-text-inverse, white)",
|
|
192
|
+
backgroundColor: "var(--ds-background-brand-bold, #0C66E4)"
|
|
193
|
+
}
|
|
194
|
+
}));
|
|
195
|
+
var whitespaceSharedStyles = (0, _react.css)({
|
|
196
|
+
wordWrap: 'break-word',
|
|
197
|
+
whiteSpace: 'pre-wrap'
|
|
198
|
+
});
|
|
199
|
+
var blockquoteSharedStyles = (0, _react.css)({
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
201
|
+
'& blockquote': {
|
|
202
|
+
boxSizing: 'border-box',
|
|
203
|
+
color: 'inherit',
|
|
204
|
+
width: '100%',
|
|
205
|
+
display: 'inline-block',
|
|
206
|
+
paddingLeft: "var(--ds-space-200, 16px)",
|
|
207
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
208
|
+
borderLeft: "2px solid ".concat("var(--ds-border, ".concat(_editorSharedStyles.akEditorBlockquoteBorderColor, ")")),
|
|
209
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
210
|
+
margin: "".concat(_editorSharedStyles.blockNodesVerticalMargin, " 0 0 0"),
|
|
211
|
+
marginRight: 0,
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
213
|
+
"[dir='rtl'] &": {
|
|
214
|
+
paddingLeft: 0,
|
|
215
|
+
paddingRight: "var(--ds-space-200, 16px)"
|
|
216
|
+
},
|
|
217
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
218
|
+
'&:first-child': {
|
|
219
|
+
marginTop: 0
|
|
220
|
+
},
|
|
221
|
+
'&::before': {
|
|
222
|
+
content: "''"
|
|
223
|
+
},
|
|
224
|
+
'&::after': {
|
|
225
|
+
content: 'none'
|
|
226
|
+
},
|
|
227
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
228
|
+
'& p': {
|
|
229
|
+
display: 'block'
|
|
230
|
+
},
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
232
|
+
'& table, & table:last-child': {
|
|
233
|
+
display: 'inline-table'
|
|
234
|
+
},
|
|
235
|
+
// Workaround for overriding the inline-block display on last child of a blockquote set in CSS reset.
|
|
236
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
237
|
+
'> .code-block:last-child, >.mediaSingleView-content-wrap:last-child, >.mediaGroupView-content-wrap:last-child': {
|
|
238
|
+
display: 'block'
|
|
239
|
+
},
|
|
240
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
241
|
+
'> .extensionView-content-wrap:last-child': {
|
|
242
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
243
|
+
display: "".concat((0, _experiments.editorExperiment)('platform_editor_nested_non_bodied_macros', 'test')) ? 'block' : 'inline-block'
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
var headingsSharedStyles = (0, _react.css)({
|
|
248
|
+
'& h1': {
|
|
249
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
250
|
+
fontSize: "".concat(24 / 14, "em"),
|
|
251
|
+
fontStyle: 'inherit',
|
|
252
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
253
|
+
lineHeight: 28 / 24,
|
|
254
|
+
color: "var(--ds-text, #172B4D)",
|
|
255
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
256
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
257
|
+
letterSpacing: "-0.01em",
|
|
258
|
+
marginBottom: 0,
|
|
259
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
260
|
+
marginTop: '1.667em'
|
|
261
|
+
},
|
|
262
|
+
'& h2': {
|
|
263
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
264
|
+
fontSize: "".concat(20 / 14, "em"),
|
|
265
|
+
fontStyle: 'inherit',
|
|
266
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
267
|
+
lineHeight: 24 / 20,
|
|
268
|
+
color: "var(--ds-text, #172B4D)",
|
|
269
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
270
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
271
|
+
letterSpacing: "-0.008em",
|
|
272
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
273
|
+
marginTop: '1.8em',
|
|
274
|
+
marginBottom: 0
|
|
275
|
+
},
|
|
276
|
+
'& h3': {
|
|
277
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
278
|
+
fontSize: "".concat(16 / 14, "em"),
|
|
279
|
+
fontStyle: 'inherit',
|
|
280
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
281
|
+
lineHeight: 20 / 16,
|
|
282
|
+
color: "var(--ds-text, #172B4D)",
|
|
283
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
284
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
285
|
+
letterSpacing: "-0.006em",
|
|
286
|
+
marginTop: "var(--ds-space-400, 2em)",
|
|
287
|
+
marginBottom: 0
|
|
288
|
+
},
|
|
289
|
+
'& h4': {
|
|
290
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
291
|
+
fontSize: "".concat(14 / 14, "em"),
|
|
292
|
+
fontStyle: 'inherit',
|
|
293
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
294
|
+
lineHeight: 16 / 14,
|
|
295
|
+
color: "var(--ds-text, #172B4D)",
|
|
296
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
297
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
298
|
+
letterSpacing: "-0.003em",
|
|
299
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
300
|
+
marginTop: '1.357em'
|
|
301
|
+
},
|
|
302
|
+
'& h5': {
|
|
303
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
304
|
+
fontSize: "".concat(12 / 14, "em"),
|
|
305
|
+
fontStyle: 'inherit',
|
|
306
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
307
|
+
lineHeight: 16 / 12,
|
|
308
|
+
color: "var(--ds-text, #172B4D)",
|
|
309
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
310
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
311
|
+
marginTop: '1.667em',
|
|
312
|
+
textTransform: 'none'
|
|
313
|
+
},
|
|
314
|
+
'& h6': {
|
|
315
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
316
|
+
fontSize: "".concat(11 / 14, "em"),
|
|
317
|
+
fontStyle: 'inherit',
|
|
318
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
319
|
+
lineHeight: 16 / 11,
|
|
320
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
321
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
322
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
323
|
+
marginTop: '1.455em',
|
|
324
|
+
textTransform: 'none'
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
// TODO: emotion refactor - check if we need UGC token?
|
|
329
|
+
var headingsSharedStylesWithEditorUGC = (0, _react.css)({
|
|
330
|
+
'& h1': {
|
|
331
|
+
font: (0, _ugcTokens.editorUGCToken)('editor.font.heading.h1', typography),
|
|
332
|
+
marginBottom: 0,
|
|
333
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
334
|
+
marginTop: '1.45833em',
|
|
335
|
+
'& strong': {
|
|
336
|
+
fontWeight: (0, _ugcTokens.editorUGCToken)('editor.font.weight.heading.h1.bold', typography)
|
|
337
|
+
},
|
|
338
|
+
'&::before': {}
|
|
339
|
+
},
|
|
340
|
+
'& h2': {
|
|
341
|
+
font: (0, _ugcTokens.editorUGCToken)('editor.font.heading.h2', typography),
|
|
342
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
343
|
+
marginTop: '1.4em',
|
|
344
|
+
marginBottom: 0,
|
|
345
|
+
'& strong': {
|
|
346
|
+
fontWeight: (0, _ugcTokens.editorUGCToken)('editor.font.weight.heading.h1.bold', typography)
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
'& h3': {
|
|
350
|
+
font: (0, _ugcTokens.editorUGCToken)('editor.font.heading.h3', typography),
|
|
351
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
352
|
+
marginTop: '1.31249em',
|
|
353
|
+
marginBottom: 0,
|
|
354
|
+
'& strong': {
|
|
355
|
+
fontWeight: (0, _ugcTokens.editorUGCToken)('editor.font.weight.heading.h1.bold', typography)
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
'& h4': {
|
|
359
|
+
font: (0, _ugcTokens.editorUGCToken)('editor.font.heading.h4', typography),
|
|
360
|
+
marginTop: "var(--ds-space-250, 1.25em)",
|
|
361
|
+
'& strong': {
|
|
362
|
+
fontWeight: (0, _ugcTokens.editorUGCToken)('editor.font.weight.heading.h1.bold', typography)
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
'& h5': {
|
|
366
|
+
font: (0, _ugcTokens.editorUGCToken)('editor.font.heading.h5', typography),
|
|
367
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
368
|
+
marginTop: '1.45833em',
|
|
369
|
+
textTransform: 'none',
|
|
370
|
+
'& strong': {
|
|
371
|
+
fontWeight: (0, _ugcTokens.editorUGCToken)('editor.font.weight.heading.h1.bold', typography)
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
'& h6': {
|
|
375
|
+
font: (0, _ugcTokens.editorUGCToken)('editor.font.heading.h6', typography),
|
|
376
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
377
|
+
marginTop: '1.59091em',
|
|
378
|
+
textTransform: 'none',
|
|
379
|
+
'& strong': {
|
|
380
|
+
fontWeight: (0, _ugcTokens.editorUGCToken)('editor.font.weight.heading.h1.bold', typography)
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
var headingWithAlignmentStyles = (0, _react.css)({
|
|
385
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
386
|
+
'.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
|
|
387
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
388
|
+
'> h1:first-child': {
|
|
389
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
390
|
+
marginTop: '1.667em'
|
|
391
|
+
},
|
|
392
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
393
|
+
' > h2:first-child': {
|
|
394
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
395
|
+
marginTop: '1.8em'
|
|
396
|
+
},
|
|
397
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
398
|
+
'> h3:first-child': {
|
|
399
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
400
|
+
marginTop: '2em'
|
|
401
|
+
},
|
|
402
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
403
|
+
'> h4:first-child': {
|
|
404
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
405
|
+
marginTop: '1.357em'
|
|
406
|
+
},
|
|
407
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
408
|
+
'> h5:first-child': {
|
|
409
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
410
|
+
marginTop: '1.667em'
|
|
411
|
+
},
|
|
412
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
413
|
+
'> h6:first-child': {
|
|
414
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
415
|
+
marginTop: '1.455em'
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
// Set marginTop: 0 if alignment block is next to a gap cursor or widget that is first child
|
|
419
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
420
|
+
'.ProseMirror-gapcursor:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .fabric-editor-block-mark.fabric-editor-alignment, .ProseMirror-widget:first-child + .ProseMirror-widget:nth-child(2) + .fabric-editor-block-mark.fabric-editor-alignment': {
|
|
421
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
422
|
+
'> :is(h1, h2, h3, h4, h5, h6):first-child': {
|
|
423
|
+
marginTop: '0'
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
var ruleSharedStyles = (0, _react.css)({
|
|
428
|
+
'& hr': {
|
|
429
|
+
border: 'none',
|
|
430
|
+
backgroundColor: "var(--ds-border, #091E4224)",
|
|
431
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
432
|
+
margin: "".concat(_editorSharedStyles.akEditorLineHeight, "em 0"),
|
|
433
|
+
height: '2px',
|
|
434
|
+
borderRadius: '1px'
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
var paragraphSharedStylesWithEditorUGC = (0, _react.css)({
|
|
438
|
+
'& p': {
|
|
439
|
+
font: (0, _ugcTokens.editorUGCToken)('editor.font.body', typography),
|
|
440
|
+
marginTop: _editorSharedStyles.blockNodesVerticalMargin,
|
|
441
|
+
marginBottom: 0
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
var paragraphSharedStyles = (0, _react.css)({
|
|
445
|
+
'& p': {
|
|
446
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
447
|
+
fontSize: '1em',
|
|
448
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
449
|
+
lineHeight: _editorSharedStyles.akEditorLineHeight,
|
|
450
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
451
|
+
marginTop: _editorSharedStyles.blockNodesVerticalMargin,
|
|
452
|
+
marginBottom: 0,
|
|
453
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
454
|
+
letterSpacing: '-0.005em'
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
var listsSharedStyles = (0, _react.css)((_css3 = {
|
|
458
|
+
/* =============== INDENTATION SPACING ========= */
|
|
459
|
+
'ul, ol': {
|
|
460
|
+
boxSizing: 'border-box',
|
|
461
|
+
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(_styles.listItemCounterPadding, "px)")
|
|
462
|
+
}
|
|
463
|
+
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css3, "".concat(_adfSchema.orderedListSelector, ", ").concat(_adfSchema.bulletListSelector), {
|
|
464
|
+
/*
|
|
465
|
+
Ensures list item content adheres to the list's margin instead
|
|
466
|
+
of filling the entire block row. This is important to allow
|
|
467
|
+
clicking interactive elements which are floated next to a list.
|
|
468
|
+
For some history and context on this block, see PRs related to tickets.:
|
|
469
|
+
@see ED-6551 - original issue.
|
|
470
|
+
@see ED-7015 - follow up issue.
|
|
471
|
+
@see ED-7447 - flow-root change.
|
|
472
|
+
used to have display: 'table' in tag template style but not supported in object styles
|
|
473
|
+
removed display: 'table' as 'flow-root' is supported in latest browsers
|
|
474
|
+
@see https://css-tricks.com/display-flow-root/
|
|
475
|
+
*/
|
|
476
|
+
display: 'flow-root'
|
|
477
|
+
}), 'ul, ul ul ul ul', {
|
|
478
|
+
listStyleType: 'disc'
|
|
479
|
+
}), 'ul ul, ul ul ul ul ul', {
|
|
480
|
+
listStyleType: 'circle'
|
|
481
|
+
}), 'ul ul ul, ul ul ul ul ul ul', {
|
|
482
|
+
listStyleType: 'square'
|
|
483
|
+
}), 'ol, ol ol ol ol', {
|
|
484
|
+
listStyleType: 'decimal'
|
|
485
|
+
}), 'ol ol, ol ol ol ol ol', {
|
|
486
|
+
listStyleType: 'lower-alpha'
|
|
487
|
+
}), 'ol ol ol, ol ol ol ol ol ol', {
|
|
488
|
+
listStyleType: 'lower-roman'
|
|
489
|
+
}), 'ol[data-indent-level="1"], ol[data-indent-level="4"]', {
|
|
490
|
+
listStyleType: 'decimal'
|
|
491
|
+
}), 'ol[data-indent-level="2"], ol[data-indent-level="5"]', {
|
|
492
|
+
listStyleType: 'lower-alpha'
|
|
493
|
+
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
494
|
+
listStyleType: 'lower-roman'
|
|
495
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css3, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
496
|
+
listStyleType: 'disc'
|
|
497
|
+
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
498
|
+
listStyleType: 'circle'
|
|
499
|
+
}), 'ul[data-indent-level="3"], ul[data-indent-level="6"]', {
|
|
500
|
+
listStyleType: 'square'
|
|
501
|
+
})));
|
|
502
|
+
|
|
503
|
+
/*
|
|
504
|
+
Firefox does not handle empty block element inside li tag.
|
|
505
|
+
If there is not block element inside li tag,
|
|
506
|
+
then firefox sets inherited height to li
|
|
507
|
+
However, if there is any block element and if it's empty
|
|
508
|
+
(or has empty inline element) then
|
|
509
|
+
firefox sets li tag height to zero.
|
|
510
|
+
More details at
|
|
511
|
+
https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation
|
|
512
|
+
*/
|
|
513
|
+
var listsSharedStylesForGekko = (0, _react.css)({
|
|
514
|
+
'ul, ol': {
|
|
515
|
+
'li p:empty, li p > span:empty': {
|
|
516
|
+
display: 'inline-block'
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
var indentationSharedStyles = (0, _react.css)({
|
|
521
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
522
|
+
'.fabric-editor-indentation-mark': {
|
|
523
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
524
|
+
"&[data-level='1']": {
|
|
525
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
526
|
+
marginLeft: '30px'
|
|
527
|
+
},
|
|
528
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
529
|
+
"&[data-level='2']": {
|
|
530
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
531
|
+
marginLeft: '60px'
|
|
532
|
+
},
|
|
533
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
534
|
+
"&[data-level='3']": {
|
|
535
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
536
|
+
marginLeft: '90px'
|
|
537
|
+
},
|
|
538
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
539
|
+
"&[data-level='4']": {
|
|
540
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
541
|
+
marginLeft: '120px'
|
|
542
|
+
},
|
|
543
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
544
|
+
"&[data-level='5']": {
|
|
545
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
546
|
+
marginLeft: '150px'
|
|
547
|
+
},
|
|
548
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
549
|
+
"&[data-level='6']": {
|
|
550
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
551
|
+
marginLeft: '180px'
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
var blockMarksSharedStyles = (0, _react.css)((0, _defineProperty2.default)({}, "*:not(.fabric-editor-block-mark) >,\n \t*:not(.fabric-editor-block-mark) >\n div.fabric-editor-block-mark:first-of-type\n\t:not(.fabric-editor-indentation-mark)\n\t:not(.fabric-editor-alignment),\n \t.fabric-editor-alignment:first-of-type:first-child,\n \t.ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child", {
|
|
556
|
+
'p, h1, h2, h3, h4, h5, h6, .heading-wrapper': {
|
|
557
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
558
|
+
':first-child:not(style), style:first-child + *': {
|
|
559
|
+
marginTop: 0
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}));
|
|
563
|
+
var codeMarkSharedStyles = (0, _react.css)({
|
|
564
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
565
|
+
'.code': {
|
|
566
|
+
'--ds--code--bg-color': "var(--ds-background-neutral, #091E420F)",
|
|
567
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
568
|
+
fontSize: '0.875em',
|
|
569
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
570
|
+
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
571
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
572
|
+
backgroundColor: "var(--ds--code--bg-color,".concat("var(--ds-background-neutral, ".concat(_colors.N20, ")"), ")"),
|
|
573
|
+
color: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
574
|
+
borderStyle: 'none',
|
|
575
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
576
|
+
display: 'inline',
|
|
577
|
+
padding: '2px 0.5ch',
|
|
578
|
+
boxDecorationBreak: 'clone',
|
|
579
|
+
overflow: 'auto',
|
|
580
|
+
overflowWrap: 'break-word',
|
|
581
|
+
whiteSpace: 'pre-wrap'
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
var shadowSharedStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "& .".concat(_ui.shadowClassNames.RIGHT_SHADOW, "::before, .").concat(_ui.shadowClassNames.RIGHT_SHADOW, "::after, .").concat(_ui.shadowClassNames.LEFT_SHADOW, "::before, .").concat(_ui.shadowClassNames.LEFT_SHADOW, "::after"), {
|
|
585
|
+
display: 'none',
|
|
586
|
+
position: 'absolute',
|
|
587
|
+
pointerEvents: 'none',
|
|
588
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
589
|
+
zIndex: _editorSharedStyles.akEditorShadowZIndex,
|
|
590
|
+
width: '8px',
|
|
591
|
+
content: "''",
|
|
592
|
+
height: 'calc(100%)'
|
|
593
|
+
}), "& .".concat(_ui.shadowClassNames.RIGHT_SHADOW, ", .").concat(_ui.shadowClassNames.LEFT_SHADOW), {
|
|
594
|
+
position: 'relative'
|
|
595
|
+
}), "& .".concat(_ui.shadowClassNames.LEFT_SHADOW, "::before"), {
|
|
596
|
+
background: "linear-gradient( to left, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to right, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px )"),
|
|
597
|
+
top: '0px',
|
|
598
|
+
left: 0,
|
|
599
|
+
display: 'block'
|
|
600
|
+
}), "& .".concat(_ui.shadowClassNames.RIGHT_SHADOW, "::after"), {
|
|
601
|
+
background: "linear-gradient( to right, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to left, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px )"),
|
|
602
|
+
right: '0px',
|
|
603
|
+
top: '0px',
|
|
604
|
+
display: 'block'
|
|
605
|
+
}), "& .".concat(_ui.shadowObserverClassNames.SENTINEL_LEFT), {
|
|
606
|
+
height: '100%',
|
|
607
|
+
width: '0px',
|
|
608
|
+
minWidth: '0px'
|
|
609
|
+
}), "& .".concat(_ui.shadowObserverClassNames.SENTINEL_RIGHT), {
|
|
610
|
+
height: '100%',
|
|
611
|
+
width: '0px',
|
|
612
|
+
minWidth: '0px'
|
|
613
|
+
}));
|
|
614
|
+
var dateSharedStyle = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.DateSharedCssClassName.DATE_WRAPPER, " span"), {
|
|
615
|
+
whiteSpace: 'unset'
|
|
616
|
+
}));
|
|
617
|
+
var textColorStyles = (0, _react.css)({
|
|
618
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
619
|
+
'.fabric-text-color-mark': {
|
|
620
|
+
color: 'var(--custom-palette-color, inherit)'
|
|
621
|
+
},
|
|
622
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
623
|
+
'a .fabric-text-color-mark': {
|
|
624
|
+
color: 'unset'
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
var backgroundColorStyles = (0, _react.css)({
|
|
628
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
629
|
+
'.fabric-background-color-mark': {
|
|
630
|
+
backgroundColor: 'var(--custom-palette-color, inherit)',
|
|
631
|
+
borderRadius: '2px',
|
|
632
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
633
|
+
paddingTop: '1px',
|
|
634
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
635
|
+
paddingBottom: '2px',
|
|
636
|
+
boxDecorationBreak: 'clone'
|
|
637
|
+
},
|
|
638
|
+
// Don't show text highlight styling when there is a hyperlink
|
|
639
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
640
|
+
'a .fabric-background-color-mark': {
|
|
641
|
+
backgroundColor: 'unset'
|
|
642
|
+
},
|
|
643
|
+
// Don't show text highlight styling when there is an inline comment
|
|
644
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
645
|
+
'.fabric-background-color-mark .ak-editor-annotation': {
|
|
646
|
+
backgroundColor: 'unset'
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
var tasksAndDecisionsStyles = (0, _react.css)({
|
|
650
|
+
'.ProseMirror': (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".taskItemView-content-wrap,\n\t\t.".concat(_styles.TaskDecisionSharedCssClassName.DECISION_CONTAINER), {
|
|
651
|
+
position: 'relative',
|
|
652
|
+
minWidth: "".concat(_editorSharedStyles.akEditorTableCellMinWidth, "px")
|
|
653
|
+
}), ".".concat(_styles.TaskDecisionSharedCssClassName.DECISION_CONTAINER), {
|
|
654
|
+
marginTop: 0
|
|
655
|
+
}), ".".concat(_styles.TaskDecisionSharedCssClassName.TASK_CONTAINER), {
|
|
656
|
+
'span[contenteditable="false"]': {
|
|
657
|
+
height: "".concat(_editorSharedStyles.akEditorLineHeight, "em")
|
|
658
|
+
}
|
|
659
|
+
}), ".".concat(_styles.TaskDecisionSharedCssClassName.TASK_ITEM), {
|
|
660
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
661
|
+
lineHeight: _editorSharedStyles.akEditorLineHeight
|
|
662
|
+
}),
|
|
663
|
+
'div[data-task-local-id]': {
|
|
664
|
+
'span[contenteditable="false"]': {
|
|
665
|
+
height: "".concat(_editorSharedStyles.akEditorLineHeight, "em")
|
|
666
|
+
},
|
|
667
|
+
'span[contenteditable="false"] + div': {
|
|
668
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
669
|
+
lineHeight: "".concat(_editorSharedStyles.akEditorLineHeight, "em")
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
'div[data-task-list-local-id]': {
|
|
673
|
+
margin: "var(--ds-space-150, 12px)".concat(" 0 0 0"),
|
|
674
|
+
// If task item is not first in the list then set margin top to 4px.
|
|
675
|
+
'div + div': {
|
|
676
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
// If task list is not first in the document then set margin top to 4px.
|
|
680
|
+
'div[data-task-list-local-id] div[data-task-list-local-id]': {
|
|
681
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
682
|
+
marginLeft: "var(--ds-space-300, 24px)"
|
|
683
|
+
},
|
|
684
|
+
/* When action list is inside panel */
|
|
685
|
+
'.ak-editor-panel__content': {
|
|
686
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
687
|
+
'> div[data-task-list-local-id]:first-child': {
|
|
688
|
+
margin: '0 0 0 0 !important'
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
var smartCardStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
|
|
693
|
+
display: 'block',
|
|
694
|
+
margin: "".concat(_editorSharedStyles.blockNodesVerticalMargin, " 0 0"),
|
|
695
|
+
maxWidth: "".concat(8 * 95, "px")
|
|
696
|
+
}));
|
|
697
|
+
var baseOtherStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
698
|
+
'& .UnknownBlock': {
|
|
699
|
+
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
700
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
701
|
+
fontSize: "".concat(14 / 16, "rem"),
|
|
702
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
703
|
+
whiteSpace: 'pre-wrap',
|
|
704
|
+
wordWrap: 'break-word'
|
|
705
|
+
},
|
|
706
|
+
'& span.date-node': {
|
|
707
|
+
background: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
|
|
708
|
+
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
709
|
+
color: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
710
|
+
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)"),
|
|
711
|
+
margin: "0 1px",
|
|
712
|
+
transition: "background 0.3s"
|
|
713
|
+
},
|
|
714
|
+
'& span.date-node-highlighted': {
|
|
715
|
+
background: "var(--ds-background-danger, ".concat(_colors.R50, ")"),
|
|
716
|
+
color: "var(--ds-text-danger, ".concat(_colors.R500, ")")
|
|
717
|
+
},
|
|
718
|
+
'& .renderer-image': {
|
|
719
|
+
maxWidth: '100%',
|
|
720
|
+
display: 'block',
|
|
721
|
+
margin: "var(--ds-space-300, 24px)".concat(" 0")
|
|
722
|
+
}
|
|
723
|
+
}, ".".concat(_styles.richMediaClassName, ".rich-media-wrapped + .").concat(_styles.richMediaClassName, ":not(.rich-media-wrapped)"), {
|
|
724
|
+
clear: 'both'
|
|
725
|
+
}), "& .code-block,\n\t& blockquote,\n\t& hr,\n\t& > div > div:not(.rich-media-wrapped),\n\t.".concat(_styles.richMediaClassName, ".rich-media-wrapped + .rich-media-wrapped + *:not(.rich-media-wrapped),\n\t.").concat(_styles.richMediaClassName, ".rich-media-wrapped + div:not(.rich-media-wrapped),\n\t.").concat(_styles.richMediaClassName, ".image-align-start,\n\t\t.").concat(_styles.richMediaClassName, ".image-center,\n\t\t.").concat(_styles.richMediaClassName, ".image-align-end"), {
|
|
726
|
+
clear: 'both'
|
|
727
|
+
}), '& .rich-media-wrapped', {
|
|
728
|
+
'& + h1, & + h2, & + h3, & + h4, & + h5, & + h6': {
|
|
729
|
+
marginTop: "var(--ds-space-100, 8px)"
|
|
730
|
+
}
|
|
731
|
+
}), 'div[class^="image-wrap-"] + div[class^="image-wrap-"]', {
|
|
732
|
+
marginLeft: 0,
|
|
733
|
+
marginRight: 0
|
|
734
|
+
}), ".".concat(_consts.RendererCssClassName.DOCUMENT, " >"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "*:not([data-mark-type='fragment']) .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), {
|
|
735
|
+
// TODO - improve inline style logic on table container so important styles aren't required here
|
|
736
|
+
width: '100% !important',
|
|
737
|
+
left: '0 !important'
|
|
738
|
+
}), "[data-mark-type='fragment'] * .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), {
|
|
739
|
+
// TODO - improve inline style logic on table container so important styles aren't required here
|
|
740
|
+
width: '100% !important',
|
|
741
|
+
left: '0 !important'
|
|
742
|
+
}), "* .".concat(_consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER), {
|
|
743
|
+
overflowX: 'auto'
|
|
744
|
+
}), "& .".concat(_consts.RendererCssClassName.EXTENSION, ":first-child"), {
|
|
745
|
+
marginTop: 0
|
|
746
|
+
})), ".".concat(_consts.RendererCssClassName.DOCUMENT), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.EXTENSION), {
|
|
747
|
+
marginTop: "".concat(_editorSharedStyles.blockNodesVerticalMargin)
|
|
748
|
+
}), ".".concat(_consts.RendererCssClassName.EXTENSION_CENTER_ALIGN), {
|
|
749
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
750
|
+
marginLeft: '50%',
|
|
751
|
+
transform: 'translateX(-50%)'
|
|
752
|
+
}), ".".concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER), {
|
|
753
|
+
overflowX: 'auto'
|
|
754
|
+
}), ".".concat(_ui.shadowObserverClassNames.SHADOW_CONTAINER, " .").concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER), {
|
|
755
|
+
display: 'flex'
|
|
756
|
+
})));
|
|
757
|
+
var alignedHeadingAnchorStyle = (0, _react.css)({
|
|
758
|
+
// TODO Delete this comment after verifying space token -> previous value `margin: 6px`
|
|
759
|
+
'.fabric-editor-block-mark[data-align] >': {
|
|
760
|
+
'h1, h2, h3, h4, h5, h6': {
|
|
761
|
+
position: 'relative'
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
765
|
+
'.fabric-editor-block-mark:not([data-align="center"])[data-align]': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
766
|
+
margin: "0 ".concat("var(--ds-space-075, 6px)", " 0 0"),
|
|
767
|
+
// If the anchor is right aligned then the left side of the heading
|
|
768
|
+
// is aligned with the left side of the anchor.
|
|
769
|
+
// In order to align as expected we transform it the width of the element (plus our expected 6px)
|
|
770
|
+
// to the left
|
|
771
|
+
transform: "translateX(calc(-100% - ".concat("var(--ds-space-075, 6px)", "))")
|
|
772
|
+
}), '@media (hover: hover) and (pointer: fine)', (0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName, " > button"), {
|
|
773
|
+
transform: "translate(8px, 0px)"
|
|
774
|
+
}))
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
// TODO: emotion refactor - there's a mediaSingleSharedNewStyle, but not originally used in the renderer.
|
|
778
|
+
var mediaSingleSharedStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "li .".concat(_styles.richMediaClassName), {
|
|
779
|
+
margin: 0
|
|
780
|
+
}), '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
781
|
+
content: "''",
|
|
782
|
+
display: 'block',
|
|
783
|
+
height: 0
|
|
784
|
+
}), '&.ua-firefox', {
|
|
785
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
786
|
+
'.mediaSingleView-content-wrap': {
|
|
787
|
+
userSelect: 'none'
|
|
788
|
+
},
|
|
789
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
790
|
+
'.captionView-content-wrap': {
|
|
791
|
+
userSelect: 'text'
|
|
792
|
+
}
|
|
793
|
+
}), ".mediaSingleView-content-wrap[layout='center']", {
|
|
794
|
+
clear: 'both'
|
|
795
|
+
}), "table .".concat(_styles.richMediaClassName), {
|
|
796
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
797
|
+
marginBottom: "var(--ds-space-150, 12px)",
|
|
798
|
+
clear: 'both',
|
|
799
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
800
|
+
'&.image-wrap-left[data-layout], &.image-wrap-right[data-layout]': {
|
|
801
|
+
clear: 'none',
|
|
802
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
803
|
+
'&:first-child': {
|
|
804
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}), ".".concat(_styles.richMediaClassName, ".image-wrap-right + .").concat(_styles.richMediaClassName, ".image-wrap-left"), {
|
|
808
|
+
clear: 'both'
|
|
809
|
+
}), ".".concat(_styles.richMediaClassName, ".image-wrap-left + .").concat(_styles.richMediaClassName, ".image-wrap-right, .").concat(_styles.richMediaClassName, ".image-wrap-right + .").concat(_styles.richMediaClassName, ".image-wrap-left, .").concat(_styles.richMediaClassName, ".image-wrap-left + .").concat(_styles.richMediaClassName, ".image-wrap-left, .").concat(_styles.richMediaClassName, ".image-wrap-right + .").concat(_styles.richMediaClassName, ".image-wrap-right"), {
|
|
810
|
+
marginRight: 0,
|
|
811
|
+
marginLeft: 0
|
|
812
|
+
}), "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
813
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
814
|
+
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
815
|
+
float: 'none',
|
|
816
|
+
overflow: 'auto',
|
|
817
|
+
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
818
|
+
}
|
|
819
|
+
}));
|
|
820
|
+
|
|
821
|
+
// was shared between editor-core and renderer
|
|
822
|
+
var tableSharedStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
823
|
+
// originally from packages/editor/editor-common/src/styles/shared/tableCell.ts
|
|
824
|
+
// Hardcoding the background color for the table cells to avoid the use of inline styles
|
|
825
|
+
'td[colorname="white" i], th[colorname="white" i]': {
|
|
826
|
+
backgroundColor: "var(--ds-surface, #FFFFFF)".concat(" !important")
|
|
827
|
+
},
|
|
828
|
+
'td[colorname="light blue" i], th[colorname="light blue" i]': {
|
|
829
|
+
backgroundColor: "var(--ds-background-accent-blue-subtlest, #DEEBFF)".concat(" !important")
|
|
830
|
+
},
|
|
831
|
+
'td[colorname="light teal" i], th[colorname="light teal" i]': {
|
|
832
|
+
backgroundColor: "var(--ds-background-accent-teal-subtlest, #E6FCFF)".concat(" !important")
|
|
833
|
+
},
|
|
834
|
+
'td[colorname="light green" i], th[colorname="light green" i]': {
|
|
835
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #E3FCEF)".concat(" !important")
|
|
836
|
+
},
|
|
837
|
+
'td[colorname="light yellow" i], th[colorname="light yellow" i]': {
|
|
838
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtlest, #FFFAE6)".concat(" !important")
|
|
839
|
+
},
|
|
840
|
+
'td[colorname="light red" i], th[colorname="light red" i]': {
|
|
841
|
+
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFEBE6)".concat(" !important")
|
|
842
|
+
},
|
|
843
|
+
'td[colorname="light purple" i], th[colorname="light purple" i]': {
|
|
844
|
+
backgroundColor: "var(--ds-background-accent-purple-subtlest, #EAE6FF)".concat(" !important")
|
|
845
|
+
},
|
|
846
|
+
'td[colorname="light gray" i], th[colorname="light gray" i]': {
|
|
847
|
+
backgroundColor: "var(--ds-background-accent-gray-subtlest, #F4F5F7)".concat(" !important")
|
|
848
|
+
},
|
|
849
|
+
'td[colorname="blue" i], th[colorname="blue" i]': {
|
|
850
|
+
backgroundColor: "var(--ds-background-accent-blue-subtler, #B3D4FF)".concat(" !important")
|
|
851
|
+
},
|
|
852
|
+
'td[colorname="teal" i], th[colorname="teal" i]': {
|
|
853
|
+
backgroundColor: "var(--ds-background-accent-teal-subtler, #B3F5FF)".concat(" !important")
|
|
854
|
+
},
|
|
855
|
+
'td[colorname="green" i], th[colorname="green" i]': {
|
|
856
|
+
backgroundColor: "var(--ds-background-accent-green-subtler, #ABF5D1)".concat(" !important")
|
|
857
|
+
},
|
|
858
|
+
'td[colorname="yellow" i], th[colorname="yellow" i]': {
|
|
859
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtler, #FFF0B3)".concat(" !important")
|
|
860
|
+
},
|
|
861
|
+
'td[colorname="red" i], th[colorname="red" i]': {
|
|
862
|
+
backgroundColor: "var(--ds-background-accent-red-subtler, #FFBDAD)".concat(" !important")
|
|
863
|
+
},
|
|
864
|
+
'td[colorname="purple" i], th[colorname="purple" i]': {
|
|
865
|
+
backgroundColor: "var(--ds-background-accent-purple-subtler, #C0B6F2)".concat(" !important")
|
|
866
|
+
},
|
|
867
|
+
'td[colorname="gray" i], th[colorname="gray" i]': {
|
|
868
|
+
backgroundColor: "var(--ds-background-accent-gray-subtle, #B3BAC5)".concat(" !important")
|
|
869
|
+
},
|
|
870
|
+
'td[colorname="dark blue" i], th[colorname="dark blue" i]': {
|
|
871
|
+
backgroundColor: "var(--ds-background-accent-blue-subtle, #4C9AFF)".concat(" !important")
|
|
872
|
+
},
|
|
873
|
+
'td[colorname="dark teal" i], th[colorname="dark teal" i]': {
|
|
874
|
+
backgroundColor: "var(--ds-background-accent-teal-subtle, #79E2F2)".concat(" !important")
|
|
875
|
+
},
|
|
876
|
+
'td[colorname="dark green" i], th[colorname="dark green" i]': {
|
|
877
|
+
backgroundColor: "var(--ds-background-accent-green-subtle, #57D9A3)".concat(" !important")
|
|
878
|
+
},
|
|
879
|
+
'td[colorname="dark yellow" i], th[colorname="dark yellow" i]': {
|
|
880
|
+
backgroundColor: "var(--ds-background-accent-orange-subtle, #FFC400)".concat(" !important")
|
|
881
|
+
},
|
|
882
|
+
'td[colorname="dark red" i], th[colorname="dark red" i]': {
|
|
883
|
+
backgroundColor: "var(--ds-background-accent-red-subtle, #FF8F73)".concat(" !important")
|
|
884
|
+
},
|
|
885
|
+
'td[colorname="dark purple" i], th[colorname="dark purple" i]': {
|
|
886
|
+
backgroundColor: "var(--ds-background-accent-purple-subtle, #998DD9)".concat(" !important")
|
|
887
|
+
}
|
|
888
|
+
}, ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), {
|
|
889
|
+
position: 'relative',
|
|
890
|
+
margin: "0 auto ".concat("var(--ds-space-200, 16px)"),
|
|
891
|
+
boxSizing: 'border-box',
|
|
892
|
+
/**
|
|
893
|
+
* Fix block top alignment inside table cells.
|
|
894
|
+
*/
|
|
895
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
896
|
+
'.decisionItemView-content-wrap:first-of-type > div': {
|
|
897
|
+
marginTop: 0
|
|
898
|
+
}
|
|
899
|
+
}), ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, "[data-number-column='true']"), {
|
|
900
|
+
paddingLeft: "".concat(_editorSharedStyles.akEditorTableNumberColumnWidth - 1, "px"),
|
|
901
|
+
clear: 'both'
|
|
902
|
+
}), ".".concat(_styles.TableSharedCssClassName.TABLE_RESIZER_CONTAINER), {
|
|
903
|
+
willChange: 'width, margin-left'
|
|
904
|
+
}), ".".concat(_styles.TableSharedCssClassName.TABLE_RESIZER_CONTAINER, " table"), {
|
|
905
|
+
willChange: 'width'
|
|
906
|
+
}), ".".concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table"), {
|
|
907
|
+
margin: "var(--ds-space-300, 24px)".concat(" 0 0 0")
|
|
908
|
+
}), ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " > table,\n\t.").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
909
|
+
margin: "var(--ds-space-300, 24px)".concat(" ", "var(--ds-space-100, 8px)", " 0 0")
|
|
910
|
+
}), ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " > table,\n\t.").concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table,\n\t.").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
911
|
+
borderCollapse: 'collapse',
|
|
912
|
+
border: "".concat(_styles.tableCellBorderWidth, "px solid ", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")")),
|
|
913
|
+
tableLayout: 'fixed',
|
|
914
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
915
|
+
fontSize: '1em',
|
|
916
|
+
width: '100%',
|
|
917
|
+
'&[data-autosize="true"]': {
|
|
918
|
+
tableLayout: 'auto'
|
|
919
|
+
},
|
|
920
|
+
'*': {
|
|
921
|
+
boxSizing: 'border-box'
|
|
922
|
+
},
|
|
923
|
+
hr: {
|
|
924
|
+
boxSizing: 'content-box'
|
|
925
|
+
},
|
|
926
|
+
tbody: {
|
|
927
|
+
borderBottom: 'none'
|
|
928
|
+
},
|
|
929
|
+
'th td': {
|
|
930
|
+
backgroundColor: "var(--ds-background-neutral-subtle, white)"
|
|
931
|
+
},
|
|
932
|
+
// platform_editor_nested_tables_renderer_styles has already been lunched, so assume it's on
|
|
933
|
+
'> tbody > tr > td': {
|
|
934
|
+
backgroundColor: "var(--ds-surface, #FFFFFF)"
|
|
935
|
+
},
|
|
936
|
+
th: {
|
|
937
|
+
backgroundColor: "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"),
|
|
938
|
+
textAlign: 'left',
|
|
939
|
+
/* only apply this styling to codeblocks in default background headercells */
|
|
940
|
+
/* TODO this needs to be overhauled as it relies on unsafe selectors */
|
|
941
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
942
|
+
'&:not([style]):not(.danger)': (0, _defineProperty2.default)({}, ".".concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, ":not(.danger)"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
943
|
+
backgroundColor: "var(--ds-surface-raised, rgb(235, 237, 240))"
|
|
944
|
+
}, "&:not(.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ")"), {
|
|
945
|
+
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border, transparent)")
|
|
946
|
+
}), ".".concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER), {
|
|
947
|
+
// originally copied from packages/editor/editor-shared-styles/src/overflow-shadow/overflow-shadow.ts
|
|
948
|
+
backgroundImage: "linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t".concat("var(--ds-background-neutral, #091E420F)", " ", "var(--ds-space-300, 24px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-300, 24px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t", "var(--ds-surface-raised, #FFFFFF)", " ", "var(--ds-space-300, 24px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-300, 24px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-background-neutral, #091E420F)", " ", "var(--ds-space-100, 8px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-surface-raised, #FFFFFF)", " ", "var(--ds-space-100, 8px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-spread, #091e4229)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-perimeter, #091e421f)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-spread, #091e4229)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-perimeter, #091e421f)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t )"),
|
|
949
|
+
backgroundColor: "var(--ds-background-neutral, rgb(235, 237, 240))"
|
|
950
|
+
}), ".".concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER), {
|
|
951
|
+
backgroundColor: "var(--ds-background-neutral, rgb(226, 229, 233))"
|
|
952
|
+
}), '> [data-ds--code--code-block]', {
|
|
953
|
+
// originally copied from packages/editor/editor-shared-styles/src/overflow-shadow/overflow-shadow.ts
|
|
954
|
+
backgroundImage: "linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t".concat("var(--ds-background-neutral, #091E420F)", " ", "var(--ds-space-300, 24px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-300, 24px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t", "var(--ds-surface-raised, #FFFFFF)", " ", "var(--ds-space-300, 24px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-300, 24px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-background-neutral, #091E420F)", " ", "var(--ds-space-100, 8px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-surface-raised, #FFFFFF)", " ", "var(--ds-space-100, 8px)", ",\n\t\t\t\t\t\t\ttransparent ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-spread, #091e4229)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto left,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-perimeter, #091e421f)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-spread, #091e4229)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t ),linear-gradient(\n\t\t\t\t\t\t\tto right,\n\t\t\t\t\t\t\t", "var(--ds-shadow-overflow-perimeter, #091e421f)", " 0,\n\t\t\t\t\t\t\t", "var(--ds-UNSAFE-transparent, transparent)", " ", "var(--ds-space-100, 8px)", "\n\t\t\t\t\t\t )"),
|
|
955
|
+
backgroundColor: "var(--ds-background-neutral, rgb(235, 237, 240))".concat("!important"),
|
|
956
|
+
// selector lives inside @atlaskit/code
|
|
957
|
+
'--ds--code--line-number-bg-color': "var(--ds-background-neutral, rgb(226, 229, 233))"
|
|
958
|
+
}))
|
|
959
|
+
}
|
|
960
|
+
}));
|
|
961
|
+
var tableRendererHeaderStylesForTableCellOnly = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
962
|
+
// platform_editor_renderer_table_header_styles has already been launched, so assume it's on
|
|
963
|
+
'> tbody > tr > th, > tbody > tr > td': {
|
|
964
|
+
minWidth: "".concat(_styles.tableCellMinWidth, "px"),
|
|
965
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
966
|
+
verticalAlign: 'top',
|
|
967
|
+
border: "1px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")")),
|
|
968
|
+
borderRightWidth: 0,
|
|
969
|
+
borderBottomWidth: 0,
|
|
970
|
+
padding: "var(--ds-space-100, 8px)",
|
|
971
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
972
|
+
'th p:not(:first-of-type), td p:not(:first-of-type)': {
|
|
973
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}));
|
|
977
|
+
var tableStylesBackGroundClipForGeckoForTableCellOnly = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
978
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
979
|
+
'> tbody > tr > th, > tbody > tr > td': {
|
|
980
|
+
backgroundClip: 'padding-box'
|
|
981
|
+
}
|
|
982
|
+
}));
|
|
983
|
+
var firstNodeWithNotMarginTopWithNestedDnD = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
984
|
+
'> tbody > tr > th, > tbody > tr > td': {
|
|
985
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
986
|
+
'> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span))': {
|
|
987
|
+
marginTop: 0
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}));
|
|
991
|
+
var firstNodeWithNotMarginTop = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table,\n\t\t.").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
992
|
+
'> tbody > tr > th, > tbody > tr > td': {
|
|
993
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
994
|
+
'> :first-child:not(style), > style:first-child + *': {
|
|
995
|
+
marginTop: 0
|
|
996
|
+
},
|
|
997
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
998
|
+
'> .ProseMirror-gapcursor:first-child + *, > style:first-child + .ProseMirror-gapcursor + *': {
|
|
999
|
+
marginTop: 0
|
|
1000
|
+
},
|
|
1001
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1002
|
+
'> .ProseMirror-gapcursor:first-child + span + *, > style:first-child + .ProseMirror-gapcursor + span + *': {
|
|
1003
|
+
marginTop: 0
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}));
|
|
1007
|
+
var rendererTableStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
1008
|
+
zIndex: 0,
|
|
1009
|
+
transition: "all 0.1s linear",
|
|
1010
|
+
display: 'flex' /* needed to avoid position: fixed jumpiness in Chrome */
|
|
1011
|
+
}, "&.".concat(_ui.shadowClassNames.RIGHT_SHADOW, "::after, &.").concat(_ui.shadowClassNames.LEFT_SHADOW, "::before"), {
|
|
1012
|
+
top: "".concat(_styles.tableMarginTop - 1, "px"),
|
|
1013
|
+
height: "calc(100% - ".concat(_styles.tableMarginTop, "px)"),
|
|
1014
|
+
zIndex: "".concat(_editorSharedStyles.akEditorStickyHeaderZIndex),
|
|
1015
|
+
width: "".concat(tableShadowWidth, "px"),
|
|
1016
|
+
background: "linear-gradient(\n\t\t\t\t\tto left,\n\t\t\t\t\ttransparent 0,\n\t\t\t\t\t".concat("var(--ds-shadow-overflow-spread, ".concat(_colors.N40A, ")"), " 140%\n\t\t\t\t),\n\t\t\t\tlinear-gradient(\n\t\t\t\t\tto right,\n\t\t\t\t\t", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px,\n\t\t\t\t\ttransparent 1px\n\t\t\t\t)")
|
|
1017
|
+
}), "&.".concat(_ui.shadowClassNames.RIGHT_SHADOW, "::after"), {
|
|
1018
|
+
background: "linear-gradient(\n\t\t\t\t\tto right,\n\t\t\t\t\ttransparent 0,\n\t\t\t\t\t".concat("var(--ds-shadow-overflow-spread, ".concat(_colors.N40A, ")"), " 140%\n\t\t\t\t),\n\t\t\t\tlinear-gradient(\n\t\t\t\t\tto left,\n\t\t\t\t\t", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px,\n\t\t\t\t\ttransparent 1px\n\t\t\t\t)"),
|
|
1019
|
+
right: "0px"
|
|
1020
|
+
}), "&\n .".concat(_ui.shadowObserverClassNames.SENTINEL_LEFT, ",\n &\n .").concat(_ui.shadowObserverClassNames.SENTINEL_RIGHT), {
|
|
1021
|
+
height: "calc(100% - ".concat(_styles.tableMarginTop, "px)")
|
|
1022
|
+
})));
|
|
1023
|
+
var stickyScrollbarStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
1024
|
+
position: 'relative',
|
|
1025
|
+
flexDirection: 'column'
|
|
1026
|
+
}, "> .".concat(_styles.TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER), {
|
|
1027
|
+
width: '100%',
|
|
1028
|
+
display: 'block',
|
|
1029
|
+
visibility: 'hidden',
|
|
1030
|
+
overflowX: 'auto',
|
|
1031
|
+
position: 'sticky',
|
|
1032
|
+
bottom: "var(--ds-space-0, 0px)",
|
|
1033
|
+
zIndex: 1
|
|
1034
|
+
}), "> .".concat(_styles.TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, ",\n\t\t> .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP), {
|
|
1035
|
+
position: 'absolute',
|
|
1036
|
+
width: '100%',
|
|
1037
|
+
height: '1px',
|
|
1038
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
1039
|
+
marginTop: '-1px',
|
|
1040
|
+
// need this to avoid sentinel being focused via keyboard
|
|
1041
|
+
// this still allows it to be detected by intersection observer
|
|
1042
|
+
visibility: 'hidden'
|
|
1043
|
+
}), "> .".concat(_styles.TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP), {
|
|
1044
|
+
top: "".concat(tableRowHeight * 3, "px")
|
|
1045
|
+
}), "> .".concat(_styles.TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM), {
|
|
1046
|
+
bottom: "var(--ds-space-250, 20px)" // MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
1047
|
+
})));
|
|
1048
|
+
var rendererTableHeaderEqualHeightStylesForTableCellOnly = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), (0, _defineProperty2.default)({}, ".".concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table, .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
1049
|
+
height: '1px' /* will be ignored */,
|
|
1050
|
+
marginLeft: 0,
|
|
1051
|
+
marginRight: 0
|
|
1052
|
+
})), ".".concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table > tbody > tr:first-of-type, .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table > tbody > tr:first-of-type"), {
|
|
1053
|
+
height: '100%',
|
|
1054
|
+
'td, th': {
|
|
1055
|
+
position: 'relative'
|
|
1056
|
+
}
|
|
1057
|
+
}));
|
|
1058
|
+
var rendererTableSortableColumnStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), (0, _defineProperty2.default)({}, ".".concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table, .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), (0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
1059
|
+
padding: 0
|
|
1060
|
+
}, ".".concat(_consts.RendererCssClassName.SORTABLE_COLUMN), {
|
|
1061
|
+
width: '100%',
|
|
1062
|
+
height: '100%',
|
|
1063
|
+
padding: "".concat(_styles.tableCellPadding, "px"),
|
|
1064
|
+
borderWidth: '1.5px',
|
|
1065
|
+
borderStyle: 'solid',
|
|
1066
|
+
borderColor: "transparent",
|
|
1067
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1068
|
+
'> *:first-child': {
|
|
1069
|
+
marginTop: 0
|
|
1070
|
+
},
|
|
1071
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1072
|
+
'> .ProseMirror-gapcursor:first-child + *, > style:first-child + .ProseMirror-gapcursor + *': {
|
|
1073
|
+
marginTop: 0
|
|
1074
|
+
},
|
|
1075
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1076
|
+
'> .ProseMirror-gapcursor:first-child + span + *, > style:first-child + .ProseMirror-gapcursor + span + *': {
|
|
1077
|
+
marginTop: 0
|
|
1078
|
+
},
|
|
1079
|
+
'@supports selector(:focus-visible)': {
|
|
1080
|
+
'&:focus': {
|
|
1081
|
+
outline: 'unset'
|
|
1082
|
+
},
|
|
1083
|
+
'&:focus-visible': {
|
|
1084
|
+
borderColor: "".concat("var(--ds-border-focused, ".concat(_colors.B300, ")"))
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}), "> .".concat(_consts.RendererCssClassName.SORTABLE_COLUMN, " > .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER), (0, _defineProperty2.default)({
|
|
1088
|
+
margin: 0
|
|
1089
|
+
}, ".".concat(_table2.SORTABLE_COLUMN_ICON_CLASSNAME), {
|
|
1090
|
+
opacity: 1,
|
|
1091
|
+
transition: "opacity 0.2s ease-in-out"
|
|
1092
|
+
})), "> .".concat(_consts.RendererCssClassName.SORTABLE_COLUMN, "\n\t\t\t\t\t\t> .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER), (0, _defineProperty2.default)({}, ".".concat(_table2.SORTABLE_COLUMN_ICON_CLASSNAME), {
|
|
1093
|
+
opacity: 0,
|
|
1094
|
+
'&:focus': {
|
|
1095
|
+
opacity: 1
|
|
1096
|
+
}
|
|
1097
|
+
})), "&:hover:not(\n\t\t\t\t\t\t\t:has(\n\t\t\t\t\t\t\t\t\t.".concat(_consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER, "\n\t\t\t\t\t\t\t\t\t\t.").concat(_consts.RendererCssClassName.SORTABLE_COLUMN, ":hover\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t> .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN, "\n\t\t\t\t\t\t> .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER), (0, _defineProperty2.default)({}, ".".concat(_table2.SORTABLE_COLUMN_ICON_CLASSNAME), {
|
|
1098
|
+
opacity: 1
|
|
1099
|
+
}))))));
|
|
1100
|
+
var rendererTableColumnStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), {
|
|
1101
|
+
'table[data-number-column="true"]': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.NUMBER_COLUMN), {
|
|
1102
|
+
backgroundColor: "".concat("var(--ds-background-neutral, ".concat(_editorSharedStyles.akEditorTableToolbar, ")")),
|
|
1103
|
+
borderRight: "1px solid\n\t\t\t\t\t\t\t\t".concat("var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")")),
|
|
1104
|
+
width: "".concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px"),
|
|
1105
|
+
textAlign: 'center',
|
|
1106
|
+
color: "".concat("var(--ds-text-subtlest, ".concat(_colors.N200, ")")),
|
|
1107
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
1108
|
+
fontSize: "".concat(14 / 16, " rem")
|
|
1109
|
+
}), ".fixed .".concat(_consts.RendererCssClassName.NUMBER_COLUMN), {
|
|
1110
|
+
borderRight: "0px none"
|
|
1111
|
+
})
|
|
1112
|
+
}));
|
|
1113
|
+
|
|
1114
|
+
// assume FG platform_editor_nested_tables_renderer_styles and platform_editor_renderer_table_header_styles on
|
|
1115
|
+
var rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER), (0, _defineProperty2.default)({}, ".".concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table, .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), (0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER), (0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.SORTABLE_COLUMN), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
1116
|
+
position: 'unset'
|
|
1117
|
+
}), '>', {
|
|
1118
|
+
'h1, h2, h3, h4, h5, h6': {
|
|
1119
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
1120
|
+
marginRight: '30px'
|
|
1121
|
+
}
|
|
1122
|
+
}))))));
|
|
1123
|
+
|
|
1124
|
+
// @ts-expect-error - throw TS error when use !import in position.
|
|
1125
|
+
var stickyHeaderStyles = (0, _react.css)({
|
|
1126
|
+
'tr[data-header-row].fixed': {
|
|
1127
|
+
position: 'fixed !important',
|
|
1128
|
+
display: 'flex',
|
|
1129
|
+
overflow: 'hidden',
|
|
1130
|
+
zIndex: "".concat(_editorSharedStyles.akEditorStickyHeaderZIndex),
|
|
1131
|
+
borderRight: "1px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")")),
|
|
1132
|
+
borderBottom: "1px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")")),
|
|
1133
|
+
/* this is to compensate for the table border */
|
|
1134
|
+
transform: 'translateX(-1px)'
|
|
1135
|
+
},
|
|
1136
|
+
'.sticky > th': {
|
|
1137
|
+
zIndex: "".concat(_editorSharedStyles.akEditorStickyHeaderZIndex),
|
|
1138
|
+
position: 'fixed !important',
|
|
1139
|
+
top: 0
|
|
1140
|
+
},
|
|
1141
|
+
/* Make the number column header sticky */
|
|
1142
|
+
'.sticky > td': {
|
|
1143
|
+
position: 'fixed !important',
|
|
1144
|
+
top: 0
|
|
1145
|
+
},
|
|
1146
|
+
/* add border for position: sticky
|
|
1147
|
+
and work around background-clip: padding-box
|
|
1148
|
+
bug for FF causing box-shadow bug in Chrome */
|
|
1149
|
+
'.sticky th, .sticky td': {
|
|
1150
|
+
boxShadow: "0px 1px ".concat("var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), ",\n\t\t\t0px -0.5px ", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), ",\n\t\t\tinset -1px 0px ", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), ",\n\t\t\t0px -1px ", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"))
|
|
1151
|
+
},
|
|
1152
|
+
/* this will remove jumpiness caused in Chrome for sticky headers */
|
|
1153
|
+
'.fixed + tr': {
|
|
1154
|
+
minHeight: '0px'
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
var codeBlockAndLayoutStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
1158
|
+
/*
|
|
1159
|
+
* We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.
|
|
1160
|
+
* See ED-4159.
|
|
1161
|
+
*/
|
|
1162
|
+
'& .code-block': {
|
|
1163
|
+
maxWidth: '100%',
|
|
1164
|
+
display: 'block',
|
|
1165
|
+
position: 'relative',
|
|
1166
|
+
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
1167
|
+
/*
|
|
1168
|
+
* The overall renderer has word-wrap: break; which causes issues with
|
|
1169
|
+
* code block line numbers in Safari / iOS.
|
|
1170
|
+
*/
|
|
1171
|
+
wordWrap: 'normal'
|
|
1172
|
+
},
|
|
1173
|
+
'& .MediaGroup, & .code-block': {
|
|
1174
|
+
marginTop: "".concat(_editorSharedStyles.blockNodesVerticalMargin),
|
|
1175
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1176
|
+
'&:first-child': {
|
|
1177
|
+
marginTop: 0
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
}, ".".concat(_consts.RendererCssClassName.DOCUMENT, "\n\t\t> .").concat(_lightWeightCodeBlock.LightWeightCodeBlockCssClassName.CONTAINER, "\n\t\t.").concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER), {
|
|
1181
|
+
marginTop: _editorSharedStyles.blockNodesVerticalMargin
|
|
1182
|
+
}), '& [data-layout-section]', (0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
1183
|
+
marginTop: "var(--ds-space-250, 20px)",
|
|
1184
|
+
'& > div + div': {
|
|
1185
|
+
marginLeft: "var(--ds-space-400, 32px)"
|
|
1186
|
+
}
|
|
1187
|
+
}, "@media screen and (max-width: ".concat(_editorSharedStyles.gridMediumMaxWidth, "px)"), {
|
|
1188
|
+
'& > div + div': {
|
|
1189
|
+
marginLeft: 0
|
|
1190
|
+
}
|
|
1191
|
+
}), '& .MediaGroup, & .code-block', {
|
|
1192
|
+
marginTop: _editorSharedStyles.blockNodesVerticalMargin,
|
|
1193
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1194
|
+
'&:first-child': {
|
|
1195
|
+
marginTop: 0
|
|
1196
|
+
}
|
|
1197
|
+
})), '& li', {
|
|
1198
|
+
'> .code-block': {
|
|
1199
|
+
margin: "".concat(_editorSharedStyles.blockNodesVerticalMargin, " 0 0 0")
|
|
1200
|
+
},
|
|
1201
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1202
|
+
'> .code-block:first-child': {
|
|
1203
|
+
marginTop: 0
|
|
1204
|
+
},
|
|
1205
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1206
|
+
'> div:last-of-type.code-block': {
|
|
1207
|
+
marginBottom: _editorSharedStyles.blockNodesVerticalMargin
|
|
1208
|
+
}
|
|
1209
|
+
}));
|
|
1210
|
+
var layoutSectionForAdvancedLayoutsStyles = (0, _react.css)({
|
|
1211
|
+
'& [data-layout-section]': {
|
|
1212
|
+
'& > div + div': {
|
|
1213
|
+
marginLeft: 0
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
var gridRenderForCodeBlockStyles = (0, _react.css)({
|
|
1218
|
+
'& .code-block': {
|
|
1219
|
+
// removed old -ms- prefix, as grid is well supported for MS Edge
|
|
1220
|
+
display: 'grid',
|
|
1221
|
+
gridTemplateColumns: 'minmax(0, 1fr)',
|
|
1222
|
+
'& > span': {
|
|
1223
|
+
gridColumn: 1
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
|
|
1228
|
+
// This prevents https://product-fabric.atlassian.net/browse/ED-20924
|
|
1229
|
+
var codeBlockInListSafariFixStyles = (0, _react.css)((0, _defineProperty2.default)({}, "&:not([data-node-type='decisionList']) > li,\n\t\t&:not(.".concat(_styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, ") > li"), (0, _defineProperty2.default)({
|
|
1230
|
+
'&::before': {
|
|
1231
|
+
content: '" "',
|
|
1232
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
1233
|
+
lineHeight: _editorSharedStyles.akEditorLineHeight
|
|
1234
|
+
}
|
|
1235
|
+
}, "> p:first-child,\n\t\t\t> .code-block:first-child,\n\t\t\t> .ProseMirror-gapcursor:first-child + .code-block", {
|
|
1236
|
+
marginTop: "-".concat(_editorSharedStyles.akEditorLineHeight, "em !important")
|
|
1237
|
+
})));
|
|
1238
|
+
var columnLayoutSharedStyle = (0, _react.css)({
|
|
1239
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
1240
|
+
'[data-layout-section]': (0, _defineProperty2.default)({
|
|
1241
|
+
position: 'relative',
|
|
1242
|
+
display: 'flex',
|
|
1243
|
+
flexDirection: 'row',
|
|
1244
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
1245
|
+
'& > *': {
|
|
1246
|
+
flex: 1,
|
|
1247
|
+
minWidth: 0
|
|
1248
|
+
},
|
|
1249
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
1250
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
1251
|
+
minWidth: 'initial'
|
|
1252
|
+
}
|
|
1253
|
+
}, "@media screen and (max-width: ".concat(_editorSharedStyles.gridMediumMaxWidth, "px)"), {
|
|
1254
|
+
flexDirection: 'column'
|
|
1255
|
+
})
|
|
1256
|
+
});
|
|
1257
|
+
var columnLayoutResponsiveSharedStyle = (0, _react.css)({
|
|
1258
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
1259
|
+
'[data-layout-section]': {
|
|
1260
|
+
display: 'flex',
|
|
1261
|
+
flexDirection: 'row',
|
|
1262
|
+
gap: "var(--ds-space-100, 8px)",
|
|
1263
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
1264
|
+
'& > *': {
|
|
1265
|
+
flex: 1,
|
|
1266
|
+
minWidth: 0
|
|
1267
|
+
},
|
|
1268
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
1269
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
1270
|
+
minWidth: 'initial'
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
1274
|
+
'.layout-section-container': {
|
|
1275
|
+
containerType: 'inline-size',
|
|
1276
|
+
containerName: 'layout-area'
|
|
1277
|
+
}
|
|
1278
|
+
});
|
|
1279
|
+
var columnLayoutResponsiveRendererStyles = (0, _react.css)({
|
|
1280
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
1281
|
+
'.layout-section-container [data-layout-section]': (0, _defineProperty2.default)({
|
|
1282
|
+
gap: "var(--ds-space-600, 48px)"
|
|
1283
|
+
}, "@container layout-area (max-width: ".concat(LAYOUT_BREAKPOINT_RENDERER, "px)"), {
|
|
1284
|
+
flexDirection: 'column',
|
|
1285
|
+
gap: "var(--ds-space-400, 32px)"
|
|
1286
|
+
})
|
|
1287
|
+
});
|
|
1288
|
+
var rendererAnnotationStyles = (0, _react.css)({
|
|
1289
|
+
"& [data-mark-type='annotation'][data-mark-annotation-state='active'] [data-annotation-mark], & [data-annotation-draft-mark][data-annotation-inline-node]": {
|
|
1290
|
+
background: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"),
|
|
1291
|
+
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")")),
|
|
1292
|
+
boxShadow: "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")"),
|
|
1293
|
+
cursor: 'pointer',
|
|
1294
|
+
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
1295
|
+
}
|
|
1296
|
+
});
|
|
1297
|
+
var rendererAnnotationStylesCommentHeightFix = (0, _react.css)({
|
|
1298
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
1299
|
+
'& [data-annotation-draft-mark][data-annotation-inline-node]': {
|
|
1300
|
+
borderBottom: '2px solid transparent',
|
|
1301
|
+
cursor: 'pointer',
|
|
1302
|
+
padding: '1px 0 2px',
|
|
1303
|
+
background: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"),
|
|
1304
|
+
borderBottomColor: "var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")"),
|
|
1305
|
+
boxShadow: "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")")
|
|
1306
|
+
},
|
|
1307
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
1308
|
+
'& [data-annotation-draft-mark][data-annotation-inline-node][data-inline-card]': {
|
|
1309
|
+
padding: '5px 0 3px 0'
|
|
1310
|
+
},
|
|
1311
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
1312
|
+
'& [data-annotation-draft-mark][data-annotation-inline-node].date-lozenger-container': {
|
|
1313
|
+
paddingTop: "var(--ds-space-025, 2px)"
|
|
1314
|
+
}
|
|
1315
|
+
});
|
|
1316
|
+
var RendererStyleContainer = exports.RendererStyleContainer = function RendererStyleContainer(props) {
|
|
1317
|
+
var onClick = props.onClick,
|
|
1318
|
+
onMouseDown = props.onMouseDown,
|
|
1319
|
+
appearance = props.appearance,
|
|
1320
|
+
allowNestedHeaderLinks = props.allowNestedHeaderLinks,
|
|
1321
|
+
allowColumnSorting = props.allowColumnSorting,
|
|
1322
|
+
allowAnnotations = props.allowAnnotations,
|
|
1323
|
+
allowTableResizing = props.allowTableResizing,
|
|
1324
|
+
useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock,
|
|
1325
|
+
children = props.children,
|
|
1326
|
+
innerRef = props.innerRef,
|
|
1327
|
+
testId = props.testId;
|
|
1328
|
+
var isAdvancedLayoutsOn = (0, _experiments.editorExperiment)('advanced_layouts', true);
|
|
1329
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_emotion_refactor_renderer')) {
|
|
1330
|
+
return (
|
|
1331
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
1332
|
+
(0, _react.jsx)("div", {
|
|
1333
|
+
ref: innerRef,
|
|
1334
|
+
onClick: onClick,
|
|
1335
|
+
onMouseDown: onMouseDown,
|
|
1336
|
+
style: {
|
|
1337
|
+
'--ak-renderer-base-font-size': "".concat((0, _getBaseFontSize.getBaseFontSize)(appearance), "px")
|
|
1338
|
+
},
|
|
1339
|
+
css: [baseStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_heading_margin_fix') && headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles,
|
|
1340
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1341
|
+
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1342
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
1343
|
+
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') &&
|
|
1344
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1345
|
+
(0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _experiments.editorExperiment)('nested-dnd', true) ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, _browser.browser.safari && codeBlockInListSafariFixStyles],
|
|
1346
|
+
"data-testid": testId
|
|
1347
|
+
}, children)
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
return (
|
|
1351
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
1352
|
+
(0, _react.jsx)("div", {
|
|
1353
|
+
ref: innerRef,
|
|
1354
|
+
onClick: onClick,
|
|
1355
|
+
onMouseDown: onMouseDown
|
|
1356
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
1357
|
+
,
|
|
1358
|
+
css: (0, _style.rendererStyles)({
|
|
1359
|
+
appearance: appearance,
|
|
1360
|
+
allowNestedHeaderLinks: allowNestedHeaderLinks,
|
|
1361
|
+
allowColumnSorting: !!allowColumnSorting,
|
|
1362
|
+
useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
|
|
1363
|
+
allowAnnotations: allowAnnotations,
|
|
1364
|
+
allowTableResizing: allowTableResizing
|
|
1365
|
+
}),
|
|
1366
|
+
"data-testid": testId
|
|
1367
|
+
}, props.children)
|
|
1368
|
+
);
|
|
1369
|
+
};
|