@atlaskit/editor-core 214.2.3 → 215.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/index.js +0 -7
  3. package/dist/cjs/ui/Addon/click-area-helper.js +1 -2
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +38 -2
  5. package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +10 -2
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/index.js +0 -8
  8. package/dist/es2019/ui/Addon/click-area-helper.js +1 -2
  9. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +40 -3
  10. package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +9 -1
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/index.js +0 -8
  13. package/dist/esm/ui/Addon/click-area-helper.js +1 -2
  14. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +39 -3
  15. package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +9 -1
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/index.d.ts +0 -7
  18. package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
  19. package/dist/types-ts4.5/index.d.ts +0 -7
  20. package/dist/types-ts4.5/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
  21. package/package.json +11 -8
  22. package/create-editor-content-style/package.json +0 -17
  23. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +0 -43
  24. package/dist/cjs/ui/ContentStyles/ai-panels.js +0 -91
  25. package/dist/cjs/ui/ContentStyles/code-bidi-warning.js +0 -75
  26. package/dist/cjs/ui/ContentStyles/code-block.js +0 -28
  27. package/dist/cjs/ui/ContentStyles/date.js +0 -43
  28. package/dist/cjs/ui/ContentStyles/expand.js +0 -37
  29. package/dist/cjs/ui/ContentStyles/extension.js +0 -21
  30. package/dist/cjs/ui/ContentStyles/index.js +0 -220
  31. package/dist/cjs/ui/ContentStyles/layout.js +0 -80
  32. package/dist/cjs/ui/ContentStyles/media.js +0 -27
  33. package/dist/cjs/ui/ContentStyles/panel.js +0 -17
  34. package/dist/cjs/ui/ContentStyles/status.js +0 -158
  35. package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +0 -556
  36. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +0 -47
  37. package/dist/es2019/ui/ContentStyles/ai-panels.js +0 -168
  38. package/dist/es2019/ui/ContentStyles/code-bidi-warning.js +0 -68
  39. package/dist/es2019/ui/ContentStyles/code-block.js +0 -90
  40. package/dist/es2019/ui/ContentStyles/date.js +0 -57
  41. package/dist/es2019/ui/ContentStyles/expand.js +0 -142
  42. package/dist/es2019/ui/ContentStyles/extension.js +0 -236
  43. package/dist/es2019/ui/ContentStyles/index.js +0 -580
  44. package/dist/es2019/ui/ContentStyles/layout.js +0 -388
  45. package/dist/es2019/ui/ContentStyles/media.js +0 -207
  46. package/dist/es2019/ui/ContentStyles/panel.js +0 -66
  47. package/dist/es2019/ui/ContentStyles/status.js +0 -197
  48. package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +0 -551
  49. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +0 -36
  50. package/dist/esm/ui/ContentStyles/ai-panels.js +0 -87
  51. package/dist/esm/ui/ContentStyles/code-bidi-warning.js +0 -68
  52. package/dist/esm/ui/ContentStyles/code-block.js +0 -21
  53. package/dist/esm/ui/ContentStyles/date.js +0 -37
  54. package/dist/esm/ui/ContentStyles/expand.js +0 -31
  55. package/dist/esm/ui/ContentStyles/extension.js +0 -15
  56. package/dist/esm/ui/ContentStyles/index.js +0 -214
  57. package/dist/esm/ui/ContentStyles/layout.js +0 -74
  58. package/dist/esm/ui/ContentStyles/media.js +0 -21
  59. package/dist/esm/ui/ContentStyles/panel.js +0 -11
  60. package/dist/esm/ui/ContentStyles/status.js +0 -152
  61. package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +0 -548
  62. package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
  63. package/dist/types/ui/ContentStyles/ai-panels.d.ts +0 -8
  64. package/dist/types/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
  65. package/dist/types/ui/ContentStyles/code-block.d.ts +0 -2
  66. package/dist/types/ui/ContentStyles/date.d.ts +0 -3
  67. package/dist/types/ui/ContentStyles/expand.d.ts +0 -2
  68. package/dist/types/ui/ContentStyles/extension.d.ts +0 -2
  69. package/dist/types/ui/ContentStyles/index.d.ts +0 -23
  70. package/dist/types/ui/ContentStyles/layout.d.ts +0 -8
  71. package/dist/types/ui/ContentStyles/media.d.ts +0 -2
  72. package/dist/types/ui/ContentStyles/panel.d.ts +0 -2
  73. package/dist/types/ui/ContentStyles/status.d.ts +0 -3
  74. package/dist/types/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
  75. package/dist/types-ts4.5/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
  76. package/dist/types-ts4.5/ui/ContentStyles/ai-panels.d.ts +0 -8
  77. package/dist/types-ts4.5/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
  78. package/dist/types-ts4.5/ui/ContentStyles/code-block.d.ts +0 -2
  79. package/dist/types-ts4.5/ui/ContentStyles/date.d.ts +0 -3
  80. package/dist/types-ts4.5/ui/ContentStyles/expand.d.ts +0 -2
  81. package/dist/types-ts4.5/ui/ContentStyles/extension.d.ts +0 -2
  82. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +0 -23
  83. package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +0 -8
  84. package/dist/types-ts4.5/ui/ContentStyles/media.d.ts +0 -2
  85. package/dist/types-ts4.5/ui/ContentStyles/panel.d.ts +0 -2
  86. package/dist/types-ts4.5/ui/ContentStyles/status.d.ts +0 -3
  87. package/dist/types-ts4.5/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
@@ -1,388 +0,0 @@
1
- /**
2
- * TODO ED-26957 - remove legacy styles when static emotion refactor is complete
3
- * We are moving this to new location under FF: platform_editor_core_static_emotion
4
- * New location: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
5
- * If you are making updates to this file, please updates in new location as well.
6
- */
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { css } from '@emotion/react';
10
- import { columnLayoutResponsiveSharedStyle, columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
11
- import { TableCssClassName } from '@atlaskit/editor-plugins/table/types';
12
- import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
- const AK_NESTED_DND_GUTTER_OFFSET = 8;
16
- const firstNodeWithNotMarginTop = () => fg('platform_editor_nested_dnd_styles_changes') ?
17
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
18
- css`
19
- > :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {
20
- margin-top: 0;
21
- }
22
- ` :
23
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
24
- css`
25
- > :not(style):first-child,
26
- > style:first-child + * {
27
- margin-top: 0;
28
- }
29
-
30
- > .ProseMirror-gapcursor:first-child + *,
31
- > style:first-child + .ProseMirror-gapcursor + * {
32
- margin-top: 0;
33
- }
34
-
35
- > .ProseMirror-gapcursor:first-child + span + * {
36
- margin-top: 0;
37
- }
38
- `;
39
- // Ignored via go/ees007
40
- // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
41
- // TODO handle responsive
42
- const layoutColumnStyles = () => editorExperiment('advanced_layouts', true) ?
43
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
44
- css`
45
- > [data-layout-column] {
46
- margin: 0 ${LAYOUT_SECTION_MARGIN / 2}px;
47
- }
48
-
49
- > [data-layout-column]:first-of-type {
50
- margin-left: 0;
51
- }
52
-
53
- > [data-layout-column]:last-of-type {
54
- margin-right: 0;
55
- }
56
-
57
- @media screen and (max-width: ${gridMediumMaxWidth}px) {
58
- [data-layout-column] + [data-layout-column] {
59
- margin: 0;
60
- }
61
- }
62
-
63
- > [data-layout-column].${akEditorSelectedNodeClassName}:not(.danger) {
64
- ${getSelectionStyles([SelectionStyle.Blanket])};
65
- /* layout column selection shorter after layout border has been removed */
66
- ::before {
67
- width: calc(100% - 8px);
68
- left: 4px;
69
- border-radius: ${"var(--ds-radius-small, 3px)"};
70
- }
71
- }
72
- ` :
73
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
74
- css`
75
- [data-layout-column] + [data-layout-column] {
76
- margin-left: ${LAYOUT_SECTION_MARGIN}px;
77
- }
78
-
79
- @media screen and (max-width: ${gridMediumMaxWidth}px) {
80
- [data-layout-column] + [data-layout-column] {
81
- margin-left: 0;
82
- }
83
- }
84
- `;
85
- const layoutSectionStyles = () => editorExperiment('advanced_layouts', true) ?
86
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
87
- css`
88
- ${columnLayoutResponsiveSharedStyle};
89
- .layout-section-container [data-layout-section] {
90
- > .ProseMirror-widget {
91
- flex: none;
92
- display: contents !important;
93
-
94
- &[data-blocks-drag-handle-container] div {
95
- display: contents !important;
96
- }
97
-
98
- &[data-blocks-drop-target-container] {
99
- display: block !important;
100
- margin: ${"var(--ds-space-negative-050, -4px)"};
101
-
102
- [data-drop-target-for-element] {
103
- position: absolute;
104
- }
105
- }
106
-
107
- & + [data-layout-column] {
108
- margin: 0;
109
- }
110
- }
111
-
112
- > [data-layout-column] {
113
- margin: 0;
114
- }
115
- }
116
- ` :
117
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
118
- css`
119
- ${columnLayoutSharedStyle}
120
- `;
121
-
122
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
123
- const layoutBorderStyles = viewMode => css`
124
- /* TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.
125
- This is because the default state already uses the same token and, as such, the hover style won't change anything.
126
- https://product-fabric.atlassian.net/browse/DSP-4441 */
127
- /* Shows the border when cursor is inside a layout */
128
- &.selected [data-layout-column],
129
- &:hover [data-layout-column] {
130
- border: ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px solid ${"var(--ds-border, #091E4224)"};
131
- }
132
-
133
- &.selected.danger [data-layout-column] {
134
- background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
135
- border-color: ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
136
- }
137
-
138
- &.${akEditorSelectedNodeClassName}:not(.danger) {
139
- [data-layout-column] {
140
- ${getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket])}
141
- ::after {
142
- background-color: transparent;
143
- }
144
- }
145
- }
146
- `;
147
-
148
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
149
- const columnSeparatorStyles = viewMode => css`
150
- [data-layout-content]::before {
151
- content: '';
152
- border-left: ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px solid
153
- ${"var(--ds-border, #091E4224)"};
154
- position: absolute;
155
- height: calc(100% - 24px);
156
- margin-left: -25px;
157
- }
158
- `;
159
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
160
- const rowSeparatorStyles = viewMode => css`
161
- [data-layout-content]::before {
162
- content: '';
163
- border-top: ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px solid
164
- ${"var(--ds-border, #091E4224)"};
165
- position: absolute;
166
- width: calc(100% - 32px);
167
- margin-top: -13px;
168
-
169
- /* clear styles for column separator */
170
- border-left: unset;
171
- margin-left: unset;
172
- height: unset;
173
- }
174
- `;
175
-
176
- // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
177
- const layoutWithSeparatorBorderResponsiveStyles = (breakpoint, viewMode
178
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
179
- ) => css`
180
- &.selected,
181
- &:hover,
182
- &.selected.danger,
183
- &.${akEditorSelectedNodeClassName}:not(.danger) {
184
- [data-layout-column]:not(:first-of-type) {
185
- @container editor-area (max-width:${breakpoint}px) {
186
- ${rowSeparatorStyles(viewMode)}
187
- }
188
- }
189
- }
190
- `;
191
-
192
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
193
- const layoutWithSeparatorBorderStyles = viewMode => {
194
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
195
- return css`
196
- &.selected [data-layout-column]:not(:first-of-type),
197
- [data-empty-layout='true'] [data-layout-column]:not(:first-of-type),
198
- &:hover [data-layout-column]:not(:first-of-type) {
199
- ${columnSeparatorStyles(viewMode)}
200
- }
201
-
202
- &.selected.danger [data-layout-section] {
203
- background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
204
-
205
- box-shadow: 0 0 0 ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px
206
- ${akEditorDeleteBorder};
207
- border-radius: 4px;
208
- [data-layout-column]:not(:first-of-type) {
209
- ${columnSeparatorStyles(viewMode)}
210
- }
211
- }
212
-
213
- &.${akEditorSelectedNodeClassName}:not(.danger) [data-layout-section] {
214
- box-shadow: 0 0 0 ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px
215
- ${"var(--ds-border-selected, #0C66E4)"};
216
- border-radius: 4px;
217
- background-color: ${"var(--ds-background-selected, #E9F2FF)"};
218
- [data-layout-column] {
219
- ${getSelectionStyles([SelectionStyle.Blanket])}
220
- border: 0px;
221
- ::before {
222
- background-color: transparent;
223
- }
224
- }
225
- [data-layout-column]:not(:first-of-type) {
226
- ${columnSeparatorStyles(viewMode)}
227
- }
228
- }
229
- `;
230
- };
231
-
232
- // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
233
- const layoutResponsiveStyles = viewMode =>
234
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
235
- css`
236
- /* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */
237
- /* not resized layout in full-width editor */
238
- .fabric-editor--full-width-mode .ProseMirror {
239
- > .layoutSectionView-content-wrap {
240
- [data-layout-section] {
241
- @container editor-area (max-width:724px) {
242
- flex-direction: column;
243
- }
244
- }
245
-
246
- ${layoutWithSeparatorBorderResponsiveStyles(724, viewMode)}
247
- }
248
- }
249
-
250
- /* not resized layout in fixed-width editor */
251
- .ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {
252
- > .layoutSectionView-content-wrap {
253
- [data-layout-section] {
254
- @container editor-area (max-width:788px) {
255
- flex-direction: column;
256
- }
257
- }
258
-
259
- ${layoutWithSeparatorBorderResponsiveStyles(788, viewMode)}
260
- }
261
- }
262
-
263
- /* resized layout in full/fixed-width editor */
264
- .ProseMirror .fabric-editor-breakout-mark {
265
- .layoutSectionView-content-wrap {
266
- [data-layout-section] {
267
- @container editor-area (max-width:820px) {
268
- flex-direction: column;
269
- }
270
- }
271
-
272
- ${layoutWithSeparatorBorderResponsiveStyles(820, viewMode)}
273
- }
274
- }
275
- `;
276
-
277
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
278
- export const layoutStyles = viewMode => css`
279
- .ProseMirror {
280
- ${layoutSectionStyles()}
281
- [data-layout-section] {
282
- /* Ignored via go/ees007
283
- TODO: Migrate away from gridSize
284
- Recommendation: Replace directly with 7px */
285
- margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)}px
286
- 0;
287
- transition: border-color 0.3s ${akEditorSwoopCubicBezier};
288
- cursor: ${viewMode === 'view' ? 'default' : 'pointer'};
289
-
290
- /* Inner cursor located 26px from left */
291
- [data-layout-column] {
292
- flex: 1;
293
- position: relative;
294
-
295
- min-width: 0;
296
- /* disable 4 borders when in view mode and advanced layouts is on */
297
- border: ${viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize}px
298
- solid ${"var(--ds-border, #091E4224)"};
299
- border-radius: 4px;
300
- padding: ${LAYOUT_COLUMN_PADDING}px
301
- ${LAYOUT_COLUMN_PADDING + (fg('platform_editor_nested_dnd_styles_changes') ? 8 : 0)}px;
302
- box-sizing: border-box;
303
-
304
- > div {
305
- ${firstNodeWithNotMarginTop()}
306
-
307
- > .embedCardView-content-wrap:first-of-type .rich-media-item {
308
- margin-top: 0;
309
- }
310
-
311
- > .mediaSingleView-content-wrap:first-of-type .rich-media-item {
312
- margin-top: 0;
313
- }
314
-
315
- > .ProseMirror-gapcursor.-right:first-child
316
- + .mediaSingleView-content-wrap
317
- .rich-media-item,
318
- > style:first-child
319
- + .ProseMirror-gapcursor.-right
320
- + .mediaSingleView-content-wrap
321
- .rich-media-item,
322
- > .ProseMirror-gapcursor.-right:first-of-type
323
- + .embedCardView-content-wrap
324
- .rich-media-item {
325
- margin-top: 0;
326
- }
327
-
328
- > .ProseMirror-gapcursor:first-child
329
- + span
330
- + .mediaSingleView-content-wrap
331
- .rich-media-item,
332
- > style:first-child
333
- + .ProseMirror-gapcursor
334
- + span
335
- + .mediaSingleView-content-wrap
336
- .rich-media-item {
337
- margin-top: 0;
338
- }
339
-
340
- /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down
341
- and shrinking layout's node selectable area (leniency margin) */
342
- > [data-node-type='decisionList'] {
343
- li:first-of-type [data-decision-wrapper] {
344
- margin-top: 0;
345
- }
346
- }
347
- }
348
-
349
- /* Make the 'content' fill the entire height of the layout column to allow click
350
- handler of layout section nodeview to target only data-layout-column */
351
- [data-layout-content] {
352
- height: 100%;
353
- cursor: text;
354
- .mediaGroupView-content-wrap {
355
- clear: both;
356
- }
357
- }
358
- }
359
-
360
- ${layoutColumnStyles()}
361
- }
362
-
363
- /* styles to support borders for layout */
364
- [data-layout-section],
365
- .layoutSectionView-content-wrap {
366
- ${editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode)}
367
- }
368
- }
369
-
370
- ${editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode)}
371
-
372
- /* hide separator when element is dragging on top of a layout column */
373
- [data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {
374
- display: none;
375
- }
376
-
377
- .fabric-editor--full-width-mode .ProseMirror {
378
- [data-layout-section] {
379
- .${TableCssClassName.TABLE_CONTAINER} {
380
- margin: 0 ${"var(--ds-space-025, 2px)"}px;
381
- }
382
- }
383
- }
384
-
385
- ${editorExperiment('advanced_layouts', false) && fg('platform_editor_nested_dnd_styles_changes') && `.ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {
386
- margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + 8}px 0;
387
- }`}
388
- `;
@@ -1,207 +0,0 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { mediaInlineImageStyles } from '@atlaskit/editor-common/media-inline';
4
- import { mediaSingleSharedStyleNew, richMediaClassName } from '@atlaskit/editor-common/styles';
5
- import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedBoxShadow, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
- import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
7
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
8
- export const mediaStyles = () => css`
9
- .ProseMirror {
10
- ${mediaSingleSharedStyleNew} & [layout='full-width'] .${richMediaClassName},
11
- & [layout='wide'] .${richMediaClassName} {
12
- margin-left: 50%;
13
- transform: translateX(-50%);
14
- }
15
-
16
- .media-extended-resize-experience[layout^='wrap-'] {
17
- /* override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle
18
- to prevent scroll bar */
19
- overflow: visible !important;
20
- }
21
-
22
- & [layout^='wrap-'] + [layout^='wrap-'] {
23
- clear: none;
24
- & + p,
25
- & + div[class^='fabric-editor-align'],
26
- & + ul,
27
- & + ol,
28
- & + h1,
29
- & + h2,
30
- & + h3,
31
- & + h4,
32
- & + h5,
33
- & + h6 {
34
- clear: both !important;
35
- }
36
- & .${richMediaClassName} {
37
- margin-left: 0;
38
- margin-right: 0;
39
- }
40
- }
41
-
42
- ${mediaInlineImageStyles}
43
-
44
- .mediaSingleView-content-wrap[layout^='wrap-'] {
45
- max-width: 100%;
46
- /* overwrite default Prosemirror setting making it clear: both */
47
- clear: inherit;
48
- }
49
-
50
- .mediaSingleView-content-wrap[layout='wrap-left'] {
51
- float: left;
52
- }
53
-
54
- .mediaSingleView-content-wrap[layout='wrap-right'] {
55
- float: right;
56
- }
57
-
58
- .mediaSingleView-content-wrap[layout='wrap-right']
59
- + .mediaSingleView-content-wrap[layout='wrap-left'] {
60
- clear: both;
61
- }
62
-
63
- /* Larger margins for resize handlers when at depth 0 of the document */
64
- & > .mediaSingleView-content-wrap {
65
- .richMedia-resize-handle-right {
66
- margin-right: -${akEditorMediaResizeHandlerPaddingWide}px;
67
- }
68
- .richMedia-resize-handle-left {
69
- margin-left: -${akEditorMediaResizeHandlerPaddingWide}px;
70
- }
71
- }
72
- }
73
-
74
- .richMedia-resize-handle-right,
75
- .richMedia-resize-handle-left {
76
- display: flex;
77
- flex-direction: column;
78
-
79
- /* vertical align */
80
- justify-content: center;
81
- }
82
-
83
- .richMedia-resize-handle-right {
84
- align-items: flex-end;
85
- padding-right: ${"var(--ds-space-150, 12px)"};
86
- margin-right: -${akEditorMediaResizeHandlerPadding}px;
87
- }
88
-
89
- .richMedia-resize-handle-left {
90
- align-items: flex-start;
91
- padding-left: ${"var(--ds-space-150, 12px)"};
92
- margin-left: -${akEditorMediaResizeHandlerPadding}px;
93
- }
94
-
95
- .richMedia-resize-handle-right::after,
96
- .richMedia-resize-handle-left::after {
97
- content: ' ';
98
- display: flex;
99
- width: 3px;
100
- height: 64px;
101
-
102
- border-radius: 6px;
103
- }
104
-
105
- .${richMediaClassName}:hover .richMedia-resize-handle-left::after,
106
- .${richMediaClassName}:hover .richMedia-resize-handle-right::after {
107
- background: ${"var(--ds-border, #091E4224)"};
108
- }
109
-
110
- .${akEditorSelectedNodeClassName} .richMedia-resize-handle-right::after,
111
- .${akEditorSelectedNodeClassName} .richMedia-resize-handle-left::after,
112
- .${richMediaClassName} .richMedia-resize-handle-right:hover::after,
113
- .${richMediaClassName} .richMedia-resize-handle-left:hover::after,
114
- .${richMediaClassName}.is-resizing .richMedia-resize-handle-right::after,
115
- .${richMediaClassName}.is-resizing .richMedia-resize-handle-left::after {
116
- background: ${"var(--ds-border-focused, #388BFF)"};
117
- }
118
-
119
- .__resizable_base__ {
120
- left: unset !important;
121
- width: auto !important;
122
- height: auto !important;
123
- }
124
-
125
- /* Danger when top level node for smart cards / inline links */
126
- .danger > div > div > .media-card-frame,
127
- .danger > span > a {
128
- background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
129
- box-shadow: 0px 0px 0px ${akEditorSelectedBorderBoldSize}px
130
- ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
131
- transition:
132
- background-color 0s,
133
- box-shadow 0s;
134
- }
135
- /* Danger when nested node or common */
136
- .danger {
137
- /* Media single */
138
- .${richMediaClassName} .${fileCardImageViewSelector}::after {
139
- border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
140
- }
141
- /* Media single video player */
142
- .${richMediaClassName} .${inlinePlayerClassName}::after {
143
- border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
144
- }
145
- /* New file experience */
146
- .${richMediaClassName} .${newFileExperienceClassName} {
147
- box-shadow: 0 0 0 1px ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`} !important;
148
- }
149
- /* Media resize legacy handlers */
150
- .richMedia-resize-handle-right::after,
151
- .richMedia-resize-handle-left::after {
152
- background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
153
- }
154
- /* Media resize new handlers */
155
- .resizer-handle-thumb {
156
- background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
157
- }
158
-
159
- /* Smart cards */
160
- div div .media-card-frame,
161
- .inlineCardView-content-wrap > span > a {
162
- background-color: ${"var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))"}; /* R75 with 50% opactiy */
163
- transition: background-color 0s;
164
- }
165
-
166
- div div .media-card-frame::after {
167
- box-shadow: none;
168
- }
169
- }
170
-
171
- .warning {
172
- /* Media single */
173
- .${richMediaClassName} .${fileCardImageViewSelector}::after {
174
- border: 1px solid ${"var(--ds-border-warning, #E56910)"};
175
- }
176
-
177
- .${richMediaClassName} .${inlinePlayerClassName}::after {
178
- border: 1px solid ${"var(--ds-border-warning, #E56910)"};
179
- }
180
-
181
- .${richMediaClassName} .${newFileExperienceClassName} {
182
- box-shadow: 0 0 0 1px ${"var(--ds-border-warning, #E56910)"} !important;
183
- }
184
-
185
- .resizer-handle-thumb {
186
- background: ${"var(--ds-icon-warning, #E56910)"} !important;
187
- }
188
- }
189
-
190
- .media-filmstrip-list-item {
191
- cursor: pointer;
192
- }
193
-
194
- /* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */
195
- .mediaGroupView-content-wrap.${akEditorSelectedNodeClassName} #newFileExperienceWrapper {
196
- box-shadow: ${akEditorSelectedBoxShadow};
197
- }
198
- `;
199
-
200
- /* `left: unset` above is to work around Chrome bug where rendering a div with
201
- * that style applied inside a container that has a scroll, causes any svgs on
202
- * the page, without a border, that are inside a flexbox, to no longer align to
203
- * the center of their viewbox.
204
- *
205
- * for us, this means that all the toolbar icons start jumping around if
206
- * you make the viewport small
207
- */
@@ -1,66 +0,0 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { PanelSharedCssClassName, panelSharedStyles } from '@atlaskit/editor-common/panel';
4
- import { akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixin usage
7
- export const panelStyles = () => css`
8
- .ProseMirror {
9
- .${PanelSharedCssClassName.prefix} {
10
- cursor: pointer;
11
-
12
- /* Danger when top level node */
13
- &.danger {
14
- box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
15
- background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`} !important;
16
-
17
- .${PanelSharedCssClassName.icon} {
18
- color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
19
- }
20
- }
21
- }
22
-
23
- .${PanelSharedCssClassName.content} {
24
- cursor: text;
25
- }
26
-
27
- /* Danger when nested node */
28
- .danger .${PanelSharedCssClassName.prefix} {
29
- &[data-panel-type] {
30
- background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
31
-
32
- .${PanelSharedCssClassName.icon} {
33
- color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`};
34
- }
35
- }
36
- }
37
-
38
- ${panelSharedStyles()};
39
- }
40
-
41
- .${PanelSharedCssClassName.prefix}.${akEditorSelectedNodeClassName}:not(.danger) {
42
- ${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
43
- }
44
-
45
- ${fg('platform_editor_nested_dnd_styles_changes') && `.ak-editor-content-area.appearance-full-page .ProseMirror {
46
- .ak-editor-panel .${PanelSharedCssClassName.icon} {
47
- padding-right: ${"var(--ds-space-150, 12px)"};
48
- }
49
-
50
- .ak-editor-panel.${PanelSharedCssClassName.noIcon} {
51
- padding-left: ${"var(--ds-space-250, 20px)"};
52
- padding-right: ${"var(--ds-space-250, 20px)"};
53
- }
54
- }`};
55
-
56
- /* Don't want extra padding for inline editor (nested) */
57
- ${fg('platform_editor_nested_dnd_styles_changes') && `.ak-editor-content-area .ak-editor-content-area .ProseMirror {
58
- .ak-editor-panel .${PanelSharedCssClassName.icon} {
59
- padding-right: ${"var(--ds-space-100, 8px)"};
60
- }
61
- .ak-editor-panel.${PanelSharedCssClassName.noIcon} {
62
- padding-right: ${"var(--ds-space-150, 12px)"};
63
- padding-left: ${"var(--ds-space-150, 12px)"};
64
- }
65
- }`};
66
- `;