@atlaskit/modal-dialog 15.0.4 → 15.1.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 +20 -0
- package/dist/cjs/full-screen.js +10 -5
- package/dist/cjs/internal/components/modal-dialog.compiled.css +2 -1
- package/dist/cjs/internal/components/modal-dialog.js +14 -7
- package/dist/cjs/internal/components/modal-wrapper.js +6 -14
- package/dist/cjs/modal-dialog.js +22 -5
- package/dist/es2019/full-screen.js +7 -4
- package/dist/es2019/internal/components/modal-dialog.compiled.css +2 -1
- package/dist/es2019/internal/components/modal-dialog.js +15 -8
- package/dist/es2019/internal/components/modal-wrapper.js +7 -15
- package/dist/es2019/modal-dialog.js +19 -4
- package/dist/esm/full-screen.js +7 -4
- package/dist/esm/internal/components/modal-dialog.compiled.css +2 -1
- package/dist/esm/internal/components/modal-dialog.js +15 -8
- package/dist/esm/internal/components/modal-wrapper.js +7 -15
- package/dist/esm/modal-dialog.js +19 -4
- package/dist/types/full-screen.d.ts +1 -1
- package/dist/types/internal/components/modal-dialog.d.ts +1 -1
- package/dist/types/internal/components/modal-wrapper.d.ts +1 -11
- package/dist/types/modal-dialog.d.ts +12 -1
- package/dist/types-ts4.5/full-screen.d.ts +1 -1
- package/dist/types-ts4.5/internal/components/modal-dialog.d.ts +1 -1
- package/dist/types-ts4.5/internal/components/modal-wrapper.d.ts +1 -11
- package/dist/types-ts4.5/modal-dialog.d.ts +12 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 15.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`68077cab1f95d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/68077cab1f95d) -
|
|
8
|
+
Fixed styling related issues behind the new motion uplift
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 15.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`cfeab708c0a5d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cfeab708c0a5d) -
|
|
16
|
+
Add ref forwarding to the modal dialog. The ref will be placed on the outer container of the modal
|
|
17
|
+
dialog.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 15.0.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cjs/full-screen.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
|
-
exports.FullScreenModalDialog =
|
|
8
|
+
exports.FullScreenModalDialog = void 0;
|
|
8
9
|
Object.defineProperty(exports, "ModalBody", {
|
|
9
10
|
enumerable: true,
|
|
10
11
|
get: function get() {
|
|
@@ -36,14 +37,16 @@ Object.defineProperty(exports, "ModalTransition", {
|
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
39
|
-
var _react =
|
|
40
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
40
41
|
var _modalWrapper = _interopRequireDefault(require("./internal/components/modal-wrapper"));
|
|
41
42
|
var _modalTransition = _interopRequireDefault(require("./modal-transition"));
|
|
42
43
|
var _modalHeader = _interopRequireDefault(require("./modal-header"));
|
|
43
44
|
var _modalTitle = _interopRequireDefault(require("./modal-title"));
|
|
44
45
|
var _modalBody = _interopRequireDefault(require("./modal-body"));
|
|
45
46
|
var _modalFooter = _interopRequireDefault(require("./modal-footer"));
|
|
46
|
-
function
|
|
47
|
+
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
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
49
|
+
var FullScreenModalDialog = exports.FullScreenModalDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
47
50
|
return /*#__PURE__*/_react.default.createElement(_modalWrapper.default
|
|
48
51
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
49
52
|
, (0, _extends2.default)({}, props, {
|
|
@@ -82,6 +85,8 @@ function FullScreenModalDialog(props) {
|
|
|
82
85
|
*
|
|
83
86
|
* We don't want consumers to disable it.
|
|
84
87
|
*/,
|
|
85
|
-
isBlanketHidden: false
|
|
88
|
+
isBlanketHidden: false,
|
|
89
|
+
ref: ref
|
|
86
90
|
}));
|
|
87
|
-
}
|
|
91
|
+
});
|
|
92
|
+
FullScreenModalDialog.displayName = 'FullScreenModalDialog';
|
|
@@ -24,4 +24,5 @@
|
|
|
24
24
|
._mizu1v1w:focus-visible{outline-color:var(--ds-border-focused,#4688ec)}
|
|
25
25
|
._ra3xnqa1:focus-visible{outline-style:solid}
|
|
26
26
|
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._1cvmnqa1:focus-visible{outline-style:solid}._4davt94y:focus-visible{outline-width:1px}}
|
|
27
|
-
@media (min-width:30rem){.
|
|
27
|
+
@media (min-width:30rem){._1jyk1jm9{height:var(--modal-dialog-height,auto)}._1jyk1osq{height:100%}._8kn617ks._8kn617ks{min-height:var(--modal-dialog-height)}._cbiz17ks._cbiz17ks{height:var(--modal-dialog-height)}._bolh1kw7._bolh1kw7{max-height:inherit}._epkxfajl{border-radius:var(--ds-radius-small,3px)}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._we1i1kw7{max-width:inherit}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}._yakv1kw7{margin-inline-end:inherit}._4lht1kw7{margin-inline-start:inherit}._1xlt6m9r._1xlt6m9r{width:var(--modal-dialog-width)}._yakv1wug{margin-inline-end:auto}._4lht1wug{margin-inline-start:auto}}
|
|
28
|
+
@media (max-width:29.9375rem){._1if81osq{height:100%}}
|
|
@@ -54,12 +54,13 @@ var dialogStyles = {
|
|
|
54
54
|
root: "_16jlidpf _1o9zkb7n _i0dl1wug _1e0c1txw _1bsb1osq _p12fauwl _4t3i1osq _1tkeidpf _c71l1kxc _2lx21bp4 _bfhk1bhr _syazi7uo _1q1l1bhr _lcxv1wug _1mq81kw7 _m01u1kw7 _1dg11kw7 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _we1i1kw7 _zg7p130s _yakv1kw7 _4lht1kw7 _1xlt6m9r",
|
|
55
55
|
borderRadius: "_epkxfajl",
|
|
56
56
|
borderRadiusT26Shape: "_epkxpb1k",
|
|
57
|
-
motion: "
|
|
57
|
+
motion: "_c71l1kw7 _p12f1kw7 _1e0c1txw _1jyk1jm9 _1if81osq",
|
|
58
|
+
rootMotion: "_yakv1wug _4lht1wug",
|
|
58
59
|
fullscreen: "_1jyk1osq"
|
|
59
60
|
};
|
|
60
61
|
var viewportScrollStyles = null;
|
|
61
62
|
var bodyScrollStyles = null;
|
|
62
|
-
var ModalDialog = function
|
|
63
|
+
var ModalDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
63
64
|
var _props$width = props.width,
|
|
64
65
|
width = _props$width === void 0 ? 'medium' : _props$width,
|
|
65
66
|
_props$shouldScrollIn = props.shouldScrollInViewport,
|
|
@@ -131,10 +132,16 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
131
132
|
enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
|
|
132
133
|
exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
|
|
133
134
|
onFinish: onMotionFinish,
|
|
134
|
-
xcss: (0, _css.cx)(dialogStyles.motion, isFullScreen && dialogStyles.fullscreen)
|
|
135
|
+
xcss: (0, _css.cx)(dialogStyles.motion, isFullScreen && dialogStyles.fullscreen),
|
|
136
|
+
style: {
|
|
137
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
138
|
+
'--modal-dialog-width': dialogWidth(width),
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
140
|
+
'--modal-dialog-height': dialogHeight(height)
|
|
141
|
+
}
|
|
135
142
|
}, /*#__PURE__*/React.createElement("section", {
|
|
136
143
|
"aria-label": label,
|
|
137
|
-
ref: motionRef,
|
|
144
|
+
ref: (0, _mergeRefs.default)([motionRef, ref]),
|
|
138
145
|
style: {
|
|
139
146
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
140
147
|
'--modal-dialog-width': dialogWidth(width),
|
|
@@ -148,7 +155,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
148
155
|
tabIndex: -1,
|
|
149
156
|
"aria-modal": true,
|
|
150
157
|
"data-ds--level": currentLevel,
|
|
151
|
-
className: (0, _runtime.ax)([dialogStyles.root, !isFullScreen && dialogStyles.borderRadius, !isFullScreen && (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && dialogStyles.borderRadiusT26Shape, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7"])
|
|
158
|
+
className: (0, _runtime.ax)([dialogStyles.root, dialogStyles.rootMotion, !isFullScreen && dialogStyles.borderRadius, !isFullScreen && (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && dialogStyles.borderRadiusT26Shape, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7"])
|
|
152
159
|
}, children)) : /*#__PURE__*/React.createElement(_fadeIn.default
|
|
153
160
|
/**
|
|
154
161
|
* We don't want a 'slide in' for the full screen modals.
|
|
@@ -158,7 +165,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
158
165
|
}, function (bottomFadeInProps) {
|
|
159
166
|
return /*#__PURE__*/React.createElement("section", (0, _extends2.default)({}, bottomFadeInProps, {
|
|
160
167
|
"aria-label": label,
|
|
161
|
-
ref: (0, _mergeRefs.default)([bottomFadeInProps.ref, motionRef]),
|
|
168
|
+
ref: (0, _mergeRefs.default)([bottomFadeInProps.ref, motionRef, ref]),
|
|
162
169
|
style: {
|
|
163
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
164
171
|
'--modal-dialog-width': dialogWidth(width),
|
|
@@ -176,7 +183,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
176
183
|
"data-ds--level": currentLevel
|
|
177
184
|
}), children);
|
|
178
185
|
}))));
|
|
179
|
-
};
|
|
186
|
+
});
|
|
180
187
|
|
|
181
188
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
182
189
|
var _default = exports.default = ModalDialog;
|
|
@@ -74,18 +74,7 @@ var allowlistElements = function allowlistElements(element, callback) {
|
|
|
74
74
|
}
|
|
75
75
|
return true;
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* __Modal wrapper__
|
|
80
|
-
*
|
|
81
|
-
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
82
|
-
* This component is primary container for other modal components.
|
|
83
|
-
*
|
|
84
|
-
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
85
|
-
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
86
|
-
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
87
|
-
*/
|
|
88
|
-
var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
77
|
+
var InternalModalWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
89
78
|
var autoFocus = props.autoFocus,
|
|
90
79
|
focusLockAllowlist = props.focusLockAllowlist,
|
|
91
80
|
_props$shouldCloseOnE = props.shouldCloseOnEscapePress,
|
|
@@ -359,7 +348,8 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
359
348
|
onOpenComplete: onOpenComplete,
|
|
360
349
|
hasProvidedOnClose: Boolean(providedOnClose),
|
|
361
350
|
isFullScreen: isFullScreen,
|
|
362
|
-
UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift
|
|
351
|
+
UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift,
|
|
352
|
+
ref: ref
|
|
363
353
|
}, children));
|
|
364
354
|
var returnFocus = true;
|
|
365
355
|
var onDeactivation = _noop.default;
|
|
@@ -400,5 +390,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
400
390
|
whiteList: allowListCallback
|
|
401
391
|
}, /*#__PURE__*/React.createElement(_reactScrolllock.default, null), shouldScrollInViewport ? /*#__PURE__*/React.createElement(_reactScrolllock.TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket));
|
|
402
392
|
})));
|
|
403
|
-
};
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
404
396
|
var _default = exports.default = InternalModalWrapper;
|
package/dist/cjs/modal-dialog.js
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
|
-
exports.default =
|
|
8
|
+
exports.default = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _modalWrapper = _interopRequireDefault(require("./internal/components/modal-wrapper"));
|
|
11
|
-
function
|
|
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); }
|
|
13
|
+
/**
|
|
14
|
+
* __Modal wrapper__
|
|
15
|
+
*
|
|
16
|
+
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
17
|
+
* This component is primary container for other modal components.
|
|
18
|
+
*
|
|
19
|
+
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
20
|
+
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
21
|
+
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
22
|
+
*/
|
|
23
|
+
var ModalWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
12
24
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
13
25
|
return /*#__PURE__*/_react.default.createElement(_modalWrapper.default, (0, _extends2.default)({}, props, {
|
|
14
|
-
isFullScreen: false
|
|
26
|
+
isFullScreen: false,
|
|
27
|
+
ref: ref
|
|
15
28
|
}));
|
|
16
|
-
}
|
|
29
|
+
});
|
|
30
|
+
ModalWrapper.displayName = 'ModalWrapper';
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
33
|
+
var _default = exports.default = ModalWrapper;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import InternalModalWrapper from './internal/components/modal-wrapper';
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
5
|
+
export const FullScreenModalDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
5
6
|
return /*#__PURE__*/React.createElement(InternalModalWrapper
|
|
6
7
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
7
8
|
, _extends({}, props, {
|
|
@@ -40,9 +41,11 @@ export function FullScreenModalDialog(props) {
|
|
|
40
41
|
*
|
|
41
42
|
* We don't want consumers to disable it.
|
|
42
43
|
*/,
|
|
43
|
-
isBlanketHidden: false
|
|
44
|
+
isBlanketHidden: false,
|
|
45
|
+
ref: ref
|
|
44
46
|
}));
|
|
45
|
-
}
|
|
47
|
+
});
|
|
48
|
+
FullScreenModalDialog.displayName = 'FullScreenModalDialog';
|
|
46
49
|
export { default as ModalTransition } from './modal-transition';
|
|
47
50
|
export { default as ModalHeader } from './modal-header';
|
|
48
51
|
export { default as ModalTitle } from './modal-title';
|
|
@@ -24,4 +24,5 @@
|
|
|
24
24
|
._mizu1v1w:focus-visible{outline-color:var(--ds-border-focused,#4688ec)}
|
|
25
25
|
._ra3xnqa1:focus-visible{outline-style:solid}
|
|
26
26
|
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._1cvmnqa1:focus-visible{outline-style:solid}._4davt94y:focus-visible{outline-width:1px}}
|
|
27
|
-
@media (min-width:30rem){.
|
|
27
|
+
@media (min-width:30rem){._1jyk1jm9{height:var(--modal-dialog-height,auto)}._1jyk1osq{height:100%}._8kn617ks._8kn617ks{min-height:var(--modal-dialog-height)}._cbiz17ks._cbiz17ks{height:var(--modal-dialog-height)}._bolh1kw7._bolh1kw7{max-height:inherit}._epkxfajl{border-radius:var(--ds-radius-small,3px)}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._we1i1kw7{max-width:inherit}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}._yakv1kw7{margin-inline-end:inherit}._4lht1kw7{margin-inline-start:inherit}._1xlt6m9r._1xlt6m9r{width:var(--modal-dialog-width)}._yakv1wug{margin-inline-end:auto}._4lht1wug{margin-inline-start:auto}}
|
|
28
|
+
@media (max-width:29.9375rem){._1if81osq{height:100%}}
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./modal-dialog.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { useEffect, useMemo } from 'react';
|
|
6
|
+
import { forwardRef, useEffect, useMemo } from 'react';
|
|
7
7
|
import { cx } from '@atlaskit/css';
|
|
8
8
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
9
9
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
@@ -43,12 +43,13 @@ const dialogStyles = {
|
|
|
43
43
|
root: "_16jlidpf _1o9zkb7n _i0dl1wug _1e0c1txw _1bsb1osq _p12fauwl _4t3i1osq _1tkeidpf _c71l1kxc _2lx21bp4 _bfhk1bhr _syazi7uo _1q1l1bhr _lcxv1wug _1mq81kw7 _m01u1kw7 _1dg11kw7 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _we1i1kw7 _zg7p130s _yakv1kw7 _4lht1kw7 _1xlt6m9r",
|
|
44
44
|
borderRadius: "_epkxfajl",
|
|
45
45
|
borderRadiusT26Shape: "_epkxpb1k",
|
|
46
|
-
motion: "
|
|
46
|
+
motion: "_c71l1kw7 _p12f1kw7 _1e0c1txw _1jyk1jm9 _1if81osq",
|
|
47
|
+
rootMotion: "_yakv1wug _4lht1wug",
|
|
47
48
|
fullscreen: "_1jyk1osq"
|
|
48
49
|
};
|
|
49
50
|
const viewportScrollStyles = null;
|
|
50
51
|
const bodyScrollStyles = null;
|
|
51
|
-
const ModalDialog = props => {
|
|
52
|
+
const ModalDialog = /*#__PURE__*/forwardRef((props, ref) => {
|
|
52
53
|
const {
|
|
53
54
|
width = 'medium',
|
|
54
55
|
shouldScrollInViewport = false,
|
|
@@ -114,10 +115,16 @@ const ModalDialog = props => {
|
|
|
114
115
|
enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
|
|
115
116
|
exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
|
|
116
117
|
onFinish: onMotionFinish,
|
|
117
|
-
xcss: cx(dialogStyles.motion, isFullScreen && dialogStyles.fullscreen)
|
|
118
|
+
xcss: cx(dialogStyles.motion, isFullScreen && dialogStyles.fullscreen),
|
|
119
|
+
style: {
|
|
120
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
121
|
+
'--modal-dialog-width': dialogWidth(width),
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
123
|
+
'--modal-dialog-height': dialogHeight(height)
|
|
124
|
+
}
|
|
118
125
|
}, /*#__PURE__*/React.createElement("section", {
|
|
119
126
|
"aria-label": label,
|
|
120
|
-
ref: motionRef,
|
|
127
|
+
ref: mergeRefs([motionRef, ref]),
|
|
121
128
|
style: {
|
|
122
129
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
123
130
|
'--modal-dialog-width': dialogWidth(width),
|
|
@@ -131,7 +138,7 @@ const ModalDialog = props => {
|
|
|
131
138
|
tabIndex: -1,
|
|
132
139
|
"aria-modal": true,
|
|
133
140
|
"data-ds--level": currentLevel,
|
|
134
|
-
className: ax([dialogStyles.root, !isFullScreen && dialogStyles.borderRadius, !isFullScreen && fg('platform-dst-shape-theme-default') && dialogStyles.borderRadiusT26Shape, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7"])
|
|
141
|
+
className: ax([dialogStyles.root, dialogStyles.rootMotion, !isFullScreen && dialogStyles.borderRadius, !isFullScreen && fg('platform-dst-shape-theme-default') && dialogStyles.borderRadiusT26Shape, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7"])
|
|
135
142
|
}, children)) : /*#__PURE__*/React.createElement(FadeIn
|
|
136
143
|
/**
|
|
137
144
|
* We don't want a 'slide in' for the full screen modals.
|
|
@@ -140,7 +147,7 @@ const ModalDialog = props => {
|
|
|
140
147
|
onFinish: onMotionFinish
|
|
141
148
|
}, bottomFadeInProps => /*#__PURE__*/React.createElement("section", _extends({}, bottomFadeInProps, {
|
|
142
149
|
"aria-label": label,
|
|
143
|
-
ref: mergeRefs([bottomFadeInProps.ref, motionRef]),
|
|
150
|
+
ref: mergeRefs([bottomFadeInProps.ref, motionRef, ref]),
|
|
144
151
|
style: {
|
|
145
152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
146
153
|
'--modal-dialog-width': dialogWidth(width),
|
|
@@ -157,7 +164,7 @@ const ModalDialog = props => {
|
|
|
157
164
|
"aria-modal": true,
|
|
158
165
|
"data-ds--level": currentLevel
|
|
159
166
|
}), children)))));
|
|
160
|
-
};
|
|
167
|
+
});
|
|
161
168
|
|
|
162
169
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
163
170
|
export default ModalDialog;
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./modal-wrapper.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
6
|
+
import { forwardRef, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
7
7
|
import FocusLock from 'react-focus-lock';
|
|
8
8
|
import ScrollLock, { TouchScrollable } from 'react-scrolllock';
|
|
9
9
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
@@ -64,18 +64,7 @@ const allowlistElements = (element, callback) => {
|
|
|
64
64
|
}
|
|
65
65
|
return true;
|
|
66
66
|
};
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* __Modal wrapper__
|
|
70
|
-
*
|
|
71
|
-
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
72
|
-
* This component is primary container for other modal components.
|
|
73
|
-
*
|
|
74
|
-
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
75
|
-
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
76
|
-
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
77
|
-
*/
|
|
78
|
-
const InternalModalWrapper = props => {
|
|
67
|
+
const InternalModalWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
79
68
|
const {
|
|
80
69
|
autoFocus,
|
|
81
70
|
focusLockAllowlist,
|
|
@@ -344,7 +333,8 @@ const InternalModalWrapper = props => {
|
|
|
344
333
|
onOpenComplete: onOpenComplete,
|
|
345
334
|
hasProvidedOnClose: Boolean(providedOnClose),
|
|
346
335
|
isFullScreen: isFullScreen,
|
|
347
|
-
UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift
|
|
336
|
+
UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift,
|
|
337
|
+
ref: ref
|
|
348
338
|
}, children));
|
|
349
339
|
let returnFocus = true;
|
|
350
340
|
let onDeactivation = noop;
|
|
@@ -383,5 +373,7 @@ const InternalModalWrapper = props => {
|
|
|
383
373
|
onDeactivation: onDeactivation,
|
|
384
374
|
whiteList: allowListCallback
|
|
385
375
|
}, /*#__PURE__*/React.createElement(ScrollLock, null), shouldScrollInViewport ? /*#__PURE__*/React.createElement(TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket)))));
|
|
386
|
-
};
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
387
379
|
export default InternalModalWrapper;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import InternalModalWrapper from './internal/components/modal-wrapper';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* __Modal wrapper__
|
|
6
|
+
*
|
|
7
|
+
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
8
|
+
* This component is primary container for other modal components.
|
|
9
|
+
*
|
|
10
|
+
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
11
|
+
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
13
|
+
*/
|
|
14
|
+
const ModalWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
5
15
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
6
16
|
return /*#__PURE__*/React.createElement(InternalModalWrapper, _extends({}, props, {
|
|
7
|
-
isFullScreen: false
|
|
17
|
+
isFullScreen: false,
|
|
18
|
+
ref: ref
|
|
8
19
|
}));
|
|
9
|
-
}
|
|
20
|
+
});
|
|
21
|
+
ModalWrapper.displayName = 'ModalWrapper';
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
24
|
+
export default ModalWrapper;
|
package/dist/esm/full-screen.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import InternalModalWrapper from './internal/components/modal-wrapper';
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
5
|
+
export var FullScreenModalDialog = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
5
6
|
return /*#__PURE__*/React.createElement(InternalModalWrapper
|
|
6
7
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
7
8
|
, _extends({}, props, {
|
|
@@ -40,9 +41,11 @@ export function FullScreenModalDialog(props) {
|
|
|
40
41
|
*
|
|
41
42
|
* We don't want consumers to disable it.
|
|
42
43
|
*/,
|
|
43
|
-
isBlanketHidden: false
|
|
44
|
+
isBlanketHidden: false,
|
|
45
|
+
ref: ref
|
|
44
46
|
}));
|
|
45
|
-
}
|
|
47
|
+
});
|
|
48
|
+
FullScreenModalDialog.displayName = 'FullScreenModalDialog';
|
|
46
49
|
export { default as ModalTransition } from './modal-transition';
|
|
47
50
|
export { default as ModalHeader } from './modal-header';
|
|
48
51
|
export { default as ModalTitle } from './modal-title';
|
|
@@ -24,4 +24,5 @@
|
|
|
24
24
|
._mizu1v1w:focus-visible{outline-color:var(--ds-border-focused,#4688ec)}
|
|
25
25
|
._ra3xnqa1:focus-visible{outline-style:solid}
|
|
26
26
|
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._1cvmnqa1:focus-visible{outline-style:solid}._4davt94y:focus-visible{outline-width:1px}}
|
|
27
|
-
@media (min-width:30rem){.
|
|
27
|
+
@media (min-width:30rem){._1jyk1jm9{height:var(--modal-dialog-height,auto)}._1jyk1osq{height:100%}._8kn617ks._8kn617ks{min-height:var(--modal-dialog-height)}._cbiz17ks._cbiz17ks{height:var(--modal-dialog-height)}._bolh1kw7._bolh1kw7{max-height:inherit}._epkxfajl{border-radius:var(--ds-radius-small,3px)}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._we1i1kw7{max-width:inherit}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}._yakv1kw7{margin-inline-end:inherit}._4lht1kw7{margin-inline-start:inherit}._1xlt6m9r._1xlt6m9r{width:var(--modal-dialog-width)}._yakv1wug{margin-inline-end:auto}._4lht1wug{margin-inline-start:auto}}
|
|
28
|
+
@media (max-width:29.9375rem){._1if81osq{height:100%}}
|
|
@@ -5,7 +5,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
5
5
|
import "./modal-dialog.compiled.css";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
-
import { useEffect, useMemo } from 'react';
|
|
8
|
+
import { forwardRef, useEffect, useMemo } from 'react';
|
|
9
9
|
import { cx } from '@atlaskit/css';
|
|
10
10
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
11
11
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
@@ -45,12 +45,13 @@ var dialogStyles = {
|
|
|
45
45
|
root: "_16jlidpf _1o9zkb7n _i0dl1wug _1e0c1txw _1bsb1osq _p12fauwl _4t3i1osq _1tkeidpf _c71l1kxc _2lx21bp4 _bfhk1bhr _syazi7uo _1q1l1bhr _lcxv1wug _1mq81kw7 _m01u1kw7 _1dg11kw7 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _we1i1kw7 _zg7p130s _yakv1kw7 _4lht1kw7 _1xlt6m9r",
|
|
46
46
|
borderRadius: "_epkxfajl",
|
|
47
47
|
borderRadiusT26Shape: "_epkxpb1k",
|
|
48
|
-
motion: "
|
|
48
|
+
motion: "_c71l1kw7 _p12f1kw7 _1e0c1txw _1jyk1jm9 _1if81osq",
|
|
49
|
+
rootMotion: "_yakv1wug _4lht1wug",
|
|
49
50
|
fullscreen: "_1jyk1osq"
|
|
50
51
|
};
|
|
51
52
|
var viewportScrollStyles = null;
|
|
52
53
|
var bodyScrollStyles = null;
|
|
53
|
-
var ModalDialog = function
|
|
54
|
+
var ModalDialog = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
54
55
|
var _props$width = props.width,
|
|
55
56
|
width = _props$width === void 0 ? 'medium' : _props$width,
|
|
56
57
|
_props$shouldScrollIn = props.shouldScrollInViewport,
|
|
@@ -122,10 +123,16 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
122
123
|
enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
|
|
123
124
|
exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
|
|
124
125
|
onFinish: onMotionFinish,
|
|
125
|
-
xcss: cx(dialogStyles.motion, isFullScreen && dialogStyles.fullscreen)
|
|
126
|
+
xcss: cx(dialogStyles.motion, isFullScreen && dialogStyles.fullscreen),
|
|
127
|
+
style: {
|
|
128
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
129
|
+
'--modal-dialog-width': dialogWidth(width),
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
131
|
+
'--modal-dialog-height': dialogHeight(height)
|
|
132
|
+
}
|
|
126
133
|
}, /*#__PURE__*/React.createElement("section", {
|
|
127
134
|
"aria-label": label,
|
|
128
|
-
ref: motionRef,
|
|
135
|
+
ref: mergeRefs([motionRef, ref]),
|
|
129
136
|
style: {
|
|
130
137
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
131
138
|
'--modal-dialog-width': dialogWidth(width),
|
|
@@ -139,7 +146,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
139
146
|
tabIndex: -1,
|
|
140
147
|
"aria-modal": true,
|
|
141
148
|
"data-ds--level": currentLevel,
|
|
142
|
-
className: ax([dialogStyles.root, !isFullScreen && dialogStyles.borderRadius, !isFullScreen && fg('platform-dst-shape-theme-default') && dialogStyles.borderRadiusT26Shape, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7"])
|
|
149
|
+
className: ax([dialogStyles.root, dialogStyles.rootMotion, !isFullScreen && dialogStyles.borderRadius, !isFullScreen && fg('platform-dst-shape-theme-default') && dialogStyles.borderRadiusT26Shape, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7"])
|
|
143
150
|
}, children)) : /*#__PURE__*/React.createElement(FadeIn
|
|
144
151
|
/**
|
|
145
152
|
* We don't want a 'slide in' for the full screen modals.
|
|
@@ -149,7 +156,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
149
156
|
}, function (bottomFadeInProps) {
|
|
150
157
|
return /*#__PURE__*/React.createElement("section", _extends({}, bottomFadeInProps, {
|
|
151
158
|
"aria-label": label,
|
|
152
|
-
ref: mergeRefs([bottomFadeInProps.ref, motionRef]),
|
|
159
|
+
ref: mergeRefs([bottomFadeInProps.ref, motionRef, ref]),
|
|
153
160
|
style: {
|
|
154
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
155
162
|
'--modal-dialog-width': dialogWidth(width),
|
|
@@ -167,7 +174,7 @@ var ModalDialog = function ModalDialog(props) {
|
|
|
167
174
|
"data-ds--level": currentLevel
|
|
168
175
|
}), children);
|
|
169
176
|
}))));
|
|
170
|
-
};
|
|
177
|
+
});
|
|
171
178
|
|
|
172
179
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
173
180
|
export default ModalDialog;
|
|
@@ -4,7 +4,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
4
4
|
import "./modal-wrapper.compiled.css";
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
7
|
+
import { forwardRef, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
8
8
|
import FocusLock from 'react-focus-lock';
|
|
9
9
|
import ScrollLock, { TouchScrollable } from 'react-scrolllock';
|
|
10
10
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
@@ -65,18 +65,7 @@ var allowlistElements = function allowlistElements(element, callback) {
|
|
|
65
65
|
}
|
|
66
66
|
return true;
|
|
67
67
|
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* __Modal wrapper__
|
|
71
|
-
*
|
|
72
|
-
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
73
|
-
* This component is primary container for other modal components.
|
|
74
|
-
*
|
|
75
|
-
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
76
|
-
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
77
|
-
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
78
|
-
*/
|
|
79
|
-
var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
68
|
+
var InternalModalWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
80
69
|
var autoFocus = props.autoFocus,
|
|
81
70
|
focusLockAllowlist = props.focusLockAllowlist,
|
|
82
71
|
_props$shouldCloseOnE = props.shouldCloseOnEscapePress,
|
|
@@ -350,7 +339,8 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
350
339
|
onOpenComplete: onOpenComplete,
|
|
351
340
|
hasProvidedOnClose: Boolean(providedOnClose),
|
|
352
341
|
isFullScreen: isFullScreen,
|
|
353
|
-
UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift
|
|
342
|
+
UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift,
|
|
343
|
+
ref: ref
|
|
354
344
|
}, children));
|
|
355
345
|
var returnFocus = true;
|
|
356
346
|
var onDeactivation = noop;
|
|
@@ -391,5 +381,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
391
381
|
whiteList: allowListCallback
|
|
392
382
|
}, /*#__PURE__*/React.createElement(ScrollLock, null), shouldScrollInViewport ? /*#__PURE__*/React.createElement(TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket));
|
|
393
383
|
})));
|
|
394
|
-
};
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
395
387
|
export default InternalModalWrapper;
|
package/dist/esm/modal-dialog.js
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import InternalModalWrapper from './internal/components/modal-wrapper';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* __Modal wrapper__
|
|
6
|
+
*
|
|
7
|
+
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
8
|
+
* This component is primary container for other modal components.
|
|
9
|
+
*
|
|
10
|
+
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
11
|
+
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
13
|
+
*/
|
|
14
|
+
var ModalWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
5
15
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
6
16
|
return /*#__PURE__*/React.createElement(InternalModalWrapper, _extends({}, props, {
|
|
7
|
-
isFullScreen: false
|
|
17
|
+
isFullScreen: false,
|
|
18
|
+
ref: ref
|
|
8
19
|
}));
|
|
9
|
-
}
|
|
20
|
+
});
|
|
21
|
+
ModalWrapper.displayName = 'ModalWrapper';
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
24
|
+
export default ModalWrapper;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { ModalDialogProps } from './types';
|
|
3
3
|
export interface FullScreenModalDialogProps extends Omit<ModalDialogProps, 'width' | 'height' | 'shouldScrollInViewport' | 'shouldCloseOnOverlayClick' | 'isBlanketHidden'> {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare const FullScreenModalDialog: React.ForwardRefExoticComponent<React.PropsWithoutRef<FullScreenModalDialogProps> & React.RefAttributes<HTMLElement>>;
|
|
6
6
|
export { default as ModalTransition } from './modal-transition';
|
|
7
7
|
export { default as ModalHeader } from './modal-header';
|
|
8
8
|
export { default as ModalTitle } from './modal-title';
|
|
@@ -6,5 +6,5 @@ import type { ModalDialogProps } from '../../types';
|
|
|
6
6
|
import type { InternalModalDialogProps } from '../types';
|
|
7
7
|
export declare const dialogWidth: (input?: ModalDialogProps["width"]) => string;
|
|
8
8
|
export declare const dialogHeight: (input?: ModalDialogProps["height"]) => string;
|
|
9
|
-
declare const ModalDialog:
|
|
9
|
+
declare const ModalDialog: React.ForwardRefExoticComponent<React.PropsWithoutRef<InternalModalDialogProps> & React.RefAttributes<HTMLElement>>;
|
|
10
10
|
export default ModalDialog;
|
|
@@ -5,15 +5,5 @@
|
|
|
5
5
|
import type { ModalDialogProps } from '../../types';
|
|
6
6
|
import type { InternalModalWrapperProps } from '../types';
|
|
7
7
|
export type { ModalDialogProps };
|
|
8
|
-
|
|
9
|
-
* __Modal wrapper__
|
|
10
|
-
*
|
|
11
|
-
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
12
|
-
* This component is primary container for other modal components.
|
|
13
|
-
*
|
|
14
|
-
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
15
|
-
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
16
|
-
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
17
|
-
*/
|
|
18
|
-
declare const InternalModalWrapper: (props: InternalModalWrapperProps) => JSX.Element;
|
|
8
|
+
declare const InternalModalWrapper: React.ForwardRefExoticComponent<React.PropsWithoutRef<InternalModalWrapperProps> & React.RefAttributes<HTMLElement>>;
|
|
19
9
|
export default InternalModalWrapper;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ModalDialogProps } from './internal/components/modal-wrapper';
|
|
3
3
|
export type { ModalDialogProps };
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* __Modal wrapper__
|
|
6
|
+
*
|
|
7
|
+
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
8
|
+
* This component is primary container for other modal components.
|
|
9
|
+
*
|
|
10
|
+
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
11
|
+
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
13
|
+
*/
|
|
14
|
+
declare const ModalWrapper: React.ForwardRefExoticComponent<React.PropsWithoutRef<ModalDialogProps> & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
export default ModalWrapper;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { ModalDialogProps } from './types';
|
|
3
3
|
export interface FullScreenModalDialogProps extends Omit<ModalDialogProps, 'width' | 'height' | 'shouldScrollInViewport' | 'shouldCloseOnOverlayClick' | 'isBlanketHidden'> {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare const FullScreenModalDialog: React.ForwardRefExoticComponent<React.PropsWithoutRef<FullScreenModalDialogProps> & React.RefAttributes<HTMLElement>>;
|
|
6
6
|
export { default as ModalTransition } from './modal-transition';
|
|
7
7
|
export { default as ModalHeader } from './modal-header';
|
|
8
8
|
export { default as ModalTitle } from './modal-title';
|
|
@@ -6,5 +6,5 @@ import type { ModalDialogProps } from '../../types';
|
|
|
6
6
|
import type { InternalModalDialogProps } from '../types';
|
|
7
7
|
export declare const dialogWidth: (input?: ModalDialogProps["width"]) => string;
|
|
8
8
|
export declare const dialogHeight: (input?: ModalDialogProps["height"]) => string;
|
|
9
|
-
declare const ModalDialog:
|
|
9
|
+
declare const ModalDialog: React.ForwardRefExoticComponent<React.PropsWithoutRef<InternalModalDialogProps> & React.RefAttributes<HTMLElement>>;
|
|
10
10
|
export default ModalDialog;
|
|
@@ -5,15 +5,5 @@
|
|
|
5
5
|
import type { ModalDialogProps } from '../../types';
|
|
6
6
|
import type { InternalModalWrapperProps } from '../types';
|
|
7
7
|
export type { ModalDialogProps };
|
|
8
|
-
|
|
9
|
-
* __Modal wrapper__
|
|
10
|
-
*
|
|
11
|
-
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
12
|
-
* This component is primary container for other modal components.
|
|
13
|
-
*
|
|
14
|
-
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
15
|
-
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
16
|
-
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
17
|
-
*/
|
|
18
|
-
declare const InternalModalWrapper: (props: InternalModalWrapperProps) => JSX.Element;
|
|
8
|
+
declare const InternalModalWrapper: React.ForwardRefExoticComponent<React.PropsWithoutRef<InternalModalWrapperProps> & React.RefAttributes<HTMLElement>>;
|
|
19
9
|
export default InternalModalWrapper;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ModalDialogProps } from './internal/components/modal-wrapper';
|
|
3
3
|
export type { ModalDialogProps };
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* __Modal wrapper__
|
|
6
|
+
*
|
|
7
|
+
* A modal wrapper displays content that requires user interaction, in a layer above the page.
|
|
8
|
+
* This component is primary container for other modal components.
|
|
9
|
+
*
|
|
10
|
+
* - [Examples](https://atlassian.design/components/modal-dialog/examples)
|
|
11
|
+
* - [Code](https://atlassian.design/components/modal-dialog/code)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
|
|
13
|
+
*/
|
|
14
|
+
declare const ModalWrapper: React.ForwardRefExoticComponent<React.PropsWithoutRef<ModalDialogProps> & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
export default ModalWrapper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.1.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/"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/primitives": "^19.0.0",
|
|
49
49
|
"@atlaskit/theme": "^23.2.0",
|
|
50
50
|
"@atlaskit/tokens": "^13.0.0",
|
|
51
|
-
"@atlaskit/top-layer": "^0.
|
|
51
|
+
"@atlaskit/top-layer": "^0.7.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@compiled/react": "^0.20.0",
|
|
54
54
|
"bind-event-listener": "^3.0.0",
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"@atlaskit/code": "^17.5.0",
|
|
72
72
|
"@atlaskit/datetime-picker": "^17.8.0",
|
|
73
73
|
"@atlaskit/docs": "^11.8.0",
|
|
74
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
74
|
+
"@atlaskit/dropdown-menu": "^16.9.0",
|
|
75
75
|
"@atlaskit/flag": "^17.11.0",
|
|
76
76
|
"@atlaskit/form": "^15.5.0",
|
|
77
77
|
"@atlaskit/heading": "^5.4.0",
|
|
78
78
|
"@atlaskit/link": "^3.4.0",
|
|
79
|
-
"@atlaskit/popup": "^4.
|
|
79
|
+
"@atlaskit/popup": "^4.20.0",
|
|
80
80
|
"@atlaskit/radio": "^8.6.0",
|
|
81
81
|
"@atlaskit/section-message": "^8.12.0",
|
|
82
82
|
"@atlaskit/select": "^21.12.0",
|