@atlaskit/modal-dialog 14.5.3 → 14.6.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,17 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 14.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8a71ce992f8c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8a71ce992f8c8) -
|
|
8
|
+
Modal dialog now registers with the open layer observer using the `useNotifyLayerObserver` hook.
|
|
9
|
+
This is behind the `platform-dst-open-layer-observer-layer-type` feature flag.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 14.5.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -18,7 +18,9 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
18
18
|
var _blanket = _interopRequireDefault(require("@atlaskit/blanket"));
|
|
19
19
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
20
20
|
var _layering = require("@atlaskit/layering");
|
|
21
|
+
var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
|
|
21
22
|
var _fadeIn = _interopRequireDefault(require("@atlaskit/motion/fade-in"));
|
|
23
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
24
|
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
23
25
|
var _constants = require("@atlaskit/theme/constants");
|
|
24
26
|
var _useModalStack = _interopRequireDefault(require("../hooks/use-modal-stack"));
|
|
@@ -87,7 +89,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
87
89
|
action: 'closed',
|
|
88
90
|
componentName: 'modalDialog',
|
|
89
91
|
packageName: "@atlaskit/modal-dialog",
|
|
90
|
-
packageVersion: "
|
|
92
|
+
packageVersion: "0.0.0-development"
|
|
91
93
|
});
|
|
92
94
|
var onBlanketClicked = (0, _react.useCallback)(function (e) {
|
|
93
95
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -100,6 +102,15 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
100
102
|
return allowlistElements(element, focusLockAllowlist);
|
|
101
103
|
}, [focusLockAllowlist]);
|
|
102
104
|
(0, _usePreventProgrammaticScroll.default)();
|
|
105
|
+
(0, _openLayerObserver.useNotifyOpenLayerObserver)({
|
|
106
|
+
type: 'modal',
|
|
107
|
+
// Modal dialog is conditionally rendered when visible, so when this runs it is always open.
|
|
108
|
+
isOpen: (0, _platformFeatureFlags.fg)('platform-dst-open-layer-observer-layer-type'),
|
|
109
|
+
// Passing a no-op for now, as there isn't a real use case for closing the modal dialog programmatically
|
|
110
|
+
// by the OpenLayerObserver. The only current use case is closing layers when resizing the nav layout,
|
|
111
|
+
// which cannot happen while a modal dialog is open.
|
|
112
|
+
onClose: _noop.default
|
|
113
|
+
});
|
|
103
114
|
var modalDialogWithBlanket = /*#__PURE__*/React.createElement(_blanket.default, {
|
|
104
115
|
isTinted: !isBlanketHidden,
|
|
105
116
|
onBlanketClicked: onBlanketClicked,
|
|
@@ -10,7 +10,9 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
|
10
10
|
import Blanket from '@atlaskit/blanket';
|
|
11
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
12
12
|
import { Layering } from '@atlaskit/layering';
|
|
13
|
+
import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
13
14
|
import FadeIn from '@atlaskit/motion/fade-in';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
16
|
import Portal from '@atlaskit/portal';
|
|
15
17
|
import { layers } from '@atlaskit/theme/constants';
|
|
16
18
|
import useModalStack from '../hooks/use-modal-stack';
|
|
@@ -74,7 +76,7 @@ const InternalModalWrapper = props => {
|
|
|
74
76
|
action: 'closed',
|
|
75
77
|
componentName: 'modalDialog',
|
|
76
78
|
packageName: "@atlaskit/modal-dialog",
|
|
77
|
-
packageVersion: "
|
|
79
|
+
packageVersion: "0.0.0-development"
|
|
78
80
|
});
|
|
79
81
|
const onBlanketClicked = useCallback(e => {
|
|
80
82
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -85,6 +87,15 @@ const InternalModalWrapper = props => {
|
|
|
85
87
|
// This ensures to prevent additional re-renders while nothing is passed to focusLockAllowlist explicitly.
|
|
86
88
|
const allowListCallback = useCallback(element => allowlistElements(element, focusLockAllowlist), [focusLockAllowlist]);
|
|
87
89
|
usePreventProgrammaticScroll();
|
|
90
|
+
useNotifyOpenLayerObserver({
|
|
91
|
+
type: 'modal',
|
|
92
|
+
// Modal dialog is conditionally rendered when visible, so when this runs it is always open.
|
|
93
|
+
isOpen: fg('platform-dst-open-layer-observer-layer-type'),
|
|
94
|
+
// Passing a no-op for now, as there isn't a real use case for closing the modal dialog programmatically
|
|
95
|
+
// by the OpenLayerObserver. The only current use case is closing layers when resizing the nav layout,
|
|
96
|
+
// which cannot happen while a modal dialog is open.
|
|
97
|
+
onClose: noop
|
|
98
|
+
});
|
|
88
99
|
const modalDialogWithBlanket = /*#__PURE__*/React.createElement(Blanket, {
|
|
89
100
|
isTinted: !isBlanketHidden,
|
|
90
101
|
onBlanketClicked: onBlanketClicked,
|
|
@@ -10,7 +10,9 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
|
10
10
|
import Blanket from '@atlaskit/blanket';
|
|
11
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
12
12
|
import { Layering } from '@atlaskit/layering';
|
|
13
|
+
import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
13
14
|
import FadeIn from '@atlaskit/motion/fade-in';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
16
|
import Portal from '@atlaskit/portal';
|
|
15
17
|
import { layers } from '@atlaskit/theme/constants';
|
|
16
18
|
import useModalStack from '../hooks/use-modal-stack';
|
|
@@ -78,7 +80,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
78
80
|
action: 'closed',
|
|
79
81
|
componentName: 'modalDialog',
|
|
80
82
|
packageName: "@atlaskit/modal-dialog",
|
|
81
|
-
packageVersion: "
|
|
83
|
+
packageVersion: "0.0.0-development"
|
|
82
84
|
});
|
|
83
85
|
var onBlanketClicked = useCallback(function (e) {
|
|
84
86
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -91,6 +93,15 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
91
93
|
return allowlistElements(element, focusLockAllowlist);
|
|
92
94
|
}, [focusLockAllowlist]);
|
|
93
95
|
usePreventProgrammaticScroll();
|
|
96
|
+
useNotifyOpenLayerObserver({
|
|
97
|
+
type: 'modal',
|
|
98
|
+
// Modal dialog is conditionally rendered when visible, so when this runs it is always open.
|
|
99
|
+
isOpen: fg('platform-dst-open-layer-observer-layer-type'),
|
|
100
|
+
// Passing a no-op for now, as there isn't a real use case for closing the modal dialog programmatically
|
|
101
|
+
// by the OpenLayerObserver. The only current use case is closing layers when resizing the nav layout,
|
|
102
|
+
// which cannot happen while a modal dialog is open.
|
|
103
|
+
onClose: noop
|
|
104
|
+
});
|
|
94
105
|
var modalDialogWithBlanket = /*#__PURE__*/React.createElement(Blanket, {
|
|
95
106
|
isTinted: !isBlanketHidden,
|
|
96
107
|
onBlanketClicked: onBlanketClicked,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.6.0",
|
|
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/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/ds-lib": "^5.1.0",
|
|
35
35
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
36
36
|
"@atlaskit/icon": "^28.5.0",
|
|
37
|
-
"@atlaskit/layering": "^3.
|
|
37
|
+
"@atlaskit/layering": "^3.2.0",
|
|
38
38
|
"@atlaskit/motion": "^5.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/portal": "^5.1.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@af/accessibility-testing": "workspace:^",
|
|
57
57
|
"@af/integration-testing": "workspace:^",
|
|
58
58
|
"@af/visual-regression": "workspace:^",
|
|
59
|
-
"@atlaskit/avatar": "^25.
|
|
59
|
+
"@atlaskit/avatar": "^25.5.0",
|
|
60
60
|
"@atlaskit/avatar-group": "^12.3.0",
|
|
61
61
|
"@atlaskit/banner": "^14.0.0",
|
|
62
62
|
"@atlaskit/breadcrumbs": "^15.3.0",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"@atlaskit/select": "^21.3.0",
|
|
76
76
|
"@atlaskit/ssr": "workspace:^",
|
|
77
77
|
"@atlaskit/textfield": "^8.0.0",
|
|
78
|
-
"@atlaskit/tooltip": "^20.
|
|
79
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
78
|
+
"@atlaskit/tooltip": "^20.6.0",
|
|
79
|
+
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
80
80
|
"@atlassian/ssr-tests": "^0.3.0",
|
|
81
81
|
"@testing-library/dom": "^10.1.0",
|
|
82
82
|
"@testing-library/react": "^13.4.0",
|
|
@@ -127,6 +127,9 @@
|
|
|
127
127
|
},
|
|
128
128
|
"platform_ads_explicit_font_styles": {
|
|
129
129
|
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"platform-dst-open-layer-observer-layer-type": {
|
|
132
|
+
"type": "boolean"
|
|
130
133
|
}
|
|
131
134
|
},
|
|
132
135
|
"homepage": "https://atlassian.design/components/modal-dialog/"
|