@atlaskit/editor-common 78.11.4 → 78.11.5

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 (214) hide show
  1. package/.eslintrc.js +8 -0
  2. package/CHANGELOG.md +8 -0
  3. package/afm-cc/tsconfig.json +3 -0
  4. package/dist/cjs/__tests_external__/page-objects/Editor.js +1 -1
  5. package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +1 -1
  6. package/dist/cjs/__tests_external__/page-objects/Renderer.js +1 -1
  7. package/dist/cjs/analytics/types/enums.js +1 -0
  8. package/dist/cjs/analytics/types/table-events.js +1 -0
  9. package/dist/cjs/annotation/index.js +1 -1
  10. package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +2 -2
  11. package/dist/cjs/card/index.js +2 -2
  12. package/dist/cjs/clipboard/index.js +2 -2
  13. package/dist/cjs/collab/index.js +6 -3
  14. package/dist/cjs/element-browser/ElementBrowser.js +3 -3
  15. package/dist/cjs/element-browser/components/CategoryList.js +2 -2
  16. package/dist/cjs/element-browser/components/ElementBrowserLoader.js +2 -2
  17. package/dist/cjs/element-browser/components/ElementList/ElementList.js +92 -15
  18. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +6 -5
  19. package/dist/cjs/element-browser/components/ElementSearch.js +5 -6
  20. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +2 -2
  21. package/dist/cjs/element-browser/hooks/use-container-width.js +2 -2
  22. package/dist/cjs/extensibility/Extension/Extension/index.js +2 -2
  23. package/dist/cjs/extensibility/Extension/Extension/styles.js +3 -3
  24. package/dist/cjs/extensibility/Extension/Lozenge.js +1 -1
  25. package/dist/cjs/extensibility/Extension/styles.js +1 -1
  26. package/dist/cjs/extensibility/Extension.js +3 -3
  27. package/dist/cjs/extensibility/ExtensionComponent.js +3 -4
  28. package/dist/cjs/extensibility/MultiBodiedExtension/index.js +2 -2
  29. package/dist/cjs/extensibility/extensionNodeView.js +1 -1
  30. package/dist/cjs/extensibility/index.js +2 -2
  31. package/dist/cjs/icons/index.js +2 -2
  32. package/dist/cjs/keymaps/index.js +2 -2
  33. package/dist/cjs/link/LinkPicker/EditorLinkPicker/index.js +2 -2
  34. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -4
  35. package/dist/cjs/link/LinkSearch/LinkSearchList.js +15 -7
  36. package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +4 -4
  37. package/dist/cjs/link/LinkSearch/ToolbarComponents.js +17 -6
  38. package/dist/cjs/link/LinkSearch/index.js +1 -2
  39. package/dist/cjs/link/LinkSearch/withActivityProvider.js +1 -1
  40. package/dist/cjs/link/index.js +2 -2
  41. package/dist/cjs/monitoring/error.js +3 -3
  42. package/dist/cjs/preset/editor-commands.js +1 -1
  43. package/dist/cjs/provider-factory/with-providers.js +1 -1
  44. package/dist/cjs/quick-insert/assets/index.js +2 -2
  45. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +1 -0
  46. package/dist/cjs/resizer/Resizer.js +8 -11
  47. package/dist/cjs/safe-plugin/index.js +1 -1
  48. package/dist/cjs/selection/gap-cursor/selection.js +1 -1
  49. package/dist/cjs/selection/gap-cursor/styles.js +1 -1
  50. package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +1 -1
  51. package/dist/cjs/styles/shared/embedCard.js +19 -5
  52. package/dist/cjs/styles/shared/grid.js +28 -4
  53. package/dist/cjs/styles/shared/indentation.js +1 -0
  54. package/dist/cjs/styles/shared/panel.js +1 -1
  55. package/dist/cjs/styles/shared/resizer.js +3 -3
  56. package/dist/cjs/styles/shared/shadow.js +32 -3
  57. package/dist/cjs/ui/Announcer/announcer.js +4 -2
  58. package/dist/cjs/ui/BaseTheme/index.js +2 -2
  59. package/dist/cjs/ui/Caption/index.js +1 -1
  60. package/dist/cjs/ui/ContextPanel/context.js +1 -1
  61. package/dist/cjs/ui/DropList/index.js +2 -2
  62. package/dist/cjs/ui/Emoji/index.js +3 -3
  63. package/dist/cjs/ui/ErrorBoundary/index.js +1 -1
  64. package/dist/cjs/ui/Expand/index.js +3 -3
  65. package/dist/cjs/ui/IntlErrorBoundary/index.js +1 -1
  66. package/dist/cjs/ui/IntlProviderIfMissingWrapper/index.js +2 -2
  67. package/dist/cjs/ui/Layer/index.js +3 -4
  68. package/dist/cjs/ui/Mention/index.js +3 -3
  69. package/dist/cjs/ui/Mention/mention-with-profilecard.js +2 -2
  70. package/dist/cjs/ui/Mention/mention-with-providers.js +3 -3
  71. package/dist/cjs/ui/MultiBodiedExtension/index.js +1 -2
  72. package/dist/cjs/ui/OverflowShadow/index.js +1 -1
  73. package/dist/cjs/ui/PanelTextInput/index.js +1 -1
  74. package/dist/cjs/ui/Popup/index.js +1 -1
  75. package/dist/cjs/ui/PortalProvider/index.js +1 -1
  76. package/dist/cjs/ui/ResizerLegacy/index.js +1 -1
  77. package/dist/cjs/ui/UnsupportedBlock/index.js +3 -3
  78. package/dist/cjs/ui/UnsupportedInline/index.js +18 -5
  79. package/dist/cjs/ui/WidthProvider/index.js +2 -2
  80. package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +1 -1
  81. package/dist/cjs/ui/index.js +2 -2
  82. package/dist/cjs/ui/with-outer-listeners.js +3 -3
  83. package/dist/cjs/ui-color/ColorPalette/Color/index.js +3 -3
  84. package/dist/cjs/ui-color/ColorPalette/Color/styles.js +21 -5
  85. package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +2 -2
  86. package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +2 -2
  87. package/dist/cjs/ui-menu/ColorPickerButton/index.js +35 -7
  88. package/dist/cjs/ui-menu/Dropdown/index.js +3 -3
  89. package/dist/cjs/ui-menu/DropdownContainer/index.js +2 -2
  90. package/dist/cjs/ui-menu/DropdownMenu/index.js +3 -4
  91. package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +2 -2
  92. package/dist/cjs/ui-menu/ToolbarButton/index.js +2 -2
  93. package/dist/cjs/ui-menu/index.js +2 -2
  94. package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +3 -3
  95. package/dist/cjs/utils/imageLoader.js +3 -3
  96. package/dist/cjs/with-plugin-state/index.js +1 -1
  97. package/dist/es2019/analytics/types/enums.js +1 -0
  98. package/dist/es2019/analytics/types/table-events.js +1 -0
  99. package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +1 -0
  100. package/dist/es2019/collab/index.js +6 -1
  101. package/dist/es2019/element-browser/components/ElementList/ElementList.js +83 -94
  102. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +6 -5
  103. package/dist/es2019/element-browser/components/ElementSearch.js +3 -4
  104. package/dist/es2019/extensibility/Extension/Extension/styles.js +4 -4
  105. package/dist/es2019/extensibility/Extension/styles.js +1 -1
  106. package/dist/es2019/extensibility/ExtensionComponent.js +0 -1
  107. package/dist/es2019/extensions/types/field-definitions.js +1 -0
  108. package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
  109. package/dist/es2019/link/LinkSearch/LinkSearchList.js +14 -14
  110. package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +2 -1
  111. package/dist/es2019/link/LinkSearch/ToolbarComponents.js +17 -18
  112. package/dist/es2019/link/LinkSearch/index.js +0 -1
  113. package/dist/es2019/monitoring/error.js +1 -1
  114. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +1 -0
  115. package/dist/es2019/resizer/Resizer.js +2 -3
  116. package/dist/es2019/selection/gap-cursor/styles.js +2 -2
  117. package/dist/es2019/styles/shared/embedCard.js +17 -21
  118. package/dist/es2019/styles/shared/grid.js +27 -31
  119. package/dist/es2019/styles/shared/indentation.js +2 -0
  120. package/dist/es2019/styles/shared/panel.js +1 -1
  121. package/dist/es2019/styles/shared/resizer.js +6 -3
  122. package/dist/es2019/styles/shared/shadow.js +36 -65
  123. package/dist/es2019/ui/Announcer/announcer.js +2 -0
  124. package/dist/es2019/ui/ContextPanel/context.js +1 -0
  125. package/dist/es2019/ui/DropList/index.js +1 -1
  126. package/dist/es2019/ui/Expand/index.js +3 -4
  127. package/dist/es2019/ui/Layer/index.js +0 -1
  128. package/dist/es2019/ui/MultiBodiedExtension/index.js +1 -3
  129. package/dist/es2019/ui/UnsupportedBlock/index.js +2 -2
  130. package/dist/es2019/ui/UnsupportedInline/index.js +15 -15
  131. package/dist/es2019/ui-color/ColorPalette/Color/styles.js +20 -24
  132. package/dist/es2019/ui-menu/ColorPickerButton/index.js +34 -35
  133. package/dist/es2019/ui-menu/DropdownMenu/index.js +0 -1
  134. package/dist/es2019/utils/dom.js +1 -0
  135. package/dist/es2019/with-plugin-state/index.js +1 -0
  136. package/dist/esm/__tests_external__/page-objects/Editor.js +1 -1
  137. package/dist/esm/__tests_external__/page-objects/EditorSmartLink.js +1 -1
  138. package/dist/esm/__tests_external__/page-objects/Renderer.js +1 -1
  139. package/dist/esm/analytics/types/enums.js +1 -0
  140. package/dist/esm/analytics/types/table-events.js +1 -0
  141. package/dist/esm/annotation/index.js +1 -1
  142. package/dist/esm/card/MediaAndEmbedsToolbar/index.js +1 -0
  143. package/dist/esm/collab/index.js +6 -1
  144. package/dist/esm/element-browser/ElementBrowser.js +1 -1
  145. package/dist/esm/element-browser/components/ElementList/ElementList.js +90 -13
  146. package/dist/esm/element-browser/components/ElementList/EmptyState.js +6 -5
  147. package/dist/esm/element-browser/components/ElementSearch.js +3 -4
  148. package/dist/esm/extensibility/Extension/Extension/styles.js +4 -4
  149. package/dist/esm/extensibility/Extension/Lozenge.js +1 -1
  150. package/dist/esm/extensibility/Extension/styles.js +1 -1
  151. package/dist/esm/extensibility/Extension.js +1 -1
  152. package/dist/esm/extensibility/ExtensionComponent.js +1 -2
  153. package/dist/esm/extensibility/extensionNodeView.js +1 -1
  154. package/dist/esm/extensions/types/field-definitions.js +1 -0
  155. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
  156. package/dist/esm/link/LinkSearch/LinkSearchList.js +15 -6
  157. package/dist/esm/link/LinkSearch/LinkSearchListItem.js +3 -2
  158. package/dist/esm/link/LinkSearch/ToolbarComponents.js +17 -5
  159. package/dist/esm/link/LinkSearch/index.js +1 -2
  160. package/dist/esm/link/LinkSearch/withActivityProvider.js +1 -1
  161. package/dist/esm/monitoring/error.js +1 -1
  162. package/dist/esm/preset/editor-commands.js +1 -1
  163. package/dist/esm/provider-factory/with-providers.js +1 -1
  164. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +1 -0
  165. package/dist/esm/resizer/Resizer.js +2 -5
  166. package/dist/esm/safe-plugin/index.js +1 -1
  167. package/dist/esm/selection/gap-cursor/selection.js +1 -1
  168. package/dist/esm/selection/gap-cursor/styles.js +1 -1
  169. package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +1 -1
  170. package/dist/esm/styles/shared/embedCard.js +19 -4
  171. package/dist/esm/styles/shared/grid.js +28 -3
  172. package/dist/esm/styles/shared/indentation.js +2 -0
  173. package/dist/esm/styles/shared/panel.js +1 -1
  174. package/dist/esm/styles/shared/resizer.js +2 -2
  175. package/dist/esm/styles/shared/shadow.js +32 -3
  176. package/dist/esm/ui/Announcer/announcer.js +2 -0
  177. package/dist/esm/ui/Caption/index.js +1 -1
  178. package/dist/esm/ui/ContextPanel/context.js +2 -1
  179. package/dist/esm/ui/DropList/index.js +2 -2
  180. package/dist/esm/ui/Emoji/index.js +1 -1
  181. package/dist/esm/ui/ErrorBoundary/index.js +1 -1
  182. package/dist/esm/ui/Expand/index.js +2 -2
  183. package/dist/esm/ui/IntlErrorBoundary/index.js +1 -1
  184. package/dist/esm/ui/Layer/index.js +1 -2
  185. package/dist/esm/ui/Mention/index.js +1 -1
  186. package/dist/esm/ui/Mention/mention-with-providers.js +1 -1
  187. package/dist/esm/ui/MultiBodiedExtension/index.js +1 -3
  188. package/dist/esm/ui/OverflowShadow/index.js +1 -1
  189. package/dist/esm/ui/PanelTextInput/index.js +1 -1
  190. package/dist/esm/ui/Popup/index.js +1 -1
  191. package/dist/esm/ui/PortalProvider/index.js +1 -1
  192. package/dist/esm/ui/ResizerLegacy/index.js +1 -1
  193. package/dist/esm/ui/UnsupportedBlock/index.js +1 -1
  194. package/dist/esm/ui/UnsupportedInline/index.js +15 -3
  195. package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +1 -1
  196. package/dist/esm/ui/with-outer-listeners.js +1 -1
  197. package/dist/esm/ui-color/ColorPalette/Color/index.js +1 -1
  198. package/dist/esm/ui-color/ColorPalette/Color/styles.js +21 -5
  199. package/dist/esm/ui-menu/ColorPickerButton/index.js +34 -7
  200. package/dist/esm/ui-menu/Dropdown/index.js +1 -1
  201. package/dist/esm/ui-menu/DropdownMenu/index.js +1 -2
  202. package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +1 -1
  203. package/dist/esm/utils/dom.js +1 -0
  204. package/dist/esm/utils/imageLoader.js +1 -1
  205. package/dist/esm/with-plugin-state/index.js +1 -1
  206. package/dist/types/analytics/types/enums.d.ts +2 -1
  207. package/dist/types/analytics/types/table-events.d.ts +10 -1
  208. package/dist/types/styles/shared/resizer.d.ts +1 -0
  209. package/dist/types/ui/UnsupportedInline/index.d.ts +3 -3
  210. package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -1
  211. package/dist/types-ts4.5/analytics/types/table-events.d.ts +10 -1
  212. package/dist/types-ts4.5/styles/shared/resizer.d.ts +1 -0
  213. package/dist/types-ts4.5/ui/UnsupportedInline/index.d.ts +3 -3
  214. package/package.json +2 -1
@@ -22,23 +22,21 @@ import EmptyState from './EmptyState';
22
22
  import { getColumnCount, getScrollbarWidth } from './utils';
23
23
  export const ICON_HEIGHT = 40;
24
24
  export const ICON_WIDTH = 40;
25
- export const itemIcon = css`
26
- width: ${ICON_WIDTH}px;
27
- height: ${ICON_HEIGHT}px;
28
- overflow: hidden;
29
- border: 1px solid ${"var(--ds-border, rgba(223, 225, 229, 0.5))"}; /* N60 at 50% */
30
- border-radius: ${borderRadius()}px;
31
- box-sizing: border-box;
32
-
33
- display: flex;
34
- justify-content: center;
35
- align-items: center;
36
-
37
- div {
38
- width: ${ICON_WIDTH}px;
39
- height: ${ICON_HEIGHT}px;
25
+ export const itemIcon = css({
26
+ width: `${ICON_WIDTH}px`,
27
+ height: `${ICON_HEIGHT}px`,
28
+ overflow: 'hidden',
29
+ border: `1px solid ${"var(--ds-border, rgba(223, 225, 229, 0.5))"}`,
30
+ borderRadius: `${borderRadius()}px`,
31
+ boxSizing: 'border-box',
32
+ display: 'flex',
33
+ justifyContent: 'center',
34
+ alignItems: 'center',
35
+ div: {
36
+ width: `${ICON_WIDTH}px`,
37
+ height: `${ICON_HEIGHT}px`
40
38
  }
41
- `;
39
+ });
42
40
  function ElementList({
43
41
  items,
44
42
  mode,
@@ -230,95 +228,86 @@ const ItemContent = /*#__PURE__*/memo(({
230
228
  }, keyshortcut))), description && jsx("p", {
231
229
  css: itemDescription
232
230
  }, description))));
233
- const elementItemsWrapper = css`
234
- flex: 1;
235
- flex-flow: row wrap;
236
- align-items: flex-start;
237
- justify-content: flex-start;
238
- overflow: hidden;
239
- padding: ${ELEMENT_LIST_PADDING}px; // For Focus outline
240
-
241
- .ReactVirtualized__Collection {
242
- border-radius: 3px; // Standard border-radius across other components like Search or Item.
243
- outline: none;
244
-
245
- :focus {
246
- box-shadow: 0 0 0 ${ELEMENT_LIST_PADDING}px
247
- ${`var(--ds-border-focused, ${B100})`};
231
+ const elementItemsWrapper = css({
232
+ flex: 1,
233
+ flexFlow: 'row wrap',
234
+ alignItems: 'flex-start',
235
+ justifyContent: 'flex-start',
236
+ overflow: 'hidden',
237
+ padding: "var(--ds-space-025, 2px)",
238
+ '.ReactVirtualized__Collection': {
239
+ borderRadius: '3px',
240
+ outline: 'none',
241
+ ':focus': {
242
+ boxShadow: `0 0 0 ${ELEMENT_LIST_PADDING}px ${`var(--ds-border-focused, ${B100})`}`
248
243
  }
249
- }
250
- .ReactVirtualized__Collection__innerScrollContainer {
251
- div[class='element-item-wrapper']:last-child {
252
- padding-bottom: ${"var(--ds-space-050, 4px)"};
244
+ },
245
+ '.ReactVirtualized__Collection__innerScrollContainer': {
246
+ "div[class='element-item-wrapper']:last-child": {
247
+ paddingBottom: "var(--ds-space-050, 4px)"
253
248
  }
254
249
  }
255
- `;
256
- const elementItemWrapper = css`
257
- div {
258
- button {
259
- height: 75px;
260
- align-items: flex-start;
261
- padding: ${"var(--ds-space-150, 12px)"} ${"var(--ds-space-150, 12px)"} 11px;
250
+ });
251
+ const elementItemWrapper = css({
252
+ div: {
253
+ button: {
254
+ height: '75px',
255
+ alignItems: 'flex-start',
256
+ padding: "var(--ds-space-150, 12px)"
262
257
  }
263
258
  }
264
- `;
265
- const itemBody = css`
266
- display: flex;
267
- flex-direction: row;
268
- flex-wrap: nowrap;
269
- justify-content: space-between;
270
- line-height: 1.4;
271
- width: 100%;
272
-
273
- margin-top: ${"var(--ds-space-negative-025, -2px)"}; // Fixes the Item Icon and text's alignment issue
274
- `;
259
+ });
260
+ const itemBody = css({
261
+ display: 'flex',
262
+ flexDirection: 'row',
263
+ flexWrap: 'nowrap',
264
+ justifyContent: 'space-between',
265
+ lineHeight: 1.4,
266
+ width: '100%',
267
+ marginTop: "var(--ds-space-negative-025, -2px)"
268
+ });
275
269
 
276
270
  /*
277
271
  * -webkit-line-clamp is also supported by firefox 🎉
278
272
  * https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/68#CSS
279
273
  */
280
- const multilineStyle = css`
281
- display: -webkit-box;
282
- -webkit-line-clamp: 2;
283
- -webkit-box-orient: vertical;
284
- `;
285
- const itemDescription = css`
286
- ${multilineStyle};
287
-
288
- overflow: hidden;
289
- font-size: ${relativeFontSizeToBase16(11.67)};
290
- color: ${`var(--ds-text-subtle, ${N200})`};
291
- margin-top: ${"var(--ds-space-025, 2px)"};
292
- `;
293
- const itemText = css`
294
- width: inherit;
295
- white-space: initial;
296
- `;
297
- const itemTitleWrapper = css`
298
- display: flex;
299
- justify-content: space-between; // Title and keyboardshortcut are rendered in the same block
300
- `;
301
- const itemTitle = css`
302
- width: 100%;
303
- overflow: hidden;
304
-
305
- white-space: nowrap;
306
- text-overflow: ellipsis;
307
- `;
308
- const itemAfter = css`
309
- flex: 0 0 auto;
310
-
311
- // Prevents item from being cut off due to negative margin
312
- padding-top: ${"var(--ds-space-025, 2px)"};
313
- margin-bottom: ${"var(--ds-space-negative-025, -2px)"};
314
- `;
315
- const itemIconStyle = css`
316
- img {
317
- height: 40px;
318
- width: 40px;
319
- object-fit: cover;
274
+ const multilineStyle = css({
275
+ display: '-webkit-box',
276
+ WebkitLineClamp: 2,
277
+ WebkitBoxOrient: 'vertical'
278
+ });
279
+ const itemDescription = css(multilineStyle, {
280
+ overflow: 'hidden',
281
+ fontSize: relativeFontSizeToBase16(11.67),
282
+ color: `var(--ds-text-subtle, ${N200})`,
283
+ marginTop: "var(--ds-space-025, 2px)"
284
+ });
285
+ const itemText = css({
286
+ width: 'inherit',
287
+ whiteSpace: 'initial'
288
+ });
289
+ const itemTitleWrapper = css({
290
+ display: 'flex',
291
+ justifyContent: 'space-between'
292
+ });
293
+ const itemTitle = css({
294
+ width: '100%',
295
+ overflow: 'hidden',
296
+ whiteSpace: 'nowrap',
297
+ textOverflow: 'ellipsis'
298
+ });
299
+ const itemAfter = css({
300
+ flex: '0 0 auto',
301
+ paddingTop: "var(--ds-space-025, 2px)",
302
+ marginBottom: "var(--ds-space-negative-025, -2px)"
303
+ });
304
+ const itemIconStyle = css({
305
+ img: {
306
+ height: '40px',
307
+ width: '40px',
308
+ objectFit: 'cover'
320
309
  }
321
- `;
310
+ });
322
311
  const MemoizedElementListWithAnalytics = /*#__PURE__*/memo(withAnalyticsContext({
323
312
  component: 'ElementList'
324
313
  })(ElementList));
@@ -2,6 +2,7 @@
2
2
  import { css, jsx } from '@emotion/react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
4
  import Button from '@atlaskit/button';
5
+ import { Box, xcss } from '@atlaskit/primitives';
5
6
  import NotFoundIllustration from './NotFoundIllustration';
6
7
  export default function EmptyState({
7
8
  onExternalLinkClick
@@ -21,8 +22,8 @@ export default function EmptyState({
21
22
  id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
22
23
  defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
23
24
  description: "Empty state sub-heading"
24
- })), jsx("div", {
25
- css: externalLinkWrapper
25
+ })), jsx(Box, {
26
+ xcss: externalLinkWrapper
26
27
  }, jsx(Button, {
27
28
  appearance: "primary",
28
29
  target: "_blank",
@@ -40,7 +41,7 @@ const emptyStateHeading = css({
40
41
  color: "var(--ds-text, rgb(23, 43, 77))",
41
42
  fontWeight: 500,
42
43
  letterSpacing: '-0.008em',
43
- marginTop: '28px'
44
+ marginTop: "var(--ds-space-300, 24px)"
44
45
  });
45
46
  const emptyStateSubHeading = css({
46
47
  marginTop: "var(--ds-space-200, 16px)",
@@ -54,6 +55,6 @@ const emptyStateWrapper = css({
54
55
  alignItems: 'center',
55
56
  width: '100%'
56
57
  });
57
- const externalLinkWrapper = css({
58
- marginTop: '14px'
58
+ const externalLinkWrapper = xcss({
59
+ marginTop: "var(--ds-space-150, 12px)"
59
60
  });
@@ -114,8 +114,8 @@ function ElementSearch({
114
114
  }, assistiveMessage));
115
115
  }
116
116
  const styledShortcut = css(shortcutStyle, {
117
- padding: `${GRID_SIZE / 2}px ${GRID_SIZE}px`,
118
- width: `${GRID_SIZE * 6}px`
117
+ padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`,
118
+ width: "var(--ds-space-600, 48px)"
119
119
  });
120
120
  const wrapper = css({
121
121
  '& > [data-ds--text-field--container]': {
@@ -124,9 +124,8 @@ const wrapper = css({
124
124
  flex: '1 1 100%',
125
125
  overflow: 'visible',
126
126
  '& > [data-ds--text-field--input]': {
127
- marginBottom: '3px',
128
127
  fontSize: relativeFontSizeToBase16(14),
129
- padding: `${GRID_SIZE}px ${"var(--ds-space-075, 6px)"} ${GRID_SIZE}px 0`
128
+ padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"} 0`
130
129
  }
131
130
  }
132
131
  });
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { N30 } from '@atlaskit/theme/colors';
3
- import { padding, wrapperDefault } from '../styles';
3
+ import { wrapperDefault } from '../styles';
4
4
  export const widerLayoutClassName = 'wider-layout';
5
5
  export const wrapperStyle = css(wrapperDefault, {
6
6
  '&.without-frame': {
@@ -13,7 +13,7 @@ export const wrapperStyle = css(wrapperDefault, {
13
13
  }
14
14
  });
15
15
  export const header = css({
16
- padding: `${padding / 2}px ${padding / 2}px 0px`,
16
+ padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"} 0px`,
17
17
  verticalAlign: 'middle',
18
18
  '&.with-children:not(.without-frame)': {
19
19
  padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`
@@ -23,7 +23,7 @@ export const header = css({
23
23
  }
24
24
  });
25
25
  export const content = css({
26
- padding: `${padding}px`,
26
+ padding: "var(--ds-space-100, 8px)",
27
27
  background: "var(--ds-surface, white)",
28
28
  border: `1px solid ${`var(--ds-border, ${N30})`}`,
29
29
  borderRadius: "var(--ds-border-radius, 3px)",
@@ -31,7 +31,7 @@ export const content = css({
31
31
  width: '100%'
32
32
  });
33
33
  export const contentWrapper = css({
34
- padding: `0 ${padding}px ${padding}px`,
34
+ padding: `0 ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`,
35
35
  display: 'flex',
36
36
  justifyContent: 'center',
37
37
  '&.remove-padding': {
@@ -43,7 +43,7 @@ export const placeholderFallback = css({
43
43
  export const placeholderFallbackParams = css({
44
44
  display: 'inline-block',
45
45
  maxWidth: '200px',
46
- marginLeft: '5px',
46
+ marginLeft: "var(--ds-space-050, 4px)",
47
47
  color: `var(--ds-text-subtlest, ${N70})`,
48
48
  textOverflow: 'ellipsis',
49
49
  whiteSpace: 'nowrap',
@@ -210,7 +210,6 @@ export class ExtensionComponent extends Component {
210
210
  /** We don't want this error to block renderer */
211
211
  /** We keep rendering the default content */
212
212
  }
213
-
214
213
  return null;
215
214
  }
216
215
  }
@@ -2,6 +2,7 @@
2
2
  // Thereby they _always_ need a value for submission
3
3
  //
4
4
  // You can do that through `defaultValue`, or `isRequired: true`
5
+
5
6
  export const isFieldset = field => {
6
7
  return field.type === 'fieldset';
7
8
  };
@@ -30,7 +30,7 @@ export const visuallyHiddenStyles = css`
30
30
  clip-path: inset(50%);
31
31
  height: 1px;
32
32
  width: 1px;
33
- margin: -1px;
33
+ margin: ${"var(--ds-space-negative-025, -2px)"};
34
34
  overflow: hidden;
35
35
  padding: 0;
36
36
  position: absolute;
@@ -4,20 +4,20 @@ import { css, jsx } from '@emotion/react';
4
4
  import Spinner from '@atlaskit/spinner';
5
5
  import { N30 } from '@atlaskit/theme/colors';
6
6
  import LinkSearchListItem from './LinkSearchListItem';
7
- const listContainer = css`
8
- padding-top: 0;
9
- margin-top: ${"var(--ds-space-150, 12px)"};
10
- border-top: 1px solid ${`var(--ds-border, ${N30})`};
11
- `;
12
- const spinnerContainer = css`
13
- text-align: center;
14
- min-height: 80px;
15
- margin-top: 30px;
16
- `;
17
- export const linkSearchList = css`
18
- padding: 0;
19
- list-style: none;
20
- `;
7
+ const listContainer = css({
8
+ paddingTop: 0,
9
+ marginTop: "var(--ds-space-150, 12px)",
10
+ borderTop: `1px solid ${`var(--ds-border, ${N30})`}`
11
+ });
12
+ const spinnerContainer = css({
13
+ textAlign: 'center',
14
+ minHeight: '80px',
15
+ marginTop: "var(--ds-space-400, 32px)"
16
+ });
17
+ export const linkSearchList = css({
18
+ padding: 0,
19
+ listStyle: 'none'
20
+ });
21
21
  export default class LinkSearchList extends PureComponent {
22
22
  render() {
23
23
  const {
@@ -4,6 +4,7 @@ import React, { Fragment } from 'react';
4
4
  import { css, jsx } from '@emotion/react';
5
5
  // AFP-2532 TODO: Fix automatic suppressions below
6
6
  // eslint-disable-next-line @atlassian/tangerine/import/entry-points
7
+
7
8
  import { injectIntl } from 'react-intl-next';
8
9
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
10
  import { N20, N300, N800 } from '@atlaskit/theme/colors';
@@ -37,7 +38,7 @@ export const containerName = css({
37
38
  });
38
39
  const iconStyle = css({
39
40
  minWidth: '16px',
40
- marginTop: '3px',
41
+ marginTop: "var(--ds-space-050, 4px)",
41
42
  marginRight: "var(--ds-space-150, 12px)",
42
43
  img: {
43
44
  maxWidth: '16px'
@@ -1,20 +1,19 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX } from '../../ui';
3
- export const inputWrapper = css`
4
- display: flex;
5
- line-height: 0;
6
- padding: 5px 0;
7
- align-items: center;
8
- `;
9
- export const container = css`
10
- display: flex;
11
- flex-direction: column;
12
- overflow: auto;
13
- padding: 0;
14
-
15
- width: ${RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX}px;
16
- line-height: initial;
17
- `;
18
- export const containerWithProvider = css`
19
- width: ${RECENT_SEARCH_WIDTH_IN_PX}px;
20
- `;
3
+ export const inputWrapper = css({
4
+ display: 'flex',
5
+ lineHeight: 0,
6
+ padding: `${"var(--ds-space-075, 6px)"} 0`,
7
+ alignItems: 'center'
8
+ });
9
+ export const container = css({
10
+ display: 'flex',
11
+ flexDirection: 'column',
12
+ overflow: 'auto',
13
+ padding: 0,
14
+ width: `${RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX}px`,
15
+ lineHeight: 'initial'
16
+ });
17
+ export const containerWithProvider = css({
18
+ width: `${RECENT_SEARCH_WIDTH_IN_PX}px`
19
+ });
@@ -22,7 +22,6 @@ class RecentLink extends React.Component {
22
22
  if (!inputMethod) {
23
23
  return; // No call submit, if there is nothing to submit
24
24
  }
25
-
26
25
  switch (inputMethod) {
27
26
  case INPUT_METHOD.MANUAL:
28
27
  {
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "78.11.4";
3
+ const packageVersion = "78.11.5";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -199,6 +199,7 @@ function getPortalChildren({
199
199
  // nodeViews: {
200
200
  // [nodeViewName: string]: NodeViewProducer
201
201
  // }
202
+
202
203
  // This return of this function is intended to be the value of a key
203
204
  // in a ProseMirror nodeViews object.
204
205
  export function getInlineNodeViewProducer({
@@ -3,7 +3,7 @@ import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, u
3
3
  import classnames from 'classnames';
4
4
  import { Resizable } from 're-resizable';
5
5
  import Tooltip from '@atlaskit/tooltip';
6
- import { handleWrapperClass, resizerDangerClassName, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
6
+ import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
7
7
  const SUPPORTED_HANDLES = ['left', 'right'];
8
8
  const ResizerNext = (props, ref) => {
9
9
  const [isResizing, setIsResizing] = useState(false);
@@ -96,7 +96,7 @@ const ResizerNext = (props, ref) => {
96
96
  [resizerDangerClassName]: appearance === 'danger'
97
97
  });
98
98
  const resizerZoneClassName = classnames(resizerHoverZoneClassName, {
99
- 'is-extended': needExtendedResizeZone
99
+ [resizerExtendedZone]: needExtendedResizeZone
100
100
  });
101
101
  const handleComponent = useMemo(() => {
102
102
  return SUPPORTED_HANDLES.reduce((result, position) => {
@@ -108,7 +108,6 @@ const ResizerNext = (props, ref) => {
108
108
  type: "button",
109
109
  tabIndex: -1 //We want to control focus on this button ourselves
110
110
  });
111
-
112
111
  if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent) {
113
112
  return {
114
113
  ...result,
@@ -42,10 +42,10 @@ export const gapCursorStyles = css`
42
42
  height: 100%;
43
43
  }
44
44
  &.-left span::after {
45
- left: -3px;
45
+ left: ${"var(--ds-space-negative-050, -4px)"};
46
46
  }
47
47
  &.-right span::after {
48
- right: -3px;
48
+ right: ${"var(--ds-space-negative-050, -4px)"};
49
49
  }
50
50
  & span[layout='full-width'],
51
51
  & span[layout='wide'],
@@ -1,24 +1,20 @@
1
1
  import { css } from '@emotion/react';
2
- export const embedCardStyles = css`
3
- .ProseMirror {
4
- .embedCardView-content-wrap[layout^='wrap-'] {
5
- max-width: 100%;
6
- }
7
-
8
- .embedCardView-content-wrap[layout='wrap-left'] {
9
- float: left;
10
- }
11
-
12
- .embedCardView-content-wrap[layout='wrap-right'] {
13
- float: right;
14
- }
15
-
16
- .embedCardView-content-wrap[layout='wrap-right']
17
- + .embedCardView-content-wrap[layout='wrap-left'] {
18
- clear: both;
2
+ export const embedCardStyles = css({
3
+ '.ProseMirror': {
4
+ ".embedCardView-content-wrap[layout^='wrap-']": {
5
+ maxWidth: '100%'
6
+ },
7
+ ".embedCardView-content-wrap[layout='wrap-left']": {
8
+ float: 'left'
9
+ },
10
+ ".embedCardView-content-wrap[layout='wrap-right']": {
11
+ float: 'right'
12
+ },
13
+ ".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
14
+ clear: 'both'
19
15
  }
20
16
  }
21
- `;
22
- export const embedSpacingStyles = css`
23
- margin: 0 10px;
24
- `;
17
+ });
18
+ export const embedSpacingStyles = css({
19
+ margin: `0 ${"var(--ds-space-150, 12px)"}`
20
+ });
@@ -2,35 +2,31 @@ import { css } from '@emotion/react';
2
2
  import { akEditorGridLineZIndex } from '@atlaskit/editor-shared-styles';
3
3
  import { B200, N30A } from '@atlaskit/theme/colors';
4
4
  export const GRID_GUTTER = 12;
5
- export const gridStyles = css`
6
- .gridParent {
7
- width: calc(100% + ${GRID_GUTTER * 2}px);
8
- margin-left: ${"var(--ds-space-negative-150, -12px)"}; // Negative GRID_GUTTER
9
- margin-right: ${"var(--ds-space-negative-150, -12px)"}; // Negative GRID_GUTTER
10
- transform: scale(1);
11
- z-index: ${akEditorGridLineZIndex};
5
+ export const gridStyles = css({
6
+ '.gridParent': {
7
+ width: `calc(100% + ${GRID_GUTTER * 2}px)`,
8
+ marginLeft: "var(--ds-space-negative-150, -12px)",
9
+ marginRight: "var(--ds-space-negative-150, -12px)",
10
+ transform: 'scale(1)',
11
+ zIndex: akEditorGridLineZIndex
12
+ },
13
+ '.gridContainer': {
14
+ position: 'fixed',
15
+ height: '100vh',
16
+ width: '100%',
17
+ pointerEvents: 'none'
18
+ },
19
+ '.gridLine': {
20
+ borderLeft: `1px solid ${`var(--ds-border, ${N30A})`}`,
21
+ display: 'inline-block',
22
+ boxSizing: 'border-box',
23
+ height: '100%',
24
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
25
+ marginLeft: '-1px',
26
+ transition: 'border-color 0.15s linear',
27
+ zIndex: 0
28
+ },
29
+ '.highlight': {
30
+ borderLeft: `1px solid ${`var(--ds-border-focused, ${B200})`}`
12
31
  }
13
-
14
- .gridContainer {
15
- position: fixed;
16
- height: 100vh;
17
- width: 100%;
18
- pointer-events: none;
19
- }
20
-
21
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4352
22
- .gridLine {
23
- border-left: 1px solid ${`var(--ds-border, ${N30A})`};
24
- display: inline-block;
25
- box-sizing: border-box;
26
- height: 100%;
27
- margin-left: -1px;
28
-
29
- transition: border-color 0.15s linear;
30
- z-index: 0;
31
- }
32
-
33
- .highlight {
34
- border-left: 1px solid ${`var(--ds-border-focused, ${B200})`};
35
- }
36
- `;
32
+ });
@@ -1,4 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
+
3
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
2
4
  export const indentationSharedStyles = css`
3
5
  .fabric-editor-indentation-mark {
4
6
  &[data-level='1'] {
@@ -200,7 +200,7 @@ export const panelSharedStylesWithoutPrefix = () => css`
200
200
  }
201
201
 
202
202
  .ak-editor-panel__content {
203
- margin: 1px 0 1px;
203
+ margin: ${"var(--ds-space-025, 2px)"} 0 ${"var(--ds-space-025, 2px)"};
204
204
  flex: 1 0 0;
205
205
  /*
206
206
  https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
@@ -5,9 +5,9 @@ import { B200, B50, N60 } from '@atlaskit/theme/colors';
5
5
  Styles in this file are based on
6
6
  packages/editor/editor-core/src/plugins/media/styles.ts
7
7
  */
8
-
9
8
  export const resizerItemClassName = 'resizer-item';
10
9
  export const resizerHoverZoneClassName = 'resizer-hover-zone';
10
+ export const resizerExtendedZone = 'resizer-is-extended';
11
11
  export const resizerHandleClassName = 'resizer-handle';
12
12
  export const resizerHandleTrackClassName = `${resizerHandleClassName}-track`;
13
13
  export const resizerHandleThumbClassName = `${resizerHandleClassName}-thumb`;
@@ -191,14 +191,17 @@ export const resizerStyles = css`
191
191
  display: inline-block;
192
192
  width: 100%;
193
193
 
194
- &.is-extended {
194
+ &.${resizerExtendedZone} {
195
195
  padding: 0 ${"var(--ds-space-150, 12px)"};
196
196
  left: ${"var(--ds-space-negative-150, -12px)"};
197
197
  }
198
198
  }
199
199
 
200
200
  // This below style is here to make sure the image width is correct when nested in a table
201
- table .${resizerHoverZoneClassName} {
201
+ table
202
+ .${resizerHoverZoneClassName},
203
+ table
204
+ .${resizerHoverZoneClassName}.${resizerExtendedZone} {
202
205
  padding: unset;
203
206
  left: unset;
204
207
  }