@atlaskit/modal-dialog 16.6.7 → 17.0.1

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,25 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 17.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9fce890f9df21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9fce890f9df21) -
8
+ Keep modal context stable when its close callback changes.
9
+ - Updated dependencies
10
+
11
+ ## 17.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - [`0c7c7be927bde`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0c7c7be927bde) -
16
+ Remove deprecated Volt re-export shims from public package entry points. Consumers should import
17
+ from the replacement subpaths or implementation entry points instead.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 16.6.7
4
24
 
5
25
  ### Patch Changes
@@ -6,44 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.FullScreenModalDialog = void 0;
9
- Object.defineProperty(exports, "ModalBody", {
10
- enumerable: true,
11
- get: function get() {
12
- return _modalBody.default;
13
- }
14
- });
15
- Object.defineProperty(exports, "ModalFooter", {
16
- enumerable: true,
17
- get: function get() {
18
- return _modalFooter.default;
19
- }
20
- });
21
- Object.defineProperty(exports, "ModalHeader", {
22
- enumerable: true,
23
- get: function get() {
24
- return _modalHeader.default;
25
- }
26
- });
27
- Object.defineProperty(exports, "ModalTitle", {
28
- enumerable: true,
29
- get: function get() {
30
- return _modalTitle.default;
31
- }
32
- });
33
- Object.defineProperty(exports, "ModalTransition", {
34
- enumerable: true,
35
- get: function get() {
36
- return _modalTransition.default;
37
- }
38
- });
39
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
40
10
  var _react = _interopRequireWildcard(require("react"));
41
11
  var _modalWrapper = _interopRequireDefault(require("./internal/components/modal-wrapper"));
42
- var _modalTransition = _interopRequireDefault(require("./modal-transition"));
43
- var _modalHeader = _interopRequireDefault(require("./modal-header"));
44
- var _modalTitle = _interopRequireDefault(require("./modal-title"));
45
- var _modalBody = _interopRequireDefault(require("./modal-body"));
46
- var _modalFooter = _interopRequireDefault(require("./modal-footer"));
47
12
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
48
13
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
49
14
  var FullScreenModalDialog = exports.FullScreenModalDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
@@ -89,29 +54,4 @@ var FullScreenModalDialog = exports.FullScreenModalDialog = /*#__PURE__*/(0, _re
89
54
  ref: ref
90
55
  }));
91
56
  });
92
- FullScreenModalDialog.displayName = 'FullScreenModalDialog';
93
-
94
- /**
95
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
96
- * Retained only while consumers migrate off this re-export.
97
- */
98
-
99
- /**
100
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
101
- * Retained only while consumers migrate off this re-export.
102
- */
103
-
104
- /**
105
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
106
- * Retained only while consumers migrate off this re-export.
107
- */
108
-
109
- /**
110
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
111
- * Retained only while consumers migrate off this re-export.
112
- */
113
-
114
- /**
115
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
116
- * Retained only while consumers migrate off this re-export.
117
- */
57
+ FullScreenModalDialog.displayName = 'FullScreenModalDialog';
@@ -43,6 +43,7 @@ var _scrollContext = require("../scroll-context");
43
43
  var _width = require("../width");
44
44
  var _modalDialog = _interopRequireDefault(require("./modal-dialog"));
45
45
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-atlaskit-theme
46
47
  var fillScreenStyles = null;
47
48
 
48
49
  /**
@@ -93,7 +94,7 @@ function useModalCloseHandler(providedOnClose) {
93
94
  action: 'closed',
94
95
  componentName: 'modalDialog',
95
96
  packageName: "@atlaskit/modal-dialog",
96
- packageVersion: "16.6.6"
97
+ packageVersion: "17.0.0"
97
98
  });
98
99
  }
99
100
  function getScrollMode(_ref) {
@@ -228,15 +229,16 @@ function ModalWrapperTopLayer(props) {
228
229
 
229
230
  // Native <dialog> ref - needed for ExitingPersistence to call dialog.close().
230
231
  var dialogRef = (0, _react.useRef)(null);
232
+ var hasProvidedOnClose = Boolean(providedOnClose);
231
233
  var modalDialogContext = (0, _react.useMemo)(function () {
232
234
  return {
233
235
  testId: defaultTestId,
234
236
  titleId: titleId,
235
237
  onClose: onCloseHandler,
236
- hasProvidedOnClose: Boolean(providedOnClose),
238
+ hasProvidedOnClose: hasProvidedOnClose,
237
239
  isFullScreen: isFullScreen !== null && isFullScreen !== void 0 ? isFullScreen : false
238
240
  };
239
- }, [defaultTestId, titleId, onCloseHandler, providedOnClose, isFullScreen]);
241
+ }, [defaultTestId, titleId, onCloseHandler, hasProvidedOnClose, isFullScreen]);
240
242
 
241
243
  // Dialog has already applied the close behavior configured by `dismissedBy`.
242
244
  // Pass a synthetic event to satisfy the KeyboardOrMouseEvent contract.
@@ -13,6 +13,7 @@ var _curves = require("@atlaskit/motion/curves");
13
13
  var _durations = require("@atlaskit/motion/utils/durations");
14
14
  var _constants = require("@atlaskit/theme/constants");
15
15
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-atlaskit-theme
16
17
  // Flex and min-content are set to constrain the height of the body and support multi-column scrolling experiences
17
18
  var positionerStyles = null;
18
19
  var stackStyles = {
@@ -45,30 +45,4 @@ export const FullScreenModalDialog = /*#__PURE__*/forwardRef((props, ref) => {
45
45
  ref: ref
46
46
  }));
47
47
  });
48
- FullScreenModalDialog.displayName = 'FullScreenModalDialog';
49
-
50
- /**
51
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
52
- * Retained only while consumers migrate off this re-export.
53
- */
54
- export { default as ModalTransition } from './modal-transition';
55
- /**
56
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
57
- * Retained only while consumers migrate off this re-export.
58
- */
59
- export { default as ModalHeader } from './modal-header';
60
- /**
61
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
62
- * Retained only while consumers migrate off this re-export.
63
- */
64
- export { default as ModalTitle } from './modal-title';
65
- /**
66
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
67
- * Retained only while consumers migrate off this re-export.
68
- */
69
- export { default as ModalBody } from './modal-body';
70
- /**
71
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
72
- * Retained only while consumers migrate off this re-export.
73
- */
74
- export { default as ModalFooter } from './modal-footer';
48
+ FullScreenModalDialog.displayName = 'FullScreenModalDialog';
@@ -20,6 +20,7 @@ import FadeIn from '@atlaskit/motion/fade-in';
20
20
  import { fg } from '@atlaskit/platform-feature-flags/fg';
21
21
  import Portal from '@atlaskit/portal/portal';
22
22
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-atlaskit-theme
23
24
  import { layers } from '@atlaskit/theme/constants';
24
25
  import { createCloseEvent } from '@atlaskit/top-layer/create-close-event';
25
26
  import { Dialog } from '@atlaskit/top-layer/dialog-content';
@@ -83,7 +84,7 @@ function useModalCloseHandler(providedOnClose) {
83
84
  action: 'closed',
84
85
  componentName: 'modalDialog',
85
86
  packageName: "@atlaskit/modal-dialog",
86
- packageVersion: "16.6.6"
87
+ packageVersion: "17.0.0"
87
88
  });
88
89
  }
89
90
  function getScrollMode({
@@ -216,13 +217,14 @@ function ModalWrapperTopLayer(props) {
216
217
 
217
218
  // Native <dialog> ref - needed for ExitingPersistence to call dialog.close().
218
219
  const dialogRef = useRef(null);
220
+ const hasProvidedOnClose = Boolean(providedOnClose);
219
221
  const modalDialogContext = useMemo(() => ({
220
222
  testId: defaultTestId,
221
223
  titleId,
222
224
  onClose: onCloseHandler,
223
- hasProvidedOnClose: Boolean(providedOnClose),
225
+ hasProvidedOnClose,
224
226
  isFullScreen: isFullScreen !== null && isFullScreen !== void 0 ? isFullScreen : false
225
- }), [defaultTestId, titleId, onCloseHandler, providedOnClose, isFullScreen]);
227
+ }), [defaultTestId, titleId, onCloseHandler, hasProvidedOnClose, isFullScreen]);
226
228
 
227
229
  // Dialog has already applied the close behavior configured by `dismissedBy`.
228
230
  // Pass a synthetic event to satisfy the KeyboardOrMouseEvent contract.
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { easeInOut } from '@atlaskit/motion/curves';
6
6
  import { durations } from '@atlaskit/motion/utils/durations';
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-atlaskit-theme
7
8
  import { layers } from '@atlaskit/theme/constants';
8
9
  // Flex and min-content are set to constrain the height of the body and support multi-column scrolling experiences
9
10
  const positionerStyles = null;
@@ -45,30 +45,4 @@ export var FullScreenModalDialog = /*#__PURE__*/forwardRef(function (props, ref)
45
45
  ref: ref
46
46
  }));
47
47
  });
48
- FullScreenModalDialog.displayName = 'FullScreenModalDialog';
49
-
50
- /**
51
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
52
- * Retained only while consumers migrate off this re-export.
53
- */
54
- export { default as ModalTransition } from './modal-transition';
55
- /**
56
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
57
- * Retained only while consumers migrate off this re-export.
58
- */
59
- export { default as ModalHeader } from './modal-header';
60
- /**
61
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
62
- * Retained only while consumers migrate off this re-export.
63
- */
64
- export { default as ModalTitle } from './modal-title';
65
- /**
66
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
67
- * Retained only while consumers migrate off this re-export.
68
- */
69
- export { default as ModalBody } from './modal-body';
70
- /**
71
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
72
- * Retained only while consumers migrate off this re-export.
73
- */
74
- export { default as ModalFooter } from './modal-footer';
48
+ FullScreenModalDialog.displayName = 'FullScreenModalDialog';
@@ -21,6 +21,7 @@ import FadeIn from '@atlaskit/motion/fade-in';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Portal from '@atlaskit/portal/portal';
23
23
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-atlaskit-theme
24
25
  import { layers } from '@atlaskit/theme/constants';
25
26
  import { createCloseEvent } from '@atlaskit/top-layer/create-close-event';
26
27
  import { Dialog } from '@atlaskit/top-layer/dialog-content';
@@ -84,7 +85,7 @@ function useModalCloseHandler(providedOnClose) {
84
85
  action: 'closed',
85
86
  componentName: 'modalDialog',
86
87
  packageName: "@atlaskit/modal-dialog",
87
- packageVersion: "16.6.6"
88
+ packageVersion: "17.0.0"
88
89
  });
89
90
  }
90
91
  function getScrollMode(_ref) {
@@ -219,15 +220,16 @@ function ModalWrapperTopLayer(props) {
219
220
 
220
221
  // Native <dialog> ref - needed for ExitingPersistence to call dialog.close().
221
222
  var dialogRef = useRef(null);
223
+ var hasProvidedOnClose = Boolean(providedOnClose);
222
224
  var modalDialogContext = useMemo(function () {
223
225
  return {
224
226
  testId: defaultTestId,
225
227
  titleId: titleId,
226
228
  onClose: onCloseHandler,
227
- hasProvidedOnClose: Boolean(providedOnClose),
229
+ hasProvidedOnClose: hasProvidedOnClose,
228
230
  isFullScreen: isFullScreen !== null && isFullScreen !== void 0 ? isFullScreen : false
229
231
  };
230
- }, [defaultTestId, titleId, onCloseHandler, providedOnClose, isFullScreen]);
232
+ }, [defaultTestId, titleId, onCloseHandler, hasProvidedOnClose, isFullScreen]);
231
233
 
232
234
  // Dialog has already applied the close behavior configured by `dismissedBy`.
233
235
  // Pass a synthetic event to satisfy the KeyboardOrMouseEvent contract.
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { easeInOut } from '@atlaskit/motion/curves';
6
6
  import { durations } from '@atlaskit/motion/utils/durations';
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-atlaskit-theme
7
8
  import { layers } from '@atlaskit/theme/constants';
8
9
  // Flex and min-content are set to constrain the height of the body and support multi-column scrolling experiences
9
10
  var positionerStyles = null;
@@ -3,28 +3,3 @@ import type { ModalDialogProps } from './types';
3
3
  export interface FullScreenModalDialogProps extends Omit<ModalDialogProps, 'width' | 'height' | 'shouldScrollInViewport' | 'shouldCloseOnOverlayClick' | 'isBlanketHidden'> {
4
4
  }
5
5
  export declare const FullScreenModalDialog: React.ForwardRefExoticComponent<React.PropsWithoutRef<FullScreenModalDialogProps> & React.RefAttributes<HTMLElement>>;
6
- /**
7
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
8
- * Retained only while consumers migrate off this re-export.
9
- */
10
- export { default as ModalTransition } from './modal-transition';
11
- /**
12
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
13
- * Retained only while consumers migrate off this re-export.
14
- */
15
- export { default as ModalHeader } from './modal-header';
16
- /**
17
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
18
- * Retained only while consumers migrate off this re-export.
19
- */
20
- export { default as ModalTitle } from './modal-title';
21
- /**
22
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
23
- * Retained only while consumers migrate off this re-export.
24
- */
25
- export { default as ModalBody } from './modal-body';
26
- /**
27
- * @deprecated Volt migration shim. Import from the explicit subpath instead.
28
- * Retained only while consumers migrate off this re-export.
29
- */
30
- export { default as ModalFooter } from './modal-footer';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "16.6.7",
3
+ "version": "17.0.1",
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/"
@@ -42,17 +42,17 @@
42
42
  "@atlaskit/button": "^25.4.0",
43
43
  "@atlaskit/css": "^1.1.0",
44
44
  "@atlaskit/ds-lib": "^8.0.0",
45
- "@atlaskit/icon": "^37.7.0",
46
- "@atlaskit/layering": "^5.2.0",
47
- "@atlaskit/motion": "^8.8.0",
45
+ "@atlaskit/icon": "^38.0.0",
46
+ "@atlaskit/layering": "^6.0.0",
47
+ "@atlaskit/motion": "^9.1.0",
48
48
  "@atlaskit/platform-feature-flags": "^2.2.0",
49
49
  "@atlaskit/portal": "^7.0.0",
50
- "@atlaskit/pragmatic-drag-and-drop": "^3.1.0",
50
+ "@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
51
51
  "@atlaskit/primitives": "^22.5.0",
52
52
  "@atlaskit/react-compiler-gating": "^0.2.0",
53
53
  "@atlaskit/theme": "^28.2.0",
54
- "@atlaskit/tokens": "^19.0.0",
55
- "@atlaskit/top-layer": "^5.1.0",
54
+ "@atlaskit/tokens": "^20.1.0",
55
+ "@atlaskit/top-layer": "^6.1.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@compiled/react": "^1.0.2",
58
58
  "bind-event-listener": "^3.0.0",
@@ -67,26 +67,26 @@
67
67
  "@af/accessibility-testing": "workspace:^",
68
68
  "@af/integration-testing": "workspace:^",
69
69
  "@af/visual-regression": "workspace:^",
70
- "@atlaskit/avatar": "^28.0.0",
71
- "@atlaskit/avatar-group": "^14.3.0",
70
+ "@atlaskit/avatar": "^30.0.0",
71
+ "@atlaskit/avatar-group": "^14.4.0",
72
72
  "@atlaskit/banner": "^15.3.0",
73
- "@atlaskit/breadcrumbs": "^17.7.0",
73
+ "@atlaskit/breadcrumbs": "^17.8.0",
74
74
  "@atlaskit/checkbox": "^19.2.0",
75
- "@atlaskit/code": "^19.2.0",
76
- "@atlaskit/datetime-picker": "^18.7.0",
77
- "@atlaskit/docs": "^12.2.0",
78
- "@atlaskit/dropdown-menu": "^18.3.0",
79
- "@atlaskit/flag": "^18.5.0",
80
- "@atlaskit/form": "^17.2.0",
81
- "@atlaskit/heading": "^7.2.0",
75
+ "@atlaskit/code": "^20.0.0",
76
+ "@atlaskit/datetime-picker": "^19.0.0",
77
+ "@atlaskit/docs": "^12.3.0",
78
+ "@atlaskit/dropdown-menu": "^21.0.0",
79
+ "@atlaskit/flag": "^19.0.0",
80
+ "@atlaskit/form": "^18.0.0",
81
+ "@atlaskit/heading": "^8.0.0",
82
82
  "@atlaskit/link": "^5.1.0",
83
- "@atlaskit/popup": "^6.3.0",
83
+ "@atlaskit/popup": "^9.0.0",
84
84
  "@atlaskit/radio": "^10.2.0",
85
85
  "@atlaskit/section-message": "^10.2.0",
86
- "@atlaskit/select": "^22.11.0",
86
+ "@atlaskit/select": "^23.1.0",
87
87
  "@atlaskit/spotlight": "^4.2.0",
88
88
  "@atlaskit/textfield": "^10.2.0",
89
- "@atlaskit/tooltip": "^24.3.0",
89
+ "@atlaskit/tooltip": "^24.4.0",
90
90
  "@atlassian/feature-flags-test-utils": "^1.3.0",
91
91
  "@atlassian/ssr-tests": "workspace:^",
92
92
  "@atlassian/structured-docs-types": "workspace:^",