@atlaskit/editor-plugin-floating-toolbar 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 1.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#117197](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117197)
8
+ [`d6202c120a039`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d6202c120a039) -
9
+ Remove @atlaskit/heading import which broke previous versions, replace with HeadingItem
10
+
3
11
  ## 1.19.0
4
12
 
5
13
  ### Minor Changes
@@ -10,7 +10,6 @@ var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _reactIntlNext = require("react-intl-next");
12
12
  var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
13
- var _heading = _interopRequireDefault(require("@atlaskit/heading"));
14
13
  var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
15
14
  var _menu = require("@atlaskit/menu");
16
15
  var _colors = require("@atlaskit/theme/colors");
@@ -41,6 +40,9 @@ var separatorStyles = (0, _react2.css)({
41
40
  background: "var(--ds-border, #091E4224)",
42
41
  height: "var(--ds-space-025, 1px)"
43
42
  });
43
+ var headingStyles = (0, _react2.css)({
44
+ padding: "var(--ds-space-100, 8px)".concat(" 0")
45
+ });
44
46
 
45
47
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
46
48
  var menuContainerStyles = (0, _react2.css)({
@@ -268,17 +270,10 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
268
270
  });
269
271
  }
270
272
  if (item.type === 'overflow-dropdown-heading') {
271
- return (
272
- // eslint-disable-next-line react/no-array-index-key, @atlaskit/ui-styling-standard/enforce-style-prop
273
- (0, _react2.jsx)("div", {
274
- key: idx,
275
- style: {
276
- padding: '10px'
277
- }
278
- }, (0, _react2.jsx)(_heading.default, {
279
- size: "xxsmall"
280
- }, item.title))
281
- );
273
+ return (0, _react2.jsx)("div", {
274
+ key: item.title,
275
+ css: headingStyles
276
+ }, (0, _react2.jsx)(_menu.HeadingItem, null, item.title));
282
277
  }
283
278
  }));
284
279
  }
@@ -10,9 +10,8 @@ import { css, jsx } from '@emotion/react';
10
10
 
11
11
  import { injectIntl } from 'react-intl-next';
12
12
  import { messages } from '@atlaskit/editor-common/floating-toolbar';
13
- import Heading from '@atlaskit/heading';
14
13
  import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
15
- import { ButtonItem } from '@atlaskit/menu';
14
+ import { ButtonItem, HeadingItem } from '@atlaskit/menu';
16
15
  import { B400 } from '@atlaskit/theme/colors';
17
16
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
18
17
  import { gridSize } from '@atlaskit/theme/constants';
@@ -31,6 +30,9 @@ const separatorStyles = css({
31
30
  background: "var(--ds-border, #091E4224)",
32
31
  height: "var(--ds-space-025, 1px)"
33
32
  });
33
+ const headingStyles = css({
34
+ padding: `${"var(--ds-space-100, 8px)"} 0`
35
+ });
34
36
 
35
37
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
36
38
  const menuContainerStyles = css({
@@ -259,17 +261,10 @@ const Dropdown = /*#__PURE__*/memo(props => {
259
261
  });
260
262
  }
261
263
  if (item.type === 'overflow-dropdown-heading') {
262
- return (
263
- // eslint-disable-next-line react/no-array-index-key, @atlaskit/ui-styling-standard/enforce-style-prop
264
- jsx("div", {
265
- key: idx,
266
- style: {
267
- padding: '10px'
268
- }
269
- }, jsx(Heading, {
270
- size: "xxsmall"
271
- }, item.title))
272
- );
264
+ return jsx("div", {
265
+ key: item.title,
266
+ css: headingStyles
267
+ }, jsx(HeadingItem, null, item.title));
273
268
  }
274
269
  }));
275
270
  }
@@ -11,9 +11,8 @@ import { css, jsx } from '@emotion/react';
11
11
 
12
12
  import { injectIntl } from 'react-intl-next';
13
13
  import { messages } from '@atlaskit/editor-common/floating-toolbar';
14
- import Heading from '@atlaskit/heading';
15
14
  import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
16
- import { ButtonItem } from '@atlaskit/menu';
15
+ import { ButtonItem, HeadingItem } from '@atlaskit/menu';
17
16
  import { B400 } from '@atlaskit/theme/colors';
18
17
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
19
18
  import { gridSize } from '@atlaskit/theme/constants';
@@ -32,6 +31,9 @@ var separatorStyles = css({
32
31
  background: "var(--ds-border, #091E4224)",
33
32
  height: "var(--ds-space-025, 1px)"
34
33
  });
34
+ var headingStyles = css({
35
+ padding: "var(--ds-space-100, 8px)".concat(" 0")
36
+ });
35
37
 
36
38
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
37
39
  var menuContainerStyles = css({
@@ -259,17 +261,10 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
259
261
  });
260
262
  }
261
263
  if (item.type === 'overflow-dropdown-heading') {
262
- return (
263
- // eslint-disable-next-line react/no-array-index-key, @atlaskit/ui-styling-standard/enforce-style-prop
264
- jsx("div", {
265
- key: idx,
266
- style: {
267
- padding: '10px'
268
- }
269
- }, jsx(Heading, {
270
- size: "xxsmall"
271
- }, item.title))
272
- );
264
+ return jsx("div", {
265
+ key: item.title,
266
+ css: headingStyles
267
+ }, jsx(HeadingItem, null, item.title));
273
268
  }
274
269
  }));
275
270
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",