@atlaskit/modal-dialog 17.0.3 → 17.1.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 +11 -0
- package/dist/cjs/internal/components/modal-wrapper.js +1 -1
- package/dist/cjs/modal-header.js +3 -1
- package/dist/es2019/internal/components/modal-wrapper.js +1 -1
- package/dist/es2019/modal-header.js +3 -1
- package/dist/esm/internal/components/modal-wrapper.js +1 -1
- package/dist/esm/modal-header.js +3 -1
- package/dist/types/modal-header.d.ts +4 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 17.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`62c3c0411e84b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/62c3c0411e84b) -
|
|
8
|
+
Cleanup `feature_gate` `platform_dst-a11y_accessible-error-modal`. The accessible modal error
|
|
9
|
+
experience is now permanent. `ModalTrigger` and `FullScreenModalTrigger` support localized
|
|
10
|
+
`title`, `errorText`, and `errorCloseText` strings for the default error fallback. `ModalTrigger`
|
|
11
|
+
also supports a per-trigger `errorFallback`. `ModalHeader` supports a localized close-button
|
|
12
|
+
label.
|
|
13
|
+
|
|
3
14
|
## 17.0.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cjs/modal-header.js
CHANGED
|
@@ -30,7 +30,8 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
30
30
|
var children = props.children,
|
|
31
31
|
userDefinedTestId = props.testId,
|
|
32
32
|
_props$hasCloseButton = props.hasCloseButton,
|
|
33
|
-
hasCloseButton = _props$hasCloseButton === void 0 ? false : _props$hasCloseButton
|
|
33
|
+
hasCloseButton = _props$hasCloseButton === void 0 ? false : _props$hasCloseButton,
|
|
34
|
+
closeButtonLabel = props.closeButtonLabel;
|
|
34
35
|
var _useModal = (0, _hooks.useModal)(),
|
|
35
36
|
hasProvidedOnClose = _useModal.hasProvidedOnClose,
|
|
36
37
|
onClose = _useModal.onClose,
|
|
@@ -49,6 +50,7 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
49
50
|
}, /*#__PURE__*/_react.default.createElement(_flex.Flex, {
|
|
50
51
|
justifyContent: "end"
|
|
51
52
|
}, /*#__PURE__*/_react.default.createElement(_closeButton.CloseButton, {
|
|
53
|
+
label: closeButtonLabel,
|
|
52
54
|
onClick: onClose,
|
|
53
55
|
testId: modalTestId
|
|
54
56
|
})), /*#__PURE__*/_react.default.createElement(_flex.Flex, {
|
|
@@ -23,7 +23,8 @@ const ModalHeader = props => {
|
|
|
23
23
|
const {
|
|
24
24
|
children,
|
|
25
25
|
testId: userDefinedTestId,
|
|
26
|
-
hasCloseButton = false
|
|
26
|
+
hasCloseButton = false,
|
|
27
|
+
closeButtonLabel
|
|
27
28
|
} = props;
|
|
28
29
|
const {
|
|
29
30
|
hasProvidedOnClose,
|
|
@@ -44,6 +45,7 @@ const ModalHeader = props => {
|
|
|
44
45
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
45
46
|
justifyContent: "end"
|
|
46
47
|
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
48
|
+
label: closeButtonLabel,
|
|
47
49
|
onClick: onClose,
|
|
48
50
|
testId: modalTestId
|
|
49
51
|
})), /*#__PURE__*/React.createElement(Flex, {
|
package/dist/esm/modal-header.js
CHANGED
|
@@ -23,7 +23,8 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
23
23
|
var children = props.children,
|
|
24
24
|
userDefinedTestId = props.testId,
|
|
25
25
|
_props$hasCloseButton = props.hasCloseButton,
|
|
26
|
-
hasCloseButton = _props$hasCloseButton === void 0 ? false : _props$hasCloseButton
|
|
26
|
+
hasCloseButton = _props$hasCloseButton === void 0 ? false : _props$hasCloseButton,
|
|
27
|
+
closeButtonLabel = props.closeButtonLabel;
|
|
27
28
|
var _useModal = useModal(),
|
|
28
29
|
hasProvidedOnClose = _useModal.hasProvidedOnClose,
|
|
29
30
|
onClose = _useModal.onClose,
|
|
@@ -42,6 +43,7 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
42
43
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
43
44
|
justifyContent: "end"
|
|
44
45
|
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
46
|
+
label: closeButtonLabel,
|
|
45
47
|
onClick: onClose,
|
|
46
48
|
testId: modalTestId
|
|
47
49
|
})), /*#__PURE__*/React.createElement(Flex, {
|
|
@@ -13,6 +13,10 @@ export interface ModalHeaderProps {
|
|
|
13
13
|
* @default false
|
|
14
14
|
*/
|
|
15
15
|
hasCloseButton?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The accessible name for the close button when `hasCloseButton` is true.
|
|
18
|
+
*/
|
|
19
|
+
closeButtonLabel?: string;
|
|
16
20
|
/**
|
|
17
21
|
* A `testId` prop is provided for specified elements,
|
|
18
22
|
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "17.0
|
|
3
|
+
"version": "17.1.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/"
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
49
49
|
"@atlaskit/portal": "^7.0.0",
|
|
50
50
|
"@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
|
|
51
|
-
"@atlaskit/primitives": "^22.
|
|
51
|
+
"@atlaskit/primitives": "^22.6.0",
|
|
52
52
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
53
53
|
"@atlaskit/theme": "^28.2.0",
|
|
54
|
-
"@atlaskit/tokens": "^20.
|
|
54
|
+
"@atlaskit/tokens": "^20.6.0",
|
|
55
55
|
"@atlaskit/top-layer": "^6.2.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@compiled/react": "^1.0.2",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@atlassian/feature-flags-test-utils": "^1.3.0",
|
|
91
91
|
"@atlassian/ssr-tests": "workspace:^",
|
|
92
92
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
93
|
-
"@atlassian/testing-library": "^0.
|
|
93
|
+
"@atlassian/testing-library": "^0.12.0",
|
|
94
94
|
"@atlassian/workbench": "workspace:*",
|
|
95
95
|
"@testing-library/dom": "^10.1.0",
|
|
96
96
|
"@types/raf-schd": "^4.0.1",
|