@atlaskit/modal-dialog 15.2.6 → 15.2.8

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/modal-dialog
2
2
 
3
+ ## 15.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6d0485dce81c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6d0485dce81c4) -
8
+ Internal: updated to the new `@atlaskit/top-layer` `Popover`/`Dialog` behaviour where the host
9
+ element unmounts after the exit animation completes. No consumer action required.
10
+ - Updated dependencies
11
+
12
+ ## 15.2.7
13
+
14
+ ### Patch Changes
15
+
16
+ - [`e5b4070f51a93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e5b4070f51a93) -
17
+ Remove Top Layer compatibility aliases and expose close-event helpers from the `dialog` and
18
+ `popover` entry points.
19
+ - Updated dependencies
20
+
3
21
  ## 15.2.6
4
22
 
5
23
  ### Patch Changes
@@ -30,7 +30,6 @@ var _portal = _interopRequireDefault(require("@atlaskit/portal"));
30
30
  var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
31
31
  var _constants = require("@atlaskit/theme/constants");
32
32
  var _animations = require("@atlaskit/top-layer/animations");
33
- var _createCloseEvent = require("@atlaskit/top-layer/create-close-event");
34
33
  var _dialog = require("@atlaskit/top-layer/dialog");
35
34
  var _dialogScrollLock = require("@atlaskit/top-layer/dialog-scroll-lock");
36
35
  var _context = require("../context");
@@ -115,7 +114,7 @@ var InternalModalWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props,
115
114
  action: 'closed',
116
115
  componentName: 'modalDialog',
117
116
  packageName: "@atlaskit/modal-dialog",
118
- packageVersion: "15.2.5"
117
+ packageVersion: "15.2.7"
119
118
  });
120
119
  var onBlanketClicked = (0, _react.useCallback)(function (e) {
121
120
  if (shouldCloseOnOverlayClick) {
@@ -210,12 +209,12 @@ var InternalModalWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props,
210
209
  var onDialogClose = (0, _react.useCallback)(function (_ref) {
211
210
  var reason = _ref.reason;
212
211
  if (reason === 'escape' && shouldCloseOnEscapePress) {
213
- onCloseHandler((0, _createCloseEvent.createCloseEvent)({
212
+ onCloseHandler((0, _dialog.createCloseEvent)({
214
213
  reason: reason
215
214
  }));
216
215
  }
217
216
  if (reason === 'overlay-click' && shouldCloseOnOverlayClick) {
218
- onCloseHandler((0, _createCloseEvent.createCloseEvent)({
217
+ onCloseHandler((0, _dialog.createCloseEvent)({
219
218
  reason: reason
220
219
  }));
221
220
  }
@@ -332,7 +331,9 @@ var InternalModalWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props,
332
331
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
333
332
  ,
334
333
  style: dialogStyle
335
- }), /*#__PURE__*/React.createElement(_dialogScrollLock.DialogScrollLock, null), dialogPositionStyles &&
334
+ }), /*#__PURE__*/React.createElement(_dialogScrollLock.DialogScrollLock, {
335
+ isOpen: true
336
+ }), dialogPositionStyles &&
336
337
  /*#__PURE__*/
337
338
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles
338
339
  React.createElement("style", null, dialogPositionStyles), /*#__PURE__*/React.createElement("div", {
@@ -21,8 +21,7 @@ import Portal from '@atlaskit/portal';
21
21
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
22
22
  import { layers } from '@atlaskit/theme/constants';
23
23
  import { dialogSlideUpAndFade } from '@atlaskit/top-layer/animations';
24
- import { createCloseEvent } from '@atlaskit/top-layer/create-close-event';
25
- import { Dialog } from '@atlaskit/top-layer/dialog';
24
+ import { createCloseEvent, Dialog } from '@atlaskit/top-layer/dialog';
26
25
  import { DialogScrollLock } from '@atlaskit/top-layer/dialog-scroll-lock';
27
26
  import { ModalContext, ScrollContext } from '../context';
28
27
  import useModalStack from '../hooks/use-modal-stack';
@@ -101,7 +100,7 @@ const InternalModalWrapper = /*#__PURE__*/forwardRef((props, ref) => {
101
100
  action: 'closed',
102
101
  componentName: 'modalDialog',
103
102
  packageName: "@atlaskit/modal-dialog",
104
- packageVersion: "15.2.5"
103
+ packageVersion: "15.2.7"
105
104
  });
106
105
  const onBlanketClicked = useCallback(e => {
107
106
  if (shouldCloseOnOverlayClick) {
@@ -317,7 +316,9 @@ const InternalModalWrapper = /*#__PURE__*/forwardRef((props, ref) => {
317
316
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
318
317
  ,
319
318
  style: dialogStyle
320
- }), /*#__PURE__*/React.createElement(DialogScrollLock, null), dialogPositionStyles &&
319
+ }), /*#__PURE__*/React.createElement(DialogScrollLock, {
320
+ isOpen: true
321
+ }), dialogPositionStyles &&
321
322
  /*#__PURE__*/
322
323
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles
323
324
  React.createElement("style", null, dialogPositionStyles), /*#__PURE__*/React.createElement("div", {
@@ -22,8 +22,7 @@ import Portal from '@atlaskit/portal';
22
22
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
23
23
  import { layers } from '@atlaskit/theme/constants';
24
24
  import { dialogSlideUpAndFade } from '@atlaskit/top-layer/animations';
25
- import { createCloseEvent } from '@atlaskit/top-layer/create-close-event';
26
- import { Dialog } from '@atlaskit/top-layer/dialog';
25
+ import { createCloseEvent, Dialog } from '@atlaskit/top-layer/dialog';
27
26
  import { DialogScrollLock } from '@atlaskit/top-layer/dialog-scroll-lock';
28
27
  import { ModalContext, ScrollContext } from '../context';
29
28
  import useModalStack from '../hooks/use-modal-stack';
@@ -106,7 +105,7 @@ var InternalModalWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
106
105
  action: 'closed',
107
106
  componentName: 'modalDialog',
108
107
  packageName: "@atlaskit/modal-dialog",
109
- packageVersion: "15.2.5"
108
+ packageVersion: "15.2.7"
110
109
  });
111
110
  var onBlanketClicked = useCallback(function (e) {
112
111
  if (shouldCloseOnOverlayClick) {
@@ -323,7 +322,9 @@ var InternalModalWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
323
322
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
324
323
  ,
325
324
  style: dialogStyle
326
- }), /*#__PURE__*/React.createElement(DialogScrollLock, null), dialogPositionStyles &&
325
+ }), /*#__PURE__*/React.createElement(DialogScrollLock, {
326
+ isOpen: true
327
+ }), dialogPositionStyles &&
327
328
  /*#__PURE__*/
328
329
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles
329
330
  React.createElement("style", null, dialogPositionStyles), /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "15.2.6",
3
+ "version": "15.2.8",
4
4
  "description": "A modal dialog displays content that requires user interaction, in a layer above the page.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/primitives": "^19.0.0",
49
49
  "@atlaskit/theme": "^25.0.0",
50
50
  "@atlaskit/tokens": "^13.3.0",
51
- "@atlaskit/top-layer": "^0.14.0",
51
+ "@atlaskit/top-layer": "^0.16.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@compiled/react": "^0.20.0",
54
54
  "bind-event-listener": "^3.0.0",
@@ -72,7 +72,7 @@
72
72
  "@atlaskit/datetime-picker": "^17.9.0",
73
73
  "@atlaskit/docs": "^11.8.0",
74
74
  "@atlaskit/dropdown-menu": "^16.10.0",
75
- "@atlaskit/flag": "^17.12.0",
75
+ "@atlaskit/flag": "^17.13.0",
76
76
  "@atlaskit/form": "^15.5.0",
77
77
  "@atlaskit/heading": "^5.4.0",
78
78
  "@atlaskit/link": "^3.4.0",