@deque/cauldron-react 6.4.1 → 6.4.2-canary.8d74f703
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/lib/components/Dialog/index.d.ts +2 -2
- package/lib/index.js +8 -3
- package/lib/types.d.ts +2 -2
- package/package.json +1 -4
|
@@ -7,8 +7,8 @@ export interface DialogProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
dialogRef?: React.Ref<HTMLDivElement>;
|
|
8
8
|
onClose?: () => void;
|
|
9
9
|
forceAction?: boolean;
|
|
10
|
-
heading: React.ReactElement<any> | {
|
|
11
|
-
text: React.ReactElement<any
|
|
10
|
+
heading: string | React.ReactElement<any> | {
|
|
11
|
+
text: React.ReactElement<any> | string;
|
|
12
12
|
level: number | undefined;
|
|
13
13
|
};
|
|
14
14
|
closeButtonText?: string;
|
package/lib/index.js
CHANGED
|
@@ -1437,6 +1437,7 @@ var Dialog = /** @class */ (function (_super) {
|
|
|
1437
1437
|
? heading.level
|
|
1438
1438
|
: 2);
|
|
1439
1439
|
var Dialog = (React__default["default"].createElement(FocusTrap__default["default"], { focusTrapOptions: {
|
|
1440
|
+
allowOutsideClick: true,
|
|
1440
1441
|
onDeactivate: this.close,
|
|
1441
1442
|
escapeDeactivates: !forceAction,
|
|
1442
1443
|
fallbackFocus: '.Dialog__heading'
|
|
@@ -1728,13 +1729,17 @@ function Tooltip(_a) {
|
|
|
1728
1729
|
};
|
|
1729
1730
|
var targetElement = document.body;
|
|
1730
1731
|
if (showTooltip) {
|
|
1731
|
-
targetElement.addEventListener('keyup', handleEscape);
|
|
1732
|
+
targetElement.addEventListener('keyup', handleEscape, { capture: true });
|
|
1732
1733
|
}
|
|
1733
1734
|
else {
|
|
1734
|
-
targetElement.removeEventListener('keyup', handleEscape
|
|
1735
|
+
targetElement.removeEventListener('keyup', handleEscape, {
|
|
1736
|
+
capture: true
|
|
1737
|
+
});
|
|
1735
1738
|
}
|
|
1736
1739
|
return function () {
|
|
1737
|
-
targetElement.removeEventListener('keyup', handleEscape
|
|
1740
|
+
targetElement.removeEventListener('keyup', handleEscape, {
|
|
1741
|
+
capture: true
|
|
1742
|
+
});
|
|
1738
1743
|
};
|
|
1739
1744
|
}, [showTooltip]);
|
|
1740
1745
|
// Handle hover and focus events for the targetElement
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement,
|
|
1
|
+
import type { ReactElement, ReactPortal } from 'react';
|
|
2
2
|
export declare namespace Cauldron {
|
|
3
3
|
type LabelProps = {
|
|
4
4
|
'aria-label': string;
|
|
@@ -10,4 +10,4 @@ export declare namespace Cauldron {
|
|
|
10
10
|
* This type is meant to ensure that a prop can actually be rendered as content.
|
|
11
11
|
* Explicit equivalent of Exclude<ReactNode, boolean | null | undefined>
|
|
12
12
|
*/
|
|
13
|
-
export type ContentNode = string | number |
|
|
13
|
+
export type ContentNode = string | number | ReactPortal | ReactElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deque/cauldron-react",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.2-canary.8d74f703",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Fully accessible react components library for Deque Cauldron",
|
|
6
6
|
"homepage": "https://cauldron.dequelabs.com/",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"@testing-library/react": "^12",
|
|
48
48
|
"@testing-library/user-event": "^14.5.2",
|
|
49
49
|
"@types/classnames": "^2.2.10",
|
|
50
|
-
"@types/enzyme-adapter-react-16": "^1.0.9",
|
|
51
50
|
"@types/jest": "^29.5.11",
|
|
52
51
|
"@types/jest-axe": "^3.5.4",
|
|
53
52
|
"@types/node": "^17.0.42",
|
|
@@ -59,8 +58,6 @@
|
|
|
59
58
|
"babel-plugin-module-resolver": "^4.0.0",
|
|
60
59
|
"babel-plugin-transform-export-extensions": "^6.22.0",
|
|
61
60
|
"concurrently": "^5.3.0",
|
|
62
|
-
"enzyme": "^3.11.0",
|
|
63
|
-
"enzyme-adapter-react-16": "^1.15.2",
|
|
64
61
|
"jest": "^29.7.0",
|
|
65
62
|
"jest-axe": "^8.0.0",
|
|
66
63
|
"jest-environment-jsdom": "^29.7.0",
|