@atlaskit/modal-dialog 14.4.2 → 14.5.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,12 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 14.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`bab28f9576a96`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bab28f9576a96) -
8
+ Add `onBlur` handler to the close button export.
9
+
3
10
  ## 14.4.2
4
11
 
5
12
  ### Patch Changes
@@ -22,6 +22,7 @@ var _cross = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross
22
22
  */
23
23
  var CloseButton = exports.CloseButton = function CloseButton(_ref) {
24
24
  var label = _ref.label,
25
+ onBlur = _ref.onBlur,
25
26
  onClick = _ref.onClick,
26
27
  testId = _ref.testId;
27
28
  return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
@@ -29,6 +30,7 @@ var CloseButton = exports.CloseButton = function CloseButton(_ref) {
29
30
  appearance: "subtle",
30
31
  icon: _cross.default,
31
32
  label: label || 'Close Modal',
33
+ onBlur: onBlur,
32
34
  onClick: onClick
33
35
  });
34
36
  };
@@ -87,7 +87,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
87
87
  action: 'closed',
88
88
  componentName: 'modalDialog',
89
89
  packageName: "@atlaskit/modal-dialog",
90
- packageVersion: "14.4.1"
90
+ packageVersion: "14.4.2"
91
91
  });
92
92
  var onBlanketClicked = (0, _react.useCallback)(function (e) {
93
93
  if (shouldCloseOnOverlayClick) {
@@ -91,7 +91,7 @@ var ScrollContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
91
91
  as: "div",
92
92
  isInset: true
93
93
  // tabindex is allowed here so that keyboard users can scroll content
94
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
94
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
95
95
  ,
96
96
  tabIndex: showContentFocus ? 0 : undefined,
97
97
  role: showContentFocus ? 'region' : undefined,
@@ -15,6 +15,7 @@ import CrossIcon from '@atlaskit/icon/core/migration/cross';
15
15
  */
16
16
  export const CloseButton = ({
17
17
  label,
18
+ onBlur,
18
19
  onClick,
19
20
  testId
20
21
  }) => /*#__PURE__*/React.createElement(IconButton, {
@@ -22,5 +23,6 @@ export const CloseButton = ({
22
23
  appearance: "subtle",
23
24
  icon: CrossIcon,
24
25
  label: label || 'Close Modal',
26
+ onBlur: onBlur,
25
27
  onClick: onClick
26
28
  });
@@ -74,7 +74,7 @@ const InternalModalWrapper = props => {
74
74
  action: 'closed',
75
75
  componentName: 'modalDialog',
76
76
  packageName: "@atlaskit/modal-dialog",
77
- packageVersion: "14.4.1"
77
+ packageVersion: "14.4.2"
78
78
  });
79
79
  const onBlanketClicked = useCallback(e => {
80
80
  if (shouldCloseOnOverlayClick) {
@@ -73,7 +73,7 @@ const ScrollContainer = /*#__PURE__*/forwardRef(({
73
73
  as: "div",
74
74
  isInset: true
75
75
  // tabindex is allowed here so that keyboard users can scroll content
76
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
76
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
77
77
  ,
78
78
  tabIndex: showContentFocus ? 0 : undefined,
79
79
  role: showContentFocus ? 'region' : undefined,
@@ -15,6 +15,7 @@ import CrossIcon from '@atlaskit/icon/core/migration/cross';
15
15
  */
16
16
  export var CloseButton = function CloseButton(_ref) {
17
17
  var label = _ref.label,
18
+ onBlur = _ref.onBlur,
18
19
  onClick = _ref.onClick,
19
20
  testId = _ref.testId;
20
21
  return /*#__PURE__*/React.createElement(IconButton, {
@@ -22,6 +23,7 @@ export var CloseButton = function CloseButton(_ref) {
22
23
  appearance: "subtle",
23
24
  icon: CrossIcon,
24
25
  label: label || 'Close Modal',
26
+ onBlur: onBlur,
25
27
  onClick: onClick
26
28
  });
27
29
  };
@@ -78,7 +78,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
78
78
  action: 'closed',
79
79
  componentName: 'modalDialog',
80
80
  packageName: "@atlaskit/modal-dialog",
81
- packageVersion: "14.4.1"
81
+ packageVersion: "14.4.2"
82
82
  });
83
83
  var onBlanketClicked = useCallback(function (e) {
84
84
  if (shouldCloseOnOverlayClick) {
@@ -82,7 +82,7 @@ var ScrollContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
82
82
  as: "div",
83
83
  isInset: true
84
84
  // tabindex is allowed here so that keyboard users can scroll content
85
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
85
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex
86
86
  ,
87
87
  tabIndex: showContentFocus ? 0 : undefined,
88
88
  role: showContentFocus ? 'region' : undefined,
@@ -1,10 +1,14 @@
1
- import React from 'react';
1
+ import React, { type FocusEventHandler } from 'react';
2
2
  import { type OnCloseHandler } from './types';
3
3
  type CloseButtonProps = {
4
4
  /**
5
5
  * The accessible name to give to the close button.
6
6
  */
7
7
  label?: string;
8
+ /**
9
+ * The `onBlur` handler for the close button.
10
+ */
11
+ onBlur?: FocusEventHandler<HTMLButtonElement>;
8
12
  /**
9
13
  * The same close handler you give to the top-level modal component.
10
14
  */
@@ -26,5 +30,5 @@ type CloseButtonProps = {
26
30
  * using a `Flex` primitive as the custom header's container with a flex
27
31
  * direction of `row-reverse`.
28
32
  */
29
- export declare const CloseButton: ({ label, onClick, testId }: CloseButtonProps) => React.JSX.Element;
33
+ export declare const CloseButton: ({ label, onBlur, onClick, testId }: CloseButtonProps) => React.JSX.Element;
30
34
  export {};
@@ -1,10 +1,14 @@
1
- import React from 'react';
1
+ import React, { type FocusEventHandler } from 'react';
2
2
  import { type OnCloseHandler } from './types';
3
3
  type CloseButtonProps = {
4
4
  /**
5
5
  * The accessible name to give to the close button.
6
6
  */
7
7
  label?: string;
8
+ /**
9
+ * The `onBlur` handler for the close button.
10
+ */
11
+ onBlur?: FocusEventHandler<HTMLButtonElement>;
8
12
  /**
9
13
  * The same close handler you give to the top-level modal component.
10
14
  */
@@ -26,5 +30,5 @@ type CloseButtonProps = {
26
30
  * using a `Flex` primitive as the custom header's container with a flex
27
31
  * direction of `row-reverse`.
28
32
  */
29
- export declare const CloseButton: ({ label, onClick, testId }: CloseButtonProps) => React.JSX.Element;
33
+ export declare const CloseButton: ({ label, onBlur, onClick, testId }: CloseButtonProps) => React.JSX.Element;
30
34
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "14.4.2",
3
+ "version": "14.5.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/"
@@ -29,12 +29,12 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/analytics-next": "^11.1.0",
31
31
  "@atlaskit/blanket": "^15.0.0",
32
- "@atlaskit/button": "^23.4.0",
32
+ "@atlaskit/button": "^23.5.0",
33
33
  "@atlaskit/css": "^0.14.0",
34
34
  "@atlaskit/ds-lib": "^5.1.0",
35
35
  "@atlaskit/focus-ring": "^3.0.0",
36
- "@atlaskit/icon": "^28.3.0",
37
- "@atlaskit/layering": "^3.0.0",
36
+ "@atlaskit/icon": "^28.5.0",
37
+ "@atlaskit/layering": "^3.1.0",
38
38
  "@atlaskit/motion": "^5.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/portal": "^5.1.0",
@@ -56,13 +56,13 @@
56
56
  "@af/accessibility-testing": "workspace:^",
57
57
  "@af/integration-testing": "workspace:^",
58
58
  "@af/visual-regression": "workspace:^",
59
- "@atlaskit/avatar": "^25.2.0",
60
- "@atlaskit/avatar-group": "^12.2.0",
59
+ "@atlaskit/avatar": "^25.3.0",
60
+ "@atlaskit/avatar-group": "^12.3.0",
61
61
  "@atlaskit/banner": "^14.0.0",
62
62
  "@atlaskit/breadcrumbs": "^15.3.0",
63
63
  "@atlaskit/checkbox": "^17.1.0",
64
64
  "@atlaskit/code": "^17.2.0",
65
- "@atlaskit/datetime-picker": "^17.0.0",
65
+ "@atlaskit/datetime-picker": "^17.1.0",
66
66
  "@atlaskit/docs": "^11.1.0",
67
67
  "@atlaskit/dropdown-menu": "^16.3.0",
68
68
  "@atlaskit/flag": "^17.4.0",