@atlaskit/modal-dialog 16.6.1 → 16.6.3
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 +16 -0
- package/context/package.json +10 -0
- package/dist/cjs/internal/components/modal-dialog.js +1 -1
- package/dist/cjs/internal/components/modal-wrapper.js +5 -7
- package/dist/cjs/internal/components/positioner.js +1 -1
- package/dist/cjs/internal/components/scroll-container.js +1 -1
- package/dist/cjs/modal-body.js +1 -1
- package/dist/cjs/modal-footer.js +1 -1
- package/dist/cjs/modal-header.js +1 -1
- package/dist/cjs/modal-title.js +1 -1
- package/dist/es2019/internal/components/modal-dialog.js +1 -1
- package/dist/es2019/internal/components/modal-wrapper.js +5 -7
- package/dist/es2019/internal/components/positioner.js +1 -1
- package/dist/es2019/internal/components/scroll-container.js +1 -1
- package/dist/es2019/modal-body.js +1 -1
- package/dist/es2019/modal-footer.js +1 -1
- package/dist/es2019/modal-header.js +1 -1
- package/dist/es2019/modal-title.js +1 -1
- package/dist/esm/internal/components/modal-dialog.js +1 -1
- package/dist/esm/internal/components/modal-wrapper.js +5 -7
- package/dist/esm/internal/components/positioner.js +1 -1
- package/dist/esm/internal/components/scroll-container.js +1 -1
- package/dist/esm/modal-body.js +1 -1
- package/dist/esm/modal-footer.js +1 -1
- package/dist/esm/modal-header.js +1 -1
- package/dist/esm/modal-title.js +1 -1
- package/dist/types/index.d.ts +6 -5
- package/dist/types/modal-dialog.d.ts +1 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 16.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 16.6.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`610d564dbc5dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/610d564dbc5dd) -
|
|
14
|
+
Behind `platform-dst-top-layer`, harden the Popover and Dialog animation lifecycle state machine
|
|
15
|
+
and completion callbacks, restore focus before controlled Popover closure removes native
|
|
16
|
+
listeners, and preserve Modal Dialog open-complete callbacks across reopen cycles.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 16.6.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/modal-dialog/context",
|
|
3
|
+
"main": "../dist/cjs/internal/context.js",
|
|
4
|
+
"module": "../dist/esm/internal/context.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/internal/context.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/internal/context.d.ts"
|
|
10
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* modal-wrapper.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* modal-wrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -93,7 +93,7 @@ function useModalCloseHandler(providedOnClose) {
|
|
|
93
93
|
action: 'closed',
|
|
94
94
|
componentName: 'modalDialog',
|
|
95
95
|
packageName: "@atlaskit/modal-dialog",
|
|
96
|
-
packageVersion: "16.6.
|
|
96
|
+
packageVersion: "16.6.2"
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
function getScrollMode(_ref) {
|
|
@@ -282,14 +282,11 @@ function ModalWrapperTopLayer(props) {
|
|
|
282
282
|
lastContentElRef.current = null;
|
|
283
283
|
onExitFinish === null || onExitFinish === void 0 || onExitFinish();
|
|
284
284
|
}, [onExitFinish, onCloseComplete]);
|
|
285
|
-
|
|
286
|
-
// Fire onOpenComplete after mount.
|
|
287
|
-
(0, _react.useEffect)(function () {
|
|
285
|
+
var handleDialogEnterFinish = (0, _react.useCallback)(function () {
|
|
288
286
|
if (onOpenComplete && contentRef.current) {
|
|
289
287
|
onOpenComplete(contentRef.current, true);
|
|
290
288
|
}
|
|
291
|
-
|
|
292
|
-
}, []);
|
|
289
|
+
}, [onOpenComplete]);
|
|
293
290
|
|
|
294
291
|
// Honor `shouldReturnFocus={ref}` on unmount.
|
|
295
292
|
// Native <dialog>.close() restores focus to the trigger that opened it,
|
|
@@ -326,6 +323,7 @@ function ModalWrapperTopLayer(props) {
|
|
|
326
323
|
onExitFinish: handleDialogExitFinish,
|
|
327
324
|
shouldAnimate: !isFullScreen,
|
|
328
325
|
isOpen: !isExiting,
|
|
326
|
+
onEnterFinish: handleDialogEnterFinish,
|
|
329
327
|
shouldHideBackdrop: isBlanketHidden
|
|
330
328
|
// Dialog requires at least one of `label` or `labelledBy` (string, not undefined).
|
|
331
329
|
// Prefer the consumer-provided `label`; otherwise reference the internal `titleId`.
|
package/dist/cjs/modal-body.js
CHANGED
package/dist/cjs/modal-footer.js
CHANGED
package/dist/cjs/modal-header.js
CHANGED
package/dist/cjs/modal-title.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* modal-wrapper.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* modal-wrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./modal-wrapper.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -83,7 +83,7 @@ function useModalCloseHandler(providedOnClose) {
|
|
|
83
83
|
action: 'closed',
|
|
84
84
|
componentName: 'modalDialog',
|
|
85
85
|
packageName: "@atlaskit/modal-dialog",
|
|
86
|
-
packageVersion: "16.6.
|
|
86
|
+
packageVersion: "16.6.2"
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
function getScrollMode({
|
|
@@ -269,14 +269,11 @@ function ModalWrapperTopLayer(props) {
|
|
|
269
269
|
lastContentElRef.current = null;
|
|
270
270
|
onExitFinish === null || onExitFinish === void 0 ? void 0 : onExitFinish();
|
|
271
271
|
}, [onExitFinish, onCloseComplete]);
|
|
272
|
-
|
|
273
|
-
// Fire onOpenComplete after mount.
|
|
274
|
-
useEffect(() => {
|
|
272
|
+
const handleDialogEnterFinish = useCallback(() => {
|
|
275
273
|
if (onOpenComplete && contentRef.current) {
|
|
276
274
|
onOpenComplete(contentRef.current, true);
|
|
277
275
|
}
|
|
278
|
-
|
|
279
|
-
}, []);
|
|
276
|
+
}, [onOpenComplete]);
|
|
280
277
|
|
|
281
278
|
// Honor `shouldReturnFocus={ref}` on unmount.
|
|
282
279
|
// Native <dialog>.close() restores focus to the trigger that opened it,
|
|
@@ -313,6 +310,7 @@ function ModalWrapperTopLayer(props) {
|
|
|
313
310
|
onExitFinish: handleDialogExitFinish,
|
|
314
311
|
shouldAnimate: !isFullScreen,
|
|
315
312
|
isOpen: !isExiting,
|
|
313
|
+
onEnterFinish: handleDialogEnterFinish,
|
|
316
314
|
shouldHideBackdrop: isBlanketHidden
|
|
317
315
|
// Dialog requires at least one of `label` or `labelledBy` (string, not undefined).
|
|
318
316
|
// Prefer the consumer-provided `label`; otherwise reference the internal `titleId`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* scroll-container.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* scroll-container.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import "./scroll-container.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* modal-dialog.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* modal-dialog.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* modal-wrapper.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* modal-wrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
4
4
|
import "./modal-wrapper.compiled.css";
|
|
@@ -84,7 +84,7 @@ function useModalCloseHandler(providedOnClose) {
|
|
|
84
84
|
action: 'closed',
|
|
85
85
|
componentName: 'modalDialog',
|
|
86
86
|
packageName: "@atlaskit/modal-dialog",
|
|
87
|
-
packageVersion: "16.6.
|
|
87
|
+
packageVersion: "16.6.2"
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
function getScrollMode(_ref) {
|
|
@@ -273,14 +273,11 @@ function ModalWrapperTopLayer(props) {
|
|
|
273
273
|
lastContentElRef.current = null;
|
|
274
274
|
onExitFinish === null || onExitFinish === void 0 || onExitFinish();
|
|
275
275
|
}, [onExitFinish, onCloseComplete]);
|
|
276
|
-
|
|
277
|
-
// Fire onOpenComplete after mount.
|
|
278
|
-
useEffect(function () {
|
|
276
|
+
var handleDialogEnterFinish = useCallback(function () {
|
|
279
277
|
if (onOpenComplete && contentRef.current) {
|
|
280
278
|
onOpenComplete(contentRef.current, true);
|
|
281
279
|
}
|
|
282
|
-
|
|
283
|
-
}, []);
|
|
280
|
+
}, [onOpenComplete]);
|
|
284
281
|
|
|
285
282
|
// Honor `shouldReturnFocus={ref}` on unmount.
|
|
286
283
|
// Native <dialog>.close() restores focus to the trigger that opened it,
|
|
@@ -317,6 +314,7 @@ function ModalWrapperTopLayer(props) {
|
|
|
317
314
|
onExitFinish: handleDialogExitFinish,
|
|
318
315
|
shouldAnimate: !isFullScreen,
|
|
319
316
|
isOpen: !isExiting,
|
|
317
|
+
onEnterFinish: handleDialogEnterFinish,
|
|
320
318
|
shouldHideBackdrop: isBlanketHidden
|
|
321
319
|
// Dialog requires at least one of `label` or `labelledBy` (string, not undefined).
|
|
322
320
|
// Prefer the consumer-provided `label`; otherwise reference the internal `titleId`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* scroll-container.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* scroll-container.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import "./scroll-container.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
package/dist/esm/modal-body.js
CHANGED
package/dist/esm/modal-footer.js
CHANGED
package/dist/esm/modal-header.js
CHANGED
package/dist/esm/modal-title.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { default } from './modal-dialog';
|
|
2
2
|
export { default as ModalTransition } from './modal-transition';
|
|
3
|
-
export type { KeyboardOrMouseEvent, Appearance,
|
|
4
|
-
export {
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
3
|
+
export type { KeyboardOrMouseEvent, Appearance, ModalDialogProps, OnCloseHandler, OnCloseCompleteHandler, OnOpenCompleteHandler, OnStackChangeHandler, } from './types';
|
|
4
|
+
export type { ModalAttributes } from './internal/context';
|
|
5
|
+
export { default as ModalHeader, type ModalHeaderProps } from './modal-header';
|
|
6
|
+
export { default as ModalTitle, type ModalTitleProps } from './modal-title';
|
|
7
|
+
export { default as ModalBody, type ModalBodyProps } from './modal-body';
|
|
8
|
+
export { default as ModalFooter, type ModalFooterProps } from './modal-footer';
|
|
8
9
|
export { CloseButton } from './close-button';
|
|
9
10
|
export { useModal } from './hooks';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "16.6.
|
|
3
|
+
"version": "16.6.3",
|
|
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/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/button": "^25.3.0",
|
|
40
40
|
"@atlaskit/css": "^1.1.0",
|
|
41
41
|
"@atlaskit/ds-lib": "^8.0.0",
|
|
42
|
-
"@atlaskit/icon": "^37.
|
|
42
|
+
"@atlaskit/icon": "^37.7.0",
|
|
43
43
|
"@atlaskit/layering": "^5.2.0",
|
|
44
44
|
"@atlaskit/motion": "^8.6.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@atlaskit/primitives": "^22.5.0",
|
|
49
49
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
50
50
|
"@atlaskit/theme": "^28.2.0",
|
|
51
|
-
"@atlaskit/tokens": "^16.
|
|
52
|
-
"@atlaskit/top-layer": "^
|
|
51
|
+
"@atlaskit/tokens": "^16.12.0",
|
|
52
|
+
"@atlaskit/top-layer": "^5.0.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@compiled/react": "^1.0.2",
|
|
55
55
|
"bind-event-listener": "^3.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/breadcrumbs": "^17.7.0",
|
|
71
71
|
"@atlaskit/checkbox": "^19.2.0",
|
|
72
72
|
"@atlaskit/code": "^19.2.0",
|
|
73
|
-
"@atlaskit/datetime-picker": "^18.
|
|
73
|
+
"@atlaskit/datetime-picker": "^18.7.0",
|
|
74
74
|
"@atlaskit/docs": "^12.2.0",
|
|
75
75
|
"@atlaskit/dropdown-menu": "^18.3.0",
|
|
76
76
|
"@atlaskit/flag": "^18.5.0",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"@atlassian/ssr-tests": "workspace:^",
|
|
89
89
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
90
90
|
"@atlassian/testing-library": "^0.11.0",
|
|
91
|
+
"@atlassian/workbench": "workspace:*",
|
|
91
92
|
"@testing-library/dom": "^10.1.0",
|
|
92
93
|
"@types/raf-schd": "^4.0.1",
|
|
93
94
|
"jscodeshift": "^17.0.0",
|