@atlaskit/modal-dialog 12.2.13 → 12.3.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/__perf__/default.tsx +3 -1
  3. package/__perf__/interactions.tsx +1 -1
  4. package/__perf__/scroll.tsx +1 -1
  5. package/codemods/{12.0.0-lite-mode.ts → 12.0.0-lite-mode.tsx} +2 -2
  6. package/codemods/__tests__/{12.0.0-lite-mode.test.ts → 12.0.0-lite-mode.test.tsx} +0 -0
  7. package/codemods/__tests__/{inline-WidthNames-declaration.test.ts → inline-width-names-declaration.test.tsx} +1 -1
  8. package/codemods/__tests__/{map-body-from-props.test.ts → map-body-from-props.test.tsx} +0 -0
  9. package/codemods/__tests__/{map-container-from-props.test.ts → map-container-from-props.test.tsx} +0 -0
  10. package/codemods/__tests__/{map-footer-from-props.test.ts → map-footer-from-props.test.tsx} +0 -0
  11. package/codemods/__tests__/{map-header-from-props.test.ts → map-header-from-props.test.tsx} +0 -0
  12. package/codemods/__tests__/{remove-appearance-prop.test.ts → remove-appearance-prop.test.tsx} +0 -0
  13. package/codemods/__tests__/{remove-component-override-props.test.ts → remove-component-override-props.test.tsx} +0 -0
  14. package/codemods/__tests__/{rename-appearance-type.test.ts → rename-appearance-type.test.tsx} +0 -0
  15. package/codemods/__tests__/{rename-inner-component-prop-types.test.ts → rename-inner-component-prop-types.test.tsx} +0 -0
  16. package/codemods/__tests__/{rename-scrollBehavior-to-shouldScrollInViewport.test.ts → rename-scroll-behavior-to-should-scroll-in-viewport.test.tsx} +1 -1
  17. package/codemods/migrations/{inline-WidthNames-declaration.ts → inline-width-names-declaration.tsx} +0 -0
  18. package/codemods/migrations/{map-body-from-props.ts → map-body-from-props.tsx} +0 -0
  19. package/codemods/migrations/{map-container-from-props.ts → map-container-from-props.tsx} +0 -0
  20. package/codemods/migrations/{map-footer-from-props.ts → map-footer-from-props.tsx} +0 -0
  21. package/codemods/migrations/{map-header-from-props.ts → map-header-from-props.tsx} +0 -0
  22. package/codemods/migrations/{remove-appearance-prop.ts → remove-appearance-prop.tsx} +0 -0
  23. package/codemods/migrations/{remove-component-override-props.ts → remove-component-override-props.tsx} +0 -0
  24. package/codemods/migrations/{rename-appearance-type.ts → rename-appearance-type.tsx} +0 -0
  25. package/codemods/migrations/{rename-inner-component-prop-types.ts → rename-inner-component-prop-types.tsx} +0 -0
  26. package/codemods/migrations/{rename-scrollBehavior-to-shouldScrollInViewport.ts → rename-scroll-behavior-to-should-scroll-in-viewport.tsx} +0 -0
  27. package/dist/cjs/internal/components/modal-dialog.js +2 -1
  28. package/dist/cjs/internal/components/positioner.js +6 -3
  29. package/dist/cjs/internal/context.js +1 -0
  30. package/dist/cjs/internal/hooks/use-on-motion-finish.js +1 -0
  31. package/dist/cjs/internal/hooks/use-scroll.js +1 -0
  32. package/dist/cjs/modal-body.js +13 -2
  33. package/dist/cjs/modal-footer.js +9 -0
  34. package/dist/cjs/modal-header.js +9 -0
  35. package/dist/cjs/modal-title.js +13 -2
  36. package/dist/cjs/modal-transition.js +9 -0
  37. package/dist/cjs/modal-wrapper.js +33 -11
  38. package/dist/cjs/version.json +1 -1
  39. package/dist/es2019/internal/components/modal-dialog.js +2 -1
  40. package/dist/es2019/internal/components/positioner.js +6 -3
  41. package/dist/es2019/internal/context.js +1 -0
  42. package/dist/es2019/internal/hooks/use-on-motion-finish.js +1 -0
  43. package/dist/es2019/internal/hooks/use-scroll.js +2 -1
  44. package/dist/es2019/modal-body.js +13 -2
  45. package/dist/es2019/modal-footer.js +9 -0
  46. package/dist/es2019/modal-header.js +9 -0
  47. package/dist/es2019/modal-title.js +13 -2
  48. package/dist/es2019/modal-transition.js +9 -0
  49. package/dist/es2019/modal-wrapper.js +32 -7
  50. package/dist/es2019/version.json +1 -1
  51. package/dist/esm/internal/components/modal-dialog.js +2 -1
  52. package/dist/esm/internal/components/positioner.js +6 -3
  53. package/dist/esm/internal/context.js +1 -0
  54. package/dist/esm/internal/hooks/use-on-motion-finish.js +1 -0
  55. package/dist/esm/internal/hooks/use-scroll.js +2 -1
  56. package/dist/esm/modal-body.js +13 -2
  57. package/dist/esm/modal-footer.js +9 -0
  58. package/dist/esm/modal-header.js +9 -0
  59. package/dist/esm/modal-title.js +13 -2
  60. package/dist/esm/modal-transition.js +9 -0
  61. package/dist/esm/modal-wrapper.js +32 -10
  62. package/dist/esm/version.json +1 -1
  63. package/dist/types/modal-body.d.ts +9 -0
  64. package/dist/types/modal-footer.d.ts +9 -0
  65. package/dist/types/modal-header.d.ts +9 -0
  66. package/dist/types/modal-title.d.ts +9 -0
  67. package/dist/types/modal-transition.d.ts +9 -0
  68. package/dist/types/modal-wrapper.d.ts +10 -0
  69. package/dist/types/types.d.ts +2 -2
  70. package/package.json +10 -9
  71. package/report.api.md +210 -0
@@ -25,6 +25,22 @@ const fillScreenStyles = css({
25
25
  WebkitOverflowScrolling: 'touch'
26
26
  });
27
27
 
28
+ const whiteListElements = element => {
29
+ // allows focus to reach elements outside the modal if they contain the data-atlas-extension attribute
30
+ return !element.hasAttribute('data-atlas-extension');
31
+ };
32
+ /**
33
+ * __Modal wrapper__
34
+ *
35
+ * A modal wrapper displays content that requires user interaction, in a layer above the page.
36
+ * This component is primary container for other modal components.
37
+ *
38
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
39
+ * - [Code](https://atlassian.design/components/modal-dialog/code)
40
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
41
+ */
42
+
43
+
28
44
  const ModalWrapper = props => {
29
45
  const {
30
46
  autoFocus = true,
@@ -35,8 +51,12 @@ const ModalWrapper = props => {
35
51
  onClose = noop,
36
52
  onStackChange = noop,
37
53
  isBlanketHidden,
38
- testId,
39
- ...modalDialogProps
54
+ children,
55
+ height,
56
+ width,
57
+ onCloseComplete,
58
+ onOpenComplete,
59
+ testId
40
60
  } = props;
41
61
  const calculatedStackIndex = useModalStack({
42
62
  onStackChange
@@ -50,7 +70,7 @@ const ModalWrapper = props => {
50
70
  action: 'closed',
51
71
  componentName: 'modalDialog',
52
72
  packageName: "@atlaskit/modal-dialog",
53
- packageVersion: "12.2.13"
73
+ packageVersion: "12.3.0"
54
74
  });
55
75
  const onBlanketClicked = useCallback(e => {
56
76
  if (shouldCloseOnOverlayClick) {
@@ -66,13 +86,17 @@ const ModalWrapper = props => {
66
86
  isTinted: !isBlanketHidden,
67
87
  onBlanketClicked: onBlanketClicked,
68
88
  testId: testId && `${testId}--blanket`
69
- }, jsx(ModalDialog, _extends({
89
+ }, jsx(ModalDialog, {
70
90
  testId: testId,
71
91
  autoFocus: autoFocus,
72
92
  stackIndex: stackIndex,
73
93
  onClose: onCloseHandler,
74
- shouldScrollInViewport: shouldScrollInViewport
75
- }, modalDialogProps)));
94
+ shouldScrollInViewport: shouldScrollInViewport,
95
+ height: height,
96
+ width: width,
97
+ onCloseComplete: onCloseComplete,
98
+ onOpenComplete: onOpenComplete
99
+ }, children));
76
100
  return jsx(Portal, {
77
101
  zIndex: layers.modal()
78
102
  }, jsx(FadeIn, null, fadeInProps => jsx("div", _extends({}, fadeInProps, {
@@ -81,7 +105,8 @@ const ModalWrapper = props => {
81
105
  }), jsx(FocusLock, {
82
106
  autoFocus: autoFocusLock,
83
107
  disabled: !isForeground,
84
- returnFocus: true
108
+ returnFocus: true,
109
+ whiteList: whiteListElements
85
110
  }, jsx(ScrollLock, null), shouldScrollInViewport ? jsx(TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket))));
86
111
  };
87
112
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "12.2.13",
3
+ "version": "12.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -128,6 +128,7 @@ var ModalDialog = function ModalDialog(props) {
128
128
  "aria-modal": true
129
129
  }), children));
130
130
  }))));
131
- };
131
+ }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
132
+
132
133
 
133
134
  export default ModalDialog;
@@ -44,9 +44,11 @@ var stackTransitionStyles = css({
44
44
  transitionProperty: 'transform',
45
45
  transitionTimingFunction: easeInOut,
46
46
 
47
- /** Duplicated from @atlaskit/motion/accessibility
47
+ /**
48
+ * Duplicated from @atlaskit/motion/accessibility
48
49
  * because @repo/internal/styles/consistent-style-ordering
49
- * doesn't work well with object spreading. */
50
+ * doesn't work well with object spreading.
51
+ */
50
52
  '@media (prefers-reduced-motion: reduce)': {
51
53
  animation: 'none',
52
54
  transition: 'none'
@@ -73,6 +75,7 @@ var Positioner = function Positioner(props) {
73
75
  stackIndex > 0 ? stackTransformStyles : stackIdleStyles, shouldScrollInViewport ? viewportScrollStyles : bodyScrollStyles],
74
76
  "data-testid": testId && "".concat(testId, "--positioner")
75
77
  }, children);
76
- };
78
+ }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
79
+
77
80
 
78
81
  export default Positioner;
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @repo/internal/react/require-jsdoc */
1
2
  import { createContext } from 'react';
2
3
  export var ModalContext = /*#__PURE__*/createContext(null);
3
4
  export var ScrollContext = /*#__PURE__*/createContext(null);
@@ -1,4 +1,5 @@
1
1
  import { useCallback, useRef } from 'react';
2
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
2
3
  export default function useOnMotionFinish(_ref) {
3
4
  var onOpenComplete = _ref.onOpenComplete,
4
5
  onCloseComplete = _ref.onCloseComplete;
@@ -1,5 +1,6 @@
1
1
  import { useContext } from 'react';
2
- import { ScrollContext } from '../context';
2
+ import { ScrollContext } from '../context'; // eslint-disable-next-line @repo/internal/react/require-jsdoc
3
+
3
4
  export default function useScroll() {
4
5
  var shouldScrollInViewport = useContext(ScrollContext);
5
6
 
@@ -13,19 +13,30 @@ var bodyStyles = css({
13
13
  /**
14
14
  * Adding the padding here avoids cropping the keyline on its sides.
15
15
  * The combined vertical spacing is maintained by subtracting the
16
- * keyline height from header and footer. */
16
+ * keyline height from header and footer.
17
+ */
17
18
 
18
19
  var bodyScrollStyles = css({
19
20
  padding: "".concat(keylineHeight, "px ").concat(padding, "px")
20
21
  });
21
22
  /**
22
23
  * Keylines will not be shown if scrolling in viewport so we do
23
- * not account for them in this case. */
24
+ * not account for them in this case.
25
+ */
24
26
 
25
27
  var viewportScrollStyles = css({
26
28
  padding: "0px ".concat(padding, "px")
27
29
  });
28
30
 
31
+ /**
32
+ * __Modal body__
33
+ *
34
+ * A modal body is used to display the main content of a modal.
35
+ *
36
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
37
+ * - [Code](https://atlassian.design/components/modal-dialog/code#modal-body-props)
38
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
39
+ */
29
40
  var ModalBody = function ModalBody(props) {
30
41
  var children = props.children,
31
42
  userDefinedTestId = props.testId;
@@ -12,6 +12,15 @@ var footerStyles = css({
12
12
  gap: "".concat(footerItemGap, "px")
13
13
  });
14
14
 
15
+ /**
16
+ * __Modal footer__
17
+ *
18
+ * A modal footer often contains a primary action and the ability to cancel and close the dialog, though can contain any React element.
19
+ *
20
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples#modal-footer)
21
+ * - [Code](https://atlassian.design/components/modal-dialog/code#modal-footer-props)
22
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
23
+ */
15
24
  var ModalFooter = function ModalFooter(props) {
16
25
  var children = props.children,
17
26
  userDefinedTestId = props.testId;
@@ -12,6 +12,15 @@ var headerStyles = css({
12
12
  justifyContent: 'space-between'
13
13
  });
14
14
 
15
+ /**
16
+ * __Modal header__
17
+ *
18
+ * A modal header contains the title of the modal and can contain other React elements such as a close button.
19
+ *
20
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples#modal-header)
21
+ * - [Code](https://atlassian.design/components/modal-dialog/code#modal-header-props)
22
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
23
+ */
15
24
  var ModalHeader = function ModalHeader(props) {
16
25
  var children = props.children,
17
26
  userDefinedTestId = props.testId;
@@ -24,7 +24,8 @@ var textStyles = css({
24
24
  /**
25
25
  * This ensures that the element fills the whole header space
26
26
  * and its content does not overflow (since flex items don't
27
- * shrink past its content size by default). */
27
+ * shrink past its content size by default).
28
+ */
28
29
  flex: '1 1 auto',
29
30
  wordWrap: 'break-word'
30
31
  });
@@ -36,7 +37,8 @@ var iconStyles = css({
36
37
  /**
37
38
  * When the title is truncated (not multi-line), we adjust the
38
39
  * line height to avoid cropping the descenders. This removes
39
- * the extra spacing that we get from that adjustment. */
40
+ * the extra spacing that we get from that adjustment.
41
+ */
40
42
 
41
43
  var lineHeightOffset = fontSize - fontSize * adjustedLineHeight;
42
44
  var truncatedTextStyles = css({
@@ -64,6 +66,15 @@ var TitleIcon = function TitleIcon(_ref) {
64
66
  }));
65
67
  };
66
68
 
69
+ /**
70
+ * __Modal title__
71
+ *
72
+ * A modal title is used to display a title within a modal.
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
+ */
67
78
  var ModalTitle = function ModalTitle(props) {
68
79
  var appearance = props.appearance,
69
80
  children = props.children,
@@ -1,5 +1,14 @@
1
1
  import React from 'react';
2
2
  import ExitingPersistence from '@atlaskit/motion/exiting-persistence';
3
+ /**
4
+ * __Modal transition__
5
+ *
6
+ * A modal transition wraps a modal to provide a fluid transition upon opening and closing.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
9
+ * - [Code](https://atlassian.design/components/modal-dialog/code)
10
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
11
+ */
3
12
 
4
13
  var ModalTransition = function ModalTransition(props) {
5
14
  return /*#__PURE__*/React.createElement(ExitingPersistence, {
@@ -1,6 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["autoFocus", "shouldCloseOnEscapePress", "shouldCloseOnOverlayClick", "shouldScrollInViewport", "stackIndex", "onClose", "onStackChange", "isBlanketHidden", "testId"];
4
2
 
5
3
  /** @jsx jsx */
6
4
  import { useCallback } from 'react';
@@ -27,6 +25,22 @@ var fillScreenStyles = css({
27
25
  WebkitOverflowScrolling: 'touch'
28
26
  });
29
27
 
28
+ var whiteListElements = function whiteListElements(element) {
29
+ // allows focus to reach elements outside the modal if they contain the data-atlas-extension attribute
30
+ return !element.hasAttribute('data-atlas-extension');
31
+ };
32
+ /**
33
+ * __Modal wrapper__
34
+ *
35
+ * A modal wrapper displays content that requires user interaction, in a layer above the page.
36
+ * This component is primary container for other modal components.
37
+ *
38
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
39
+ * - [Code](https://atlassian.design/components/modal-dialog/code)
40
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
41
+ */
42
+
43
+
30
44
  var ModalWrapper = function ModalWrapper(props) {
31
45
  var _props$autoFocus = props.autoFocus,
32
46
  autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,
@@ -42,9 +56,12 @@ var ModalWrapper = function ModalWrapper(props) {
42
56
  _props$onStackChange = props.onStackChange,
43
57
  onStackChange = _props$onStackChange === void 0 ? noop : _props$onStackChange,
44
58
  isBlanketHidden = props.isBlanketHidden,
45
- testId = props.testId,
46
- modalDialogProps = _objectWithoutProperties(props, _excluded);
47
-
59
+ children = props.children,
60
+ height = props.height,
61
+ width = props.width,
62
+ onCloseComplete = props.onCloseComplete,
63
+ onOpenComplete = props.onOpenComplete,
64
+ testId = props.testId;
48
65
  var calculatedStackIndex = useModalStack({
49
66
  onStackChange: onStackChange
50
67
  });
@@ -57,7 +74,7 @@ var ModalWrapper = function ModalWrapper(props) {
57
74
  action: 'closed',
58
75
  componentName: 'modalDialog',
59
76
  packageName: "@atlaskit/modal-dialog",
60
- packageVersion: "12.2.13"
77
+ packageVersion: "12.3.0"
61
78
  });
62
79
  var onBlanketClicked = useCallback(function (e) {
63
80
  if (shouldCloseOnOverlayClick) {
@@ -73,13 +90,17 @@ var ModalWrapper = function ModalWrapper(props) {
73
90
  isTinted: !isBlanketHidden,
74
91
  onBlanketClicked: onBlanketClicked,
75
92
  testId: testId && "".concat(testId, "--blanket")
76
- }, jsx(ModalDialog, _extends({
93
+ }, jsx(ModalDialog, {
77
94
  testId: testId,
78
95
  autoFocus: autoFocus,
79
96
  stackIndex: stackIndex,
80
97
  onClose: onCloseHandler,
81
- shouldScrollInViewport: shouldScrollInViewport
82
- }, modalDialogProps)));
98
+ shouldScrollInViewport: shouldScrollInViewport,
99
+ height: height,
100
+ width: width,
101
+ onCloseComplete: onCloseComplete,
102
+ onOpenComplete: onOpenComplete
103
+ }, children));
83
104
  return jsx(Portal, {
84
105
  zIndex: layers.modal()
85
106
  }, jsx(FadeIn, null, function (fadeInProps) {
@@ -89,7 +110,8 @@ var ModalWrapper = function ModalWrapper(props) {
89
110
  }), jsx(FocusLock, {
90
111
  autoFocus: autoFocusLock,
91
112
  disabled: !isForeground,
92
- returnFocus: true
113
+ returnFocus: true,
114
+ whiteList: whiteListElements
93
115
  }, jsx(ScrollLock, null), shouldScrollInViewport ? jsx(TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket));
94
116
  }));
95
117
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "12.2.13",
3
+ "version": "12.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -12,5 +12,14 @@ export interface ModalBodyProps {
12
12
  */
13
13
  testId?: string;
14
14
  }
15
+ /**
16
+ * __Modal body__
17
+ *
18
+ * A modal body is used to display the main content of a modal.
19
+ *
20
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
21
+ * - [Code](https://atlassian.design/components/modal-dialog/code#modal-body-props)
22
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
23
+ */
15
24
  declare const ModalBody: (props: ModalBodyProps) => JSX.Element;
16
25
  export default ModalBody;
@@ -12,5 +12,14 @@ export interface ModalFooterProps {
12
12
  */
13
13
  testId?: string;
14
14
  }
15
+ /**
16
+ * __Modal footer__
17
+ *
18
+ * A modal footer often contains a primary action and the ability to cancel and close the dialog, though can contain any React element.
19
+ *
20
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples#modal-footer)
21
+ * - [Code](https://atlassian.design/components/modal-dialog/code#modal-footer-props)
22
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
23
+ */
15
24
  declare const ModalFooter: (props: ModalFooterProps) => JSX.Element;
16
25
  export default ModalFooter;
@@ -12,5 +12,14 @@ export interface ModalHeaderProps {
12
12
  */
13
13
  testId?: string;
14
14
  }
15
+ /**
16
+ * __Modal header__
17
+ *
18
+ * A modal header contains the title of the modal and can contain other React elements such as a close button.
19
+ *
20
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples#modal-header)
21
+ * - [Code](https://atlassian.design/components/modal-dialog/code#modal-header-props)
22
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
23
+ */
15
24
  declare const ModalHeader: (props: ModalHeaderProps) => JSX.Element;
16
25
  export default ModalHeader;
@@ -22,5 +22,14 @@ export interface ModalTitleProps {
22
22
  */
23
23
  testId?: string;
24
24
  }
25
+ /**
26
+ * __Modal title__
27
+ *
28
+ * A modal title is used to display a title within a modal.
29
+ *
30
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
31
+ * - [Code](https://atlassian.design/components/modal-dialog/code)
32
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
33
+ */
25
34
  declare const ModalTitle: (props: ModalTitleProps) => JSX.Element;
26
35
  export default ModalTitle;
@@ -1,4 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { ExitingPersistenceProps } from '@atlaskit/motion/exiting-persistence';
3
+ /**
4
+ * __Modal transition__
5
+ *
6
+ * A modal transition wraps a modal to provide a fluid transition upon opening and closing.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
9
+ * - [Code](https://atlassian.design/components/modal-dialog/code)
10
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
11
+ */
3
12
  declare const ModalTransition: (props: Pick<ExitingPersistenceProps, 'children'>) => JSX.Element;
4
13
  export default ModalTransition;
@@ -2,5 +2,15 @@
2
2
  /// <reference types="react" />
3
3
  import type { ModalDialogProps } from './types';
4
4
  export type { ModalDialogProps };
5
+ /**
6
+ * __Modal wrapper__
7
+ *
8
+ * A modal wrapper displays content that requires user interaction, in a layer above the page.
9
+ * This component is primary container for other modal components.
10
+ *
11
+ * - [Examples](https://atlassian.design/components/modal-dialog/examples)
12
+ * - [Code](https://atlassian.design/components/modal-dialog/code)
13
+ * - [Usage](https://atlassian.design/components/modal-dialog/usage)
14
+ */
5
15
  declare const ModalWrapper: (props: ModalDialogProps) => JSX.Element;
6
16
  export default ModalWrapper;
@@ -74,10 +74,10 @@ export interface ModalDialogProps {
74
74
  * A `testId` prop is provided for specified elements,
75
75
  * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
76
76
  * serving as a hook for automated tests.
77
-
77
+ *
78
78
  * If not overridden using `testId` prop in the respective components,
79
79
  * this will set `data-testid` on these elements when defined:
80
-
80
+ *
81
81
  * - Modal dialog - `{testId}`
82
82
  * - Modal header - `{testId}--header`
83
83
  * - Modal title - `{testId}--title`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "12.2.13",
3
+ "version": "12.3.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/"
@@ -14,9 +14,9 @@
14
14
  "types": "dist/types/index.d.ts",
15
15
  "sideEffects": false,
16
16
  "af:exports": {
17
- ".": "./src/index.ts",
18
- "./types": "./src/types.ts",
19
- "./hooks": "./src/hooks.ts",
17
+ ".": "./src/index.tsx",
18
+ "./types": "./src/types.tsx",
19
+ "./hooks": "./src/hooks.tsx",
20
20
  "./modal-dialog": "./src/modal-wrapper.tsx",
21
21
  "./modal-header": "./src/modal-header.tsx",
22
22
  "./modal-title": "./src/modal-title.tsx",
@@ -24,7 +24,7 @@
24
24
  "./modal-footer": "./src/modal-footer.tsx",
25
25
  "./modal-transition": "./src/modal-transition.tsx"
26
26
  },
27
- "atlaskit:src": "src/index.ts",
27
+ "atlaskit:src": "src/index.tsx",
28
28
  "atlassian": {
29
29
  "team": "Design System Team",
30
30
  "releaseModel": "scheduled",
@@ -40,12 +40,12 @@
40
40
  "@atlaskit/analytics-next": "^8.2.0",
41
41
  "@atlaskit/blanket": "^12.2.0",
42
42
  "@atlaskit/codemod-utils": "^4.1.0",
43
- "@atlaskit/ds-lib": "^2.0.0",
43
+ "@atlaskit/ds-lib": "^2.1.0",
44
44
  "@atlaskit/focus-ring": "^1.0.0",
45
45
  "@atlaskit/icon": "^21.10.0",
46
- "@atlaskit/motion": "^1.1.0",
46
+ "@atlaskit/motion": "^1.2.0",
47
47
  "@atlaskit/portal": "^4.1.0",
48
- "@atlaskit/theme": "^12.1.0",
48
+ "@atlaskit/theme": "^12.2.0",
49
49
  "@atlaskit/tokens": "^0.10.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/core": "^10.0.9",
@@ -90,7 +90,7 @@
90
90
  "react-dom": "^16.8.0",
91
91
  "react-lorem-component": "^0.13.0",
92
92
  "storybook-addon-performance": "^0.16.0",
93
- "typescript": "4.2.4",
93
+ "typescript": "4.3.5",
94
94
  "wait-for-expect": "^1.2.0"
95
95
  },
96
96
  "keywords": [
@@ -104,6 +104,7 @@
104
104
  },
105
105
  "@repo/internal": {
106
106
  "dom-events": "use-bind-event-listener",
107
+ "design-system": "v1",
107
108
  "ui-components": "lite-mode",
108
109
  "analytics": "analytics-next",
109
110
  "theming": "tokens",