@atlaskit/editor-common 94.3.0 → 94.4.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 (48) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/analytics/types/node-events.js +2 -0
  3. package/dist/cjs/doc-utils/editor-use-only.js +2 -0
  4. package/dist/cjs/element-browser/components/ElementList/ElementList.js +48 -21
  5. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +1 -1
  6. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +52 -47
  7. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  8. package/dist/cjs/monitoring/error.js +1 -1
  9. package/dist/cjs/styles/index.js +6 -0
  10. package/dist/cjs/styles/shared/embedCard.js +45 -18
  11. package/dist/cjs/styles/shared/media-single.js +49 -2
  12. package/dist/cjs/ui/Caption/index.js +7 -6
  13. package/dist/cjs/ui/DropList/index.js +1 -1
  14. package/dist/es2019/analytics/types/node-events.js +2 -0
  15. package/dist/es2019/doc-utils/editor-use-only.js +1 -0
  16. package/dist/es2019/element-browser/components/ElementList/ElementList.js +50 -20
  17. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +2 -2
  18. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +52 -47
  19. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  20. package/dist/es2019/monitoring/error.js +1 -1
  21. package/dist/es2019/styles/index.js +1 -1
  22. package/dist/es2019/styles/shared/embedCard.js +26 -1
  23. package/dist/es2019/styles/shared/media-single.js +68 -1
  24. package/dist/es2019/ui/Caption/index.js +7 -6
  25. package/dist/es2019/ui/DropList/index.js +1 -1
  26. package/dist/esm/analytics/types/node-events.js +2 -0
  27. package/dist/esm/doc-utils/editor-use-only.js +1 -0
  28. package/dist/esm/element-browser/components/ElementList/ElementList.js +48 -21
  29. package/dist/esm/element-browser/components/ElementList/EmptyState.js +2 -2
  30. package/dist/esm/element-browser/components/StatelessElementBrowser.js +52 -47
  31. package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  32. package/dist/esm/monitoring/error.js +1 -1
  33. package/dist/esm/styles/index.js +1 -1
  34. package/dist/esm/styles/shared/embedCard.js +45 -18
  35. package/dist/esm/styles/shared/media-single.js +49 -2
  36. package/dist/esm/ui/Caption/index.js +7 -6
  37. package/dist/esm/ui/DropList/index.js +1 -1
  38. package/dist/types/analytics/types/node-events.d.ts +6 -4
  39. package/dist/types/styles/index.d.ts +1 -1
  40. package/dist/types/styles/shared/embedCard.d.ts +1 -1
  41. package/dist/types/styles/shared/media-single.d.ts +2 -1
  42. package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
  43. package/dist/types-ts4.5/analytics/types/node-events.d.ts +6 -4
  44. package/dist/types-ts4.5/styles/index.d.ts +1 -1
  45. package/dist/types-ts4.5/styles/shared/embedCard.d.ts +1 -1
  46. package/dist/types-ts4.5/styles/shared/media-single.d.ts +2 -1
  47. package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
  48. package/package.json +8 -5
@@ -14,6 +14,8 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
14
14
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
15
15
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
16
16
  import { ButtonItem } from '@atlaskit/menu';
17
+ import { Stack, Text } from '@atlaskit/primitives';
18
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
19
  import Tooltip from '@atlaskit/tooltip';
18
20
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
19
21
  import { IconFallback } from '../../../quick-insert';
@@ -276,8 +278,7 @@ const itemStyleOverrides = {
276
278
  alignItems: 'flex-start'
277
279
  };
278
280
  const ElementBefore = /*#__PURE__*/memo(({
279
- icon,
280
- title
281
+ icon
281
282
  }) => jsx("div", {
282
283
  css: [itemIcon, itemIconStyle]
283
284
  }, icon ? icon() : jsx(IconFallback, null)));
@@ -285,24 +286,53 @@ const ItemContent = /*#__PURE__*/memo(({
285
286
  title,
286
287
  description,
287
288
  keyshortcut
288
- }) =>
289
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
290
- jsx("div", {
291
- css: itemBody,
292
- className: "item-body"
293
- }, jsx("div", {
294
- css: itemText
295
- }, jsx("div", {
296
- css: itemTitleWrapper
297
- }, jsx("p", {
298
- css: itemTitle
299
- }, title), jsx("div", {
300
- css: itemAfter
301
- }, keyshortcut && jsx("div", {
302
- css: shortcutStyle
303
- }, keyshortcut))), description && jsx("p", {
304
- css: itemDescription
305
- }, description))));
289
+ }) => {
290
+ if (editorExperiment('typography_migration_ugc', true)) {
291
+ return (
292
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
293
+ jsx("div", {
294
+ css: itemBody,
295
+ className: "item-body"
296
+ }, jsx("div", {
297
+ css: itemText
298
+ }, jsx(Stack, {
299
+ space: "space.025"
300
+ }, jsx("div", {
301
+ css: itemTitleWrapper
302
+ }, jsx(Text, {
303
+ maxLines: 1
304
+ }, title), jsx("div", {
305
+ css: itemAfter
306
+ }, keyshortcut && jsx("div", {
307
+ css: shortcutStyle
308
+ }, keyshortcut))), description && jsx(Text, {
309
+ color: "color.text.subtle",
310
+ size: "small",
311
+ maxLines: 2
312
+ }, description))))
313
+ );
314
+ } else {
315
+ return (
316
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
317
+ jsx("div", {
318
+ css: itemBody,
319
+ className: "item-body"
320
+ }, jsx("div", {
321
+ css: itemText
322
+ }, jsx("div", {
323
+ css: itemTitleWrapper
324
+ }, jsx("p", {
325
+ css: itemTitle
326
+ }, title), jsx("div", {
327
+ css: itemAfter
328
+ }, keyshortcut && jsx("div", {
329
+ css: shortcutStyle
330
+ }, keyshortcut))), description && jsx("p", {
331
+ css: itemDescription
332
+ }, description)))
333
+ );
334
+ }
335
+ });
306
336
  const elementItemsWrapper = css({
307
337
  flex: 1,
308
338
  flexFlow: 'row wrap',
@@ -6,7 +6,7 @@
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { FormattedMessage } from 'react-intl-next';
8
8
  import { LinkButton } from '@atlaskit/button/new';
9
- import { Box, xcss } from '@atlaskit/primitives';
9
+ import { Box, Text, xcss } from '@atlaskit/primitives';
10
10
  import NotFoundIllustration from './NotFoundIllustration';
11
11
  export default function EmptyState({
12
12
  onExternalLinkClick
@@ -22,7 +22,7 @@ export default function EmptyState({
22
22
  description: "Empty state heading"
23
23
  })), jsx("div", {
24
24
  css: emptyStateSubHeading
25
- }, jsx("p", null, jsx(FormattedMessage, {
25
+ }, jsx(Text, null, jsx(FormattedMessage, {
26
26
  id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
27
27
  defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
28
28
  description: "Empty state sub-heading"
@@ -11,6 +11,7 @@ import { FormattedMessage } from 'react-intl-next';
11
11
  import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
12
12
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
13
13
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
14
+ import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
14
15
  import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
15
16
  import useContainerWidth from '../hooks/use-container-width';
16
17
  import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
@@ -70,7 +71,8 @@ const sidebarHeading = css({
70
71
  display: 'inline-flex',
71
72
  alignItems: 'center',
72
73
  paddingLeft: "var(--ds-space-150, 12px)",
73
- fontWeight: 700
74
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
75
+ font: editorUGCToken('editor.font.heading.h1', 'typography-modernized') // use editor h1 modernized here as the style matches
74
76
  });
75
77
  const mobileMainContent = css({
76
78
  flex: '1 1 auto',
@@ -272,51 +274,54 @@ function MobileBrowser({
272
274
  emptyStateHandler,
273
275
  viewMoreItem
274
276
  }) {
275
- return jsx("div", {
276
- css: mobileElementBrowserContainer,
277
- onKeyDown: onKeyDown,
278
- "data-testid": "mobile__element-browser"
279
- }, jsx("div", {
280
- css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
281
- }, showSearch && jsx(ElementSearch, {
282
- onSearch: onSearch,
283
- onKeyDown: onKeyPress,
284
- mode: mode,
285
- focus: focusOnSearch,
286
- onClick: setFocusOnSearch,
287
- searchTerm: searchTerm,
288
- items: items,
289
- selectedItemIndex: selectedItemIndex
290
- }), showCategories && jsx("nav", {
291
- css: mobileCategoryListWrapper,
292
- tabIndex: -1
293
- }, jsx(CategoryList, {
294
- categories: categories,
295
- onSelectCategory: onSelectCategory,
296
- selectedCategory: selectedCategory,
297
- focusedCategoryIndex: focusedCategoryIndex,
298
- setFocusedCategoryIndex: setFocusedCategoryIndex,
299
- setFocusedItemIndex: setFocusedItemIndex,
300
- setFocusOnSearch: setFocusOnSearch
301
- }))), jsx("div", {
302
- css: mobileMainContent
303
- }, jsx(ElementList, {
304
- items: items,
305
- mode: mode,
306
- onInsertItem: onInsertItem,
307
- selectedItemIndex: selectedItemIndex,
308
- focusedItemIndex: focusedItemIndex,
309
- setFocusedItemIndex: setFocusedItemIndex,
310
- columnCount: columnCount,
311
- setColumnCount: setColumnCount,
312
- createAnalyticsEvent: createAnalyticsEvent,
313
- emptyStateHandler: emptyStateHandler,
314
- selectedCategory: selectedCategory,
315
- searchTerm: searchTerm
316
- })), viewMoreItem && jsx(ViewMore, {
317
- item: viewMoreItem,
318
- focus: focusOnViewMore
319
- }));
277
+ return (
278
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
279
+ jsx("div", {
280
+ css: mobileElementBrowserContainer,
281
+ onKeyDown: onKeyDown,
282
+ "data-testid": "mobile__element-browser"
283
+ }, jsx("div", {
284
+ css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
285
+ }, showSearch && jsx(ElementSearch, {
286
+ onSearch: onSearch,
287
+ onKeyDown: onKeyPress,
288
+ mode: mode,
289
+ focus: focusOnSearch,
290
+ onClick: setFocusOnSearch,
291
+ searchTerm: searchTerm,
292
+ items: items,
293
+ selectedItemIndex: selectedItemIndex
294
+ }), showCategories && jsx("nav", {
295
+ css: mobileCategoryListWrapper,
296
+ tabIndex: -1
297
+ }, jsx(CategoryList, {
298
+ categories: categories,
299
+ onSelectCategory: onSelectCategory,
300
+ selectedCategory: selectedCategory,
301
+ focusedCategoryIndex: focusedCategoryIndex,
302
+ setFocusedCategoryIndex: setFocusedCategoryIndex,
303
+ setFocusedItemIndex: setFocusedItemIndex,
304
+ setFocusOnSearch: setFocusOnSearch
305
+ }))), jsx("div", {
306
+ css: mobileMainContent
307
+ }, jsx(ElementList, {
308
+ items: items,
309
+ mode: mode,
310
+ onInsertItem: onInsertItem,
311
+ selectedItemIndex: selectedItemIndex,
312
+ focusedItemIndex: focusedItemIndex,
313
+ setFocusedItemIndex: setFocusedItemIndex,
314
+ columnCount: columnCount,
315
+ setColumnCount: setColumnCount,
316
+ createAnalyticsEvent: createAnalyticsEvent,
317
+ emptyStateHandler: emptyStateHandler,
318
+ selectedCategory: selectedCategory,
319
+ searchTerm: searchTerm
320
+ })), viewMoreItem && jsx(ViewMore, {
321
+ item: viewMoreItem,
322
+ focus: focusOnViewMore
323
+ }))
324
+ );
320
325
  }
321
326
  function DesktopBrowser({
322
327
  showCategories,
@@ -349,7 +354,7 @@ function DesktopBrowser({
349
354
  "data-testid": "desktop__element-browser"
350
355
  }, showCategories && jsx("div", {
351
356
  css: showCategories ? sideBarShowCategories : sideBar
352
- }, jsx("h2", {
357
+ }, jsx("div", {
353
358
  css: sidebarHeading,
354
359
  "data-testid": "sidebar-heading",
355
360
  id: "sidebar-heading"
@@ -69,7 +69,7 @@ const buttonLabelStyles = css({
69
69
  '&.remove-nested-left-margin': {
70
70
  marginLeft: 0
71
71
  },
72
- fontSize: '16px',
72
+ fontSize: "var(--ds-space-200, 16px)",
73
73
  fontWeight: "var(--ds-font-weight-regular, 400)"
74
74
  });
75
75
  const spacerStyles = css({
@@ -77,6 +77,9 @@ const spacerStyles = css({
77
77
  height: '10px'
78
78
  });
79
79
  const textStyles = css({
80
+ // cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
81
+ // cannot use space token as there is not token for 14px
82
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
80
83
  fontSize: '14px',
81
84
  fontWeight: "var(--ds-font-weight-regular, 400)",
82
85
  padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}`
@@ -139,51 +142,56 @@ export const ExtensionLabel = ({
139
142
  const iconClassNames = classnames({
140
143
  'hide-icon': isBodiedMacro && !isNodeHovered
141
144
  });
142
- return jsx("div", {
143
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
144
- css: containerStyles
145
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
146
- ,
147
- className: containerClassNames
148
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
149
- ,
150
- style: customContainerStyles,
151
- onMouseOver: () => {
152
- setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
153
- },
154
- onMouseLeave: () => {
155
- setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
156
- },
157
- "data-testid": "new-lozenge-container"
158
- }, showMacroButtonUpdates ? jsx(Fragment, null, jsx(Tooltip, {
159
- content: jsx(FormattedMessage, _extends({}, i18n.configure, {
160
- values: {
161
- macroName: text
162
- }
163
- })),
164
- position: "top"
165
- }, tooltipProps => jsx("span", _extends({
166
- "data-testid": "new-lozenge-button"
167
- }, tooltipProps, {
168
- css: [sharedLabelStyles, buttonLabelStyles]
169
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
170
- ,
171
- className: `${sharedLabelClassNames} ${newButtonLabelClassNames}`
172
- }), text, jsx("span", {
173
- css: iconStyles,
174
- className: iconClassNames,
175
- "data-testid": "config-icon"
176
- }, jsx(PreferencesIcon, {
177
- label: ""
178
- })))), jsx("div", {
179
- css: spacerStyles
180
- })) : jsx("span", {
181
- "data-testid": "new-lozenge",
182
- css: [sharedLabelStyles, originalLabelStyles]
183
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
184
- ,
185
- className: sharedLabelClassNames
186
- }, jsx("span", {
187
- css: textStyles
188
- }, text)));
145
+ return (
146
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
147
+ jsx("div", {
148
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
149
+ css: containerStyles
150
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
151
+ ,
152
+ className: containerClassNames
153
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
154
+ ,
155
+ style: customContainerStyles
156
+ // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
157
+ ,
158
+ onMouseOver: () => {
159
+ setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
160
+ },
161
+ onMouseLeave: () => {
162
+ setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
163
+ },
164
+ "data-testid": "new-lozenge-container"
165
+ }, showMacroButtonUpdates ? jsx(Fragment, null, jsx(Tooltip, {
166
+ content: jsx(FormattedMessage, _extends({}, i18n.configure, {
167
+ values: {
168
+ macroName: text
169
+ }
170
+ })),
171
+ position: "top"
172
+ }, tooltipProps => jsx("span", _extends({
173
+ "data-testid": "new-lozenge-button"
174
+ }, tooltipProps, {
175
+ css: [sharedLabelStyles, buttonLabelStyles]
176
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
177
+ ,
178
+ className: `${sharedLabelClassNames} ${newButtonLabelClassNames}`
179
+ }), text, jsx("span", {
180
+ css: iconStyles,
181
+ className: iconClassNames,
182
+ "data-testid": "config-icon"
183
+ }, jsx(PreferencesIcon, {
184
+ label: ""
185
+ })))), jsx("div", {
186
+ css: spacerStyles
187
+ })) : jsx("span", {
188
+ "data-testid": "new-lozenge",
189
+ css: [sharedLabelStyles, originalLabelStyles]
190
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
191
+ ,
192
+ className: sharedLabelClassNames
193
+ }, jsx("span", {
194
+ css: textStyles
195
+ }, text)))
196
+ );
189
197
  };
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "94.3.0";
4
+ const packageVersion = "94.4.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -3,7 +3,7 @@ export { backgroundColorStyles } from './shared/background-color';
3
3
  export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
4
4
  export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
5
5
  export { columnLayoutSharedStyle } from './shared/column-layout';
6
- export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
6
+ export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName } from './shared/media-single';
7
7
  export { blockquoteSharedStyles } from './shared/blockquote';
8
8
  export { headingsSharedStyles } from './shared/headings';
9
9
  export { ruleSharedStyles } from './shared/rule';
@@ -1,7 +1,32 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
+ import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
3
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
4
- export const embedCardStyles = css({
6
+ export const embedCardStyles = () => fg('platform_editor_element_dnd_nested_fix_patch_3') ? css({
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
8
+ '.ProseMirror': {
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
10
+ ".embedCardView-content-wrap[layout^='wrap-']": {
11
+ maxWidth: '100%',
12
+ position: 'relative',
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
14
+ zIndex: akEditorWrappedNodeZIndex
15
+ },
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
17
+ ".embedCardView-content-wrap[layout='wrap-left']": {
18
+ float: 'left'
19
+ },
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
21
+ ".embedCardView-content-wrap[layout='wrap-right']": {
22
+ float: 'right'
23
+ },
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
+ ".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
26
+ clear: 'both'
27
+ }
28
+ }
29
+ }) : css({
5
30
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
6
31
  '.ProseMirror': {
7
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -1,5 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
+ import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
3
4
  const richMediaClassName = 'rich-media-item';
4
5
  const wrappedMediaBreakoutPoint = 410;
5
6
  const mediaSingleSharedStyle = css({
@@ -62,6 +63,72 @@ const mediaSingleSharedStyle = css({
62
63
  }
63
64
  }
64
65
  });
66
+ const mediaSingleSharedStyleNew = css({
67
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
68
+ [`li .${richMediaClassName}`]: {
69
+ margin: 0
70
+ },
71
+ // Hack for chrome to fix media single position inside a list when media is the first child
72
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
73
+ '&.ua-chrome li > .mediaSingleView-content-wrap::before': {
74
+ content: "''",
75
+ display: 'block',
76
+ height: 0
77
+ },
78
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
79
+ '&.ua-firefox': {
80
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
81
+ '.mediaSingleView-content-wrap': {
82
+ userSelect: 'none'
83
+ },
84
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
85
+ '.captionView-content-wrap': {
86
+ userSelect: 'text'
87
+ }
88
+ },
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
90
+ ".mediaSingleView-content-wrap[layout^='wrap-']": {
91
+ position: 'relative',
92
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
93
+ zIndex: akEditorWrappedNodeZIndex
94
+ },
95
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
96
+ ".mediaSingleView-content-wrap[layout='center']": {
97
+ clear: 'both'
98
+ },
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
100
+ [`table .${richMediaClassName}`]: {
101
+ marginTop: "var(--ds-space-150, 12px)",
102
+ marginBottom: "var(--ds-space-150, 12px)",
103
+ clear: 'both',
104
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
105
+ '&.image-wrap-left[data-layout], &.image-wrap-right[data-layout]': {
106
+ clear: 'none',
107
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
108
+ '&:first-child': {
109
+ marginTop: "var(--ds-space-150, 12px)"
110
+ }
111
+ }
112
+ },
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
114
+ [`.${richMediaClassName}.image-wrap-right + .${richMediaClassName}.image-wrap-left`]: {
115
+ clear: 'both'
116
+ },
117
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
118
+ [`.${richMediaClassName}.image-wrap-left + .${richMediaClassName}.image-wrap-right, .${richMediaClassName}.image-wrap-right + .${richMediaClassName}.image-wrap-left, .${richMediaClassName}.image-wrap-left + .${richMediaClassName}.image-wrap-left, .${richMediaClassName}.image-wrap-right + .${richMediaClassName}.image-wrap-right`]: {
119
+ marginRight: 0,
120
+ marginLeft: 0
121
+ },
122
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
123
+ [`@media all and (max-width: ${wrappedMediaBreakoutPoint}px)`]: {
124
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
125
+ "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']": {
126
+ float: 'none',
127
+ overflow: 'auto',
128
+ margin: `${"var(--ds-space-150, 12px)"} 0`
129
+ }
130
+ }
131
+ });
65
132
 
66
133
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
67
- export { mediaSingleSharedStyle, richMediaClassName };
134
+ export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName };
@@ -8,6 +8,7 @@ import React from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl-next';
11
+ import { Box, Text, xcss } from '@atlaskit/primitives';
11
12
  import { messages } from './messages';
12
13
  const captionWrapperStyle = css({
13
14
  marginTop: "var(--ds-space-100, 8px)",
@@ -15,10 +16,10 @@ const captionWrapperStyle = css({
15
16
  position: 'relative',
16
17
  color: "var(--ds-text-subtle, #44546F)"
17
18
  });
18
- const placeholderStyle = css({
19
- color: "var(--ds-text-subtlest, #626F86)",
19
+ const placeholderStyle = xcss({
20
+ color: 'color.text.subtlest',
20
21
  position: 'absolute',
21
- top: 0,
22
+ top: 'space.0',
22
23
  width: '100%'
23
24
  });
24
25
  export class CaptionComponent extends React.Component {
@@ -38,9 +39,9 @@ export class CaptionComponent extends React.Component {
38
39
  "data-testid": "media-caption"
39
40
  }, dataAttributes, {
40
41
  css: captionWrapperStyle
41
- }), showPlaceholder ? jsx("p", {
42
- css: placeholderStyle
43
- }, formatMessage(messages.placeholder)) : null, children);
42
+ }), showPlaceholder ? jsx(Box, {
43
+ xcss: placeholderStyle
44
+ }, jsx(Text, null, formatMessage(messages.placeholder))) : null, children);
44
45
  }
45
46
  }
46
47
  export default injectIntl(CaptionComponent);
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "94.3.0";
16
+ const packageVersion = "94.4.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -5,6 +5,8 @@ export var LAYOUT_TYPE = /*#__PURE__*/function (LAYOUT_TYPE) {
5
5
  LAYOUT_TYPE["LEFT_SIDEBAR"] = "twoColumnsLeftSidebar";
6
6
  LAYOUT_TYPE["RIGHT_SIDEBAR"] = "twoColumnsRightSidebar";
7
7
  LAYOUT_TYPE["THREE_WITH_SIDEBARS"] = "threeColumnsWithSidebars ";
8
+ LAYOUT_TYPE["FOUR_COLS_EQUAL"] = "fourColumnsEqual";
9
+ LAYOUT_TYPE["FIVE_COLS_EQUAL"] = "fiveColumnsEqual";
8
10
  return LAYOUT_TYPE;
9
11
  }({});
10
12
  export var SMART_LINK_TYPE = /*#__PURE__*/function (SMART_LINK_TYPE) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @atlaskit/design-system/use-primitives-text */
1
2
  import React from 'react';
2
3
  import SectionMessage from '@atlaskit/section-message';
3
4
  function AlternativePackagesMessage(_ref) {