@atlaskit/editor-common 78.11.5 → 78.11.6

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 (180) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/collab/index.js +38 -11
  3. package/dist/cjs/keymaps/index.js +9 -6
  4. package/dist/cjs/media-inline/styles.js +2 -0
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/selection/gap-cursor/styles.js +12 -3
  7. package/dist/cjs/styles/shared/annotation.js +18 -4
  8. package/dist/cjs/styles/shared/block-marks.js +1 -0
  9. package/dist/cjs/styles/shared/blockquote.js +29 -4
  10. package/dist/cjs/styles/shared/code-block.js +1 -0
  11. package/dist/cjs/styles/shared/code-mark.js +8 -3
  12. package/dist/cjs/styles/shared/column-layout.js +17 -3
  13. package/dist/cjs/styles/shared/date.js +4 -3
  14. package/dist/cjs/styles/shared/expand.js +3 -5
  15. package/dist/cjs/styles/shared/headings.js +34 -3
  16. package/dist/cjs/styles/shared/indentation.js +28 -5
  17. package/dist/cjs/styles/shared/link.js +5 -4
  18. package/dist/cjs/styles/shared/lists.js +2 -0
  19. package/dist/cjs/styles/shared/media-single.js +39 -3
  20. package/dist/cjs/styles/shared/panel.js +5 -2
  21. package/dist/cjs/styles/shared/paragraph.js +11 -4
  22. package/dist/cjs/styles/shared/plugins.js +30 -7
  23. package/dist/cjs/styles/shared/resizer.js +2 -0
  24. package/dist/cjs/styles/shared/rule.js +10 -4
  25. package/dist/cjs/styles/shared/shadow.js +1 -2
  26. package/dist/cjs/styles/shared/smartCard.js +2 -0
  27. package/dist/cjs/styles/shared/table.js +2 -0
  28. package/dist/cjs/styles/shared/tableCell.js +2 -4
  29. package/dist/cjs/styles/shared/text-color.js +8 -4
  30. package/dist/cjs/styles/shared/unsupported-content.js +2 -0
  31. package/dist/cjs/styles/shared/whitespace.js +4 -4
  32. package/dist/cjs/ui/DropList/index.js +1 -1
  33. package/dist/cjs/ui/MediaSingle/styled.js +16 -8
  34. package/dist/cjs/ui/ResizerLegacy/styled.js +1 -0
  35. package/dist/cjs/ui/clear-next-sibling-margin-top.js +12 -5
  36. package/dist/es2019/collab/index.js +34 -41
  37. package/dist/es2019/keymaps/index.js +7 -11
  38. package/dist/es2019/media-inline/media-inline-image-card.js +0 -1
  39. package/dist/es2019/media-inline/styles.js +2 -0
  40. package/dist/es2019/media-inline/views/icon-wrapper.js +0 -1
  41. package/dist/es2019/monitoring/error.js +1 -1
  42. package/dist/es2019/selection/gap-cursor/styles.js +9 -7
  43. package/dist/es2019/styles/shared/annotation.js +13 -12
  44. package/dist/es2019/styles/shared/block-marks.js +1 -0
  45. package/dist/es2019/styles/shared/blockquote.js +27 -34
  46. package/dist/es2019/styles/shared/code-block.js +1 -0
  47. package/dist/es2019/styles/shared/code-mark.js +5 -5
  48. package/dist/es2019/styles/shared/column-layout.js +15 -17
  49. package/dist/es2019/styles/shared/date.js +4 -4
  50. package/dist/es2019/styles/shared/expand.js +3 -4
  51. package/dist/es2019/styles/shared/headings.js +36 -35
  52. package/dist/es2019/styles/shared/indentation.js +26 -22
  53. package/dist/es2019/styles/shared/link.js +4 -4
  54. package/dist/es2019/styles/shared/lists.js +2 -0
  55. package/dist/es2019/styles/shared/media-single.js +42 -65
  56. package/dist/es2019/styles/shared/panel.js +5 -5
  57. package/dist/es2019/styles/shared/paragraph.js +10 -9
  58. package/dist/es2019/styles/shared/plugins.js +29 -34
  59. package/dist/es2019/styles/shared/resizer.js +2 -0
  60. package/dist/es2019/styles/shared/rule.js +9 -8
  61. package/dist/es2019/styles/shared/shadow.js +1 -2
  62. package/dist/es2019/styles/shared/smartCard.js +2 -0
  63. package/dist/es2019/styles/shared/table.js +2 -0
  64. package/dist/es2019/styles/shared/tableCell.js +1 -3
  65. package/dist/es2019/styles/shared/text-color.js +7 -8
  66. package/dist/es2019/styles/shared/unsupported-content.js +2 -0
  67. package/dist/es2019/styles/shared/whitespace.js +4 -4
  68. package/dist/es2019/ui/DropList/index.js +1 -1
  69. package/dist/es2019/ui/MediaSingle/styled.js +37 -31
  70. package/dist/es2019/ui/ResizerLegacy/styled.js +2 -0
  71. package/dist/es2019/ui/clear-next-sibling-margin-top.js +11 -9
  72. package/dist/esm/collab/index.js +38 -11
  73. package/dist/esm/keymaps/index.js +7 -5
  74. package/dist/esm/media-inline/media-inline-image-card.js +0 -1
  75. package/dist/esm/media-inline/styles.js +2 -0
  76. package/dist/esm/media-inline/views/icon-wrapper.js +0 -1
  77. package/dist/esm/monitoring/error.js +1 -1
  78. package/dist/esm/selection/gap-cursor/styles.js +12 -3
  79. package/dist/esm/styles/shared/annotation.js +18 -4
  80. package/dist/esm/styles/shared/block-marks.js +1 -0
  81. package/dist/esm/styles/shared/blockquote.js +29 -3
  82. package/dist/esm/styles/shared/code-block.js +1 -0
  83. package/dist/esm/styles/shared/code-mark.js +8 -3
  84. package/dist/esm/styles/shared/column-layout.js +17 -3
  85. package/dist/esm/styles/shared/date.js +4 -3
  86. package/dist/esm/styles/shared/expand.js +3 -4
  87. package/dist/esm/styles/shared/headings.js +34 -3
  88. package/dist/esm/styles/shared/indentation.js +28 -5
  89. package/dist/esm/styles/shared/link.js +5 -3
  90. package/dist/esm/styles/shared/lists.js +2 -0
  91. package/dist/esm/styles/shared/media-single.js +39 -3
  92. package/dist/esm/styles/shared/panel.js +5 -2
  93. package/dist/esm/styles/shared/paragraph.js +11 -3
  94. package/dist/esm/styles/shared/plugins.js +30 -6
  95. package/dist/esm/styles/shared/resizer.js +2 -0
  96. package/dist/esm/styles/shared/rule.js +10 -3
  97. package/dist/esm/styles/shared/shadow.js +1 -2
  98. package/dist/esm/styles/shared/smartCard.js +2 -0
  99. package/dist/esm/styles/shared/table.js +2 -0
  100. package/dist/esm/styles/shared/tableCell.js +1 -3
  101. package/dist/esm/styles/shared/text-color.js +8 -3
  102. package/dist/esm/styles/shared/unsupported-content.js +2 -0
  103. package/dist/esm/styles/shared/whitespace.js +4 -3
  104. package/dist/esm/ui/DropList/index.js +1 -1
  105. package/dist/esm/ui/MediaSingle/styled.js +16 -8
  106. package/dist/esm/ui/ResizerLegacy/styled.js +2 -0
  107. package/dist/esm/ui/clear-next-sibling-margin-top.js +12 -5
  108. package/dist/types/collab/index.d.ts +1 -1
  109. package/dist/types/element-browser/components/ElementBrowserLoader.d.ts +1 -1
  110. package/dist/types/extensions/types/extension-manifest-common.d.ts +1 -1
  111. package/dist/types/extensions/types/extension-manifest.d.ts +1 -1
  112. package/dist/types/icons/index.d.ts +1 -1
  113. package/dist/types/link/LinkSearch/withActivityProvider.d.ts +1 -1
  114. package/dist/types/media-inline/inline-image-wrapper.d.ts +3 -2
  115. package/dist/types/media-inline/media-inline-image-card.d.ts +4 -4
  116. package/dist/types/media-inline/views/error-view.d.ts +3 -2
  117. package/dist/types/media-inline/views/frame.d.ts +3 -2
  118. package/dist/types/media-inline/views/icon-wrapper.d.ts +3 -2
  119. package/dist/types/media-inline/views/loading-view.d.ts +2 -2
  120. package/dist/types/quick-insert/assets/index.d.ts +24 -24
  121. package/dist/types/react-node-view/getInlineNodeViewProducer.d.ts +1 -1
  122. package/dist/types/react-node-view/index.d.ts +2 -2
  123. package/dist/types/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -1
  124. package/dist/types/types/annotation/index.d.ts +2 -2
  125. package/dist/types/types/floating-toolbar.d.ts +3 -3
  126. package/dist/types/ui/Announcer/announcer.d.ts +1 -1
  127. package/dist/types/ui/DropList/index.d.ts +1 -2
  128. package/dist/types/ui/ErrorBoundary/index.d.ts +1 -0
  129. package/dist/types/ui/IntlErrorBoundary/index.d.ts +1 -0
  130. package/dist/types/ui/Layer/index.d.ts +2 -1
  131. package/dist/types/ui/MediaSingle/styled.d.ts +1 -1
  132. package/dist/types/ui/OverflowShadow/index.d.ts +1 -1
  133. package/dist/types/ui/Popup/index.d.ts +1 -0
  134. package/dist/types/ui/with-outer-listeners.d.ts +3 -2
  135. package/dist/types/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +1 -1
  136. package/dist/types/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
  137. package/dist/types/ui-menu/ArrowKeyNavigationProvider/index.d.ts +1 -1
  138. package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
  139. package/dist/types/ui-menu/Dropdown/index.d.ts +1 -1
  140. package/dist/types/ui-menu/DropdownMenu/index.d.ts +1 -1
  141. package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -0
  142. package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -2
  143. package/dist/types/utils/imageLoader.d.ts +1 -1
  144. package/dist/types-ts4.5/collab/index.d.ts +1 -1
  145. package/dist/types-ts4.5/element-browser/components/ElementBrowserLoader.d.ts +1 -1
  146. package/dist/types-ts4.5/extensions/types/extension-manifest-common.d.ts +1 -1
  147. package/dist/types-ts4.5/extensions/types/extension-manifest.d.ts +1 -1
  148. package/dist/types-ts4.5/icons/index.d.ts +1 -1
  149. package/dist/types-ts4.5/link/LinkSearch/withActivityProvider.d.ts +1 -1
  150. package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +3 -2
  151. package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +4 -4
  152. package/dist/types-ts4.5/media-inline/views/error-view.d.ts +3 -2
  153. package/dist/types-ts4.5/media-inline/views/frame.d.ts +3 -2
  154. package/dist/types-ts4.5/media-inline/views/icon-wrapper.d.ts +3 -2
  155. package/dist/types-ts4.5/media-inline/views/loading-view.d.ts +2 -2
  156. package/dist/types-ts4.5/quick-insert/assets/index.d.ts +24 -24
  157. package/dist/types-ts4.5/react-node-view/getInlineNodeViewProducer.d.ts +1 -1
  158. package/dist/types-ts4.5/react-node-view/index.d.ts +2 -2
  159. package/dist/types-ts4.5/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -1
  160. package/dist/types-ts4.5/types/annotation/index.d.ts +2 -2
  161. package/dist/types-ts4.5/types/floating-toolbar.d.ts +3 -3
  162. package/dist/types-ts4.5/ui/Announcer/announcer.d.ts +1 -1
  163. package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -2
  164. package/dist/types-ts4.5/ui/ErrorBoundary/index.d.ts +1 -0
  165. package/dist/types-ts4.5/ui/IntlErrorBoundary/index.d.ts +1 -0
  166. package/dist/types-ts4.5/ui/Layer/index.d.ts +2 -1
  167. package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +1 -1
  168. package/dist/types-ts4.5/ui/OverflowShadow/index.d.ts +1 -1
  169. package/dist/types-ts4.5/ui/Popup/index.d.ts +1 -0
  170. package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +3 -2
  171. package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +1 -1
  172. package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
  173. package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/index.d.ts +1 -1
  174. package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
  175. package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +1 -1
  176. package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +1 -1
  177. package/dist/types-ts4.5/ui-menu/DropdownMenu/types.d.ts +1 -0
  178. package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -2
  179. package/dist/types-ts4.5/utils/imageLoader.d.ts +1 -1
  180. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Perfectly safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing */
1
2
  import { css } from '@emotion/react';
2
3
  export const blockMarksSharedStyles = css`
3
4
  /**
@@ -1,38 +1,31 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
3
- export const blockquoteSharedStyles = css`
4
- & blockquote {
5
- box-sizing: border-box;
6
- padding-left: ${"var(--ds-space-200, 16px)"};
7
- border-left: 2px solid
8
- ${`var(--ds-border, ${akEditorBlockquoteBorderColor})`};
9
- margin: ${blockNodesVerticalMargin} 0 0 0;
10
- margin-right: 0;
11
-
12
- [dir='rtl'] & {
13
- padding-left: 0;
14
- padding-right: ${"var(--ds-space-200, 16px)"};
15
- }
16
-
17
- &:first-child {
18
- margin-top: 0;
19
- }
20
-
21
- &::before {
22
- content: '';
23
- }
24
-
25
- &::after {
26
- content: none;
27
- }
28
-
29
- & p {
30
- display: block;
31
- }
32
-
33
- & table,
34
- & table:last-child {
35
- display: inline-table;
3
+ export const blockquoteSharedStyles = css({
4
+ '& blockquote': {
5
+ boxSizing: 'border-box',
6
+ paddingLeft: "var(--ds-space-200, 16px)",
7
+ borderLeft: `2px solid ${`var(--ds-border, ${akEditorBlockquoteBorderColor})`}`,
8
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
9
+ margin: `${blockNodesVerticalMargin} 0 0 0`,
10
+ marginRight: 0,
11
+ "[dir='rtl'] &": {
12
+ paddingLeft: 0,
13
+ paddingRight: "var(--ds-space-200, 16px)"
14
+ },
15
+ '&:first-child': {
16
+ marginTop: 0
17
+ },
18
+ '&::before': {
19
+ content: "''"
20
+ },
21
+ '&::after': {
22
+ content: 'none'
23
+ },
24
+ '& p': {
25
+ display: 'block'
26
+ },
27
+ '& table, & table:last-child': {
28
+ display: 'inline-table'
36
29
  }
37
30
  }
38
- `;
31
+ });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Should be safe to autofix, but ignoring for now */
1
2
  import { css } from '@emotion/react';
2
3
  import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
3
4
  import { N20, N30, N400, N800 } from '@atlaskit/theme/colors';
@@ -2,10 +2,10 @@ import { css } from '@emotion/react';
2
2
  import { getCodeStyles } from '@atlaskit/code/inline';
3
3
  import { N30A } from '@atlaskit/theme/colors';
4
4
  export const codeMarkSharedStyles = () => {
5
- return css`
6
- .code {
7
- --ds--code--bg-color: ${`var(--ds-background-neutral, ${N30A})`};
8
- ${getCodeStyles()}
5
+ return css({
6
+ '.code': {
7
+ '--ds--code--bg-color': `var(--ds-background-neutral, ${N30A})`,
8
+ ...getCodeStyles()
9
9
  }
10
- `;
10
+ });
11
11
  };
@@ -1,22 +1,20 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
3
- const columnLayoutSharedStyle = css`
4
- [data-layout-section] {
5
- position: relative;
6
- display: flex;
7
- flex-direction: row;
8
- & > * {
9
- flex: 1;
10
- min-width: 0;
11
- }
12
-
13
- & > .unsupportedBlockView-content-wrap {
14
- min-width: initial;
15
- }
16
-
17
- @media screen and (max-width: ${gridMediumMaxWidth}px) {
18
- flex-direction: column;
3
+ const columnLayoutSharedStyle = css({
4
+ '[data-layout-section]': {
5
+ position: 'relative',
6
+ display: 'flex',
7
+ flexDirection: 'row',
8
+ '& > *': {
9
+ flex: 1,
10
+ minWidth: 0
11
+ },
12
+ '& > .unsupportedBlockView-content-wrap': {
13
+ minWidth: 'initial'
14
+ },
15
+ [`@media screen and (max-width: ${gridMediumMaxWidth}px)`]: {
16
+ flexDirection: 'column'
19
17
  }
20
18
  }
21
- `;
19
+ });
22
20
  export { columnLayoutSharedStyle };
@@ -3,8 +3,8 @@ export const DateSharedCssClassName = {
3
3
  DATE_WRAPPER: `date-lozenger-container`,
4
4
  DATE_CONTAINER: 'dateView-content-wrap'
5
5
  };
6
- export const dateSharedStyle = css`
7
- .${DateSharedCssClassName.DATE_WRAPPER} span {
8
- white-space: unset;
6
+ export const dateSharedStyle = css({
7
+ [`.${DateSharedCssClassName.DATE_WRAPPER} span`]: {
8
+ whiteSpace: 'unset'
9
9
  }
10
- `;
10
+ });
@@ -1,8 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
- export const expandIconWrapperStyle = css`
4
- margin-left: ${"var(--ds-space-negative-100, -8px)"};
5
- `;
2
+ export const expandIconWrapperStyle = css({
3
+ marginLeft: "var(--ds-space-negative-100, -8px)"
4
+ });
6
5
  const prefix = 'ak-editor-expand';
7
6
  export const expandClassNames = {
8
7
  prefix,
@@ -3,39 +3,40 @@ import { h100, h300, h400, h500, h600, h700 } from '@atlaskit/theme/typography';
3
3
 
4
4
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
5
5
  // text sizing prototype: http://proto/fabricrender/
6
- export const headingsSharedStyles = () => css`
7
- & h1 {
8
- ${h700()};
9
- margin-bottom: 0;
10
- margin-top: 1.667em;
6
+ export const headingsSharedStyles = () => css({
7
+ '& h1': {
8
+ ...h700(),
9
+ marginBottom: 0,
10
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
11
+ marginTop: '1.667em'
12
+ },
13
+ '& h2': {
14
+ ...h600(),
15
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
16
+ marginTop: '1.8em',
17
+ marginBottom: 0
18
+ },
19
+ '& h3': {
20
+ ...h500(),
21
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
22
+ marginTop: '2em',
23
+ marginBottom: 0
24
+ },
25
+ '& h4': {
26
+ ...h400(),
27
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
28
+ marginTop: '1.357em'
29
+ },
30
+ '& h5': {
31
+ ...h300(),
32
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
33
+ marginTop: '1.667em',
34
+ textTransform: 'none'
35
+ },
36
+ '& h6': {
37
+ ...h100(),
38
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
39
+ marginTop: '1.455em',
40
+ textTransform: 'none'
11
41
  }
12
-
13
- & h2 {
14
- ${h600()};
15
- margin-top: 1.8em;
16
- margin-bottom: 0;
17
- }
18
-
19
- & h3 {
20
- ${h500()};
21
- margin-top: 2em;
22
- margin-bottom: 0;
23
- }
24
-
25
- & h4 {
26
- ${h400()};
27
- margin-top: 1.357em;
28
- }
29
-
30
- & h5 {
31
- ${h300()};
32
- margin-top: 1.667em;
33
- text-transform: none;
34
- }
35
-
36
- & h6 {
37
- ${h100()};
38
- margin-top: 1.455em;
39
- text-transform: none;
40
- }
41
- `;
42
+ });
@@ -1,25 +1,29 @@
1
1
  import { css } from '@emotion/react';
2
-
3
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
4
- export const indentationSharedStyles = css`
5
- .fabric-editor-indentation-mark {
6
- &[data-level='1'] {
7
- margin-left: 30px;
8
- }
9
- &[data-level='2'] {
10
- margin-left: 60px;
11
- }
12
- &[data-level='3'] {
13
- margin-left: 90px;
14
- }
15
- &[data-level='4'] {
16
- margin-left: 120px;
17
- }
18
- &[data-level='5'] {
19
- margin-left: 150px;
20
- }
21
- &[data-level='6'] {
22
- margin-left: 180px;
2
+ export const indentationSharedStyles = css({
3
+ '.fabric-editor-indentation-mark': {
4
+ "&[data-level='1']": {
5
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
6
+ marginLeft: '30px'
7
+ },
8
+ "&[data-level='2']": {
9
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
10
+ marginLeft: '60px'
11
+ },
12
+ "&[data-level='3']": {
13
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
14
+ marginLeft: '90px'
15
+ },
16
+ "&[data-level='4']": {
17
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
18
+ marginLeft: '120px'
19
+ },
20
+ "&[data-level='5']": {
21
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
22
+ marginLeft: '150px'
23
+ },
24
+ "&[data-level='6']": {
25
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
26
+ marginLeft: '180px'
23
27
  }
24
28
  }
25
- `;
29
+ });
@@ -1,7 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
- const linkSharedStyle = css`
3
- a.blockLink {
4
- display: block;
2
+ const linkSharedStyle = css({
3
+ 'a.blockLink': {
4
+ display: 'block'
5
5
  }
6
- `;
6
+ });
7
7
  export { linkSharedStyle };
@@ -33,6 +33,8 @@ export function getOrderedListInlineStyles(itemCounterDigitsSize, styleFormat) {
33
33
  }
34
34
  return style;
35
35
  }
36
+
37
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- There is some "flow-root" hack that is not actually valid css. Do note, this might not even work in Compiled (or Emotion) due to the way tagged template expressions are parsed…
36
38
  export const listsSharedStyles = css`
37
39
  /* =============== INDENTATION SPACING ========= */
38
40
 
@@ -1,74 +1,51 @@
1
1
  import { css } from '@emotion/react';
2
2
  const richMediaClassName = 'rich-media-item';
3
3
  const wrappedMediaBreakoutPoint = 410;
4
- const mediaSingleSharedStyle = css`
5
- li .${richMediaClassName} {
6
- margin: 0;
7
- }
8
-
9
- /* Hack for chrome to fix media single position
10
- inside a list when media is the first child */
11
- &.ua-chrome li > .mediaSingleView-content-wrap::before {
12
- content: '';
13
- display: block;
14
- height: 0;
15
- }
16
-
17
- &.ua-firefox {
18
- .mediaSingleView-content-wrap {
19
- user-select: none;
4
+ const mediaSingleSharedStyle = css({
5
+ [`li .${richMediaClassName}`]: {
6
+ margin: 0
7
+ },
8
+ // Hack for chrome to fix media single position inside a list when media is the first child
9
+ '&.ua-chrome li > .mediaSingleView-content-wrap::before': {
10
+ content: "''",
11
+ display: 'block',
12
+ height: 0
13
+ },
14
+ '&.ua-firefox': {
15
+ '.mediaSingleView-content-wrap': {
16
+ userSelect: 'none'
17
+ },
18
+ '.captionView-content-wrap': {
19
+ userSelect: 'text'
20
20
  }
21
-
22
- .captionView-content-wrap {
23
- user-select: text;
24
- }
25
- }
26
-
27
- .mediaSingleView-content-wrap[layout='center'] {
28
- clear: both;
29
- }
30
-
31
- table .${richMediaClassName} {
32
- margin-top: ${"var(--ds-space-150, 12px)"};
33
- margin-bottom: ${"var(--ds-space-150, 12px)"};
34
- clear: both;
35
-
36
- &.image-wrap-left,
37
- &.image-wrap-right {
38
- clear: none;
39
-
40
- &:first-child {
41
- margin-top: ${"var(--ds-space-150, 12px)"};
21
+ },
22
+ ".mediaSingleView-content-wrap[layout='center']": {
23
+ clear: 'both'
24
+ },
25
+ [`table .${richMediaClassName}`]: {
26
+ marginTop: "var(--ds-space-150, 12px)",
27
+ marginBottom: "var(--ds-space-150, 12px)",
28
+ clear: 'both',
29
+ '&.image-wrap-left, &.image-wrap-right': {
30
+ clear: 'none',
31
+ '&:first-child': {
32
+ marginTop: "var(--ds-space-150, 12px)"
42
33
  }
43
34
  }
44
- }
45
-
46
- .${richMediaClassName}.image-wrap-right
47
- + .${richMediaClassName}.image-wrap-left {
48
- clear: both;
49
- }
50
-
51
- .${richMediaClassName}.image-wrap-left
52
- + .${richMediaClassName}.image-wrap-right,
53
- .${richMediaClassName}.image-wrap-right
54
- + .${richMediaClassName}.image-wrap-left,
55
- .${richMediaClassName}.image-wrap-left
56
- + .${richMediaClassName}.image-wrap-left,
57
- .${richMediaClassName}.image-wrap-right
58
- + .${richMediaClassName}.image-wrap-right {
59
- margin-right: 0;
60
- margin-left: 0;
61
- }
62
-
63
- @media all and (max-width: ${wrappedMediaBreakoutPoint}px) {
64
- div.mediaSingleView-content-wrap[layout='wrap-left'],
65
- div.mediaSingleView-content-wrap[data-layout='wrap-left'],
66
- div.mediaSingleView-content-wrap[layout='wrap-right'],
67
- div.mediaSingleView-content-wrap[data-layout='wrap-right'] {
68
- float: none;
69
- overflow: auto;
70
- margin: ${"var(--ds-space-150, 12px)"} 0;
35
+ },
36
+ [`.${richMediaClassName}.image-wrap-right + .${richMediaClassName}.image-wrap-left`]: {
37
+ clear: 'both'
38
+ },
39
+ [`.${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`]: {
40
+ marginRight: 0,
41
+ marginLeft: 0
42
+ },
43
+ [`@media all and (max-width: ${wrappedMediaBreakoutPoint}px)`]: {
44
+ "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']": {
45
+ float: 'none',
46
+ overflow: 'auto',
47
+ margin: `${"var(--ds-space-150, 12px)"} 0`
71
48
  }
72
49
  }
73
- `;
50
+ });
74
51
  export { mediaSingleSharedStyle, richMediaClassName };
@@ -149,6 +149,8 @@ const mainDynamicStyles = panelType => {
149
149
  color: inherit;
150
150
  `;
151
151
  };
152
+
153
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
152
154
  export const panelSharedStylesWithoutPrefix = () => css`
153
155
  border-radius: ${"var(--ds-border-radius, 3px)"};
154
156
  margin: ${blockNodesVerticalMargin} 0 0;
@@ -249,8 +251,6 @@ export const panelSharedStylesWithoutPrefix = () => css`
249
251
  }
250
252
  }
251
253
  `;
252
- export const panelSharedStyles = () => css`
253
- .${PanelSharedCssClassName.prefix} {
254
- ${panelSharedStylesWithoutPrefix()}
255
- }
256
- `;
254
+ export const panelSharedStyles = () => css({
255
+ [`.${PanelSharedCssClassName.prefix}`]: panelSharedStylesWithoutPrefix()
256
+ });
@@ -2,13 +2,14 @@ import { css } from '@emotion/react';
2
2
  import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
3
3
 
4
4
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
5
- export const paragraphSharedStyles = css`
6
- & p {
7
- font-size: 1em;
8
- line-height: ${akEditorLineHeight};
9
- font-weight: normal;
10
- margin-top: ${blockNodesVerticalMargin};
11
- margin-bottom: 0;
12
- letter-spacing: -0.005em;
5
+ export const paragraphSharedStyles = css({
6
+ '& p': {
7
+ fontSize: '1em',
8
+ lineHeight: akEditorLineHeight,
9
+ fontWeight: 'normal',
10
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
11
+ marginTop: blockNodesVerticalMargin,
12
+ marginBottom: 0,
13
+ letterSpacing: '-0.005em'
13
14
  }
14
- `;
15
+ });
@@ -1,43 +1,38 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { N30 } from '@atlaskit/theme/colors';
3
- export const buttonGroupStyle = css`
4
- display: inline-flex;
5
- align-items: center;
6
-
7
- & > div {
8
- display: flex;
3
+ export const buttonGroupStyle = css({
4
+ display: 'inline-flex',
5
+ alignItems: 'center',
6
+ '& > div': {
7
+ display: 'flex'
9
8
  }
10
- `;
9
+ });
11
10
 
12
11
  // This style is copied to packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/styles.tsx
13
12
  // If you make change here, change in above file as well.
14
- export const separatorStyles = css`
15
- background: ${`var(--ds-border, ${N30})`};
16
- width: 1px;
17
- height: 24px;
18
- display: inline-block;
19
- margin: 0 ${"var(--ds-space-100, 8px)"};
20
- user-select: none;
21
- `;
13
+ export const separatorStyles = css({
14
+ background: `var(--ds-border, ${N30})`,
15
+ width: '1px',
16
+ height: '24px',
17
+ display: 'inline-block',
18
+ margin: `0 ${"var(--ds-space-100, 8px)"}`,
19
+ userSelect: 'none'
20
+ });
22
21
 
23
22
  // This style is copied to packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/styles.tsx
24
23
  // If you make change here, change in above file as well.
25
- export const wrapperStyle = css`
26
- display: flex;
27
- align-items: center;
28
-
29
- > div,
30
- > span {
31
- display: flex;
32
- }
33
-
34
- > div > div {
35
- display: flex;
36
- }
37
-
38
- margin-left: 0;
39
- min-width: auto;
40
- `;
41
- export const triggerWrapperStyles = css`
42
- display: flex;
43
- `;
24
+ export const wrapperStyle = css({
25
+ display: 'flex',
26
+ alignItems: 'center',
27
+ '> div, > span': {
28
+ display: 'flex'
29
+ },
30
+ '> div > div': {
31
+ display: 'flex'
32
+ },
33
+ marginLeft: 0,
34
+ minWidth: 'auto'
35
+ });
36
+ export const triggerWrapperStyles = css({
37
+ display: 'flex'
38
+ });
@@ -17,6 +17,8 @@ export const resizerDangerClassName = `${resizerHandleClassName}-danger`;
17
17
  const akEditorSelectedNodeClassName = 'ak-editor-selected-node';
18
18
  export const handleWrapperClass = 'resizer-handle-wrapper';
19
19
  export const resizerHandleZIndex = 1;
20
+
21
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Seems perfectly safe to autofix, but comments would be lost…
20
22
  export const resizerStyles = css`
21
23
  .${resizerItemClassName} {
22
24
  will-change: width;
@@ -2,12 +2,13 @@ import { css } from '@emotion/react';
2
2
  import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
3
3
  import { N30A } from '@atlaskit/theme/colors';
4
4
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
5
- export const ruleSharedStyles = () => css`
6
- & hr {
7
- border: none;
8
- background-color: ${`var(--ds-border, ${N30A})`};
9
- margin: ${akEditorLineHeight}em 0;
10
- height: 2px;
11
- border-radius: 1px;
5
+ export const ruleSharedStyles = () => css({
6
+ '& hr': {
7
+ border: 'none',
8
+ backgroundColor: `var(--ds-border, ${N30A})`,
9
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
10
+ margin: `${akEditorLineHeight}em 0`,
11
+ height: '2px',
12
+ borderRadius: '1px'
12
13
  }
13
- `;
14
+ });
@@ -43,8 +43,7 @@ const shadowSharedStyle = css({
43
43
  },
44
44
  [`& .${shadowClassNames.RIGHT_SHADOW}::after`]: {
45
45
  background: `linear-gradient( to right, transparent 0, ${`var(--ds-shadow-overflow-spread, ${N40A})`} ${getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? 140 : 100}% ), linear-gradient( to left, ${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px, transparent 1px )`,
46
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
47
- left: `calc(100% - ${shadowWidth}px)`,
46
+ right: '0px',
48
47
  top: '0px',
49
48
  display: 'block'
50
49
  },
@@ -4,6 +4,8 @@ import { N0, N40 } from '@atlaskit/theme/colors';
4
4
  import { SmartCardSharedCssClassName } from './smart-card';
5
5
  export const DATASOURCE_INNER_CONTAINER_CLASSNAME = 'datasourceView-content-inner-wrap';
6
6
  export const FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-picker';
7
+
8
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Seems safe to autofix with a fix to `getSelectionStyles`
7
9
  export const smartCardStyles = css`
8
10
  .${SmartCardSharedCssClassName.INLINE_CARD_CONTAINER} {
9
11
  max-width: calc(100% - 20px);
@@ -34,6 +34,8 @@ export const TableSharedCssClassName = {
34
34
  TABLE_COLUMN_CONTROLS_DECORATIONS: `${tablePrefixSelector}-column-controls-decoration`,
35
35
  TABLE_RESIZER_CONTAINER: `${tablePrefixSelector}-resizer-container`
36
36
  };
37
+
38
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
37
39
  const tableSharedStyle = () => css`
38
40
  ${tableCellBackgroundStyleOverride()}
39
41
  .${TableSharedCssClassName.TABLE_CONTAINER} {
@@ -22,6 +22,4 @@ const mapBackgroundColors = () => {
22
22
  });
23
23
  return cssString;
24
24
  };
25
- export const tableCellBackgroundStyleOverride = () => css`
26
- ${mapBackgroundColors()}
27
- `;
25
+ export const tableCellBackgroundStyleOverride = () => css(mapBackgroundColors());
@@ -1,10 +1,9 @@
1
1
  import { css } from '@emotion/react';
2
- export const textColorStyles = css`
3
- .fabric-text-color-mark {
4
- color: var(--custom-palette-color, inherit);
2
+ export const textColorStyles = css({
3
+ '.fabric-text-color-mark': {
4
+ color: 'var(--custom-palette-color, inherit)'
5
+ },
6
+ 'a .fabric-text-color-mark': {
7
+ color: 'unset'
5
8
  }
6
-
7
- a .fabric-text-color-mark {
8
- color: unset;
9
- }
10
- `;
9
+ });