@atlaskit/modal-dialog 14.10.4 → 14.10.5
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 +8 -0
- package/dist/cjs/internal/components/modal-wrapper.js +1 -1
- package/dist/cjs/modal-header.compiled.css +3 -0
- package/dist/cjs/modal-header.js +13 -19
- package/dist/es2019/internal/components/modal-wrapper.js +1 -1
- package/dist/es2019/modal-header.compiled.css +3 -0
- package/dist/es2019/modal-header.js +11 -17
- package/dist/esm/internal/components/modal-wrapper.js +1 -1
- package/dist/esm/modal-header.compiled.css +3 -0
- package/dist/esm/modal-header.js +11 -17
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 14.10.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`54274768b5a88`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/54274768b5a88) -
|
|
8
|
+
Fixed an issue where the modal title could overflow the width of the modal instead of truncating
|
|
9
|
+
when `isMultiline` is set to false
|
|
10
|
+
|
|
3
11
|
## 14.10.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -88,7 +88,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
88
88
|
action: 'closed',
|
|
89
89
|
componentName: 'modalDialog',
|
|
90
90
|
packageName: "@atlaskit/modal-dialog",
|
|
91
|
-
packageVersion: "
|
|
91
|
+
packageVersion: "14.10.4"
|
|
92
92
|
});
|
|
93
93
|
var onBlanketClicked = (0, _react.useCallback)(function (e) {
|
|
94
94
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
._18zr1ejb{padding-inline:var(--ds-space-300,24px)}
|
|
2
2
|
._1bah1yb4{justify-content:space-between}
|
|
3
|
+
._1bsb1osq{width:100%}
|
|
3
4
|
._1e0c1txw{display:flex}
|
|
4
5
|
._1q511ejb{padding-block-start:var(--ds-space-300,24px)}
|
|
6
|
+
._1ul9idpf{min-width:0}
|
|
7
|
+
._2lx21sbv{flex-direction:row-reverse}
|
|
5
8
|
._4cvr1h6o{align-items:center}
|
|
6
9
|
._6rth1i6y{margin-block-end:var(--ds-space-negative-025,-2px)}
|
|
7
10
|
._85i5pxbi{padding-block-end:var(--ds-space-200,1pc)}
|
package/dist/cjs/modal-header.js
CHANGED
|
@@ -9,15 +9,14 @@ exports.default = void 0;
|
|
|
9
9
|
require("./modal-header.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
13
|
var _closeButton = require("./close-button");
|
|
14
14
|
var _hooks = require("./hooks");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
15
|
+
var styles = {
|
|
16
|
+
header: "_18zr1ejb _1e0c1txw _kqswh2mm _4cvr1h6o _1bah1yb4 _6rth1i6y _85i5pxbi _1q511ejb",
|
|
17
|
+
flex: "_2lx21sbv _1bsb1osq",
|
|
18
|
+
titleContainer: "_1ul9idpf"
|
|
19
|
+
};
|
|
21
20
|
/**
|
|
22
21
|
* __Modal header__
|
|
23
22
|
*
|
|
@@ -42,25 +41,20 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
42
41
|
var shouldShowCloseButton = hasCloseButton && hasProvidedOnClose && onClose;
|
|
43
42
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
43
|
"data-testid": testId,
|
|
45
|
-
className: (0, _runtime.ax)([
|
|
46
|
-
}, shouldShowCloseButton ?
|
|
47
|
-
/*#__PURE__*/
|
|
48
|
-
// The reason we are putting the close button first in the DOM and then
|
|
49
|
-
// reordering them is to ensure that users of assistive technology get
|
|
50
|
-
// all the context of a modal when initial focus is placed on the close
|
|
51
|
-
// button, since it's the first interactive element.
|
|
52
|
-
_react.default.createElement(_primitives.Flex, {
|
|
44
|
+
className: (0, _runtime.ax)([styles.header])
|
|
45
|
+
}, shouldShowCloseButton ? /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
53
46
|
gap: "space.200",
|
|
54
47
|
justifyContent: "space-between",
|
|
55
|
-
xcss:
|
|
56
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
48
|
+
xcss: styles.flex
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
57
50
|
justifyContent: "end"
|
|
58
51
|
}, /*#__PURE__*/_react.default.createElement(_closeButton.CloseButton, {
|
|
59
52
|
onClick: onClose,
|
|
60
53
|
testId: modalTestId
|
|
61
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
54
|
+
})), /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
62
55
|
justifyContent: "start",
|
|
63
|
-
alignItems: "center"
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
xcss: styles.titleContainer
|
|
64
58
|
}, children)) : children);
|
|
65
59
|
};
|
|
66
60
|
var _default = exports.default = ModalHeader;
|
|
@@ -75,7 +75,7 @@ const InternalModalWrapper = props => {
|
|
|
75
75
|
action: 'closed',
|
|
76
76
|
componentName: 'modalDialog',
|
|
77
77
|
packageName: "@atlaskit/modal-dialog",
|
|
78
|
-
packageVersion: "
|
|
78
|
+
packageVersion: "14.10.4"
|
|
79
79
|
});
|
|
80
80
|
const onBlanketClicked = useCallback(e => {
|
|
81
81
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
._18zr1ejb{padding-inline:var(--ds-space-300,24px)}
|
|
2
2
|
._1bah1yb4{justify-content:space-between}
|
|
3
|
+
._1bsb1osq{width:100%}
|
|
3
4
|
._1e0c1txw{display:flex}
|
|
4
5
|
._1q511ejb{padding-block-start:var(--ds-space-300,24px)}
|
|
6
|
+
._1ul9idpf{min-width:0}
|
|
7
|
+
._2lx21sbv{flex-direction:row-reverse}
|
|
5
8
|
._4cvr1h6o{align-items:center}
|
|
6
9
|
._6rth1i6y{margin-block-end:var(--ds-space-negative-025,-2px)}
|
|
7
10
|
._85i5pxbi{padding-block-end:var(--ds-space-200,1pc)}
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
import "./modal-header.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import { Flex, xcss } from '@atlaskit/primitives';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
7
6
|
import { CloseButton } from './close-button';
|
|
8
7
|
import { useModal } from './hooks';
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
8
|
+
const styles = {
|
|
9
|
+
header: "_18zr1ejb _1e0c1txw _kqswh2mm _4cvr1h6o _1bah1yb4 _6rth1i6y _85i5pxbi _1q511ejb",
|
|
10
|
+
flex: "_2lx21sbv _1bsb1osq",
|
|
11
|
+
titleContainer: "_1ul9idpf"
|
|
12
|
+
};
|
|
14
13
|
/**
|
|
15
14
|
* __Modal header__
|
|
16
15
|
*
|
|
@@ -37,17 +36,11 @@ const ModalHeader = props => {
|
|
|
37
36
|
const shouldShowCloseButton = hasCloseButton && hasProvidedOnClose && onClose;
|
|
38
37
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
38
|
"data-testid": testId,
|
|
40
|
-
className: ax([
|
|
41
|
-
}, shouldShowCloseButton ?
|
|
42
|
-
/*#__PURE__*/
|
|
43
|
-
// The reason we are putting the close button first in the DOM and then
|
|
44
|
-
// reordering them is to ensure that users of assistive technology get
|
|
45
|
-
// all the context of a modal when initial focus is placed on the close
|
|
46
|
-
// button, since it's the first interactive element.
|
|
47
|
-
React.createElement(Flex, {
|
|
39
|
+
className: ax([styles.header])
|
|
40
|
+
}, shouldShowCloseButton ? /*#__PURE__*/React.createElement(Flex, {
|
|
48
41
|
gap: "space.200",
|
|
49
42
|
justifyContent: "space-between",
|
|
50
|
-
xcss:
|
|
43
|
+
xcss: styles.flex
|
|
51
44
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
52
45
|
justifyContent: "end"
|
|
53
46
|
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
@@ -55,7 +48,8 @@ const ModalHeader = props => {
|
|
|
55
48
|
testId: modalTestId
|
|
56
49
|
})), /*#__PURE__*/React.createElement(Flex, {
|
|
57
50
|
justifyContent: "start",
|
|
58
|
-
alignItems: "center"
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
xcss: styles.titleContainer
|
|
59
53
|
}, children)) : children);
|
|
60
54
|
};
|
|
61
55
|
export default ModalHeader;
|
|
@@ -79,7 +79,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
|
|
|
79
79
|
action: 'closed',
|
|
80
80
|
componentName: 'modalDialog',
|
|
81
81
|
packageName: "@atlaskit/modal-dialog",
|
|
82
|
-
packageVersion: "
|
|
82
|
+
packageVersion: "14.10.4"
|
|
83
83
|
});
|
|
84
84
|
var onBlanketClicked = useCallback(function (e) {
|
|
85
85
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
._18zr1ejb{padding-inline:var(--ds-space-300,24px)}
|
|
2
2
|
._1bah1yb4{justify-content:space-between}
|
|
3
|
+
._1bsb1osq{width:100%}
|
|
3
4
|
._1e0c1txw{display:flex}
|
|
4
5
|
._1q511ejb{padding-block-start:var(--ds-space-300,24px)}
|
|
6
|
+
._1ul9idpf{min-width:0}
|
|
7
|
+
._2lx21sbv{flex-direction:row-reverse}
|
|
5
8
|
._4cvr1h6o{align-items:center}
|
|
6
9
|
._6rth1i6y{margin-block-end:var(--ds-space-negative-025,-2px)}
|
|
7
10
|
._85i5pxbi{padding-block-end:var(--ds-space-200,1pc)}
|
package/dist/esm/modal-header.js
CHANGED
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
import "./modal-header.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import { Flex, xcss } from '@atlaskit/primitives';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
7
6
|
import { CloseButton } from './close-button';
|
|
8
7
|
import { useModal } from './hooks';
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
8
|
+
var styles = {
|
|
9
|
+
header: "_18zr1ejb _1e0c1txw _kqswh2mm _4cvr1h6o _1bah1yb4 _6rth1i6y _85i5pxbi _1q511ejb",
|
|
10
|
+
flex: "_2lx21sbv _1bsb1osq",
|
|
11
|
+
titleContainer: "_1ul9idpf"
|
|
12
|
+
};
|
|
14
13
|
/**
|
|
15
14
|
* __Modal header__
|
|
16
15
|
*
|
|
@@ -35,17 +34,11 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
35
34
|
var shouldShowCloseButton = hasCloseButton && hasProvidedOnClose && onClose;
|
|
36
35
|
return /*#__PURE__*/React.createElement("div", {
|
|
37
36
|
"data-testid": testId,
|
|
38
|
-
className: ax([
|
|
39
|
-
}, shouldShowCloseButton ?
|
|
40
|
-
/*#__PURE__*/
|
|
41
|
-
// The reason we are putting the close button first in the DOM and then
|
|
42
|
-
// reordering them is to ensure that users of assistive technology get
|
|
43
|
-
// all the context of a modal when initial focus is placed on the close
|
|
44
|
-
// button, since it's the first interactive element.
|
|
45
|
-
React.createElement(Flex, {
|
|
37
|
+
className: ax([styles.header])
|
|
38
|
+
}, shouldShowCloseButton ? /*#__PURE__*/React.createElement(Flex, {
|
|
46
39
|
gap: "space.200",
|
|
47
40
|
justifyContent: "space-between",
|
|
48
|
-
xcss:
|
|
41
|
+
xcss: styles.flex
|
|
49
42
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
50
43
|
justifyContent: "end"
|
|
51
44
|
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
@@ -53,7 +46,8 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
53
46
|
testId: modalTestId
|
|
54
47
|
})), /*#__PURE__*/React.createElement(Flex, {
|
|
55
48
|
justifyContent: "start",
|
|
56
|
-
alignItems: "center"
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
xcss: styles.titleContainer
|
|
57
51
|
}, children)) : children);
|
|
58
52
|
};
|
|
59
53
|
export default ModalHeader;
|
package/package.json
CHANGED