@atlaskit/editor-core 203.4.0 → 203.5.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-core
2
2
 
3
+ ## 203.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#178994](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178994)
8
+ [`75a272d4afdbb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/75a272d4afdbb) -
9
+ [ux] making padding optional for content panels
10
+
3
11
  ## 203.4.0
4
12
 
5
13
  ### Minor Changes
@@ -47,12 +47,14 @@ var content = exports.content = (0, _react2.css)({
47
47
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
48
48
  transition: "width 600ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
49
49
  boxSizing: 'border-box',
50
- padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px"),
51
50
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
52
51
  width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
53
52
  height: '100%',
54
53
  overflowY: 'auto'
55
54
  });
55
+ var paddingStyles = (0, _react2.css)({
56
+ padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px")
57
+ });
56
58
  var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
57
59
  function SwappableContentArea() {
58
60
  var _this;
@@ -126,6 +128,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
126
128
  var width = _editorSharedStyles.akEditorContextPanelWidth;
127
129
  var userVisible = !!this.props.visible;
128
130
  var visible = userVisible || !!this.state.currentPluginContent;
131
+ var hasPadding = this.props.hasPadding === undefined ? true : this.props.hasPadding;
129
132
  return (0, _react2.jsx)(_ui.ContextPanelConsumer, null, function (_ref) {
130
133
  var broadcastWidth = _ref.broadcastWidth;
131
134
  var contextPanelWidth = visible ? width : 0;
@@ -137,7 +140,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
137
140
  role: "dialog"
138
141
  }, (0, _react2.jsx)("div", {
139
142
  "data-testid": "context-panel-content",
140
- css: [content, !visible && panelHidden]
143
+ css: [content, hasPadding && paddingStyles, !visible && panelHidden]
141
144
  }, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
142
145
  });
143
146
  }
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "203.4.0";
8
+ var version = exports.version = "203.5.0";
@@ -33,12 +33,14 @@ export const content = css({
33
33
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
34
34
  transition: `width 600ms ${akEditorSwoopCubicBezier}`,
35
35
  boxSizing: 'border-box',
36
- padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"} 0px`,
37
36
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
37
  width: `${akEditorContextPanelWidth}px`,
39
38
  height: '100%',
40
39
  overflowY: 'auto'
41
40
  });
41
+ const paddingStyles = css({
42
+ padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"} 0px`
43
+ });
42
44
  export class SwappableContentArea extends React.PureComponent {
43
45
  constructor(...args) {
44
46
  super(...args);
@@ -113,6 +115,7 @@ export class SwappableContentArea extends React.PureComponent {
113
115
  const width = akEditorContextPanelWidth;
114
116
  const userVisible = !!this.props.visible;
115
117
  const visible = userVisible || !!this.state.currentPluginContent;
118
+ const hasPadding = this.props.hasPadding === undefined ? true : this.props.hasPadding;
116
119
  return jsx(ContextPanelConsumer, null, ({
117
120
  broadcastWidth
118
121
  }) => {
@@ -125,7 +128,7 @@ export class SwappableContentArea extends React.PureComponent {
125
128
  role: "dialog"
126
129
  }, jsx("div", {
127
130
  "data-testid": "context-panel-content",
128
- css: [content, !visible && panelHidden]
131
+ css: [content, hasPadding && paddingStyles, !visible && panelHidden]
129
132
  }, this.showPluginContent() || this.showProvidedContent(userVisible)));
130
133
  });
131
134
  }
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "203.4.0";
2
+ export const version = "203.5.0";
@@ -42,12 +42,14 @@ export var content = css({
42
42
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
43
43
  transition: "width 600ms ".concat(akEditorSwoopCubicBezier),
44
44
  boxSizing: 'border-box',
45
- padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px"),
46
45
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
47
46
  width: "".concat(akEditorContextPanelWidth, "px"),
48
47
  height: '100%',
49
48
  overflowY: 'auto'
50
49
  });
50
+ var paddingStyles = css({
51
+ padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px")
52
+ });
51
53
  export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
52
54
  function SwappableContentArea() {
53
55
  var _this;
@@ -121,6 +123,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
121
123
  var width = akEditorContextPanelWidth;
122
124
  var userVisible = !!this.props.visible;
123
125
  var visible = userVisible || !!this.state.currentPluginContent;
126
+ var hasPadding = this.props.hasPadding === undefined ? true : this.props.hasPadding;
124
127
  return jsx(ContextPanelConsumer, null, function (_ref) {
125
128
  var broadcastWidth = _ref.broadcastWidth;
126
129
  var contextPanelWidth = visible ? width : 0;
@@ -132,7 +135,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
132
135
  role: "dialog"
133
136
  }, jsx("div", {
134
137
  "data-testid": "context-panel-content",
135
- css: [content, !visible && panelHidden]
138
+ css: [content, hasPadding && paddingStyles, !visible && panelHidden]
136
139
  }, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
137
140
  });
138
141
  }
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "203.4.0";
2
+ export var version = "203.5.0";
@@ -11,6 +11,7 @@ export type Props = {
11
11
  visible: boolean;
12
12
  editorAPI: PublicPluginAPI<[OptionalPlugin<ContextPanelPlugin>]> | undefined;
13
13
  children?: React.ReactElement;
14
+ hasPadding?: boolean;
14
15
  };
15
16
  export declare const panel: import("@emotion/react").SerializedStyles;
16
17
  export declare const content: import("@emotion/react").SerializedStyles;
@@ -13,6 +13,7 @@ export type Props = {
13
13
  OptionalPlugin<ContextPanelPlugin>
14
14
  ]> | undefined;
15
15
  children?: React.ReactElement;
16
+ hasPadding?: boolean;
16
17
  };
17
18
  export declare const panel: import("@emotion/react").SerializedStyles;
18
19
  export declare const content: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "203.4.0",
3
+ "version": "203.5.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -103,7 +103,7 @@
103
103
  "@atlaskit/visual-regression": "*",
104
104
  "@atlassian/adf-schema-json": "^1.22.0",
105
105
  "@atlassian/feature-flags-test-utils": "*",
106
- "@atlassian/search-provider": "3.0.8",
106
+ "@atlassian/search-provider": "3.0.9",
107
107
  "@emotion/jest": "^11.8.0",
108
108
  "@storybook/addon-knobs": "^6.4.0",
109
109
  "@testing-library/react": "^12.1.5",