@atlaskit/inline-dialog 15.2.2 → 15.3.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,23 @@
1
1
  # @atlaskit/inline-dialog
2
2
 
3
+ ## 15.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#168743](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168743)
8
+ [`b27dba8a5f3cd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b27dba8a5f3cd) -
9
+ Update types to improve compatibility with React 18.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 15.2.3
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 15.2.2
4
22
 
5
23
  ### Patch Changes
@@ -86,7 +86,7 @@ var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref2) {
86
86
  action: 'closed',
87
87
  componentName: 'inlineDialog',
88
88
  packageName: "@atlaskit/inline-dialog",
89
- packageVersion: "15.2.2"
89
+ packageVersion: "15.3.0"
90
90
  });
91
91
 
92
92
  // we put this into a ref to avoid handleCloseRequest having this as a dependency
@@ -165,7 +165,7 @@ var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref2) {
165
165
  ,
166
166
  style: style,
167
167
  testId: testId
168
- }, content);
168
+ }, typeof content === 'function' ? content() : content);
169
169
  }) : null;
170
170
  return (0, _react2.jsx)(_popper.Manager, null, (0, _react2.jsx)(_popper.Reference, null, function (_ref5) {
171
171
  var ref = _ref5.ref;
@@ -1,18 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.Container = void 0;
9
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _react = _interopRequireWildcard(require("react"));
9
+ var _react = require("react");
11
10
  var _react2 = require("@emotion/react");
12
11
  var _colors = require("@atlaskit/theme/colors");
13
12
  var _constants = require("@atlaskit/theme/constants");
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
18
15
  * @jsxRuntime classic
@@ -63,6 +60,6 @@ var Container = exports.Container = /*#__PURE__*/(0, _react.forwardRef)(function
63
60
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
64
61
  ,
65
62
  style: _objectSpread((_objectSpread2 = {}, (0, _defineProperty2.default)(_objectSpread2, CSS_THEME_BACKGROUND, "var(--ds-surface-overlay, ".concat(_colors.N0, ")")), (0, _defineProperty2.default)(_objectSpread2, CSS_THEME_COLOR, "var(--ds-text, ".concat(_colors.N900, ")")), (0, _defineProperty2.default)(_objectSpread2, CSS_THEME_BOX_SHADOW, "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")), _objectSpread2), style)
66
- }, children)
63
+ }, typeof children === 'function' ? children() : children)
67
64
  );
68
65
  });
@@ -69,7 +69,7 @@ const InlineDialog = /*#__PURE__*/memo(function InlineDialog({
69
69
  action: 'closed',
70
70
  componentName: 'inlineDialog',
71
71
  packageName: "@atlaskit/inline-dialog",
72
- packageVersion: "15.2.2"
72
+ packageVersion: "15.3.0"
73
73
  });
74
74
 
75
75
  // we put this into a ref to avoid handleCloseRequest having this as a dependency
@@ -150,7 +150,7 @@ const InlineDialog = /*#__PURE__*/memo(function InlineDialog({
150
150
  ,
151
151
  style: style,
152
152
  testId: testId
153
- }, content)) : null;
153
+ }, typeof content === 'function' ? content() : content)) : null;
154
154
  return jsx(Manager, null, jsx(Reference, null, ({
155
155
  ref
156
156
  }) => jsx(NodeResolverWrapper, {
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React, { forwardRef } from 'react';
5
+ import { forwardRef } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css, jsx } from '@emotion/react';
@@ -59,6 +59,6 @@ export const Container = /*#__PURE__*/forwardRef(({
59
59
  ...style
60
60
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
61
61
  }
62
- }, children)
62
+ }, typeof children === 'function' ? children() : children)
63
63
  );
64
64
  });
@@ -75,7 +75,7 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref2) {
75
75
  action: 'closed',
76
76
  componentName: 'inlineDialog',
77
77
  packageName: "@atlaskit/inline-dialog",
78
- packageVersion: "15.2.2"
78
+ packageVersion: "15.3.0"
79
79
  });
80
80
 
81
81
  // we put this into a ref to avoid handleCloseRequest having this as a dependency
@@ -154,7 +154,7 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref2) {
154
154
  ,
155
155
  style: style,
156
156
  testId: testId
157
- }, content);
157
+ }, typeof content === 'function' ? content() : content);
158
158
  }) : null;
159
159
  return jsx(Manager, null, jsx(Reference, null, function (_ref5) {
160
160
  var ref = _ref5.ref;
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  * @jsxRuntime classic
6
6
  * @jsx jsx
7
7
  */
8
- import React, { forwardRef } from 'react';
8
+ import { forwardRef } from 'react';
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx } from '@emotion/react';
@@ -56,6 +56,6 @@ export var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
56
56
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
57
57
  ,
58
58
  style: _objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, CSS_THEME_BACKGROUND, "var(--ds-surface-overlay, ".concat(N0, ")")), _defineProperty(_objectSpread2, CSS_THEME_COLOR, "var(--ds-text, ".concat(N900, ")")), _defineProperty(_objectSpread2, CSS_THEME_BOX_SHADOW, "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")), _objectSpread2), style)
59
- }, children)
59
+ }, typeof children === 'function' ? children() : children)
60
60
  );
61
61
  });
@@ -2,13 +2,13 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React from 'react';
5
+ import { type CSSProperties, type FocusEventHandler, type MouseEventHandler, type ReactNode } from 'react';
6
6
  interface ContainerProps {
7
- children: React.ReactNode;
8
- onBlur?: React.FocusEventHandler<HTMLElement>;
9
- onClick?: React.MouseEventHandler<HTMLElement>;
10
- onFocus?: React.FocusEventHandler<HTMLElement>;
11
- style: React.CSSProperties;
7
+ children: ReactNode | (() => ReactNode);
8
+ onBlur?: FocusEventHandler<HTMLElement>;
9
+ onClick?: MouseEventHandler<HTMLElement>;
10
+ onFocus?: FocusEventHandler<HTMLElement>;
11
+ style: CSSProperties;
12
12
  testId?: string;
13
13
  }
14
14
  /**
@@ -18,5 +18,5 @@ interface ContainerProps {
18
18
  * Note that the styles here are merged with the style prop that comes from the popper.js library.
19
19
  *
20
20
  */
21
- export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const Container: import("react").ForwardRefExoticComponent<ContainerProps & import("react").RefAttributes<HTMLDivElement>>;
22
22
  export {};
@@ -1,2 +1,3 @@
1
1
  export { default } from './InlineDialog';
2
2
  export type { Placement } from './types';
3
+ export type { InlineDialogProps } from './types';
@@ -9,7 +9,7 @@ export interface InlineDialogProps extends WithAnalyticsEventsProps {
9
9
  /**
10
10
  * The elements to be displayed within the InlineDialog.
11
11
  */
12
- content: ReactNode;
12
+ content: ReactNode | (() => ReactNode);
13
13
  /**
14
14
  * Sets whether to show or hide the dialog.
15
15
  */
@@ -2,13 +2,13 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React from 'react';
5
+ import { type CSSProperties, type FocusEventHandler, type MouseEventHandler, type ReactNode } from 'react';
6
6
  interface ContainerProps {
7
- children: React.ReactNode;
8
- onBlur?: React.FocusEventHandler<HTMLElement>;
9
- onClick?: React.MouseEventHandler<HTMLElement>;
10
- onFocus?: React.FocusEventHandler<HTMLElement>;
11
- style: React.CSSProperties;
7
+ children: ReactNode | (() => ReactNode);
8
+ onBlur?: FocusEventHandler<HTMLElement>;
9
+ onClick?: MouseEventHandler<HTMLElement>;
10
+ onFocus?: FocusEventHandler<HTMLElement>;
11
+ style: CSSProperties;
12
12
  testId?: string;
13
13
  }
14
14
  /**
@@ -18,5 +18,5 @@ interface ContainerProps {
18
18
  * Note that the styles here are merged with the style prop that comes from the popper.js library.
19
19
  *
20
20
  */
21
- export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const Container: import("react").ForwardRefExoticComponent<ContainerProps & import("react").RefAttributes<HTMLDivElement>>;
22
22
  export {};
@@ -1,2 +1,3 @@
1
1
  export { default } from './InlineDialog';
2
2
  export type { Placement } from './types';
3
+ export type { InlineDialogProps } from './types';
@@ -9,7 +9,7 @@ export interface InlineDialogProps extends WithAnalyticsEventsProps {
9
9
  /**
10
10
  * The elements to be displayed within the InlineDialog.
11
11
  */
12
- content: ReactNode;
12
+ content: ReactNode | (() => ReactNode);
13
13
  /**
14
14
  * Sets whether to show or hide the dialog.
15
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "15.2.2",
3
+ "version": "15.3.0",
4
4
  "description": "An inline dialog is a pop-up container for small amounts of information. It can also contain controls.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,17 +35,17 @@
35
35
  }
36
36
  ]
37
37
  },
38
- "category": "Components"
38
+ "category": "Overlays and layering"
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
42
  "@atlaskit/analytics-next": "^10.1.0",
43
- "@atlaskit/ds-lib": "^3.2.0",
44
- "@atlaskit/layering": "^0.7.3",
43
+ "@atlaskit/ds-lib": "^3.3.0",
44
+ "@atlaskit/layering": "^0.8.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.3.0",
46
46
  "@atlaskit/popper": "^6.3.0",
47
47
  "@atlaskit/theme": "^14.0.0",
48
- "@atlaskit/tokens": "^2.2.0",
48
+ "@atlaskit/tokens": "^2.4.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "@emotion/react": "^11.7.1",
51
51
  "bind-event-listener": "^3.0.0",
@@ -61,10 +61,10 @@
61
61
  "@atlaskit/button": "^20.3.0",
62
62
  "@atlaskit/datetime-picker": "^15.9.0",
63
63
  "@atlaskit/docs": "*",
64
- "@atlaskit/dropdown-menu": "^12.22.0",
64
+ "@atlaskit/dropdown-menu": "^12.23.0",
65
65
  "@atlaskit/modal-dialog": "^12.17.0",
66
- "@atlaskit/section-message": "^6.6.0",
67
- "@atlaskit/select": "^18.5.0",
66
+ "@atlaskit/section-message": "^6.7.0",
67
+ "@atlaskit/select": "^18.6.0",
68
68
  "@atlaskit/ssr": "*",
69
69
  "@atlaskit/visual-regression": "*",
70
70
  "@testing-library/react": "^12.1.5",