@atlaskit/editor-common 76.25.1 → 76.25.2

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 (137) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/afm-cc/tsconfig.json +133 -0
  3. package/dist/cjs/card/LinkToolbarButtonGroup.js +6 -5
  4. package/dist/cjs/element-browser/ViewMore.js +4 -3
  5. package/dist/cjs/element-browser/components/CategoryList.js +5 -4
  6. package/dist/cjs/element-browser/components/ElementBrowserLoader.js +3 -2
  7. package/dist/cjs/element-browser/components/ElementList/ElementList.js +21 -20
  8. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +9 -8
  9. package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +16 -15
  10. package/dist/cjs/element-browser/components/ElementSearch.js +7 -6
  11. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +22 -21
  12. package/dist/cjs/element-browser/hooks/use-container-width.js +3 -2
  13. package/dist/cjs/keymaps/index.js +2 -1
  14. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +22 -21
  15. package/dist/cjs/link/LinkSearch/LinkSearchList.js +6 -5
  16. package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +11 -9
  17. package/dist/cjs/media-inline/inline-image-wrapper.js +3 -1
  18. package/dist/cjs/media-inline/media-inline-image-card.js +22 -13
  19. package/dist/cjs/media-inline/types.js +5 -0
  20. package/dist/cjs/media-inline/views/error-view.js +6 -3
  21. package/dist/cjs/media-inline/views/frame.js +4 -1
  22. package/dist/cjs/media-inline/views/icon-wrapper.js +3 -1
  23. package/dist/cjs/media-inline/views/loading-view.js +5 -2
  24. package/dist/cjs/monitoring/error.js +1 -1
  25. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +8 -5
  26. package/dist/cjs/ui/Caption/index.js +3 -2
  27. package/dist/cjs/ui/DropList/index.js +6 -6
  28. package/dist/cjs/ui/Expand/index.js +5 -3
  29. package/dist/cjs/ui/FloatingToolbar/Separator.js +2 -1
  30. package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +3 -2
  31. package/dist/cjs/ui/MediaSingle/index.js +5 -2
  32. package/dist/cjs/ui/MediaSingle/styled.js +3 -2
  33. package/dist/cjs/ui/Messages/index.js +8 -7
  34. package/dist/cjs/ui/PanelTextInput/index.js +3 -2
  35. package/dist/cjs/ui/UnsupportedBlock/index.js +5 -4
  36. package/dist/cjs/ui/UnsupportedInline/index.js +5 -4
  37. package/dist/cjs/ui/WidthProvider/index.js +4 -4
  38. package/dist/cjs/ui-color/ColorPalette/Color/index.js +6 -5
  39. package/dist/cjs/ui-color/ColorPalette/index.js +6 -3
  40. package/dist/cjs/ui-menu/ColorPickerButton/index.js +10 -9
  41. package/dist/cjs/ui-menu/DropdownContainer/index.js +3 -3
  42. package/dist/cjs/ui-menu/DropdownMenu/index.js +19 -18
  43. package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +3 -2
  44. package/dist/cjs/ui-menu/ToolbarButton/index.js +4 -3
  45. package/dist/es2019/card/LinkToolbarButtonGroup.js +7 -6
  46. package/dist/es2019/element-browser/ViewMore.js +5 -4
  47. package/dist/es2019/element-browser/components/CategoryList.js +6 -4
  48. package/dist/es2019/element-browser/components/ElementBrowserLoader.js +4 -3
  49. package/dist/es2019/element-browser/components/ElementList/ElementList.js +22 -21
  50. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +10 -9
  51. package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +17 -16
  52. package/dist/es2019/element-browser/components/ElementSearch.js +8 -7
  53. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +23 -22
  54. package/dist/es2019/element-browser/hooks/use-container-width.js +4 -3
  55. package/dist/es2019/keymaps/index.js +3 -2
  56. package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -22
  57. package/dist/es2019/link/LinkSearch/LinkSearchList.js +7 -6
  58. package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +10 -9
  59. package/dist/es2019/media-inline/inline-image-wrapper.js +4 -2
  60. package/dist/es2019/media-inline/media-inline-image-card.js +22 -13
  61. package/dist/es2019/media-inline/types.js +1 -0
  62. package/dist/es2019/media-inline/views/error-view.js +6 -3
  63. package/dist/es2019/media-inline/views/frame.js +4 -1
  64. package/dist/es2019/media-inline/views/icon-wrapper.js +4 -2
  65. package/dist/es2019/media-inline/views/loading-view.js +5 -2
  66. package/dist/es2019/monitoring/error.js +1 -1
  67. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +7 -5
  68. package/dist/es2019/ui/Caption/index.js +4 -3
  69. package/dist/es2019/ui/DropList/index.js +8 -6
  70. package/dist/es2019/ui/Expand/index.js +5 -3
  71. package/dist/es2019/ui/FloatingToolbar/Separator.js +3 -2
  72. package/dist/es2019/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
  73. package/dist/es2019/ui/MediaSingle/index.js +4 -2
  74. package/dist/es2019/ui/MediaSingle/styled.js +5 -3
  75. package/dist/es2019/ui/Messages/index.js +10 -8
  76. package/dist/es2019/ui/PanelTextInput/index.js +4 -1
  77. package/dist/es2019/ui/UnsupportedBlock/index.js +6 -5
  78. package/dist/es2019/ui/UnsupportedInline/index.js +6 -5
  79. package/dist/es2019/ui/WidthProvider/index.js +5 -4
  80. package/dist/es2019/ui-color/ColorPalette/Color/index.js +6 -4
  81. package/dist/es2019/ui-color/ColorPalette/index.js +4 -2
  82. package/dist/es2019/ui-menu/ColorPickerButton/index.js +11 -10
  83. package/dist/es2019/ui-menu/DropdownContainer/index.js +3 -2
  84. package/dist/es2019/ui-menu/DropdownMenu/index.js +21 -19
  85. package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +4 -3
  86. package/dist/es2019/ui-menu/ToolbarButton/index.js +5 -5
  87. package/dist/esm/card/LinkToolbarButtonGroup.js +7 -6
  88. package/dist/esm/element-browser/ViewMore.js +5 -4
  89. package/dist/esm/element-browser/components/CategoryList.js +7 -5
  90. package/dist/esm/element-browser/components/ElementBrowserLoader.js +4 -3
  91. package/dist/esm/element-browser/components/ElementList/ElementList.js +22 -21
  92. package/dist/esm/element-browser/components/ElementList/EmptyState.js +10 -9
  93. package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +17 -16
  94. package/dist/esm/element-browser/components/ElementSearch.js +8 -7
  95. package/dist/esm/element-browser/components/StatelessElementBrowser.js +23 -22
  96. package/dist/esm/element-browser/hooks/use-container-width.js +4 -3
  97. package/dist/esm/keymaps/index.js +3 -2
  98. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -22
  99. package/dist/esm/link/LinkSearch/LinkSearchList.js +7 -6
  100. package/dist/esm/link/LinkSearch/LinkSearchListItem.js +10 -9
  101. package/dist/esm/media-inline/inline-image-wrapper.js +4 -2
  102. package/dist/esm/media-inline/media-inline-image-card.js +22 -13
  103. package/dist/esm/media-inline/types.js +1 -0
  104. package/dist/esm/media-inline/views/error-view.js +6 -3
  105. package/dist/esm/media-inline/views/frame.js +4 -1
  106. package/dist/esm/media-inline/views/icon-wrapper.js +4 -2
  107. package/dist/esm/media-inline/views/loading-view.js +5 -2
  108. package/dist/esm/monitoring/error.js +1 -1
  109. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +7 -5
  110. package/dist/esm/ui/Caption/index.js +4 -3
  111. package/dist/esm/ui/DropList/index.js +8 -6
  112. package/dist/esm/ui/Expand/index.js +5 -3
  113. package/dist/esm/ui/FloatingToolbar/Separator.js +3 -2
  114. package/dist/esm/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
  115. package/dist/esm/ui/MediaSingle/index.js +4 -2
  116. package/dist/esm/ui/MediaSingle/styled.js +5 -3
  117. package/dist/esm/ui/Messages/index.js +10 -8
  118. package/dist/esm/ui/PanelTextInput/index.js +4 -1
  119. package/dist/esm/ui/UnsupportedBlock/index.js +6 -5
  120. package/dist/esm/ui/UnsupportedInline/index.js +6 -5
  121. package/dist/esm/ui/WidthProvider/index.js +5 -4
  122. package/dist/esm/ui-color/ColorPalette/Color/index.js +6 -4
  123. package/dist/esm/ui-color/ColorPalette/index.js +5 -3
  124. package/dist/esm/ui-menu/ColorPickerButton/index.js +11 -10
  125. package/dist/esm/ui-menu/DropdownContainer/index.js +3 -2
  126. package/dist/esm/ui-menu/DropdownMenu/index.js +21 -19
  127. package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +4 -3
  128. package/dist/esm/ui-menu/ToolbarButton/index.js +5 -5
  129. package/dist/types/media-inline/index.d.ts +1 -0
  130. package/dist/types/media-inline/media-inline-image-card.d.ts +4 -2
  131. package/dist/types/media-inline/types.d.ts +6 -0
  132. package/dist/types/types/floating-toolbar.d.ts +1 -0
  133. package/dist/types-ts4.5/media-inline/index.d.ts +1 -0
  134. package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +4 -2
  135. package/dist/types-ts4.5/media-inline/types.d.ts +6 -0
  136. package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -0
  137. package/package.json +2 -2
@@ -1,13 +1,15 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
3
+
2
4
  import { Component } from 'react';
3
- import { css } from '@emotion/react';
5
+ import { css, jsx } from '@emotion/react';
4
6
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
5
7
  import { DN50, DN600, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
6
8
  import { themed } from '@atlaskit/theme/components';
7
9
  import { borderRadius } from '@atlaskit/theme/constants';
8
10
  import Layer from '../Layer';
9
11
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "76.25.1";
12
+ const packageVersion = "76.25.2";
11
13
  const halfFocusRing = 1;
12
14
  const dropOffset = '0, 8';
13
15
  class DropList extends Component {
@@ -125,7 +127,7 @@ class DropList extends Component {
125
127
  testId,
126
128
  id
127
129
  } = this.props;
128
- let layerContent = isOpen ? /*#__PURE__*/React.createElement("div", {
130
+ let layerContent = isOpen ? jsx("div", {
129
131
  css: theme => this.menuWrapper({
130
132
  theme: theme
131
133
  }),
@@ -135,14 +137,14 @@ class DropList extends Component {
135
137
  id: id,
136
138
  role: "presentation"
137
139
  }, children) : null;
138
- return /*#__PURE__*/React.createElement("div", {
140
+ return jsx("div", {
139
141
  css: this.wrapperStyles
140
- }, /*#__PURE__*/React.createElement(Layer, {
142
+ }, jsx(Layer, {
141
143
  content: layerContent,
142
144
  offset: dropOffset,
143
145
  position: position,
144
146
  onPositioned: onPositioned
145
- }, /*#__PURE__*/React.createElement("div", {
147
+ }, jsx("div", {
146
148
  css: this.triggerStyles,
147
149
  ref: this.handleTriggerRef
148
150
  }, trigger)));
@@ -1,6 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
3
+
2
4
  import React, { forwardRef } from 'react';
3
- import { css } from '@emotion/react';
5
+ import { css, jsx } from '@emotion/react';
4
6
  import { defineMessages } from 'react-intl-next';
5
7
  import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
8
  import { B300, DN50, DN600, N200, N200A, N300A, N30A, N40A, N50A, N90 } from '@atlaskit/theme/colors';
@@ -45,7 +47,7 @@ export const ExpandIconWrapper = ({
45
47
  children,
46
48
  expanded
47
49
  }) => {
48
- return /*#__PURE__*/React.createElement("div", {
50
+ return jsx("div", {
49
51
  css: props => expanded ? [expandIconWrapperStyle(props), expandIconWrapperExpandedStyle] : expandIconWrapperStyle(props)
50
52
  }, children);
51
53
  };
@@ -82,7 +84,7 @@ export const ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef((props, ref) =
82
84
  children,
83
85
  ...rest
84
86
  } = props;
85
- return /*#__PURE__*/React.createElement("div", _extends({
87
+ return jsx("div", _extends({
86
88
  css: expandLayoutWrapperStyle
87
89
  }, rest, {
88
90
  ref: ref
@@ -1,4 +1,5 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
2
3
  import { N30 } from '@atlaskit/theme/colors';
3
4
  const separator = css`
4
5
  background: ${`var(--ds-border, ${N30})`};
@@ -7,7 +8,7 @@ const separator = css`
7
8
  margin: 0 ${"var(--ds-space-050, 4px)"};
8
9
  align-self: center;
9
10
  `;
10
- export default (() => /*#__PURE__*/React.createElement("div", {
11
+ export default (() => jsx("div", {
11
12
  css: separator,
12
13
  className: "separator"
13
14
  }));
@@ -1,4 +1,5 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
2
3
  import EditIcon from '@atlaskit/icon/glyph/edit';
3
4
  const editIconStyles = css`
4
5
  width: 20px;
@@ -6,9 +7,9 @@ const editIconStyles = css`
6
7
 
7
8
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
8
9
  export const SmallerEditIcon = () => {
9
- return /*#__PURE__*/React.createElement("div", {
10
+ return jsx("div", {
10
11
  css: editIconStyles
11
- }, /*#__PURE__*/React.createElement(EditIcon, {
12
+ }, jsx(EditIcon, {
12
13
  label: "edit"
13
14
  }));
14
15
  };
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import classnames from 'classnames';
3
5
  import { akEditorMediaResizeHandlerPaddingWide, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
4
6
  import { MEDIA_SINGLE_GUTTER_SIZE } from '../../media-single/constants';
@@ -69,7 +71,7 @@ export default function MediaSingle({
69
71
  }
70
72
  }
71
73
  const [media, caption] = children;
72
- return /*#__PURE__*/React.createElement("div", {
74
+ return jsx("div", {
73
75
  ref: handleMediaSingleRef,
74
76
  css: MediaSingleDimensionHelper({
75
77
  width,
@@ -87,7 +89,7 @@ export default function MediaSingle({
87
89
  'is-loading': isLoading,
88
90
  'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
89
91
  })
90
- }, /*#__PURE__*/React.createElement(MediaWrapper, {
92
+ }, jsx(MediaWrapper, {
91
93
  hasFallbackContainer: hasFallbackContainer,
92
94
  height: mediaWrapperHeight,
93
95
  paddingBottom: paddingBottom
@@ -1,5 +1,7 @@
1
+ /** @jsx jsx */
2
+
1
3
  import React from 'react';
2
- import { css } from '@emotion/react';
4
+ import { css, jsx } from '@emotion/react';
3
5
  import { akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
4
6
  import { nonWrappedLayouts } from '../../utils';
5
7
  import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
@@ -198,7 +200,7 @@ export const mediaWrapperStyle = props => css`
198
200
  export const MediaWrapper = ({
199
201
  children,
200
202
  ...rest
201
- }) => /*#__PURE__*/React.createElement("div", {
203
+ }) => jsx("div", {
202
204
  css: mediaWrapperStyle(rest)
203
205
  }, children);
204
206
  MediaWrapper.displayName = 'WrapperMediaSingle';
@@ -213,7 +215,7 @@ MediaWrapper.displayName = 'WrapperMediaSingle';
213
215
  export const MediaBorderGapFiller = ({
214
216
  borderColor
215
217
  }) => {
216
- return /*#__PURE__*/React.createElement("div", {
218
+ return jsx("div", {
217
219
  style: {
218
220
  position: 'absolute',
219
221
  inset: '0px',
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
3
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
4
6
  import { G400, N200, R400 } from '@atlaskit/theme/colors';
@@ -22,31 +24,31 @@ const iconWrapperStyle = css`
22
24
  `;
23
25
  export const HelperMessage = ({
24
26
  children
25
- }) => /*#__PURE__*/React.createElement("div", {
27
+ }) => jsx("div", {
26
28
  css: messageStyle
27
29
  }, children);
28
30
  export const ErrorMessage = ({
29
31
  children
30
- }) => /*#__PURE__*/React.createElement("div", {
32
+ }) => jsx("div", {
31
33
  css: theme => {
32
34
  return [messageStyle(theme), errorColor];
33
35
  }
34
- }, /*#__PURE__*/React.createElement("span", {
36
+ }, jsx("span", {
35
37
  css: iconWrapperStyle
36
- }, /*#__PURE__*/React.createElement(ErrorIcon, {
38
+ }, jsx(ErrorIcon, {
37
39
  size: "small",
38
40
  label: "error",
39
41
  "aria-label": "error"
40
42
  })), children);
41
43
  export const ValidMessage = ({
42
44
  children
43
- }) => /*#__PURE__*/React.createElement("div", {
45
+ }) => jsx("div", {
44
46
  css: theme => {
45
47
  return [messageStyle(theme), validColor];
46
48
  }
47
- }, /*#__PURE__*/React.createElement("span", {
49
+ }, jsx("span", {
48
50
  css: iconWrapperStyle
49
- }, /*#__PURE__*/React.createElement(SuccessIcon, {
51
+ }, jsx(SuccessIcon, {
50
52
  size: "small",
51
53
  label: "success"
52
54
  })), children);
@@ -1,5 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
3
+
2
4
  import { PureComponent } from 'react';
5
+ import { jsx } from '@emotion/react';
3
6
  import { browser } from '../../utils';
4
7
  import { panelTextInput, panelTextInputWithCustomWidth } from './styles';
5
8
  const KeyZCode = 90;
@@ -103,7 +106,7 @@ export default class PanelTextInput extends PureComponent {
103
106
  const {
104
107
  value
105
108
  } = this.state;
106
- return /*#__PURE__*/React.createElement("input", {
109
+ return jsx("input", {
107
110
  css: [panelTextInput, width !== undefined && panelTextInputWithCustomWidth(width)],
108
111
  role: role,
109
112
  "aria-autocomplete": ariaAutoComplete ? 'list' : undefined,
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React, { useCallback, useRef } from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { injectIntl } from 'react-intl-next';
4
5
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
5
6
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
@@ -41,18 +42,18 @@ const UnsupportedBlockNode = ({
41
42
  });
42
43
  const originalNodeType = node === null || node === void 0 ? void 0 : node.attrs.originalValue.type;
43
44
  const tooltipOnShowHandler = useCallback(() => dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_BLOCK, originalNodeType), [dispatchAnalyticsEvent, originalNodeType]);
44
- return /*#__PURE__*/React.createElement("div", {
45
+ return jsx("div", {
45
46
  css: blockNodeStyle,
46
47
  className: "unsupported"
47
- }, message, /*#__PURE__*/React.createElement(Tooltip, {
48
+ }, message, jsx(Tooltip, {
48
49
  content: tooltipContent,
49
50
  hideTooltipOnClick: false,
50
51
  position: "bottom",
51
52
  onShow: tooltipOnShowHandler,
52
53
  strategy: "absolute"
53
- }, /*#__PURE__*/React.createElement("span", {
54
+ }, jsx("span", {
54
55
  style: style
55
- }, /*#__PURE__*/React.createElement(QuestionsIcon, {
56
+ }, jsx(QuestionsIcon, {
56
57
  label: "?",
57
58
  size: "small"
58
59
  }))));
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React, { useCallback, useRef } from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { injectIntl } from 'react-intl-next';
4
5
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
5
6
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
@@ -39,17 +40,17 @@ const UnsupportedInlineNode = ({
39
40
  });
40
41
  const originalNodeType = node === null || node === void 0 ? void 0 : node.attrs.originalValue.type;
41
42
  const tooltipOnShowHandler = useCallback(() => dispatchAnalyticsEvent && trackUnsupportedContentTooltipDisplayedFor(dispatchAnalyticsEvent, ACTION_SUBJECT_ID.ON_UNSUPPORTED_INLINE, originalNodeType), [dispatchAnalyticsEvent, originalNodeType]);
42
- return /*#__PURE__*/React.createElement("span", {
43
+ return jsx("span", {
43
44
  css: inlineNodeStyle
44
- }, message, /*#__PURE__*/React.createElement(Tooltip, {
45
+ }, message, jsx(Tooltip, {
45
46
  content: tooltipContent,
46
47
  hideTooltipOnClick: false,
47
48
  position: "bottom",
48
49
  onShow: tooltipOnShowHandler,
49
50
  strategy: "absolute"
50
- }, /*#__PURE__*/React.createElement("span", {
51
+ }, jsx("span", {
51
52
  style: style
52
- }, /*#__PURE__*/React.createElement(QuestionsIcon, {
53
+ }, jsx(QuestionsIcon, {
53
54
  label: "?",
54
55
  size: "small"
55
56
  }))));
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
2
3
  import React from 'react';
3
- import { css } from '@emotion/react';
4
+ import { css, jsx } from '@emotion/react';
4
5
  import rafSchedule from 'raf-schd';
5
6
  import { WidthObserver } from '@atlaskit/width-detector';
6
7
  const SCROLLBAR_WIDTH = 30;
@@ -45,16 +46,16 @@ export class WidthProvider extends React.Component {
45
46
  }
46
47
  }
47
48
  render() {
48
- return /*#__PURE__*/React.createElement("div", {
49
+ return jsx("div", {
49
50
  css: css`
50
51
  position: relative;
51
52
  width: 100%;
52
53
  `,
53
54
  className: this.props.className
54
- }, /*#__PURE__*/React.createElement(WidthObserver, {
55
+ }, jsx(WidthObserver, {
55
56
  setWidth: this.setWidth,
56
57
  offscreen: true
57
- }), /*#__PURE__*/React.createElement(Provider, {
58
+ }), jsx(Provider, {
58
59
  value: createWidthContext(this.state.width)
59
60
  }, this.props.children));
60
61
  }
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
2
3
  import React, { PureComponent } from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
4
6
  import { N0 } from '@atlaskit/theme/colors';
5
7
  import Tooltip from '@atlaskit/tooltip';
@@ -39,11 +41,11 @@ class Color extends PureComponent {
39
41
  hexToPaletteColor
40
42
  } = this.props;
41
43
  const colorStyle = hexToPaletteColor ? hexToPaletteColor(value) : value;
42
- return /*#__PURE__*/React.createElement(Tooltip, {
44
+ return jsx(Tooltip, {
43
45
  content: label
44
- }, /*#__PURE__*/React.createElement("span", {
46
+ }, jsx("span", {
45
47
  css: buttonWrapperStyle
46
- }, /*#__PURE__*/React.createElement("button", {
48
+ }, jsx("button", {
47
49
  css: buttonStyle,
48
50
  "aria-label": label,
49
51
  role: "radio",
@@ -57,7 +59,7 @@ class Color extends PureComponent {
57
59
  border: `1px solid ${borderColor}`
58
60
  },
59
61
  autoFocus: autoFocus
60
- }, isSelected && /*#__PURE__*/React.createElement(EditorDoneIcon, {
62
+ }, isSelected && jsx(EditorDoneIcon, {
61
63
  primaryColor: checkMarkColor,
62
64
  label: ""
63
65
  }))));
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import chromatism from 'chromatism';
3
5
  import { injectIntl } from 'react-intl-next';
4
6
  import { N0, N500 } from '@atlaskit/theme/colors';
@@ -54,7 +56,7 @@ const ColorPalette = props => {
54
56
  const colorsPerRow = React.useMemo(() => {
55
57
  return getColorsPerRowFromPalette(palette, cols);
56
58
  }, [palette, cols]);
57
- return /*#__PURE__*/React.createElement(React.Fragment, null, colorsPerRow.map(row => /*#__PURE__*/React.createElement("div", {
59
+ return jsx(React.Fragment, null, colorsPerRow.map(row => jsx("div", {
58
60
  css: colorPaletteWrapper,
59
61
  className: className,
60
62
  key: `row-first-color-${row[0].value}`,
@@ -73,7 +75,7 @@ const ColorPalette = props => {
73
75
  message = getColorMessage(paletteColorTooltipMessages.light, value.toUpperCase());
74
76
  }
75
77
  }
76
- return /*#__PURE__*/React.createElement(Color, {
78
+ return jsx(Color, {
77
79
  key: value,
78
80
  value: value,
79
81
  borderColor: border,
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
4
5
  import Button from '@atlaskit/button';
5
6
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
@@ -112,7 +113,7 @@ const ColorPickerButton = props => {
112
113
  selectedRowIndex,
113
114
  selectedColumnIndex
114
115
  } = getSelectedRowAndColumnFromPalette(props.colorPalette, selectedColor, props.cols);
115
- return /*#__PURE__*/React.createElement(Popup, {
116
+ return jsx(Popup, {
116
117
  target: buttonRef.current,
117
118
  fitHeight: 350,
118
119
  fitWidth: 350,
@@ -126,10 +127,10 @@ const ColorPickerButton = props => {
126
127
  zIndex: props.setDisableParentScroll ? 600 : undefined,
127
128
  ariaLabel: "Color picker popup",
128
129
  onPositionCalculated: onPositionCalculated
129
- }, /*#__PURE__*/React.createElement("div", {
130
+ }, jsx("div", {
130
131
  css: colorPickerWrapper,
131
132
  "data-test-id": "color-picker-menu"
132
- }, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider, {
133
+ }, jsx(ArrowKeyNavigationProvider, {
133
134
  type: ArrowKeyNavigationType.COLOR,
134
135
  selectedRowIndex: selectedRowIndex,
135
136
  selectedColumnIndex: selectedColumnIndex,
@@ -137,7 +138,7 @@ const ColorPickerButton = props => {
137
138
  handleClose: () => setIsPopupOpen(false),
138
139
  isOpenedByKeyboard: isOpenedByKeyboard,
139
140
  isPopupPositioned: isPopupPositioned
140
- }, /*#__PURE__*/React.createElement(ColorPaletteWithListeners, {
141
+ }, jsx(ColorPaletteWithListeners, {
141
142
  cols: props.cols,
142
143
  selectedColor: selectedColor,
143
144
  onClick: onColorSelected,
@@ -181,12 +182,12 @@ const ColorPickerButton = props => {
181
182
  }
182
183
  `;
183
184
  };
184
- return /*#__PURE__*/React.createElement("div", {
185
+ return jsx("div", {
185
186
  css: colorPickerButtonWrapper
186
- }, /*#__PURE__*/React.createElement(Tooltip, {
187
+ }, jsx(Tooltip, {
187
188
  content: title,
188
189
  position: "top"
189
- }, /*#__PURE__*/React.createElement(Button, {
190
+ }, jsx(Button, {
190
191
  ref: buttonRef,
191
192
  "aria-label": title,
192
193
  spacing: "compact",
@@ -199,9 +200,9 @@ const ColorPickerButton = props => {
199
200
  }
200
201
  },
201
202
  css: buttonStyle,
202
- iconAfter: /*#__PURE__*/React.createElement("span", {
203
+ iconAfter: jsx("span", {
203
204
  css: colorPickerExpandContainer
204
- }, /*#__PURE__*/React.createElement(ExpandIcon, {
205
+ }, jsx(ExpandIcon, {
205
206
  label: ""
206
207
  }))
207
208
  })), renderPopup());
@@ -1,5 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
2
3
  import React, { useContext } from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
4
6
  import DropdownComponent from '../Dropdown';
5
7
  import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
@@ -14,10 +16,9 @@ export const DropdownContainer = /*#__PURE__*/React.memo(function DropdownContai
14
16
  };
15
17
  }
16
18
  return (
17
- /*#__PURE__*/
18
19
  //This context is to handle the tab, Arrow Right/Left key events for dropdown.
19
20
  //Default context has the void callbacks for above key events
20
- React.createElement(DropdownComponent, _extends({}, props, {
21
+ jsx(DropdownComponent, _extends({}, props, {
21
22
  arrowKeyNavigationProviderOptions: newArrowKeyNavigationProviderOptions
22
23
  }))
23
24
  );
@@ -1,7 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ /** @jsx jsx */
4
+
3
5
  import React, { PureComponent, useContext } from 'react';
4
- import { css } from '@emotion/react';
6
+ import { css, jsx } from '@emotion/react';
5
7
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
6
8
  import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
7
9
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
@@ -166,7 +168,7 @@ export default class DropdownMenuWrapper extends PureComponent {
166
168
  }
167
169
  }
168
170
  };
169
- return /*#__PURE__*/React.createElement(Popup, {
171
+ return jsx(Popup, {
170
172
  target: isOpen ? target : undefined,
171
173
  mountTo: mountTo,
172
174
  boundariesElement: boundariesElement,
@@ -176,10 +178,10 @@ export default class DropdownMenuWrapper extends PureComponent {
176
178
  fitWidth: fitWidth,
177
179
  zIndex: zIndex || akEditorFloatingPanelZIndex,
178
180
  offset: offset
179
- }, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider, _extends({}, navigationProviderProps, {
181
+ }, jsx(ArrowKeyNavigationProvider, _extends({}, navigationProviderProps, {
180
182
  handleClose: this.handleCloseAndFocus,
181
183
  closeOnTab: true
182
- }), /*#__PURE__*/React.createElement(DropListWithOutsideListeners, {
184
+ }), jsx(DropListWithOutsideListeners, {
183
185
  isOpen: true,
184
186
  appearance: "tall",
185
187
  position: popupPlacement.join(' '),
@@ -193,22 +195,22 @@ export default class DropdownMenuWrapper extends PureComponent {
193
195
  e.stopPropagation();
194
196
  },
195
197
  targetRef: this.state.target
196
- }, /*#__PURE__*/React.createElement("div", {
198
+ }, jsx("div", {
197
199
  style: {
198
200
  height: 0,
199
201
  minWidth: fitWidth || 0
200
202
  }
201
- }), /*#__PURE__*/React.createElement("div", {
203
+ }), jsx("div", {
202
204
  ref: this.popupRef
203
- }, getBooleanFF('platform.editor.menu.group-items') && /*#__PURE__*/React.createElement(MenuGroup, {
205
+ }, getBooleanFF('platform.editor.menu.group-items') && jsx(MenuGroup, {
204
206
  role: shouldUseDefaultRole ? 'group' : 'menu'
205
- }, items.map((group, index) => /*#__PURE__*/React.createElement(Section, {
207
+ }, items.map((group, index) => jsx(Section, {
206
208
  hasSeparator: (section === null || section === void 0 ? void 0 : section.hasSeparator) && index > 0,
207
209
  title: section === null || section === void 0 ? void 0 : section.title,
208
210
  key: index
209
211
  }, group.items.map(item => {
210
212
  var _item$key;
211
- return /*#__PURE__*/React.createElement(DropdownMenuItem, {
213
+ return jsx(DropdownMenuItem, {
212
214
  key: (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : String(item.content),
213
215
  item: item,
214
216
  onItemActivated: this.props.onItemActivated,
@@ -216,12 +218,12 @@ export default class DropdownMenuWrapper extends PureComponent {
216
218
  onMouseEnter: this.props.onMouseEnter,
217
219
  onMouseLeave: this.props.onMouseLeave
218
220
  });
219
- })))), !getBooleanFF('platform.editor.menu.group-items') && items.map((group, index) => /*#__PURE__*/React.createElement(MenuGroup, {
221
+ })))), !getBooleanFF('platform.editor.menu.group-items') && items.map((group, index) => jsx(MenuGroup, {
220
222
  key: index,
221
223
  role: shouldUseDefaultRole ? 'group' : 'menu'
222
224
  }, group.items.map(item => {
223
225
  var _item$key2;
224
- return /*#__PURE__*/React.createElement(DropdownMenuItem, {
226
+ return jsx(DropdownMenuItem, {
225
227
  key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
226
228
  item: item,
227
229
  onItemActivated: this.props.onItemActivated,
@@ -236,9 +238,9 @@ export default class DropdownMenuWrapper extends PureComponent {
236
238
  children,
237
239
  isOpen
238
240
  } = this.props;
239
- return /*#__PURE__*/React.createElement("div", {
241
+ return jsx("div", {
240
242
  css: wrapper
241
- }, /*#__PURE__*/React.createElement("div", {
243
+ }, jsx("div", {
242
244
  ref: this.handleRef
243
245
  }, children), isOpen ? this.renderDropdownMenu() : null);
244
246
  }
@@ -261,7 +263,7 @@ const DropdownMenuItemCustomComponent = /*#__PURE__*/React.forwardRef((props, re
261
263
  children,
262
264
  ...rest
263
265
  } = props;
264
- return /*#__PURE__*/React.createElement("span", _extends({
266
+ return jsx("span", _extends({
265
267
  ref: ref
266
268
  }, rest, {
267
269
  style: {
@@ -288,21 +290,21 @@ function DropdownMenuItem({
288
290
  // onClick and value.name are the action indicators in the handlers
289
291
  // If neither are present, don't wrap in an Item.
290
292
  if (!item.onClick && !(item.value && item.value.name)) {
291
- return /*#__PURE__*/React.createElement("span", {
293
+ return jsx("span", {
292
294
  key: String(item.content)
293
295
  }, item.content);
294
296
  }
295
297
  const _handleSubmenuActive = event => {
296
298
  setSubmenuActive(!!event.target.closest(`.${DropdownMenuSharedCssClassName.SUBMENU}`));
297
299
  };
298
- const dropListItem = /*#__PURE__*/React.createElement("div", {
300
+ const dropListItem = jsx("div", {
299
301
  css: theme => buttonStyles(item.isActive, submenuActive)({
300
302
  theme
301
303
  }),
302
304
  tabIndex: -1,
303
305
  "aria-disabled": item.isDisabled ? 'true' : 'false',
304
306
  onMouseDown: _handleSubmenuActive
305
- }, /*#__PURE__*/React.createElement(CustomItem, {
307
+ }, jsx(CustomItem, {
306
308
  item: item,
307
309
  key: (_item$key3 = item.key) !== null && _item$key3 !== void 0 ? _item$key3 : String(item.content),
308
310
  testId: `dropdown-item__${String(item.content)}`,
@@ -329,7 +331,7 @@ function DropdownMenuItem({
329
331
  }, item.content));
330
332
  if (item.tooltipDescription) {
331
333
  var _item$key4;
332
- return /*#__PURE__*/React.createElement(Tooltip, {
334
+ return jsx(Tooltip, {
333
335
  key: (_item$key4 = item.key) !== null && _item$key4 !== void 0 ? _item$key4 : String(item.content),
334
336
  content: item.tooltipDescription,
335
337
  position: item.tooltipPosition
@@ -343,7 +345,7 @@ export const DropdownMenuWithKeyboardNavigation = /*#__PURE__*/React.memo(({
343
345
  const keyDownHandlerContext = useContext(KeyDownHandlerContext);
344
346
  // This context is to handle the tab, Arrow Right/Left key events for dropdown.
345
347
  // Default context has the void callbacks for above key events
346
- return /*#__PURE__*/React.createElement(DropdownMenuWrapper, _extends({
348
+ return jsx(DropdownMenuWrapper, _extends({
347
349
  arrowKeyNavigationProviderOptions: {
348
350
  ...props.arrowKeyNavigationProviderOptions,
349
351
  keyDownHandlerContext
@@ -1,7 +1,8 @@
1
+ /** @jsx jsx */
1
2
  /* eslint-disable no-console */
2
3
 
3
4
  import React, { useCallback, useLayoutEffect, useRef } from 'react';
4
- import { css } from '@emotion/react';
5
+ import { css, jsx } from '@emotion/react';
5
6
  import { fullPageMessages as messages } from '../../messages';
6
7
  import { EDIT_AREA_ID } from '../../ui';
7
8
  /*
@@ -185,14 +186,14 @@ export const ToolbarArrowKeyNavigationProvider = ({
185
186
  }
186
187
  };
187
188
  }, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
188
- return /*#__PURE__*/React.createElement("div", {
189
+ return jsx("div", {
189
190
  css: editorAppearance === 'comment' && centeredToolbarContainer,
190
191
  className: "custom-key-handler-wrapper",
191
192
  ref: wrapperRef,
192
193
  role: "toolbar",
193
194
  "aria-label": intl.formatMessage(messages.toolbarLabel),
194
195
  "aria-controls": EDIT_AREA_ID
195
- }, /*#__PURE__*/React.createElement(KeyDownHandlerContext.Provider, {
196
+ }, jsx(KeyDownHandlerContext.Provider, {
196
197
  value: submenuKeydownHandleContext
197
198
  }, children));
198
199
  };