@atlaskit/modal-dialog 14.18.1 → 14.18.3

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,20 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 14.18.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5a711f8d38b68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5a711f8d38b68) -
8
+ Changed the motion uplift feature gate from `platform-dst-motion-uplift` to
9
+ `platform-dst-motion-uplift-modal`
10
+ - Updated dependencies
11
+
12
+ ## 14.18.2
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 14.18.1
4
19
 
5
20
  ### Patch Changes
@@ -28,6 +28,7 @@ var _useOnMotionFinish3 = _interopRequireDefault(require("../hooks/use-on-motion
28
28
  var _element = require("../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/element");
29
29
  var _external = require("../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/external");
30
30
  var _textSelection = require("../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/text-selection");
31
+ var _scrollContext = require("../scroll-context");
31
32
  var _width = require("../width");
32
33
  var _positioner = _interopRequireDefault(require("./positioner"));
33
34
  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" != _typeof3(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); }
@@ -128,9 +129,9 @@ var ModalDialog = function ModalDialog(props) {
128
129
  isFullScreen: isFullScreen
129
130
  }, /*#__PURE__*/React.createElement(_context.ModalContext.Provider, {
130
131
  value: modalDialogContext
131
- }, /*#__PURE__*/React.createElement(_context.ScrollContext.Provider, {
132
+ }, /*#__PURE__*/React.createElement(_scrollContext.ScrollContext.Provider, {
132
133
  value: shouldScrollInViewport
133
- }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(_motion.Motion, {
134
+ }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(_motion.Motion, {
134
135
  enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
135
136
  exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
136
137
  onFinish: onMotionFinish,
@@ -152,7 +152,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
152
152
  isDisabled: false
153
153
  }, /*#__PURE__*/React.createElement(_portal.default, {
154
154
  zIndex: _constants.layers.modal()
155
- }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(_motion.Motion, {
155
+ }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(_motion.Motion, {
156
156
  enteringAnimation: "var(--ds-blanket-enter, 250ms cubic-bezier(0.4, 0, 0, 1) FadeIn0to100)",
157
157
  exitingAnimation: "var(--ds-blanket-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) FadeOut100to0)"
158
158
  }, /*#__PURE__*/React.createElement("div", {
@@ -3,8 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ScrollContext = exports.ModalContext = void 0;
6
+ exports.ModalContext = void 0;
7
+ Object.defineProperty(exports, "ScrollContext", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _scrollContext.ScrollContext;
11
+ }
12
+ });
7
13
  var _react = require("react");
14
+ var _scrollContext = require("./scroll-context");
8
15
  /* eslint-disable @repo/internal/react/require-jsdoc */
9
- var ModalContext = exports.ModalContext = /*#__PURE__*/(0, _react.createContext)(null);
10
- var ScrollContext = exports.ScrollContext = /*#__PURE__*/(0, _react.createContext)(null);
16
+ var ModalContext = exports.ModalContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = useScroll;
7
7
  var _react = require("react");
8
- var _context = require("../context");
8
+ var _scrollContext = require("../scroll-context");
9
9
  /**
10
10
  * This returns whether or not scrolling is allowed based on the existing
11
11
  * scrolling context.
12
12
  */
13
13
  function useScroll() {
14
- var shouldScrollInViewport = (0, _react.useContext)(_context.ScrollContext);
14
+ var shouldScrollInViewport = (0, _react.useContext)(_scrollContext.ScrollContext);
15
15
  if (shouldScrollInViewport == null) {
16
16
  throw Error('@atlaskit/modal-dialog: Scroll context unavailable – this component needs to be a child of ModalDialog.');
17
17
  }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ScrollContext = void 0;
7
+ var _react = require("react");
8
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
9
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
10
+ /**
11
+ * __Scroll context__
12
+ *
13
+ * A scroll context {description}.
14
+ *
15
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
16
+ * - [Code](https://atlassian.design/components/{packageName}/code)
17
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
18
+ */
19
+ var ScrollContext = exports.ScrollContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -13,11 +13,12 @@ import { Motion } from '@atlaskit/motion';
13
13
  import FadeIn from '@atlaskit/motion/fade-in';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
16
- import { ModalContext, ScrollContext } from '../context';
16
+ import { ModalContext } from '../context';
17
17
  import useOnMotionFinish from '../hooks/use-on-motion-finish';
18
18
  import { disableDraggingToCrossOriginIFramesForElement } from '../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/element';
19
19
  import { disableDraggingToCrossOriginIFramesForExternal } from '../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/external';
20
20
  import { disableDraggingToCrossOriginIFramesForTextSelection } from '../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/text-selection';
21
+ import { ScrollContext } from '../scroll-context';
21
22
  import { width } from '../width';
22
23
  import Positioner from './positioner';
23
24
  const dialogWidth = input => {
@@ -113,7 +114,7 @@ const ModalDialog = props => {
113
114
  value: modalDialogContext
114
115
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
115
116
  value: shouldScrollInViewport
116
- }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
117
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(Motion, {
117
118
  enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
118
119
  exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
119
120
  onFinish: onMotionFinish,
@@ -136,7 +136,7 @@ const InternalModalWrapper = props => {
136
136
  isDisabled: false
137
137
  }, /*#__PURE__*/React.createElement(Portal, {
138
138
  zIndex: layers.modal()
139
- }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
139
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(Motion, {
140
140
  enteringAnimation: "var(--ds-blanket-enter, 250ms cubic-bezier(0.4, 0, 0, 1) FadeIn0to100)",
141
141
  exitingAnimation: "var(--ds-blanket-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) FadeOut100to0)"
142
142
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,4 +1,4 @@
1
1
  import { createContext } from 'react';
2
2
  /* eslint-disable @repo/internal/react/require-jsdoc */
3
3
  export const ModalContext = /*#__PURE__*/createContext(null);
4
- export const ScrollContext = /*#__PURE__*/createContext(null);
4
+ export { ScrollContext } from './scroll-context';
@@ -1,5 +1,5 @@
1
1
  import { useContext } from 'react';
2
- import { ScrollContext } from '../context';
2
+ import { ScrollContext } from '../scroll-context';
3
3
 
4
4
  /**
5
5
  * This returns whether or not scrolling is allowed based on the existing
@@ -0,0 +1,14 @@
1
+ import { createContext } from 'react';
2
+
3
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
4
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
5
+ /**
6
+ * __Scroll context__
7
+ *
8
+ * A scroll context {description}.
9
+ *
10
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
11
+ * - [Code](https://atlassian.design/components/{packageName}/code)
12
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
13
+ */
14
+ export const ScrollContext = /*#__PURE__*/createContext(null);
@@ -15,11 +15,12 @@ import { Motion } from '@atlaskit/motion';
15
15
  import FadeIn from '@atlaskit/motion/fade-in';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
18
- import { ModalContext, ScrollContext } from '../context';
18
+ import { ModalContext } from '../context';
19
19
  import useOnMotionFinish from '../hooks/use-on-motion-finish';
20
20
  import { disableDraggingToCrossOriginIFramesForElement } from '../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/element';
21
21
  import { disableDraggingToCrossOriginIFramesForExternal } from '../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/external';
22
22
  import { disableDraggingToCrossOriginIFramesForTextSelection } from '../pragmatic-drag-and-drop/disable-dragging-to-cross-origin-iframes/text-selection';
23
+ import { ScrollContext } from '../scroll-context';
23
24
  import { width } from '../width';
24
25
  import Positioner from './positioner';
25
26
  var dialogWidth = function dialogWidth(input) {
@@ -121,7 +122,7 @@ var ModalDialog = function ModalDialog(props) {
121
122
  value: modalDialogContext
122
123
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
123
124
  value: shouldScrollInViewport
124
- }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
125
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(Motion, {
125
126
  enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
126
127
  exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
127
128
  onFinish: onMotionFinish,
@@ -143,7 +143,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
143
143
  isDisabled: false
144
144
  }, /*#__PURE__*/React.createElement(Portal, {
145
145
  zIndex: layers.modal()
146
- }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift') ? /*#__PURE__*/React.createElement(Motion, {
146
+ }, !UNSAFE_shouldDisableMotionUplift && fg('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(Motion, {
147
147
  enteringAnimation: "var(--ds-blanket-enter, 250ms cubic-bezier(0.4, 0, 0, 1) FadeIn0to100)",
148
148
  exitingAnimation: "var(--ds-blanket-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) FadeOut100to0)"
149
149
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,4 +1,4 @@
1
1
  import { createContext } from 'react';
2
2
  /* eslint-disable @repo/internal/react/require-jsdoc */
3
3
  export var ModalContext = /*#__PURE__*/createContext(null);
4
- export var ScrollContext = /*#__PURE__*/createContext(null);
4
+ export { ScrollContext } from './scroll-context';
@@ -1,5 +1,5 @@
1
1
  import { useContext } from 'react';
2
- import { ScrollContext } from '../context';
2
+ import { ScrollContext } from '../scroll-context';
3
3
 
4
4
  /**
5
5
  * This returns whether or not scrolling is allowed based on the existing
@@ -0,0 +1,14 @@
1
+ import { createContext } from 'react';
2
+
3
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
4
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
5
+ /**
6
+ * __Scroll context__
7
+ *
8
+ * A scroll context {description}.
9
+ *
10
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
11
+ * - [Code](https://atlassian.design/components/{packageName}/code)
12
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
13
+ */
14
+ export var ScrollContext = /*#__PURE__*/createContext(null);
@@ -27,4 +27,4 @@ export type ModalAttributes = {
27
27
  isFullScreen: boolean;
28
28
  };
29
29
  export declare const ModalContext: Context<ModalAttributes | null>;
30
- export declare const ScrollContext: Context<boolean | null>;
30
+ export { ScrollContext } from './scroll-context';
@@ -0,0 +1,11 @@
1
+ import { type Context } from 'react';
2
+ /**
3
+ * __Scroll context__
4
+ *
5
+ * A scroll context {description}.
6
+ *
7
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
8
+ * - [Code](https://atlassian.design/components/{packageName}/code)
9
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
10
+ */
11
+ export declare const ScrollContext: Context<boolean | null>;
@@ -27,4 +27,4 @@ export type ModalAttributes = {
27
27
  isFullScreen: boolean;
28
28
  };
29
29
  export declare const ModalContext: Context<ModalAttributes | null>;
30
- export declare const ScrollContext: Context<boolean | null>;
30
+ export { ScrollContext } from './scroll-context';
@@ -0,0 +1,11 @@
1
+ import { type Context } from 'react';
2
+ /**
3
+ * __Scroll context__
4
+ *
5
+ * A scroll context {description}.
6
+ *
7
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
8
+ * - [Code](https://atlassian.design/components/{packageName}/code)
9
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
10
+ */
11
+ export declare const ScrollContext: Context<boolean | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "14.18.1",
3
+ "version": "14.18.3",
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/"
@@ -41,12 +41,12 @@
41
41
  "@atlaskit/ds-lib": "^7.0.0",
42
42
  "@atlaskit/icon": "^34.3.0",
43
43
  "@atlaskit/layering": "^3.7.0",
44
- "@atlaskit/motion": "^5.7.0",
44
+ "@atlaskit/motion": "^6.2.0",
45
45
  "@atlaskit/platform-feature-flags": "^1.1.0",
46
- "@atlaskit/portal": "^5.4.0",
46
+ "@atlaskit/portal": "^5.5.0",
47
47
  "@atlaskit/pragmatic-drag-and-drop": "^1.8.0",
48
48
  "@atlaskit/primitives": "^19.0.0",
49
- "@atlaskit/theme": "^23.1.0",
49
+ "@atlaskit/theme": "^23.2.0",
50
50
  "@atlaskit/tokens": "^13.0.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@compiled/react": "^0.20.0",
@@ -62,26 +62,26 @@
62
62
  "@af/accessibility-testing": "workspace:^",
63
63
  "@af/integration-testing": "workspace:^",
64
64
  "@af/visual-regression": "workspace:^",
65
- "@atlaskit/avatar": "^25.13.0",
65
+ "@atlaskit/avatar": "^25.14.0",
66
66
  "@atlaskit/avatar-group": "^12.7.0",
67
- "@atlaskit/banner": "^14.0.0",
67
+ "@atlaskit/banner": "^14.1.0",
68
68
  "@atlaskit/breadcrumbs": "^16.1.0",
69
69
  "@atlaskit/checkbox": "^17.3.0",
70
- "@atlaskit/code": "^17.4.0",
71
- "@atlaskit/datetime-picker": "^17.7.0",
70
+ "@atlaskit/code": "^17.5.0",
71
+ "@atlaskit/datetime-picker": "^17.8.0",
72
72
  "@atlaskit/docs": "^11.8.0",
73
73
  "@atlaskit/dropdown-menu": "^16.8.0",
74
- "@atlaskit/flag": "^17.9.0",
74
+ "@atlaskit/flag": "^17.11.0",
75
75
  "@atlaskit/form": "^15.5.0",
76
76
  "@atlaskit/heading": "^5.4.0",
77
77
  "@atlaskit/link": "^3.4.0",
78
- "@atlaskit/popup": "^4.16.0",
79
- "@atlaskit/radio": "^8.5.0",
78
+ "@atlaskit/popup": "^4.17.0",
79
+ "@atlaskit/radio": "^8.6.0",
80
80
  "@atlaskit/section-message": "^8.12.0",
81
81
  "@atlaskit/select": "^21.10.0",
82
- "@atlaskit/spotlight": "^0.12.0",
82
+ "@atlaskit/spotlight": "^0.13.0",
83
83
  "@atlaskit/textfield": "^8.3.0",
84
- "@atlaskit/tooltip": "^21.2.0",
84
+ "@atlaskit/tooltip": "^22.0.0",
85
85
  "@atlassian/feature-flags-test-utils": "^1.0.0",
86
86
  "@atlassian/react-compiler-gating": "workspace:^",
87
87
  "@atlassian/ssr-tests": "workspace:^",
@@ -138,7 +138,7 @@
138
138
  "platform-dst-shape-theme-default": {
139
139
  "type": "boolean"
140
140
  },
141
- "platform-dst-motion-uplift": {
141
+ "platform-dst-motion-uplift-modal": {
142
142
  "type": "boolean"
143
143
  }
144
144
  },
package/offerings.json DELETED
@@ -1,37 +0,0 @@
1
- [
2
- {
3
- "name": "Modal",
4
- "package": "@atlaskit/modal-dialog",
5
- "import": {
6
- "name": "Modal",
7
- "package": "@atlaskit/modal-dialog",
8
- "type": "default"
9
- },
10
- "keywords": ["modal", "dialog", "popup", "overlay", "focused", "interaction", "layer"],
11
- "categories": ["overlay"],
12
- "shortDescription": "A modal dialog component for important content.",
13
- "status": "general-availability",
14
- "accessibilityGuidelines": [
15
- "Ensure modal content is announced by screen readers",
16
- "Provide appropriate focus management",
17
- "Use clear, descriptive modal titles",
18
- "Ensure keyboard navigation and escape key support",
19
- "Maintain focus within modal when open"
20
- ],
21
- "usageGuidelines": [
22
- "Use for important content that requires user attention",
23
- "Keep modal content focused on a single task",
24
- "Provide clear action buttons",
25
- "Use appropriate modal sizes for content",
26
- "Consider mobile responsiveness"
27
- ],
28
- "contentGuidelines": [
29
- "Use clear, descriptive titles",
30
- "Keep content focused on a single task or message",
31
- "Include clear action buttons",
32
- "Use sentence case for all text",
33
- "Provide clear next steps"
34
- ],
35
- "examples": ["./examples/constellation/modal-default.tsx"]
36
- }
37
- ]