@atlaskit/link-create 4.3.5 → 4.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,16 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 4.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`6ce6f7249075d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6ce6f7249075d) -
8
+ [ux] NAVX-1483 using the ADS modal built in hasCloseButton for LP components to adhere to a11y
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 4.3.5
4
15
 
5
16
  ### Patch Changes
@@ -16,7 +16,7 @@ var CREATE_FORM_MIN_HEIGHT_IN_PX = exports.CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
16
16
  var LINK_CREATE_FORM_POST_CREATE_FIELD = exports.LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
17
17
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
18
18
  packageName: "@atlaskit/link-create" || '',
19
- packageVersion: "4.3.4" || '',
19
+ packageVersion: "4.3.5" || '',
20
20
  component: COMPONENT_NAME,
21
21
  componentName: COMPONENT_NAME
22
22
  };
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
11
  var _modalDialog = require("@atlaskit/modal-dialog");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _Button = require("../Button");
13
14
  var _ModalDialog = require("../ModalDialog");
14
15
  var _messages = _interopRequireDefault(require("./messages"));
@@ -36,7 +37,9 @@ var ConfirmDismissDialog = exports.ConfirmDismissDialog = function ConfirmDismis
36
37
  screen: screen,
37
38
  onClose: onCancelDismiss,
38
39
  width: "small"
39
- }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, null, intl.formatMessage(_messages.default.title))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, intl.formatMessage(_messages.default.description)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_Button.Button, {
40
+ }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
41
+ hasCloseButton: (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates')
42
+ }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, null, intl.formatMessage(_messages.default.title))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, intl.formatMessage(_messages.default.description)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_Button.Button, {
40
43
  actionSubjectId: "cancel",
41
44
  appearance: "subtle",
42
45
  onClick: onCancelDismiss
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.ErrorBoundaryModal = void 0;
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _constants = require("../../constants");
12
13
  var _errorBoundaryUi = require("../error-boundary-ui");
13
14
  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); }
@@ -24,5 +25,7 @@ var ErrorBoundaryModal = exports.ErrorBoundaryModal = function ErrorBoundaryModa
24
25
  onClose: onClose,
25
26
  shouldScrollInViewport: true,
26
27
  width: "".concat(_constants.CREATE_FORM_MAX_WIDTH_IN_PX, "px")
27
- }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_errorBoundaryUi.ErrorBoundaryUI, null))));
28
+ }, (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates') && /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
29
+ hasCloseButton: true
30
+ }), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_errorBoundaryUi.ErrorBoundaryUI, null))));
28
31
  };
@@ -69,7 +69,9 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
69
69
  width: "".concat(_constants.CREATE_FORM_MAX_WIDTH_IN_PX, "px")
70
70
  }, /*#__PURE__*/_react.default.createElement(_modalHero.ModalHero, {
71
71
  hero: modalHero
72
- }), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, null, modalTitle || intl.formatMessage(_messages.messages.heading))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
72
+ }), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
73
+ hasCloseButton: (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates')
74
+ }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, null, modalTitle || intl.formatMessage(_messages.messages.heading))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
73
75
  testId: testId
74
76
  }, /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, null, /*#__PURE__*/_react.default.createElement(_linkCreateContent.LinkCreateContent, {
75
77
  plugins: plugins,
@@ -10,7 +10,7 @@ export const CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
10
10
  export const LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
11
11
  export const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/link-create" || '',
13
- packageVersion: "4.3.4" || '',
13
+ packageVersion: "4.3.5" || '',
14
14
  component: COMPONENT_NAME,
15
15
  componentName: COMPONENT_NAME
16
16
  };
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { AnalyticsContext } from '@atlaskit/analytics-next';
4
4
  import { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { Button } from '../Button';
6
7
  import { Modal } from '../ModalDialog';
7
8
  import messages from './messages';
@@ -28,7 +29,9 @@ export const ConfirmDismissDialog = ({
28
29
  screen: screen,
29
30
  onClose: onCancelDismiss,
30
31
  width: "small"
31
- }, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, intl.formatMessage(messages.title))), /*#__PURE__*/React.createElement(ModalBody, null, intl.formatMessage(messages.description)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
32
+ }, /*#__PURE__*/React.createElement(ModalHeader, {
33
+ hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
34
+ }, /*#__PURE__*/React.createElement(ModalTitle, null, intl.formatMessage(messages.title))), /*#__PURE__*/React.createElement(ModalBody, null, intl.formatMessage(messages.description)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
32
35
  actionSubjectId: "cancel",
33
36
  appearance: "subtle",
34
37
  onClick: onCancelDismiss
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import Modal, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
2
+ import Modal, { ModalBody, ModalHeader, ModalTransition } from '@atlaskit/modal-dialog';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../constants';
4
5
  import { ErrorBoundaryUI } from '../error-boundary-ui';
5
6
 
@@ -17,5 +18,7 @@ export const ErrorBoundaryModal = ({
17
18
  onClose: onClose,
18
19
  shouldScrollInViewport: true,
19
20
  width: `${CREATE_FORM_MAX_WIDTH_IN_PX}px`
20
- }, /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(ErrorBoundaryUI, null))));
21
+ }, fg('navx-1483-a11y-close-button-in-modal-updates') && /*#__PURE__*/React.createElement(ModalHeader, {
22
+ hasCloseButton: true
23
+ }), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(ErrorBoundaryUI, null))));
21
24
  };
@@ -59,7 +59,9 @@ const LinkCreateWithModal = ({
59
59
  width: `${CREATE_FORM_MAX_WIDTH_IN_PX}px`
60
60
  }, /*#__PURE__*/React.createElement(ModalHero, {
61
61
  hero: modalHero
62
- }), /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Box, {
62
+ }), /*#__PURE__*/React.createElement(ModalHeader, {
63
+ hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
64
+ }, /*#__PURE__*/React.createElement(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Box, {
63
65
  testId: testId
64
66
  }, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(LinkCreateContent, {
65
67
  plugins: plugins,
@@ -10,7 +10,7 @@ export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
10
10
  export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
11
11
  export var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/link-create" || '',
13
- packageVersion: "4.3.4" || '',
13
+ packageVersion: "4.3.5" || '',
14
14
  component: COMPONENT_NAME,
15
15
  componentName: COMPONENT_NAME
16
16
  };
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { AnalyticsContext } from '@atlaskit/analytics-next';
4
4
  import { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { Button } from '../Button';
6
7
  import { Modal } from '../ModalDialog';
7
8
  import messages from './messages';
@@ -29,7 +30,9 @@ export var ConfirmDismissDialog = function ConfirmDismissDialog(_ref) {
29
30
  screen: screen,
30
31
  onClose: onCancelDismiss,
31
32
  width: "small"
32
- }, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, intl.formatMessage(messages.title))), /*#__PURE__*/React.createElement(ModalBody, null, intl.formatMessage(messages.description)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
33
+ }, /*#__PURE__*/React.createElement(ModalHeader, {
34
+ hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
35
+ }, /*#__PURE__*/React.createElement(ModalTitle, null, intl.formatMessage(messages.title))), /*#__PURE__*/React.createElement(ModalBody, null, intl.formatMessage(messages.description)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
33
36
  actionSubjectId: "cancel",
34
37
  appearance: "subtle",
35
38
  onClick: onCancelDismiss
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import Modal, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
2
+ import Modal, { ModalBody, ModalHeader, ModalTransition } from '@atlaskit/modal-dialog';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../constants';
4
5
  import { ErrorBoundaryUI } from '../error-boundary-ui';
5
6
 
@@ -16,5 +17,7 @@ export var ErrorBoundaryModal = function ErrorBoundaryModal(_ref) {
16
17
  onClose: onClose,
17
18
  shouldScrollInViewport: true,
18
19
  width: "".concat(CREATE_FORM_MAX_WIDTH_IN_PX, "px")
19
- }, /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(ErrorBoundaryUI, null))));
20
+ }, fg('navx-1483-a11y-close-button-in-modal-updates') && /*#__PURE__*/React.createElement(ModalHeader, {
21
+ hasCloseButton: true
22
+ }), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(ErrorBoundaryUI, null))));
20
23
  };
@@ -60,7 +60,9 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
60
60
  width: "".concat(CREATE_FORM_MAX_WIDTH_IN_PX, "px")
61
61
  }, /*#__PURE__*/React.createElement(ModalHero, {
62
62
  hero: modalHero
63
- }), /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Box, {
63
+ }), /*#__PURE__*/React.createElement(ModalHeader, {
64
+ hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
65
+ }, /*#__PURE__*/React.createElement(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Box, {
64
66
  testId: testId
65
67
  }, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(LinkCreateContent, {
66
68
  plugins: plugins,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "4.3.5",
3
+ "version": "4.4.0",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/button": "^23.4.0",
41
41
  "@atlaskit/css": "^0.12.0",
42
42
  "@atlaskit/empty-state": "^10.1.0",
43
- "@atlaskit/form": "^12.2.0",
43
+ "@atlaskit/form": "^12.4.0",
44
44
  "@atlaskit/icon": "^28.1.0",
45
45
  "@atlaskit/icon-file-type": "^7.0.0",
46
46
  "@atlaskit/icon-object": "^7.2.0",
@@ -131,6 +131,9 @@
131
131
  },
132
132
  "layering-tree-graph": {
133
133
  "type": "boolean"
134
+ },
135
+ "navx-1483-a11y-close-button-in-modal-updates": {
136
+ "type": "boolean"
134
137
  }
135
138
  },
136
139
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/5ebc0bfb-9b6d-4ec0-adbe-e4d5e88ace44"