@atlaskit/modal-dialog 14.2.10 → 14.2.12

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,19 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 14.2.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [#186153](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/186153)
8
+ [`4389a7b035d36`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4389a7b035d36) -
9
+ Add testid for modal-dialog to confirm a TTVC blindspot is caused by modal dialog
10
+
11
+ ## 14.2.11
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 14.2.10
4
18
 
5
19
  ### Patch Changes
@@ -52,6 +52,7 @@ var ModalDialog = function ModalDialog(props) {
52
52
  testId = props.testId;
53
53
  var id = (0, _useId.useId)();
54
54
  var titleId = "modal-dialog-title-".concat(id);
55
+ var defaultTestId = testId || 'modal-dialog';
55
56
  (0, _react.useEffect)(function () {
56
57
  // Modal dialogs can appear on top of iframe elements that are on another domain.
57
58
  // There is a Chrome bug where drag and drop in an element on top of a cross domain
@@ -75,12 +76,12 @@ var ModalDialog = function ModalDialog(props) {
75
76
  onMotionFinish = _useOnMotionFinish2[1];
76
77
  var modalDialogContext = (0, _react.useMemo)(function () {
77
78
  return {
78
- testId: testId,
79
+ testId: defaultTestId,
79
80
  titleId: titleId,
80
81
  onClose: onClose,
81
82
  hasProvidedOnClose: hasProvidedOnClose
82
83
  };
83
- }, [testId, titleId, onClose, hasProvidedOnClose]);
84
+ }, [defaultTestId, titleId, onClose, hasProvidedOnClose]);
84
85
  (0, _layering.useCloseOnEscapePress)({
85
86
  onClose: onClose,
86
87
  isDisabled: !shouldCloseOnEscapePress
@@ -90,7 +91,7 @@ var ModalDialog = function ModalDialog(props) {
90
91
  return /*#__PURE__*/React.createElement(_positioner.default, {
91
92
  stackIndex: stackIndex,
92
93
  shouldScrollInViewport: shouldScrollInViewport,
93
- testId: testId
94
+ testId: defaultTestId
94
95
  }, /*#__PURE__*/React.createElement(_context.ModalContext.Provider, {
95
96
  value: modalDialogContext
96
97
  }, /*#__PURE__*/React.createElement(_context.ScrollContext.Provider, {
@@ -112,7 +113,7 @@ var ModalDialog = function ModalDialog(props) {
112
113
  className: (0, _runtime.ax)([dialogStyles.root, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7", bottomFadeInProps.className]),
113
114
  role: "dialog",
114
115
  "aria-labelledby": label ? undefined : titleId,
115
- "data-testid": testId,
116
+ "data-testid": defaultTestId,
116
117
  "data-modal-stack": stackIndex,
117
118
  tabIndex: -1,
118
119
  "aria-modal": true,
@@ -12,6 +12,7 @@ var _react = _interopRequireDefault(require("react"));
12
12
  var _primitives = require("@atlaskit/primitives");
13
13
  var _closeButton = require("./close-button");
14
14
  var _hooks = require("./hooks");
15
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
15
16
  var headerStyles = null;
16
17
  var flexStyles = (0, _primitives.xcss)({
17
18
  flexDirection: 'row-reverse',
@@ -86,7 +86,7 @@ var ModalWrapper = function ModalWrapper(props) {
86
86
  action: 'closed',
87
87
  componentName: 'modalDialog',
88
88
  packageName: "@atlaskit/modal-dialog",
89
- packageVersion: "14.2.9"
89
+ packageVersion: "14.2.11"
90
90
  });
91
91
  var onBlanketClicked = (0, _react.useCallback)(function (e) {
92
92
  if (shouldCloseOnOverlayClick) {
@@ -41,6 +41,7 @@ const ModalDialog = props => {
41
41
  } = props;
42
42
  const id = useId();
43
43
  const titleId = `modal-dialog-title-${id}`;
44
+ const defaultTestId = testId || 'modal-dialog';
44
45
  useEffect(() => {
45
46
  // Modal dialogs can appear on top of iframe elements that are on another domain.
46
47
  // There is a Chrome bug where drag and drop in an element on top of a cross domain
@@ -60,11 +61,11 @@ const ModalDialog = props => {
60
61
  onCloseComplete
61
62
  });
62
63
  const modalDialogContext = useMemo(() => ({
63
- testId,
64
+ testId: defaultTestId,
64
65
  titleId,
65
66
  onClose,
66
67
  hasProvidedOnClose
67
- }), [testId, titleId, onClose, hasProvidedOnClose]);
68
+ }), [defaultTestId, titleId, onClose, hasProvidedOnClose]);
68
69
  useCloseOnEscapePress({
69
70
  onClose,
70
71
  isDisabled: !shouldCloseOnEscapePress
@@ -75,7 +76,7 @@ const ModalDialog = props => {
75
76
  return /*#__PURE__*/React.createElement(Positioner, {
76
77
  stackIndex: stackIndex,
77
78
  shouldScrollInViewport: shouldScrollInViewport,
78
- testId: testId
79
+ testId: defaultTestId
79
80
  }, /*#__PURE__*/React.createElement(ModalContext.Provider, {
80
81
  value: modalDialogContext
81
82
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
@@ -96,7 +97,7 @@ const ModalDialog = props => {
96
97
  className: ax([dialogStyles.root, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7", bottomFadeInProps.className]),
97
98
  role: "dialog",
98
99
  "aria-labelledby": label ? undefined : titleId,
99
- "data-testid": testId,
100
+ "data-testid": defaultTestId,
100
101
  "data-modal-stack": stackIndex,
101
102
  tabIndex: -1,
102
103
  "aria-modal": true,
@@ -2,6 +2,7 @@
2
2
  import "./modal-header.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
6
  import { Flex, xcss } from '@atlaskit/primitives';
6
7
  import { CloseButton } from './close-button';
7
8
  import { useModal } from './hooks';
@@ -73,7 +73,7 @@ const ModalWrapper = props => {
73
73
  action: 'closed',
74
74
  componentName: 'modalDialog',
75
75
  packageName: "@atlaskit/modal-dialog",
76
- packageVersion: "14.2.9"
76
+ packageVersion: "14.2.11"
77
77
  });
78
78
  const onBlanketClicked = useCallback(e => {
79
79
  if (shouldCloseOnOverlayClick) {
@@ -43,6 +43,7 @@ var ModalDialog = function ModalDialog(props) {
43
43
  testId = props.testId;
44
44
  var id = useId();
45
45
  var titleId = "modal-dialog-title-".concat(id);
46
+ var defaultTestId = testId || 'modal-dialog';
46
47
  useEffect(function () {
47
48
  // Modal dialogs can appear on top of iframe elements that are on another domain.
48
49
  // There is a Chrome bug where drag and drop in an element on top of a cross domain
@@ -66,12 +67,12 @@ var ModalDialog = function ModalDialog(props) {
66
67
  onMotionFinish = _useOnMotionFinish2[1];
67
68
  var modalDialogContext = useMemo(function () {
68
69
  return {
69
- testId: testId,
70
+ testId: defaultTestId,
70
71
  titleId: titleId,
71
72
  onClose: onClose,
72
73
  hasProvidedOnClose: hasProvidedOnClose
73
74
  };
74
- }, [testId, titleId, onClose, hasProvidedOnClose]);
75
+ }, [defaultTestId, titleId, onClose, hasProvidedOnClose]);
75
76
  useCloseOnEscapePress({
76
77
  onClose: onClose,
77
78
  isDisabled: !shouldCloseOnEscapePress
@@ -81,7 +82,7 @@ var ModalDialog = function ModalDialog(props) {
81
82
  return /*#__PURE__*/React.createElement(Positioner, {
82
83
  stackIndex: stackIndex,
83
84
  shouldScrollInViewport: shouldScrollInViewport,
84
- testId: testId
85
+ testId: defaultTestId
85
86
  }, /*#__PURE__*/React.createElement(ModalContext.Provider, {
86
87
  value: modalDialogContext
87
88
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
@@ -103,7 +104,7 @@ var ModalDialog = function ModalDialog(props) {
103
104
  className: ax([dialogStyles.root, shouldScrollInViewport ? "_1tke1kxc _c71lglyw _8kn617ks" : "_cbiz17ks _bolh1kw7", bottomFadeInProps.className]),
104
105
  role: "dialog",
105
106
  "aria-labelledby": label ? undefined : titleId,
106
- "data-testid": testId,
107
+ "data-testid": defaultTestId,
107
108
  "data-modal-stack": stackIndex,
108
109
  tabIndex: -1,
109
110
  "aria-modal": true,
@@ -2,6 +2,7 @@
2
2
  import "./modal-header.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
6
  import { Flex, xcss } from '@atlaskit/primitives';
6
7
  import { CloseButton } from './close-button';
7
8
  import { useModal } from './hooks';
@@ -77,7 +77,7 @@ var ModalWrapper = function ModalWrapper(props) {
77
77
  action: 'closed',
78
78
  componentName: 'modalDialog',
79
79
  packageName: "@atlaskit/modal-dialog",
80
- packageVersion: "14.2.9"
80
+ packageVersion: "14.2.11"
81
81
  });
82
82
  var onBlanketClicked = useCallback(function (e) {
83
83
  if (shouldCloseOnOverlayClick) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "14.2.10",
3
+ "version": "14.2.12",
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/"
@@ -40,8 +40,8 @@
40
40
  "@atlaskit/portal": "^5.1.0",
41
41
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
42
42
  "@atlaskit/primitives": "^14.10.0",
43
- "@atlaskit/theme": "^18.0.0",
44
- "@atlaskit/tokens": "^5.4.0",
43
+ "@atlaskit/theme": "^19.0.0",
44
+ "@atlaskit/tokens": "^5.5.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@compiled/react": "^0.18.3",
47
47
  "bind-event-listener": "^3.0.0",
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/avatar": "^25.1.0",
60
60
  "@atlaskit/avatar-group": "^12.1.0",
61
61
  "@atlaskit/banner": "^14.0.0",
62
- "@atlaskit/breadcrumbs": "^15.1.0",
62
+ "@atlaskit/breadcrumbs": "^15.2.0",
63
63
  "@atlaskit/checkbox": "^17.1.0",
64
64
  "@atlaskit/code": "^17.2.0",
65
65
  "@atlaskit/datetime-picker": "^17.0.0",
@@ -72,7 +72,7 @@
72
72
  "@atlaskit/popup": "^4.3.0",
73
73
  "@atlaskit/radio": "^8.1.0",
74
74
  "@atlaskit/section-message": "^8.2.0",
75
- "@atlaskit/select": "^21.1.0",
75
+ "@atlaskit/select": "^21.2.0",
76
76
  "@atlaskit/ssr": "workspace:^",
77
77
  "@atlaskit/textfield": "^8.0.0",
78
78
  "@atlaskit/tooltip": "^20.3.0",