@atlaskit/modal-dialog 12.15.5 → 12.15.6

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,13 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 12.15.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#138585](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138585)
8
+ [`b72c2c7f9a2fd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b72c2c7f9a2fd) -
9
+ Support to close all layers when clicking outside under feature flag
10
+
3
11
  ## 12.15.5
4
12
 
5
13
  ### Patch Changes
@@ -109,6 +109,8 @@ var ModalDialog = function ModalDialog(props) {
109
109
  onClose: onClose,
110
110
  isDisabled: !shouldCloseOnEscapePress
111
111
  });
112
+ var _UNSAFE_useLayering = (0, _layering.UNSAFE_useLayering)(),
113
+ currentLevel = _UNSAFE_useLayering.currentLevel;
112
114
  return (0, _react2.jsx)(_positioner.default, {
113
115
  stackIndex: stackIndex,
114
116
  shouldScrollInViewport: shouldScrollInViewport,
@@ -139,7 +141,8 @@ var ModalDialog = function ModalDialog(props) {
139
141
  "data-testid": testId,
140
142
  "data-modal-stack": stackIndex,
141
143
  tabIndex: -1,
142
- "aria-modal": true
144
+ "aria-modal": true,
145
+ "data-ds--level": currentLevel
143
146
  }), children));
144
147
  }))));
145
148
  };
@@ -102,7 +102,7 @@ var ModalWrapper = function ModalWrapper(props) {
102
102
  action: 'closed',
103
103
  componentName: 'modalDialog',
104
104
  packageName: "@atlaskit/modal-dialog",
105
- packageVersion: "12.15.5"
105
+ packageVersion: "12.15.6"
106
106
  });
107
107
  var onBlanketClicked = (0, _react.useCallback)(function (e) {
108
108
  if (shouldCloseOnOverlayClick) {
@@ -9,7 +9,7 @@ import mergeRefs from '@atlaskit/ds-lib/merge-refs';
9
9
  import { useId } from '@atlaskit/ds-lib/react-uid';
10
10
  import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
11
11
  import FocusRing from '@atlaskit/focus-ring';
12
- import { useCloseOnEscapePress } from '@atlaskit/layering';
12
+ import { UNSAFE_useLayering, useCloseOnEscapePress } from '@atlaskit/layering';
13
13
  import FadeIn from '@atlaskit/motion/fade-in';
14
14
  import { media } from '@atlaskit/primitives';
15
15
  import { N0, N30A, N60A } from '@atlaskit/theme/colors';
@@ -105,6 +105,9 @@ const ModalDialog = props => {
105
105
  onClose,
106
106
  isDisabled: !shouldCloseOnEscapePress
107
107
  });
108
+ const {
109
+ currentLevel
110
+ } = UNSAFE_useLayering();
108
111
  return jsx(Positioner, {
109
112
  stackIndex: stackIndex,
110
113
  shouldScrollInViewport: shouldScrollInViewport,
@@ -134,7 +137,8 @@ const ModalDialog = props => {
134
137
  "data-testid": testId,
135
138
  "data-modal-stack": stackIndex,
136
139
  tabIndex: -1,
137
- "aria-modal": true
140
+ "aria-modal": true,
141
+ "data-ds--level": currentLevel
138
142
  }), children))))));
139
143
  };
140
144
 
@@ -87,7 +87,7 @@ const ModalWrapper = props => {
87
87
  action: 'closed',
88
88
  componentName: 'modalDialog',
89
89
  packageName: "@atlaskit/modal-dialog",
90
- packageVersion: "12.15.5"
90
+ packageVersion: "12.15.6"
91
91
  });
92
92
  const onBlanketClicked = useCallback(e => {
93
93
  if (shouldCloseOnOverlayClick) {
@@ -13,7 +13,7 @@ import mergeRefs from '@atlaskit/ds-lib/merge-refs';
13
13
  import { useId } from '@atlaskit/ds-lib/react-uid';
14
14
  import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
15
15
  import FocusRing from '@atlaskit/focus-ring';
16
- import { useCloseOnEscapePress } from '@atlaskit/layering';
16
+ import { UNSAFE_useLayering, useCloseOnEscapePress } from '@atlaskit/layering';
17
17
  import FadeIn from '@atlaskit/motion/fade-in';
18
18
  import { media } from '@atlaskit/primitives';
19
19
  import { N0, N30A, N60A } from '@atlaskit/theme/colors';
@@ -102,6 +102,8 @@ var ModalDialog = function ModalDialog(props) {
102
102
  onClose: onClose,
103
103
  isDisabled: !shouldCloseOnEscapePress
104
104
  });
105
+ var _UNSAFE_useLayering = UNSAFE_useLayering(),
106
+ currentLevel = _UNSAFE_useLayering.currentLevel;
105
107
  return jsx(Positioner, {
106
108
  stackIndex: stackIndex,
107
109
  shouldScrollInViewport: shouldScrollInViewport,
@@ -132,7 +134,8 @@ var ModalDialog = function ModalDialog(props) {
132
134
  "data-testid": testId,
133
135
  "data-modal-stack": stackIndex,
134
136
  tabIndex: -1,
135
- "aria-modal": true
137
+ "aria-modal": true,
138
+ "data-ds--level": currentLevel
136
139
  }), children));
137
140
  }))));
138
141
  };
@@ -92,7 +92,7 @@ var ModalWrapper = function ModalWrapper(props) {
92
92
  action: 'closed',
93
93
  componentName: 'modalDialog',
94
94
  packageName: "@atlaskit/modal-dialog",
95
- packageVersion: "12.15.5"
95
+ packageVersion: "12.15.6"
96
96
  });
97
97
  var onBlanketClicked = useCallback(function (e) {
98
98
  if (shouldCloseOnOverlayClick) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "12.15.5",
3
+ "version": "12.15.6",
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/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/codemod-utils": "^4.2.0",
32
32
  "@atlaskit/ds-lib": "^2.5.0",
33
33
  "@atlaskit/focus-ring": "^1.6.0",
34
- "@atlaskit/icon": "^22.15.0",
34
+ "@atlaskit/icon": "^22.16.0",
35
35
  "@atlaskit/layering": "^0.4.0",
36
36
  "@atlaskit/motion": "^1.9.0",
37
37
  "@atlaskit/platform-feature-flags": "^0.3.0",
@@ -55,9 +55,9 @@
55
55
  "@af/integration-testing": "*",
56
56
  "@af/visual-regression": "*",
57
57
  "@atlaskit/button": "*",
58
- "@atlaskit/checkbox": "^13.7.0",
58
+ "@atlaskit/checkbox": "^14.0.0",
59
59
  "@atlaskit/dropdown-menu": "^12.18.0",
60
- "@atlaskit/popup": "^1.24.0",
60
+ "@atlaskit/popup": "^1.25.0",
61
61
  "@atlaskit/radio": "^6.5.0",
62
62
  "@atlaskit/select": "^17.15.0",
63
63
  "@atlaskit/ssr": "*",
@@ -126,6 +126,10 @@
126
126
  "platform-feature-flags": {
127
127
  "platform_dst_modal-dialog-bump-focus-lock": {
128
128
  "type": "boolean"
129
+ },
130
+ "design-system-closed-all-when-click-outside": {
131
+ "type": "boolean",
132
+ "referenceOnly": true
129
133
  }
130
134
  },
131
135
  "homepage": "https://atlassian.design/components/modal-dialog/"