@atlaskit/modal-dialog 16.3.3 → 16.4.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,22 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 16.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0075efb228821`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0075efb228821) -
8
+ Autofix: barrel removal (imports + exports)
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 16.3.4
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 16.3.3
4
21
 
5
22
  ### Patch Changes
@@ -20,7 +20,7 @@ var _useAutoFocus = _interopRequireDefault(require("@atlaskit/ds-lib/use-auto-fo
20
20
  var _useId = require("@atlaskit/ds-lib/use-id");
21
21
  var _useCloseOnEscapePress = require("@atlaskit/layering/use-close-on-escape-press");
22
22
  var _useLayering2 = require("@atlaskit/layering/use-layering");
23
- var _motion = require("@atlaskit/motion");
23
+ var _motion = _interopRequireDefault(require("@atlaskit/motion/entering/motion"));
24
24
  var _fadeIn = _interopRequireDefault(require("@atlaskit/motion/fade-in"));
25
25
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
26
  var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
@@ -113,7 +113,7 @@ var ModalDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
113
113
  value: modalDialogContext
114
114
  }, /*#__PURE__*/React.createElement(_scrollContext.ScrollContext.Provider, {
115
115
  value: shouldScrollInViewport
116
- }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(_motion.Motion, {
116
+ }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(_motion.default, {
117
117
  enteringAnimation: "var(--ds-modal-enter, 250ms cubic-bezier(0.4, 0, 0, 1) ScaleIn95to100)",
118
118
  exitingAnimation: "var(--ds-modal-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) ScaleOut100to95)",
119
119
  onFinish: onMotionFinish,
@@ -23,9 +23,9 @@ var _useAutoFocus = _interopRequireDefault(require("@atlaskit/ds-lib/use-auto-fo
23
23
  var _useId = require("@atlaskit/ds-lib/use-id");
24
24
  var _layering = require("@atlaskit/layering/layering");
25
25
  var _useNotifyOpenLayerObserver = require("@atlaskit/layering/use-notify-open-layer-observer");
26
- var _motion = require("@atlaskit/motion");
27
- var _exitingPersistence = require("@atlaskit/motion/exiting-persistence");
26
+ var _motion = _interopRequireDefault(require("@atlaskit/motion/entering/motion"));
28
27
  var _fadeIn = _interopRequireDefault(require("@atlaskit/motion/fade-in"));
28
+ var _useExitingPersistence = require("@atlaskit/motion/use-exiting-persistence");
29
29
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
30
30
  var _portal = _interopRequireDefault(require("@atlaskit/portal"));
31
31
  var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
@@ -92,7 +92,7 @@ function useModalCloseHandler(providedOnClose) {
92
92
  action: 'closed',
93
93
  componentName: 'modalDialog',
94
94
  packageName: "@atlaskit/modal-dialog",
95
- packageVersion: "16.3.2"
95
+ packageVersion: "16.3.4"
96
96
  });
97
97
  }
98
98
  function getScrollMode(_ref) {
@@ -206,7 +206,7 @@ function ModalWrapperTopLayer(props) {
206
206
  onStackChange: onStackChange
207
207
  });
208
208
  var onCloseHandler = useModalCloseHandler(providedOnClose);
209
- var _useExitingPersistenc = (0, _exitingPersistence.useExitingPersistence)(),
209
+ var _useExitingPersistenc = (0, _useExitingPersistence.useExitingPersistence)(),
210
210
  isExiting = _useExitingPersistenc.isExiting,
211
211
  onExitFinish = _useExitingPersistenc.onFinish;
212
212
 
@@ -453,7 +453,7 @@ var ModalWrapperLegacy = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
453
453
  isDisabled: false
454
454
  }, /*#__PURE__*/React.createElement(_portal.default, {
455
455
  zIndex: _constants.layers.modal()
456
- }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(_motion.Motion, {
456
+ }, !UNSAFE_shouldDisableMotionUplift && (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-modal') ? /*#__PURE__*/React.createElement(_motion.default, {
457
457
  enteringAnimation: "var(--ds-blanket-enter, 250ms cubic-bezier(0.4, 0, 0, 1) FadeIn0to100)",
458
458
  exitingAnimation: "var(--ds-blanket-exit, 200ms cubic-bezier(0.6, 0, 0.8, 0.6) FadeOut100to0)"
459
459
  }, /*#__PURE__*/React.createElement("div", {
@@ -10,7 +10,7 @@ require("./positioner.compiled.css");
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _runtime = require("@compiled/react/runtime");
12
12
  var _curves = require("@atlaskit/motion/curves");
13
- var _durations = require("@atlaskit/motion/durations");
13
+ var _durations = require("@atlaskit/motion/utils/durations");
14
14
  var _constants = require("@atlaskit/theme/constants");
15
15
  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); }
16
16
  // Flex and min-content are set to constrain the height of the body and support multi-column scrolling experiences
@@ -10,7 +10,7 @@ var _react = require("react");
10
10
  var _useLazyCallback = _interopRequireDefault(require("@atlaskit/ds-lib/use-lazy-callback"));
11
11
  var _usePreviousValue = _interopRequireDefault(require("@atlaskit/ds-lib/use-previous-value"));
12
12
  var _useStateRef3 = _interopRequireDefault(require("@atlaskit/ds-lib/use-state-ref"));
13
- var _exitingPersistence = require("@atlaskit/motion/exiting-persistence");
13
+ var _useExitingPersistence = require("@atlaskit/motion/use-exiting-persistence");
14
14
  /**
15
15
  * ________________________________________________
16
16
  * | MAJOR VERSIONS WILL NOT KNOW ABOUT EACH OTHER! |
@@ -30,7 +30,7 @@ var modalStackRegister = [];
30
30
  */
31
31
  function useModalStack(_ref) {
32
32
  var onStackChange = _ref.onStackChange;
33
- var _useExitingPersistenc = (0, _exitingPersistence.useExitingPersistence)(),
33
+ var _useExitingPersistenc = (0, _useExitingPersistence.useExitingPersistence)(),
34
34
  isExiting = _useExitingPersistenc.isExiting;
35
35
  var _useStateRef = (0, _useStateRef3.default)(0),
36
36
  _useStateRef2 = (0, _slicedToArray2.default)(_useStateRef, 2),
@@ -10,7 +10,7 @@ import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
10
10
  import { useId } from '@atlaskit/ds-lib/use-id';
11
11
  import { useCloseOnEscapePress } from '@atlaskit/layering/use-close-on-escape-press';
12
12
  import { useLayering } from '@atlaskit/layering/use-layering';
13
- import { Motion } from '@atlaskit/motion';
13
+ import Motion from '@atlaskit/motion/entering/motion';
14
14
  import FadeIn from '@atlaskit/motion/fade-in';
15
15
  import { fg } from '@atlaskit/platform-feature-flags';
16
16
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
@@ -14,9 +14,9 @@ import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
14
14
  import { useId } from '@atlaskit/ds-lib/use-id';
15
15
  import { Layering } from '@atlaskit/layering/layering';
16
16
  import { useNotifyOpenLayerObserver } from '@atlaskit/layering/use-notify-open-layer-observer';
17
- import { Motion } from '@atlaskit/motion';
18
- import { useExitingPersistence } from '@atlaskit/motion/exiting-persistence';
17
+ import Motion from '@atlaskit/motion/entering/motion';
19
18
  import FadeIn from '@atlaskit/motion/fade-in';
19
+ import { useExitingPersistence } from '@atlaskit/motion/use-exiting-persistence';
20
20
  import { fg } from '@atlaskit/platform-feature-flags';
21
21
  import Portal from '@atlaskit/portal';
22
22
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
@@ -82,7 +82,7 @@ function useModalCloseHandler(providedOnClose) {
82
82
  action: 'closed',
83
83
  componentName: 'modalDialog',
84
84
  packageName: "@atlaskit/modal-dialog",
85
- packageVersion: "16.3.2"
85
+ packageVersion: "16.3.4"
86
86
  });
87
87
  }
88
88
  function getScrollMode({
@@ -3,7 +3,7 @@ import "./positioner.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { easeInOut } from '@atlaskit/motion/curves';
6
- import { durations } from '@atlaskit/motion/durations';
6
+ import { durations } from '@atlaskit/motion/utils/durations';
7
7
  import { layers } from '@atlaskit/theme/constants';
8
8
  // Flex and min-content are set to constrain the height of the body and support multi-column scrolling experiences
9
9
  const positionerStyles = null;
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
2
2
  import useLazyCallback from '@atlaskit/ds-lib/use-lazy-callback';
3
3
  import usePreviousValue from '@atlaskit/ds-lib/use-previous-value';
4
4
  import useStateRef from '@atlaskit/ds-lib/use-state-ref';
5
- import { useExitingPersistence } from '@atlaskit/motion/exiting-persistence';
5
+ import { useExitingPersistence } from '@atlaskit/motion/use-exiting-persistence';
6
6
 
7
7
  /**
8
8
  * ________________________________________________
@@ -12,7 +12,7 @@ import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
12
12
  import { useId } from '@atlaskit/ds-lib/use-id';
13
13
  import { useCloseOnEscapePress } from '@atlaskit/layering/use-close-on-escape-press';
14
14
  import { useLayering } from '@atlaskit/layering/use-layering';
15
- import { Motion } from '@atlaskit/motion';
15
+ import Motion from '@atlaskit/motion/entering/motion';
16
16
  import FadeIn from '@atlaskit/motion/fade-in';
17
17
  import { fg } from '@atlaskit/platform-feature-flags';
18
18
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
@@ -15,9 +15,9 @@ import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
15
15
  import { useId } from '@atlaskit/ds-lib/use-id';
16
16
  import { Layering } from '@atlaskit/layering/layering';
17
17
  import { useNotifyOpenLayerObserver } from '@atlaskit/layering/use-notify-open-layer-observer';
18
- import { Motion } from '@atlaskit/motion';
19
- import { useExitingPersistence } from '@atlaskit/motion/exiting-persistence';
18
+ import Motion from '@atlaskit/motion/entering/motion';
20
19
  import FadeIn from '@atlaskit/motion/fade-in';
20
+ import { useExitingPersistence } from '@atlaskit/motion/use-exiting-persistence';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Portal from '@atlaskit/portal';
23
23
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
@@ -83,7 +83,7 @@ function useModalCloseHandler(providedOnClose) {
83
83
  action: 'closed',
84
84
  componentName: 'modalDialog',
85
85
  packageName: "@atlaskit/modal-dialog",
86
- packageVersion: "16.3.2"
86
+ packageVersion: "16.3.4"
87
87
  });
88
88
  }
89
89
  function getScrollMode(_ref) {
@@ -3,7 +3,7 @@ import "./positioner.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { easeInOut } from '@atlaskit/motion/curves';
6
- import { durations } from '@atlaskit/motion/durations';
6
+ import { durations } from '@atlaskit/motion/utils/durations';
7
7
  import { layers } from '@atlaskit/theme/constants';
8
8
  // Flex and min-content are set to constrain the height of the body and support multi-column scrolling experiences
9
9
  var positionerStyles = null;
@@ -3,7 +3,7 @@ import { useEffect } from 'react';
3
3
  import useLazyCallback from '@atlaskit/ds-lib/use-lazy-callback';
4
4
  import usePreviousValue from '@atlaskit/ds-lib/use-previous-value';
5
5
  import useStateRef from '@atlaskit/ds-lib/use-state-ref';
6
- import { useExitingPersistence } from '@atlaskit/motion/exiting-persistence';
6
+ import { useExitingPersistence } from '@atlaskit/motion/use-exiting-persistence';
7
7
 
8
8
  /**
9
9
  * ________________________________________________
@@ -1,5 +1,5 @@
1
1
  import { type RefObject } from 'react';
2
- import type { Transition } from '@atlaskit/motion/types';
2
+ import type { Transition } from '@atlaskit/motion/entering/types';
3
3
  import { type ModalDialogProps } from '../../types';
4
4
  /**
5
5
  * This will run the respective passed in callback functions when modal is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "16.3.3",
3
+ "version": "16.4.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/"
@@ -36,20 +36,20 @@
36
36
  "dependencies": {
37
37
  "@atlaskit/analytics-next": "^12.3.0",
38
38
  "@atlaskit/blanket": "^16.2.0",
39
- "@atlaskit/button": "^25.0.0",
39
+ "@atlaskit/button": "^25.1.0",
40
40
  "@atlaskit/css": "^1.0.0",
41
41
  "@atlaskit/ds-lib": "^8.0.0",
42
- "@atlaskit/icon": "^37.3.0",
42
+ "@atlaskit/icon": "^37.4.0",
43
43
  "@atlaskit/layering": "^5.0.0",
44
- "@atlaskit/motion": "^8.0.0",
44
+ "@atlaskit/motion": "^8.2.0",
45
45
  "@atlaskit/platform-feature-flags": "^2.1.0",
46
46
  "@atlaskit/portal": "^6.2.0",
47
- "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
48
- "@atlaskit/primitives": "^22.2.0",
47
+ "@atlaskit/pragmatic-drag-and-drop": "^3.0.0",
48
+ "@atlaskit/primitives": "^22.3.0",
49
49
  "@atlaskit/react-compiler-gating": "^0.2.0",
50
50
  "@atlaskit/theme": "^28.0.0",
51
51
  "@atlaskit/tokens": "^16.7.0",
52
- "@atlaskit/top-layer": "^4.1.0",
52
+ "@atlaskit/top-layer": "^4.3.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@compiled/react": "^1.0.2",
55
55
  "bind-event-listener": "^3.0.0",
@@ -65,25 +65,25 @@
65
65
  "@af/integration-testing": "workspace:^",
66
66
  "@af/visual-regression": "workspace:^",
67
67
  "@atlaskit/avatar": "^27.0.0",
68
- "@atlaskit/avatar-group": "^14.0.0",
68
+ "@atlaskit/avatar-group": "^14.1.0",
69
69
  "@atlaskit/banner": "^15.1.0",
70
70
  "@atlaskit/breadcrumbs": "^17.5.0",
71
71
  "@atlaskit/checkbox": "^19.0.0",
72
72
  "@atlaskit/code": "^19.0.0",
73
73
  "@atlaskit/datetime-picker": "^18.3.0",
74
74
  "@atlaskit/docs": "^12.2.0",
75
- "@atlaskit/dropdown-menu": "^18.0.0",
76
- "@atlaskit/flag": "^18.2.0",
75
+ "@atlaskit/dropdown-menu": "^18.1.0",
76
+ "@atlaskit/flag": "^18.3.0",
77
77
  "@atlaskit/form": "^17.0.0",
78
78
  "@atlaskit/heading": "^7.0.0",
79
79
  "@atlaskit/link": "^5.0.0",
80
- "@atlaskit/popup": "^6.0.0",
80
+ "@atlaskit/popup": "^6.1.0",
81
81
  "@atlaskit/radio": "^10.0.0",
82
82
  "@atlaskit/section-message": "^10.0.0",
83
- "@atlaskit/select": "^22.6.0",
84
- "@atlaskit/spotlight": "^4.0.0",
83
+ "@atlaskit/select": "^22.7.0",
84
+ "@atlaskit/spotlight": "^4.1.0",
85
85
  "@atlaskit/textfield": "^10.0.0",
86
- "@atlaskit/tooltip": "^24.0.0",
86
+ "@atlaskit/tooltip": "^24.1.0",
87
87
  "@atlassian/feature-flags-test-utils": "^1.2.0",
88
88
  "@atlassian/ssr-tests": "workspace:^",
89
89
  "@atlassian/structured-docs-types": "workspace:^",
@@ -1,231 +0,0 @@
1
- import path from 'path';
2
-
3
- import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
4
-
5
- const documentation: StructuredContentSource = {
6
- components: [
7
- {
8
- name: 'Modal',
9
- description: 'A modal dialog component for important content.',
10
- status: 'general-availability',
11
- designSource: {
12
- figmaUrl: 'https://go.atlassian.com/figma-library-ads-82128-80670',
13
- },
14
- import: {
15
- name: 'Modal',
16
- package: '@atlaskit/modal-dialog',
17
- type: 'default',
18
- packagePath: path.resolve(__dirname),
19
- packageJson: require('./package.json'),
20
- },
21
- usageGuidelines: [
22
- 'Use for immediate task or critical/warning requiring a response; blocking until closed',
23
- 'Use sparingly—modals are invasive',
24
- 'One task per modal; limit interactions; no nested modals (inaccessible)',
25
- 'Anatomy: header (h1 title), close button, body, footer with primary + cancel/close',
26
- 'Footer: primary button on the right of secondary; multiple dismissal methods (close button, Esc, blanket click, Cancel/Close)',
27
- 'Use Popup for smaller info + controls; Spotlight for onboarding; Inline message for alert/action',
28
- ],
29
- contentGuidelines: [
30
- 'Use clear, descriptive titles',
31
- 'Primary button label should reflect the modal title',
32
- 'Use action verbs in button labels',
33
- 'Keep content focused on a single task or message',
34
- 'Use sentence case for all text',
35
- ],
36
- accessibilityGuidelines: [
37
- 'Modal must have a title: use title component, or titleId from useModal, or label (avoid if no visual title)',
38
- 'Close button is required (except rare cases—consult a11y team)',
39
- 'Do not rely on color alone for severity; provide accessible label for icons',
40
- 'Focus order: 1) close (or title or container), 2) first focusable, 3) secondary button, 4) primary, 5) return focus to trigger on close',
41
- 'Dismiss via: close button, Esc, click blanket, Cancel/Close in footer',
42
- 'Ensure modal content is announced by screen readers',
43
- 'Ensure keyboard navigation and escape key support',
44
- 'Maintain focus within modal when open',
45
- ],
46
- examples: [
47
- {
48
- name: 'Default',
49
- description: 'The default form of a modal dialog.',
50
- source: path.resolve(__dirname, './examples/constellation/modal-default.tsx'),
51
- },
52
- ],
53
- keywords: ['modal', 'dialog', 'popup', 'overlay', 'focused', 'interaction', 'layer'],
54
- categories: ['overlay'],
55
- },
56
- {
57
- name: 'ModalHeader',
58
- description:
59
- 'The header section of a modal dialog, typically containing the title and optional close button.',
60
- status: 'general-availability',
61
- import: {
62
- name: 'ModalHeader',
63
- package: '@atlaskit/modal-dialog/modal-header',
64
- type: 'default',
65
- packagePath: path.resolve(__dirname),
66
- packageJson: require('./package.json'),
67
- },
68
- usageGuidelines: [
69
- 'Use as the first child of Modal',
70
- 'Use hasCloseButton prop for standard close affordance',
71
- 'Ensure header contains ModalTitle or equivalent for accessibility',
72
- 'For custom headers, use CloseButton as first element in DOM',
73
- ],
74
- contentGuidelines: ['Use clear, descriptive titles', 'Keep header content focused'],
75
- examples: [
76
- {
77
- name: 'Modal Header',
78
- description: 'ModalHeader example',
79
- source: path.resolve(__dirname, './examples/constellation/modal-header-default.tsx'),
80
- },
81
- ],
82
- keywords: ['modal', 'header', 'title', 'close'],
83
- categories: ['overlay'],
84
- },
85
- {
86
- name: 'ModalTitle',
87
- description: 'The title element for a modal dialog. Renders as h1 for accessibility.',
88
- status: 'general-availability',
89
- import: {
90
- name: 'ModalTitle',
91
- package: '@atlaskit/modal-dialog/modal-title',
92
- type: 'default',
93
- packagePath: path.resolve(__dirname),
94
- packageJson: require('./package.json'),
95
- },
96
- usageGuidelines: [
97
- 'Use inside ModalHeader for the modal title',
98
- 'Modal must have a title for accessibility',
99
- 'Supports any valid React element as children',
100
- ],
101
- contentGuidelines: ['Use clear, descriptive titles', 'Use sentence case'],
102
- examples: [
103
- {
104
- name: 'Modal Title',
105
- description: 'ModalTitle example',
106
- source: path.resolve(__dirname, './examples/constellation/modal-default.tsx'),
107
- },
108
- ],
109
- keywords: ['modal', 'title', 'heading'],
110
- categories: ['overlay'],
111
- },
112
- {
113
- name: 'ModalBody',
114
- description: 'The main content area of a modal dialog.',
115
- status: 'general-availability',
116
- import: {
117
- name: 'ModalBody',
118
- package: '@atlaskit/modal-dialog/modal-body',
119
- type: 'default',
120
- packagePath: path.resolve(__dirname),
121
- packageJson: require('./package.json'),
122
- },
123
- usageGuidelines: [
124
- 'Use for the primary content between header and footer',
125
- 'Accepts any valid React element as children',
126
- 'Handles overflow and scrolling when content exceeds viewport',
127
- ],
128
- contentGuidelines: ['Keep content focused on a single task', 'Use clear, readable content'],
129
- examples: [
130
- {
131
- name: 'Modal Body',
132
- description: 'ModalBody example',
133
- source: path.resolve(__dirname, './examples/constellation/modal-default.tsx'),
134
- },
135
- ],
136
- keywords: ['modal', 'body', 'content'],
137
- categories: ['overlay'],
138
- },
139
- {
140
- name: 'ModalFooter',
141
- description: 'The footer section of a modal dialog, typically containing action buttons.',
142
- status: 'general-availability',
143
- import: {
144
- name: 'ModalFooter',
145
- package: '@atlaskit/modal-dialog/modal-footer',
146
- type: 'default',
147
- packagePath: path.resolve(__dirname),
148
- packageJson: require('./package.json'),
149
- },
150
- usageGuidelines: [
151
- 'Use for primary and secondary actions',
152
- 'Primary button on the right of secondary',
153
- 'Include Cancel/Close for dismissal',
154
- 'Accepts any valid React element for custom layouts',
155
- ],
156
- contentGuidelines: [
157
- 'Primary button label should reflect the modal title',
158
- 'Use action verbs in button labels',
159
- ],
160
- examples: [
161
- {
162
- name: 'Modal Footer',
163
- description: 'ModalFooter example',
164
- source: path.resolve(__dirname, './examples/constellation/modal-footer-default.tsx'),
165
- },
166
- ],
167
- keywords: ['modal', 'footer', 'actions', 'buttons'],
168
- categories: ['overlay'],
169
- },
170
- {
171
- name: 'ModalTransition',
172
- description: 'A wrapper that provides enter/exit transitions for modal content.',
173
- status: 'general-availability',
174
- import: {
175
- name: 'ModalTransition',
176
- package: '@atlaskit/modal-dialog/modal-transition',
177
- type: 'default',
178
- packagePath: path.resolve(__dirname),
179
- packageJson: require('./package.json'),
180
- },
181
- usageGuidelines: [
182
- 'Wrap Modal with ModalTransition for animated open/close',
183
- 'Use when modal visibility is controlled by state',
184
- 'Children mount when visible and unmount when closed',
185
- ],
186
- examples: [
187
- {
188
- name: 'Modal Transition',
189
- description: 'ModalTransition example',
190
- source: path.resolve(__dirname, './examples/constellation/modal-default.tsx'),
191
- },
192
- ],
193
- keywords: ['modal', 'transition', 'animation'],
194
- categories: ['overlay'],
195
- },
196
- {
197
- name: 'CloseButton',
198
- description:
199
- 'An accessible close button for use in custom modal headers. Ensures users have an obvious way to close the modal.',
200
- status: 'general-availability',
201
- import: {
202
- name: 'CloseButton',
203
- package: '@atlaskit/modal-dialog/close-button',
204
- type: 'named',
205
- packagePath: path.resolve(__dirname),
206
- packageJson: require('./package.json'),
207
- },
208
- usageGuidelines: [
209
- 'Use when customizing ModalHeader without hasCloseButton',
210
- 'Render CloseButton first in DOM for proper focus order',
211
- 'Use Flex with row-reverse if close should appear on the right',
212
- 'Provide label prop for custom accessible name',
213
- ],
214
- accessibilityGuidelines: [
215
- 'Close button is required for modals (consult a11y team for rare exceptions)',
216
- 'Ensure close button is keyboard accessible',
217
- ],
218
- examples: [
219
- {
220
- name: 'Close Button',
221
- description: 'CloseButton example',
222
- source: path.resolve(__dirname, './examples/constellation/modal-header-custom.tsx'),
223
- },
224
- ],
225
- keywords: ['modal', 'close', 'button', 'dismiss'],
226
- categories: ['overlay'],
227
- },
228
- ],
229
- };
230
-
231
- export default documentation;