@atlaskit/modal-dialog 14.8.0 → 14.9.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 +15 -0
- package/dist/cjs/internal/components/modal-dialog.js +4 -1
- package/dist/cjs/internal/components/modal-wrapper.js +1 -1
- package/dist/es2019/internal/components/modal-dialog.js +4 -1
- package/dist/es2019/internal/components/modal-wrapper.js +1 -1
- package/dist/esm/internal/components/modal-dialog.js +4 -1
- package/dist/esm/internal/components/modal-wrapper.js +1 -1
- package/package.json +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 14.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 14.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`5b72169f84be0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5b72169f84be0) -
|
|
14
|
+
This change makes the `autoFocus` prop always `true` behind a flag. This fixes accessibility
|
|
15
|
+
issues from misuse of the `autoFocus` prop. If successful, this will be released for all consumers
|
|
16
|
+
and the flag will be removed.
|
|
17
|
+
|
|
3
18
|
## 14.8.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -43,7 +43,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
43
43
|
_props$shouldScrollIn = props.shouldScrollInViewport,
|
|
44
44
|
shouldScrollInViewport = _props$shouldScrollIn === void 0 ? false : _props$shouldScrollIn,
|
|
45
45
|
shouldCloseOnEscapePress = props.shouldCloseOnEscapePress,
|
|
46
|
-
|
|
46
|
+
providedAutoFocus = props.autoFocus,
|
|
47
47
|
stackIndex = props.stackIndex,
|
|
48
48
|
onClose = props.onClose,
|
|
49
49
|
onCloseComplete = props.onCloseComplete,
|
|
@@ -58,6 +58,9 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
58
58
|
var id = (0, _useId.useId)();
|
|
59
59
|
var titleId = "modal-dialog-title-".concat(id);
|
|
60
60
|
var defaultTestId = testId || 'modal-dialog';
|
|
61
|
+
// https://product-fabric.atlassian.net/browse/DSP-24307
|
|
62
|
+
// If flag and falsy, use true instead.
|
|
63
|
+
var autoFocus = !providedAutoFocus && (0, _platformFeatureFlags.fg)('platform_dst_autofocus-never-false') ? true : providedAutoFocus;
|
|
61
64
|
(0, _react.useEffect)(function () {
|
|
62
65
|
// Modal dialogs can appear on top of iframe elements that are on another domain.
|
|
63
66
|
// There is a Chrome bug where drag and drop in an element on top of a cross domain
|
|
@@ -88,7 +88,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
88
88
|
action: 'closed',
|
|
89
89
|
componentName: 'modalDialog',
|
|
90
90
|
packageName: "@atlaskit/modal-dialog",
|
|
91
|
-
packageVersion: "
|
|
91
|
+
packageVersion: "14.9.0"
|
|
92
92
|
});
|
|
93
93
|
var onBlanketClicked = (0, _react.useCallback)(function (e) {
|
|
94
94
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -31,7 +31,7 @@ const ModalDialog = props => {
|
|
|
31
31
|
width = 'medium',
|
|
32
32
|
shouldScrollInViewport = false,
|
|
33
33
|
shouldCloseOnEscapePress,
|
|
34
|
-
autoFocus,
|
|
34
|
+
autoFocus: providedAutoFocus,
|
|
35
35
|
stackIndex,
|
|
36
36
|
onClose,
|
|
37
37
|
onCloseComplete,
|
|
@@ -46,6 +46,9 @@ const ModalDialog = props => {
|
|
|
46
46
|
const id = useId();
|
|
47
47
|
const titleId = `modal-dialog-title-${id}`;
|
|
48
48
|
const defaultTestId = testId || 'modal-dialog';
|
|
49
|
+
// https://product-fabric.atlassian.net/browse/DSP-24307
|
|
50
|
+
// If flag and falsy, use true instead.
|
|
51
|
+
const autoFocus = !providedAutoFocus && fg('platform_dst_autofocus-never-false') ? true : providedAutoFocus;
|
|
49
52
|
useEffect(() => {
|
|
50
53
|
// Modal dialogs can appear on top of iframe elements that are on another domain.
|
|
51
54
|
// There is a Chrome bug where drag and drop in an element on top of a cross domain
|
|
@@ -75,7 +75,7 @@ const InternalModalWrapper = props => {
|
|
|
75
75
|
action: 'closed',
|
|
76
76
|
componentName: 'modalDialog',
|
|
77
77
|
packageName: "@atlaskit/modal-dialog",
|
|
78
|
-
packageVersion: "
|
|
78
|
+
packageVersion: "14.9.0"
|
|
79
79
|
});
|
|
80
80
|
const onBlanketClicked = useCallback(e => {
|
|
81
81
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -34,7 +34,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
34
34
|
_props$shouldScrollIn = props.shouldScrollInViewport,
|
|
35
35
|
shouldScrollInViewport = _props$shouldScrollIn === void 0 ? false : _props$shouldScrollIn,
|
|
36
36
|
shouldCloseOnEscapePress = props.shouldCloseOnEscapePress,
|
|
37
|
-
|
|
37
|
+
providedAutoFocus = props.autoFocus,
|
|
38
38
|
stackIndex = props.stackIndex,
|
|
39
39
|
onClose = props.onClose,
|
|
40
40
|
onCloseComplete = props.onCloseComplete,
|
|
@@ -49,6 +49,9 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
49
49
|
var id = useId();
|
|
50
50
|
var titleId = "modal-dialog-title-".concat(id);
|
|
51
51
|
var defaultTestId = testId || 'modal-dialog';
|
|
52
|
+
// https://product-fabric.atlassian.net/browse/DSP-24307
|
|
53
|
+
// If flag and falsy, use true instead.
|
|
54
|
+
var autoFocus = !providedAutoFocus && fg('platform_dst_autofocus-never-false') ? true : providedAutoFocus;
|
|
52
55
|
useEffect(function () {
|
|
53
56
|
// Modal dialogs can appear on top of iframe elements that are on another domain.
|
|
54
57
|
// There is a Chrome bug where drag and drop in an element on top of a cross domain
|
|
@@ -79,7 +79,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
79
79
|
action: 'closed',
|
|
80
80
|
componentName: 'modalDialog',
|
|
81
81
|
packageName: "@atlaskit/modal-dialog",
|
|
82
|
-
packageVersion: "
|
|
82
|
+
packageVersion: "14.9.0"
|
|
83
83
|
});
|
|
84
84
|
var onBlanketClicked = useCallback(function (e) {
|
|
85
85
|
if (shouldCloseOnOverlayClick) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.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/"
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
31
31
|
"@atlaskit/blanket": "^15.0.0",
|
|
32
|
-
"@atlaskit/button": "^23.
|
|
33
|
-
"@atlaskit/css": "^0.
|
|
32
|
+
"@atlaskit/button": "^23.8.0",
|
|
33
|
+
"@atlaskit/css": "^0.18.0",
|
|
34
34
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
35
|
-
"@atlaskit/icon": "^29.
|
|
35
|
+
"@atlaskit/icon": "^29.2.0",
|
|
36
36
|
"@atlaskit/layering": "^3.4.0",
|
|
37
37
|
"@atlaskit/motion": "^5.3.0",
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
41
41
|
"@atlaskit/primitives": "^16.4.0",
|
|
42
42
|
"@atlaskit/theme": "^21.0.0",
|
|
43
|
-
"@atlaskit/tokens": "^8.
|
|
43
|
+
"@atlaskit/tokens": "^8.6.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@compiled/react": "^0.18.6",
|
|
46
46
|
"bind-event-listener": "^3.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@af/accessibility-testing": "workspace:^",
|
|
56
56
|
"@af/integration-testing": "workspace:^",
|
|
57
57
|
"@af/visual-regression": "workspace:^",
|
|
58
|
-
"@atlaskit/avatar": "^25.
|
|
58
|
+
"@atlaskit/avatar": "^25.6.0",
|
|
59
59
|
"@atlaskit/avatar-group": "^12.4.0",
|
|
60
60
|
"@atlaskit/banner": "^14.0.0",
|
|
61
61
|
"@atlaskit/breadcrumbs": "^15.3.0",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"@atlaskit/datetime-picker": "^17.2.0",
|
|
65
65
|
"@atlaskit/docs": "^11.2.0",
|
|
66
66
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
67
|
-
"@atlaskit/flag": "^17.
|
|
68
|
-
"@atlaskit/form": "^
|
|
67
|
+
"@atlaskit/flag": "^17.7.0",
|
|
68
|
+
"@atlaskit/form": "^15.0.0",
|
|
69
69
|
"@atlaskit/heading": "^5.2.0",
|
|
70
70
|
"@atlaskit/link": "^3.2.0",
|
|
71
71
|
"@atlaskit/popup": "^4.7.0",
|
|
72
72
|
"@atlaskit/radio": "^8.3.0",
|
|
73
|
-
"@atlaskit/section-message": "^8.
|
|
74
|
-
"@atlaskit/select": "^21.
|
|
73
|
+
"@atlaskit/section-message": "^8.11.0",
|
|
74
|
+
"@atlaskit/select": "^21.6.0",
|
|
75
75
|
"@atlaskit/textfield": "^8.2.0",
|
|
76
76
|
"@atlaskit/tooltip": "^20.11.0",
|
|
77
77
|
"@atlassian/ssr-tests": "workspace:^",
|
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"platform_modal-dialog-heading-icon-a11y-fix": {
|
|
123
123
|
"type": "boolean"
|
|
124
124
|
},
|
|
125
|
+
"platform_dst_autofocus-never-false": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
125
128
|
"platform_ads_explicit_font_styles": {
|
|
126
129
|
"type": "boolean"
|
|
127
130
|
},
|