@atlaskit/renderer 91.0.0 → 93.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/cjs/analytics/enums.js +2 -0
- package/dist/cjs/react/marks/alignment.js +11 -12
- package/dist/cjs/react/marks/breakout.js +7 -9
- package/dist/cjs/react/marks/link.js +13 -6
- package/dist/cjs/react/nodes/codeBlock.js +17 -16
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +13 -11
- package/dist/cjs/react/nodes/embedCard.js +25 -33
- package/dist/cjs/react/nodes/heading-anchor.js +7 -6
- package/dist/cjs/react/nodes/heading.js +4 -2
- package/dist/cjs/react/nodes/layoutColumn.js +7 -2
- package/dist/cjs/react/nodes/media.js +7 -6
- package/dist/cjs/react/nodes/mediaSingle/index.js +15 -4
- package/dist/cjs/react/nodes/mediaSingle/styles.js +7 -10
- package/dist/cjs/react/nodes/panel.js +26 -16
- package/dist/cjs/react/nodes/table/sticky.js +63 -55
- package/dist/cjs/react/nodes/table.js +2 -10
- package/dist/cjs/react/utils/inject-props.js +33 -0
- package/dist/cjs/react/utils/performance/RenderTracking.js +52 -0
- package/dist/cjs/ui/Expand.js +52 -28
- package/dist/cjs/ui/MediaCard.js +4 -14
- package/dist/cjs/ui/Renderer/index.js +72 -64
- package/dist/cjs/ui/Renderer/style.js +62 -55
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +19 -21
- package/dist/cjs/ui/SortingIcon.js +8 -9
- package/dist/cjs/ui/annotations/draft/component.js +22 -12
- package/dist/cjs/ui/annotations/element/mark.js +9 -5
- package/dist/cjs/ui/renderer-props.js +1 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/enums.js +2 -0
- package/dist/es2019/react/marks/alignment.js +15 -7
- package/dist/es2019/react/marks/breakout.js +6 -5
- package/dist/es2019/react/marks/link.js +8 -5
- package/dist/es2019/react/nodes/codeBlock.js +25 -23
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +12 -9
- package/dist/es2019/react/nodes/embedCard.js +16 -16
- package/dist/es2019/react/nodes/heading-anchor.js +9 -6
- package/dist/es2019/react/nodes/heading.js +4 -2
- package/dist/es2019/react/nodes/layoutColumn.js +7 -3
- package/dist/es2019/react/nodes/media.js +9 -5
- package/dist/es2019/react/nodes/mediaSingle/index.js +10 -6
- package/dist/es2019/react/nodes/mediaSingle/styles.js +6 -7
- package/dist/es2019/react/nodes/panel.js +23 -16
- package/dist/es2019/react/nodes/table/sticky.js +55 -37
- package/dist/es2019/react/nodes/table.js +2 -5
- package/dist/es2019/react/utils/inject-props.js +24 -0
- package/dist/es2019/react/utils/performance/RenderTracking.js +37 -0
- package/dist/es2019/ui/Expand.js +65 -36
- package/dist/es2019/ui/MediaCard.js +3 -6
- package/dist/es2019/ui/Renderer/index.js +72 -57
- package/dist/es2019/ui/Renderer/style.js +370 -327
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +26 -15
- package/dist/es2019/ui/SortingIcon.js +9 -7
- package/dist/es2019/ui/annotations/draft/component.js +18 -12
- package/dist/es2019/ui/annotations/element/mark.js +12 -6
- package/dist/es2019/ui/renderer-props.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/enums.js +2 -0
- package/dist/esm/react/marks/alignment.js +13 -6
- package/dist/esm/react/marks/breakout.js +6 -5
- package/dist/esm/react/marks/link.js +7 -5
- package/dist/esm/react/nodes/codeBlock.js +18 -14
- package/dist/esm/react/nodes/codeBlockCopyButton.js +10 -7
- package/dist/esm/react/nodes/embedCard.js +19 -19
- package/dist/esm/react/nodes/heading-anchor.js +8 -6
- package/dist/esm/react/nodes/heading.js +4 -2
- package/dist/esm/react/nodes/layoutColumn.js +7 -3
- package/dist/esm/react/nodes/media.js +8 -5
- package/dist/esm/react/nodes/mediaSingle/index.js +11 -6
- package/dist/esm/react/nodes/mediaSingle/styles.js +5 -7
- package/dist/esm/react/nodes/panel.js +27 -15
- package/dist/esm/react/nodes/table/sticky.js +64 -53
- package/dist/esm/react/nodes/table.js +2 -8
- package/dist/esm/react/utils/inject-props.js +24 -0
- package/dist/esm/react/utils/performance/RenderTracking.js +39 -0
- package/dist/esm/ui/Expand.js +57 -29
- package/dist/esm/ui/MediaCard.js +3 -9
- package/dist/esm/ui/Renderer/index.js +74 -61
- package/dist/esm/ui/Renderer/style.js +58 -51
- package/dist/esm/ui/Renderer/truncated-wrapper.js +20 -14
- package/dist/esm/ui/SortingIcon.js +9 -7
- package/dist/esm/ui/annotations/draft/component.js +18 -11
- package/dist/esm/ui/annotations/element/mark.js +11 -4
- package/dist/esm/ui/renderer-props.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/enums.d.ts +2 -0
- package/dist/types/analytics/events.d.ts +12 -2
- package/dist/types/react/marks/alignment.d.ts +2 -2
- package/dist/types/react/marks/breakout.d.ts +4 -3
- package/dist/types/react/marks/link.d.ts +2 -2
- package/dist/types/react/nodes/codeBlock.d.ts +4 -14
- package/dist/types/react/nodes/embedCard.d.ts +3 -2
- package/dist/types/react/nodes/heading-anchor.d.ts +1 -0
- package/dist/types/react/nodes/heading.d.ts +1 -0
- package/dist/types/react/nodes/index.d.ts +1 -13
- package/dist/types/react/nodes/layoutColumn.d.ts +3 -1
- package/dist/types/react/nodes/media.d.ts +3 -1
- package/dist/types/react/nodes/mediaSingle/index.d.ts +1 -0
- package/dist/types/react/nodes/mediaSingle/styles.d.ts +2 -3
- package/dist/types/react/nodes/panel.d.ts +3 -1
- package/dist/types/react/nodes/table/sticky.d.ts +4 -2
- package/dist/types/react/utils/inject-props.d.ts +6 -0
- package/dist/types/react/utils/performance/RenderTracking.d.ts +15 -0
- package/dist/types/ui/Expand.d.ts +3 -2
- package/dist/types/ui/MediaCard.d.ts +1 -3
- package/dist/types/ui/Renderer/index.d.ts +3 -26
- package/dist/types/ui/Renderer/style.d.ts +2 -3
- package/dist/types/ui/Renderer/truncated-wrapper.d.ts +3 -1
- package/dist/types/ui/SortingIcon.d.ts +3 -3
- package/dist/types/ui/annotations/draft/component.d.ts +1 -0
- package/dist/types/ui/annotations/element/mark.d.ts +1 -0
- package/dist/types/ui/renderer-props.d.ts +14 -2
- package/package.json +22 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { themed } from '@atlaskit/theme/components';
|
|
3
3
|
import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
@@ -84,9 +84,14 @@ const alignedHeadingAnchorStyle = ({
|
|
|
84
84
|
return '';
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
return `
|
|
87
|
+
return css`
|
|
88
88
|
.fabric-editor-block-mark[data-align] > {
|
|
89
|
-
h1,
|
|
89
|
+
h1,
|
|
90
|
+
h2,
|
|
91
|
+
h3,
|
|
92
|
+
h4,
|
|
93
|
+
h5,
|
|
94
|
+
h6 {
|
|
90
95
|
position: relative;
|
|
91
96
|
}
|
|
92
97
|
}
|
|
@@ -97,41 +102,45 @@ const alignedHeadingAnchorStyle = ({
|
|
|
97
102
|
* container edge.
|
|
98
103
|
*/
|
|
99
104
|
.fabric-editor-block-mark:not([data-align='center'])[data-align] {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
105
|
+
> {
|
|
106
|
+
h1,
|
|
107
|
+
h2,
|
|
108
|
+
h3,
|
|
109
|
+
h4,
|
|
110
|
+
h5,
|
|
111
|
+
h6 {
|
|
112
|
+
// Using right to left text to achieve the inverse effect
|
|
113
|
+
// of where the copy link button icon sits for left/center
|
|
114
|
+
// alignment.
|
|
115
|
+
// Although this is unorthodox it's the only approach which
|
|
116
|
+
// allows the button to sit flush against the left edge of
|
|
117
|
+
// bottom line of text.
|
|
118
|
+
direction: rtl;
|
|
119
|
+
|
|
120
|
+
// By default RTL will negatively impact the layout of special
|
|
121
|
+
// characters within the heading text, and potentially other
|
|
122
|
+
// nested inline nodes. To prevent this we insert pseudo elements
|
|
123
|
+
// containing HTML entities to retain LTR for all heading content
|
|
124
|
+
// except for the copy link button.
|
|
125
|
+
> *:not(.${HeadingAnchorWrapperClassName}):not(br) {
|
|
126
|
+
::before {
|
|
127
|
+
// Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm
|
|
128
|
+
content: '\u202A';
|
|
129
|
+
}
|
|
130
|
+
::after {
|
|
131
|
+
// Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm
|
|
132
|
+
content: '\u202C';
|
|
124
133
|
}
|
|
125
134
|
}
|
|
126
135
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
136
|
+
}
|
|
137
|
+
.${HeadingAnchorWrapperClassName} {
|
|
138
|
+
margin: 0 6px 0 0;
|
|
139
|
+
}
|
|
130
140
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
141
|
+
@media (hover: hover) and (pointer: fine) {
|
|
142
|
+
.${HeadingAnchorWrapperClassName} > button {
|
|
143
|
+
transform: translate(8px, 0px);
|
|
135
144
|
}
|
|
136
145
|
}
|
|
137
146
|
}
|
|
@@ -174,7 +183,7 @@ const tableSortableColumnStyle = ({
|
|
|
174
183
|
`;
|
|
175
184
|
}
|
|
176
185
|
|
|
177
|
-
return `
|
|
186
|
+
return css`
|
|
178
187
|
.${RendererCssClassName.SORTABLE_COLUMN} {
|
|
179
188
|
padding: 0;
|
|
180
189
|
|
|
@@ -211,7 +220,8 @@ const tableSortableColumnStyle = ({
|
|
|
211
220
|
${headingsCss}
|
|
212
221
|
}
|
|
213
222
|
|
|
214
|
-
&.${RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED}
|
|
223
|
+
&.${RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED}
|
|
224
|
+
.${RendererCssClassName.SORTABLE_COLUMN_BUTTON} {
|
|
215
225
|
cursor: default;
|
|
216
226
|
}
|
|
217
227
|
|
|
@@ -235,14 +245,15 @@ const tableSortableColumnStyle = ({
|
|
|
235
245
|
};
|
|
236
246
|
|
|
237
247
|
const fullPageStyles = ({
|
|
238
|
-
theme,
|
|
239
248
|
appearance
|
|
249
|
+
}, {
|
|
250
|
+
theme
|
|
240
251
|
}) => {
|
|
241
252
|
if (appearance !== 'full-page' && appearance !== 'mobile') {
|
|
242
253
|
return '';
|
|
243
254
|
}
|
|
244
255
|
|
|
245
|
-
return `
|
|
256
|
+
return css`
|
|
246
257
|
max-width: ${theme && theme.layoutMaxWidth ? `${theme.layoutMaxWidth}px` : 'none'};
|
|
247
258
|
margin: 0 auto;
|
|
248
259
|
padding: 0 ${appearance === 'full-page' ? FullPagePadding : 0}px;
|
|
@@ -256,363 +267,395 @@ const fullWidthStyles = ({
|
|
|
256
267
|
return '';
|
|
257
268
|
}
|
|
258
269
|
|
|
259
|
-
return `
|
|
260
|
-
|
|
261
|
-
|
|
270
|
+
return css`
|
|
271
|
+
max-width: ${akEditorFullWidthLayoutWidth}px;
|
|
272
|
+
margin: 0 auto;
|
|
262
273
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
274
|
+
.fabric-editor-breakout-mark,
|
|
275
|
+
.pm-table-container,
|
|
276
|
+
.ak-renderer-extension {
|
|
277
|
+
width: 100% !important;
|
|
278
|
+
}
|
|
268
279
|
`;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
export const Wrapper = styled.div`
|
|
273
|
-
font-size: ${editorFontSize}px;
|
|
274
|
-
line-height: 1.5rem;
|
|
275
|
-
color: ${themed({
|
|
276
|
-
light: colors.N800,
|
|
277
|
-
dark: '#B8C7E0'
|
|
278
|
-
})};
|
|
279
|
-
|
|
280
|
-
${fullPageStyles}
|
|
281
|
-
${fullWidthStyles}
|
|
282
|
-
|
|
283
|
-
& h1 {
|
|
284
|
-
${headingAnchorStyle('h1')}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
& h2 {
|
|
288
|
-
${headingAnchorStyle('h2')}
|
|
289
|
-
}
|
|
280
|
+
};
|
|
290
281
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
282
|
+
export const rendererStyles = wrapperProps => theme => {
|
|
283
|
+
// This is required to be compatible with styled-components prop structure.
|
|
284
|
+
const themeProps = {
|
|
285
|
+
theme
|
|
286
|
+
};
|
|
287
|
+
return css`
|
|
288
|
+
font-size: ${editorFontSize(themeProps)}px;
|
|
289
|
+
line-height: 1.5rem;
|
|
290
|
+
color: ${themed({
|
|
291
|
+
light: colors.N800,
|
|
292
|
+
dark: '#B8C7E0'
|
|
293
|
+
})(themeProps)};
|
|
294
|
+
|
|
295
|
+
.${RendererCssClassName.DOCUMENT}::after {
|
|
296
|
+
// we add a clearfix after ak-renderer-document in order to
|
|
297
|
+
// contain internal floats (such as media images that are "wrap-left")
|
|
298
|
+
// to just the renderer (and not spill outside of it)
|
|
299
|
+
content: '';
|
|
300
|
+
visibility: hidden;
|
|
301
|
+
display: block;
|
|
302
|
+
height: 0;
|
|
303
|
+
clear: both;
|
|
304
|
+
}
|
|
294
305
|
|
|
295
|
-
|
|
296
|
-
${
|
|
297
|
-
}
|
|
306
|
+
${fullPageStyles(wrapperProps, themeProps)}
|
|
307
|
+
${fullWidthStyles(wrapperProps)}
|
|
298
308
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
309
|
+
& h1 {
|
|
310
|
+
${headingAnchorStyle('h1')}
|
|
311
|
+
}
|
|
302
312
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
313
|
+
& h2 {
|
|
314
|
+
${headingAnchorStyle('h2')}
|
|
315
|
+
}
|
|
306
316
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
317
|
+
& h3 {
|
|
318
|
+
${headingAnchorStyle('h3')}
|
|
319
|
+
}
|
|
310
320
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
text-decoration: underline;
|
|
321
|
+
& h4 {
|
|
322
|
+
${headingAnchorStyle('h4')}
|
|
314
323
|
}
|
|
315
|
-
}
|
|
316
324
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
325
|
+
& h5 {
|
|
326
|
+
${headingAnchorStyle('h5')}
|
|
327
|
+
}
|
|
320
328
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
329
|
+
& h6 {
|
|
330
|
+
${headingAnchorStyle('h6')}
|
|
331
|
+
}
|
|
324
332
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
${panelSharedStyles};
|
|
329
|
-
${ruleSharedStyles};
|
|
330
|
-
${paragraphSharedStyles};
|
|
331
|
-
${listsSharedStyles};
|
|
332
|
-
${indentationSharedStyles};
|
|
333
|
-
${blockMarksSharedStyles};
|
|
334
|
-
${codeMarkSharedStyles};
|
|
335
|
-
${shadowSharedStyle};
|
|
336
|
-
${dateSharedStyle};
|
|
337
|
-
${textColorStyles};
|
|
338
|
-
${tasksAndDecisionsStyles};
|
|
339
|
-
${smartCardSharedStyles}
|
|
340
|
-
|
|
341
|
-
& .UnknownBlock {
|
|
342
|
-
font-family: ${fontFamily()};
|
|
343
|
-
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
344
|
-
font-weight: 400;
|
|
345
|
-
white-space: pre-wrap;
|
|
346
|
-
word-wrap: break-word;
|
|
347
|
-
}
|
|
333
|
+
& span.akActionMark {
|
|
334
|
+
color: ${colors.B400};
|
|
335
|
+
text-decoration: none;
|
|
348
336
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
354
|
-
border-radius: ${borderRadius()}px;
|
|
355
|
-
color: ${themed({
|
|
356
|
-
light: colors.N800,
|
|
357
|
-
dark: colors.DN600
|
|
358
|
-
})};
|
|
359
|
-
padding: 2px 4px;
|
|
360
|
-
margin: 0 1px;
|
|
361
|
-
transition: background 0.3s;
|
|
362
|
-
}
|
|
337
|
+
&:hover {
|
|
338
|
+
color: ${colors.B300};
|
|
339
|
+
text-decoration: underline;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
363
342
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
343
|
+
& span.akActionMark {
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
}
|
|
368
346
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
margin: ${gridSize() * 3}px 0;
|
|
373
|
-
}
|
|
347
|
+
& span[data-placeholder] {
|
|
348
|
+
color: ${colors.placeholderText(themeProps)};
|
|
349
|
+
}
|
|
374
350
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
351
|
+
${whitespaceSharedStyles};
|
|
352
|
+
${blockquoteSharedStyles};
|
|
353
|
+
${headingsSharedStyles(themeProps)};
|
|
354
|
+
${panelSharedStyles(themeProps)};
|
|
355
|
+
${ruleSharedStyles(themeProps)};
|
|
356
|
+
${paragraphSharedStyles};
|
|
357
|
+
${listsSharedStyles};
|
|
358
|
+
${indentationSharedStyles};
|
|
359
|
+
${blockMarksSharedStyles};
|
|
360
|
+
${codeMarkSharedStyles(themeProps)};
|
|
361
|
+
${shadowSharedStyle};
|
|
362
|
+
${dateSharedStyle};
|
|
363
|
+
${textColorStyles};
|
|
364
|
+
${tasksAndDecisionsStyles};
|
|
365
|
+
${smartCardSharedStyles}
|
|
366
|
+
|
|
367
|
+
& .UnknownBlock {
|
|
368
|
+
font-family: ${fontFamily()};
|
|
369
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
370
|
+
font-weight: 400;
|
|
371
|
+
white-space: pre-wrap;
|
|
372
|
+
word-wrap: break-word;
|
|
373
|
+
}
|
|
378
374
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
375
|
+
& span.date-node {
|
|
376
|
+
background: ${themed({
|
|
377
|
+
light: colors.N30A,
|
|
378
|
+
dark: colors.DN70
|
|
379
|
+
})(themeProps)};
|
|
380
|
+
border-radius: ${borderRadius()}px;
|
|
381
|
+
color: ${themed({
|
|
382
|
+
light: colors.N800,
|
|
383
|
+
dark: colors.DN600
|
|
384
|
+
})(themeProps)};
|
|
385
|
+
padding: 2px 4px;
|
|
386
|
+
margin: 0 1px;
|
|
387
|
+
transition: background 0.3s;
|
|
388
|
+
}
|
|
390
389
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
& + h3,
|
|
395
|
-
& + h4,
|
|
396
|
-
& + h5,
|
|
397
|
-
& + h6 {
|
|
398
|
-
margin-top: 8px;
|
|
390
|
+
& span.date-node-highlighted {
|
|
391
|
+
background: ${colors.R50};
|
|
392
|
+
color: ${colors.R500};
|
|
399
393
|
}
|
|
400
|
-
}
|
|
401
394
|
|
|
402
|
-
|
|
395
|
+
& .renderer-image {
|
|
396
|
+
max-width: 100%;
|
|
397
|
+
display: block;
|
|
398
|
+
margin: ${gridSize() * 3}px 0;
|
|
399
|
+
}
|
|
403
400
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
401
|
+
.${richMediaClassName}.rich-media-wrapped
|
|
402
|
+
+ .${richMediaClassName}:not(.rich-media-wrapped) {
|
|
403
|
+
clear: both;
|
|
404
|
+
}
|
|
409
405
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
406
|
+
& .code-block,
|
|
407
|
+
& blockquote,
|
|
408
|
+
& hr,
|
|
409
|
+
& > div > div:not(.rich-media-wrapped),
|
|
410
|
+
.${richMediaClassName}.rich-media-wrapped
|
|
411
|
+
+ .rich-media-wrapped
|
|
412
|
+
+ *:not(.rich-media-wrapped),
|
|
413
|
+
.${richMediaClassName}.rich-media-wrapped + div:not(.rich-media-wrapped),
|
|
414
|
+
.${richMediaClassName}.image-align-start,
|
|
415
|
+
.${richMediaClassName}.image-center,
|
|
416
|
+
.${richMediaClassName}.image-align-end {
|
|
417
|
+
clear: both;
|
|
415
418
|
}
|
|
416
419
|
|
|
417
|
-
|
|
418
|
-
|
|
420
|
+
& .rich-media-wrapped {
|
|
421
|
+
& + h1,
|
|
422
|
+
& + h2,
|
|
423
|
+
& + h3,
|
|
424
|
+
& + h4,
|
|
425
|
+
& + h5,
|
|
426
|
+
& + h6 {
|
|
427
|
+
margin-top: 8px;
|
|
428
|
+
}
|
|
419
429
|
}
|
|
420
430
|
|
|
421
|
-
|
|
422
|
-
|
|
431
|
+
${alignedHeadingAnchorStyle(wrapperProps)}
|
|
432
|
+
/* plugin styles */
|
|
433
|
+
${mediaSingleSharedStyle} &
|
|
434
|
+
div[class^='image-wrap-'] + div[class^='image-wrap-'] {
|
|
435
|
+
margin-left: 0;
|
|
436
|
+
margin-right: 0;
|
|
423
437
|
}
|
|
424
|
-
}
|
|
425
438
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
439
|
+
/* Breakout for tables and extensions */
|
|
440
|
+
.${RendererCssClassName.DOCUMENT} > {
|
|
441
|
+
* .${TableSharedCssClassName.TABLE_CONTAINER} {
|
|
442
|
+
width: 100% !important;
|
|
443
|
+
left: 0 !important;
|
|
444
|
+
}
|
|
429
445
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
446
|
+
* .${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER} {
|
|
447
|
+
overflow-x: auto;
|
|
448
|
+
}
|
|
434
449
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
450
|
+
& .${RendererCssClassName.EXTENSION}:first-child {
|
|
451
|
+
margin-top: 0;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
438
454
|
|
|
439
|
-
|
|
455
|
+
.${RendererCssClassName.DOCUMENT} {
|
|
456
|
+
.${RendererCssClassName.EXTENSION} {
|
|
457
|
+
margin-top: ${blockNodesVerticalMargin};
|
|
458
|
+
}
|
|
440
459
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
460
|
+
.${RendererCssClassName.EXTENSION_CENTER_ALIGN} {
|
|
461
|
+
margin-left: 50%;
|
|
462
|
+
transform: translateX(-50%);
|
|
463
|
+
}
|
|
445
464
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
height: calc(100% - ${tableMarginTop}px);
|
|
450
|
-
z-index: ${akEditorStickyHeaderZIndex};
|
|
465
|
+
.${TableSharedCssClassName.TABLE_NODE_WRAPPER} {
|
|
466
|
+
overflow-x: auto;
|
|
467
|
+
}
|
|
451
468
|
}
|
|
452
469
|
|
|
453
|
-
|
|
470
|
+
${tableSharedStyle(themeProps)}
|
|
471
|
+
|
|
472
|
+
.${RendererCssClassName.DOCUMENT} .${TableSharedCssClassName.TABLE_CONTAINER} {
|
|
473
|
+
z-index: 0;
|
|
474
|
+
transition: all 0.1s linear;
|
|
475
|
+
display: flex; /* needed to avoid position: fixed jumpiness in Chrome */
|
|
476
|
+
|
|
477
|
+
/** Shadow overrides */
|
|
478
|
+
&.${shadowClassNames.RIGHT_SHADOW}::after,
|
|
479
|
+
&.${shadowClassNames.LEFT_SHADOW}::before {
|
|
480
|
+
top: ${tableMarginTop - 1}px;
|
|
481
|
+
height: calc(100% - ${tableMarginTop}px);
|
|
482
|
+
z-index: ${akEditorStickyHeaderZIndex};
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
454
486
|
* A hack for making all the <th /> heights equal in case some have shorter
|
|
455
487
|
* content than others.
|
|
456
488
|
*
|
|
457
489
|
* This is done to make sort buttons fill entire <th />.
|
|
458
490
|
*/
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
491
|
+
table {
|
|
492
|
+
height: 1px; /* will be ignored */
|
|
493
|
+
${tableSortableColumnStyle(wrapperProps)};
|
|
494
|
+
margin-left: 0;
|
|
495
|
+
margin-right: 0;
|
|
496
|
+
}
|
|
465
497
|
|
|
466
|
-
|
|
467
|
-
|
|
498
|
+
table tr:first-child {
|
|
499
|
+
height: 100%;
|
|
468
500
|
|
|
469
|
-
|
|
470
|
-
|
|
501
|
+
td,
|
|
502
|
+
th {
|
|
503
|
+
position: relative;
|
|
504
|
+
}
|
|
471
505
|
}
|
|
472
|
-
}
|
|
473
506
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
})};
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
507
|
+
table[data-number-column='true'] {
|
|
508
|
+
.${RendererCssClassName.NUMBER_COLUMN} {
|
|
509
|
+
background-color: ${themed({
|
|
510
|
+
light: akEditorTableToolbar,
|
|
511
|
+
dark: akEditorTableToolbarDark
|
|
512
|
+
})(themeProps)};
|
|
513
|
+
border-right: 1px solid
|
|
514
|
+
${themed({
|
|
515
|
+
light: akEditorTableBorder,
|
|
516
|
+
dark: akEditorTableBorderDark
|
|
517
|
+
})(themeProps)};
|
|
518
|
+
width: ${akEditorTableNumberColumnWidth}px;
|
|
519
|
+
text-align: center;
|
|
520
|
+
color: ${themed({
|
|
521
|
+
light: colors.N200,
|
|
522
|
+
dark: colors.DN400
|
|
523
|
+
})(themeProps)};
|
|
524
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
525
|
+
}
|
|
492
526
|
|
|
493
|
-
|
|
494
|
-
|
|
527
|
+
.fixed .${RendererCssClassName.NUMBER_COLUMN} {
|
|
528
|
+
border-right: 0px none;
|
|
529
|
+
}
|
|
495
530
|
}
|
|
496
531
|
}
|
|
497
|
-
}
|
|
498
532
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
border-right: 1px solid ${themed({
|
|
506
|
-
light: akEditorTableBorder,
|
|
507
|
-
dark: akEditorTableBorderDark
|
|
508
|
-
})};
|
|
509
|
-
border-bottom: 1px solid ${themed({
|
|
510
|
-
light: akEditorTableBorder,
|
|
511
|
-
dark: akEditorTableBorderDark
|
|
512
|
-
})};
|
|
513
|
-
|
|
514
|
-
/* this is to compensate for the table border */
|
|
515
|
-
transform: translateX(-1px);
|
|
516
|
-
}
|
|
533
|
+
tr[data-header-row].fixed {
|
|
534
|
+
position: fixed !important;
|
|
535
|
+
display: flex;
|
|
536
|
+
overflow: hidden;
|
|
537
|
+
z-index: ${akEditorStickyHeaderZIndex};
|
|
517
538
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
}
|
|
539
|
+
border-right: 1px solid
|
|
540
|
+
${themed({
|
|
541
|
+
light: akEditorTableBorder,
|
|
542
|
+
dark: akEditorTableBorderDark
|
|
543
|
+
})(themeProps)};
|
|
544
|
+
border-bottom: 1px solid
|
|
545
|
+
${themed({
|
|
546
|
+
light: akEditorTableBorder,
|
|
547
|
+
dark: akEditorTableBorderDark
|
|
548
|
+
})(themeProps)};
|
|
549
|
+
|
|
550
|
+
/* this is to compensate for the table border */
|
|
551
|
+
transform: translateX(-1px);
|
|
552
|
+
}
|
|
523
553
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
554
|
+
.sticky > th {
|
|
555
|
+
z-index: ${akEditorStickyHeaderZIndex};
|
|
556
|
+
position: sticky !important;
|
|
557
|
+
top: 0;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/* Make the number column header sticky */
|
|
561
|
+
.sticky > td {
|
|
562
|
+
position: sticky !important;
|
|
563
|
+
top: 0;
|
|
564
|
+
}
|
|
529
565
|
|
|
530
|
-
|
|
566
|
+
/* add border for position: sticky
|
|
531
567
|
and work around background-clip: padding-box
|
|
532
568
|
bug for FF causing box-shadow bug in Chrome */
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
})},
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
569
|
+
.sticky th,
|
|
570
|
+
.sticky td {
|
|
571
|
+
box-shadow: 0px 1px
|
|
572
|
+
${themed({
|
|
573
|
+
light: akEditorTableBorder,
|
|
574
|
+
dark: akEditorTableBorderDark
|
|
575
|
+
})(themeProps)},
|
|
576
|
+
0px -0.5px ${themed({
|
|
577
|
+
light: akEditorTableBorder,
|
|
578
|
+
dark: akEditorTableBorderDark
|
|
579
|
+
})(themeProps)},
|
|
580
|
+
inset -1px 0px ${themed({
|
|
581
|
+
light: akEditorTableToolbar,
|
|
582
|
+
dark: akEditorTableToolbarDark
|
|
583
|
+
})(themeProps)},
|
|
584
|
+
0px -1px ${themed({
|
|
585
|
+
light: akEditorTableToolbar,
|
|
586
|
+
dark: akEditorTableToolbarDark
|
|
587
|
+
})(themeProps)};
|
|
588
|
+
}
|
|
548
589
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
590
|
+
/* this will remove jumpiness caused in Chrome for sticky headers */
|
|
591
|
+
.fixed + tr {
|
|
592
|
+
min-height: 0px;
|
|
593
|
+
}
|
|
553
594
|
|
|
554
|
-
|
|
595
|
+
/*
|
|
555
596
|
* We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.
|
|
556
597
|
* See ED-4159.
|
|
557
598
|
*/
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
grid-template-columns: minmax(0, 1fr);
|
|
568
|
-
position: relative;
|
|
569
|
-
border-radius: ${borderRadius()}px;
|
|
599
|
+
& .code-block {
|
|
600
|
+
max-width: 100%;
|
|
601
|
+
/* -ms- properties are necessary until MS supports the latest version of the grid spec */
|
|
602
|
+
/* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */
|
|
603
|
+
display: -ms-grid;
|
|
604
|
+
display: grid;
|
|
605
|
+
-ms-grid-columns: auto 1fr;
|
|
606
|
+
/* stylelint-enable */
|
|
570
607
|
|
|
571
|
-
|
|
608
|
+
grid-template-columns: minmax(0, 1fr);
|
|
609
|
+
position: relative;
|
|
610
|
+
border-radius: ${borderRadius()}px;
|
|
611
|
+
|
|
612
|
+
/*
|
|
572
613
|
* The overall renderer has word-wrap: break; which causes issues with
|
|
573
614
|
* code block line numbers in Safari / iOS.
|
|
574
615
|
*/
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
616
|
+
word-wrap: normal;
|
|
617
|
+
|
|
618
|
+
& > span {
|
|
619
|
+
/* stylelint-disable value-no-vendor-prefix */
|
|
620
|
+
-ms-grid-row: 1;
|
|
621
|
+
-ms-grid-column: 2;
|
|
622
|
+
/* stylelint-enable */
|
|
623
|
+
grid-column: 1;
|
|
624
|
+
}
|
|
583
625
|
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
& .MediaGroup,
|
|
587
|
-
& .code-block {
|
|
588
|
-
margin-top: ${blockNodesVerticalMargin};
|
|
589
626
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
627
|
+
& .MediaGroup,
|
|
628
|
+
& .code-block {
|
|
629
|
+
margin-top: ${blockNodesVerticalMargin};
|
|
593
630
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
height: 32px;
|
|
598
|
-
width: 32px;
|
|
599
|
-
right: 6px;
|
|
600
|
-
top: 4px;
|
|
601
|
-
padding: 2px;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
631
|
+
&:first-child {
|
|
632
|
+
margin-top: 0;
|
|
633
|
+
}
|
|
604
634
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
635
|
+
&:hover button.copy-to-clipboard,
|
|
636
|
+
.copy-to-clipboard:focus {
|
|
637
|
+
opacity: 1;
|
|
638
|
+
position: absolute;
|
|
639
|
+
height: 32px;
|
|
640
|
+
width: 32px;
|
|
641
|
+
right: 6px;
|
|
642
|
+
top: 4px;
|
|
643
|
+
padding: 2px;
|
|
644
|
+
}
|
|
610
645
|
}
|
|
611
646
|
|
|
612
|
-
|
|
647
|
+
${columnLayoutSharedStyle};
|
|
648
|
+
& [data-layout-section] {
|
|
649
|
+
margin-top: ${gridSize() * 2.5}px;
|
|
613
650
|
& > div + div {
|
|
614
|
-
margin-left:
|
|
651
|
+
margin-left: ${gridSize() * 4}px;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
@media screen and (max-width: ${gridMediumMaxWidth}px) {
|
|
655
|
+
& > div + div {
|
|
656
|
+
margin-left: 0;
|
|
657
|
+
}
|
|
615
658
|
}
|
|
616
659
|
}
|
|
617
|
-
|
|
618
|
-
|
|
660
|
+
`;
|
|
661
|
+
};
|