@atlaskit/modal-dialog 14.17.0 → 14.18.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 14.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d182ea0a08b1f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d182ea0a08b1f) -
8
+ Added temporary `UNSAFE_shouldDisableMotionUplift` prop to override the
9
+ `platform-dst-motion-uplift` feature gate and disable the motion uplift
10
+
3
11
  ## 14.17.0
4
12
 
5
13
  ### Minor Changes
@@ -75,7 +75,9 @@ var ModalDialog = function ModalDialog(props) {
75
75
  label = props.label,
76
76
  testId = props.testId,
77
77
  _props$isFullScreen = props.isFullScreen,
78
- isFullScreen = _props$isFullScreen === void 0 ? false : _props$isFullScreen;
78
+ isFullScreen = _props$isFullScreen === void 0 ? false : _props$isFullScreen,
79
+ _props$UNSAFE_shouldD = props.UNSAFE_shouldDisableMotionUplift,
80
+ UNSAFE_shouldDisableMotionUplift = _props$UNSAFE_shouldD === void 0 ? false : _props$UNSAFE_shouldD;
79
81
  var id = (0, _useId.useId)();
80
82
  var titleId = "modal-dialog-title-".concat(id);
81
83
  var defaultTestId = testId || 'modal-dialog';
@@ -128,7 +130,7 @@ var ModalDialog = function ModalDialog(props) {
128
130
  value: modalDialogContext
129
131
  }, /*#__PURE__*/React.createElement(_context.ScrollContext.Provider, {
130
132
  value: shouldScrollInViewport
131
- }, (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(_motion.Motion, {
133
+ }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(_motion.Motion, {
132
134
  enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
133
135
  exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
134
136
  onFinish: onMotionFinish,
@@ -76,7 +76,9 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
76
76
  onOpenComplete = props.onOpenComplete,
77
77
  label = props.label,
78
78
  testId = props.testId,
79
- isFullScreen = props.isFullScreen;
79
+ isFullScreen = props.isFullScreen,
80
+ _props$UNSAFE_shouldD = props.UNSAFE_shouldDisableMotionUplift,
81
+ UNSAFE_shouldDisableMotionUplift = _props$UNSAFE_shouldD === void 0 ? false : _props$UNSAFE_shouldD;
80
82
  var calculatedStackIndex = (0, _useModalStack.default)({
81
83
  onStackChange: onStackChange
82
84
  });
@@ -92,7 +94,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
92
94
  action: 'closed',
93
95
  componentName: 'modalDialog',
94
96
  packageName: "@atlaskit/modal-dialog",
95
- packageVersion: "14.16.0"
97
+ packageVersion: "0.0.0-development"
96
98
  });
97
99
  var onBlanketClicked = (0, _react.useCallback)(function (e) {
98
100
  if (shouldCloseOnOverlayClick) {
@@ -131,7 +133,8 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
131
133
  onCloseComplete: onCloseComplete,
132
134
  onOpenComplete: onOpenComplete,
133
135
  hasProvidedOnClose: Boolean(providedOnClose),
134
- isFullScreen: isFullScreen
136
+ isFullScreen: isFullScreen,
137
+ UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift
135
138
  }, children));
136
139
  var returnFocus = true;
137
140
  var onDeactivation = _noop.default;
@@ -149,7 +152,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
149
152
  isDisabled: false
150
153
  }, /*#__PURE__*/React.createElement(_portal.default, {
151
154
  zIndex: _constants.layers.modal()
152
- }, (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(_motion.Motion, {
155
+ }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(_motion.Motion, {
153
156
  enteringAnimation: "var(--ds-blanket-enter, 250ms cubic-bezier(0.4, 0, 0, 1) FadeIn0to100)",
154
157
  exitingAnimation: "var(--ds-blanket-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) FadeOut100to0)"
155
158
  }, /*#__PURE__*/React.createElement("div", {
@@ -62,7 +62,8 @@ const ModalDialog = props => {
62
62
  children,
63
63
  label,
64
64
  testId,
65
- isFullScreen = false
65
+ isFullScreen = false,
66
+ UNSAFE_shouldDisableMotionUplift = false
66
67
  } = props;
67
68
  const id = useId();
68
69
  const titleId = `modal-dialog-title-${id}`;
@@ -112,7 +113,7 @@ const ModalDialog = props => {
112
113
  value: modalDialogContext
113
114
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
114
115
  value: shouldScrollInViewport
115
- }, fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
116
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
116
117
  enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
117
118
  exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
118
119
  onFinish: onMotionFinish,
@@ -62,7 +62,8 @@ const InternalModalWrapper = props => {
62
62
  onOpenComplete,
63
63
  label,
64
64
  testId,
65
- isFullScreen
65
+ isFullScreen,
66
+ UNSAFE_shouldDisableMotionUplift = false
66
67
  } = props;
67
68
  const calculatedStackIndex = useModalStack({
68
69
  onStackChange
@@ -79,7 +80,7 @@ const InternalModalWrapper = props => {
79
80
  action: 'closed',
80
81
  componentName: 'modalDialog',
81
82
  packageName: "@atlaskit/modal-dialog",
82
- packageVersion: "14.16.0"
83
+ packageVersion: "0.0.0-development"
83
84
  });
84
85
  const onBlanketClicked = useCallback(e => {
85
86
  if (shouldCloseOnOverlayClick) {
@@ -116,7 +117,8 @@ const InternalModalWrapper = props => {
116
117
  onCloseComplete: onCloseComplete,
117
118
  onOpenComplete: onOpenComplete,
118
119
  hasProvidedOnClose: Boolean(providedOnClose),
119
- isFullScreen: isFullScreen
120
+ isFullScreen: isFullScreen,
121
+ UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift
120
122
  }, children));
121
123
  let returnFocus = true;
122
124
  let onDeactivation = noop;
@@ -134,7 +136,7 @@ const InternalModalWrapper = props => {
134
136
  isDisabled: false
135
137
  }, /*#__PURE__*/React.createElement(Portal, {
136
138
  zIndex: layers.modal()
137
- }, fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
139
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
138
140
  enteringAnimation: "var(--ds-blanket-enter, 250ms cubic-bezier(0.4, 0, 0, 1) FadeIn0to100)",
139
141
  exitingAnimation: "var(--ds-blanket-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) FadeOut100to0)"
140
142
  }, /*#__PURE__*/React.createElement("div", {
@@ -66,7 +66,9 @@ var ModalDialog = function ModalDialog(props) {
66
66
  label = props.label,
67
67
  testId = props.testId,
68
68
  _props$isFullScreen = props.isFullScreen,
69
- isFullScreen = _props$isFullScreen === void 0 ? false : _props$isFullScreen;
69
+ isFullScreen = _props$isFullScreen === void 0 ? false : _props$isFullScreen,
70
+ _props$UNSAFE_shouldD = props.UNSAFE_shouldDisableMotionUplift,
71
+ UNSAFE_shouldDisableMotionUplift = _props$UNSAFE_shouldD === void 0 ? false : _props$UNSAFE_shouldD;
70
72
  var id = useId();
71
73
  var titleId = "modal-dialog-title-".concat(id);
72
74
  var defaultTestId = testId || 'modal-dialog';
@@ -119,7 +121,7 @@ var ModalDialog = function ModalDialog(props) {
119
121
  value: modalDialogContext
120
122
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
121
123
  value: shouldScrollInViewport
122
- }, fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
124
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
123
125
  enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
124
126
  exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
125
127
  onFinish: onMotionFinish,
@@ -67,7 +67,9 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
67
67
  onOpenComplete = props.onOpenComplete,
68
68
  label = props.label,
69
69
  testId = props.testId,
70
- isFullScreen = props.isFullScreen;
70
+ isFullScreen = props.isFullScreen,
71
+ _props$UNSAFE_shouldD = props.UNSAFE_shouldDisableMotionUplift,
72
+ UNSAFE_shouldDisableMotionUplift = _props$UNSAFE_shouldD === void 0 ? false : _props$UNSAFE_shouldD;
71
73
  var calculatedStackIndex = useModalStack({
72
74
  onStackChange: onStackChange
73
75
  });
@@ -83,7 +85,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
83
85
  action: 'closed',
84
86
  componentName: 'modalDialog',
85
87
  packageName: "@atlaskit/modal-dialog",
86
- packageVersion: "14.16.0"
88
+ packageVersion: "0.0.0-development"
87
89
  });
88
90
  var onBlanketClicked = useCallback(function (e) {
89
91
  if (shouldCloseOnOverlayClick) {
@@ -122,7 +124,8 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
122
124
  onCloseComplete: onCloseComplete,
123
125
  onOpenComplete: onOpenComplete,
124
126
  hasProvidedOnClose: Boolean(providedOnClose),
125
- isFullScreen: isFullScreen
127
+ isFullScreen: isFullScreen,
128
+ UNSAFE_shouldDisableMotionUplift: UNSAFE_shouldDisableMotionUplift
126
129
  }, children));
127
130
  var returnFocus = true;
128
131
  var onDeactivation = noop;
@@ -140,7 +143,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
140
143
  isDisabled: false
141
144
  }, /*#__PURE__*/React.createElement(Portal, {
142
145
  zIndex: layers.modal()
143
- }, fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
146
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
144
147
  enteringAnimation: "var(--ds-blanket-enter, 250ms cubic-bezier(0.4, 0, 0, 1) FadeIn0to100)",
145
148
  exitingAnimation: "var(--ds-blanket-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) FadeOut100to0)"
146
149
  }, /*#__PURE__*/React.createElement("div", {
@@ -111,4 +111,12 @@ export interface ModalDialogProps {
111
111
  * - Blanket: `{testId}--blanket`
112
112
  */
113
113
  testId?: string;
114
+ /**
115
+ * @internal NOT FOR PUBLIC USE.
116
+ * This prop is used to disable the new motion uplift.
117
+ * It is strictly only used for cases where the motion uplift is not working as expected.
118
+ *
119
+ * @warning Use with caution. This prop will be removed in a future release.
120
+ */
121
+ UNSAFE_shouldDisableMotionUplift?: boolean | undefined;
114
122
  }
@@ -111,4 +111,12 @@ export interface ModalDialogProps {
111
111
  * - Blanket: `{testId}--blanket`
112
112
  */
113
113
  testId?: string;
114
+ /**
115
+ * @internal NOT FOR PUBLIC USE.
116
+ * This prop is used to disable the new motion uplift.
117
+ * It is strictly only used for cases where the motion uplift is not working as expected.
118
+ *
119
+ * @warning Use with caution. This prop will be removed in a future release.
120
+ */
121
+ UNSAFE_shouldDisableMotionUplift?: boolean | undefined;
114
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "14.17.0",
3
+ "version": "14.18.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/"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/button": "^23.11.0",
40
40
  "@atlaskit/css": "^0.19.0",
41
41
  "@atlaskit/ds-lib": "^7.0.0",
42
- "@atlaskit/icon": "^34.2.0",
42
+ "@atlaskit/icon": "^34.3.0",
43
43
  "@atlaskit/layering": "^3.7.0",
44
44
  "@atlaskit/motion": "^5.7.0",
45
45
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/breadcrumbs": "^16.1.0",
69
69
  "@atlaskit/checkbox": "^17.3.0",
70
70
  "@atlaskit/code": "^17.4.0",
71
- "@atlaskit/datetime-picker": "^17.6.0",
71
+ "@atlaskit/datetime-picker": "^17.7.0",
72
72
  "@atlaskit/docs": "^11.8.0",
73
73
  "@atlaskit/dropdown-menu": "^16.8.0",
74
74
  "@atlaskit/flag": "^17.9.0",
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/select": "^21.10.0",
82
82
  "@atlaskit/spotlight": "^0.12.0",
83
83
  "@atlaskit/textfield": "^8.3.0",
84
- "@atlaskit/tooltip": "^21.1.0",
84
+ "@atlaskit/tooltip": "^21.2.0",
85
85
  "@atlassian/feature-flags-test-utils": "^1.0.0",
86
86
  "@atlassian/react-compiler-gating": "workspace:^",
87
87
  "@atlassian/ssr-tests": "workspace:^",