carbon-react 102.4.0 → 102.4.1

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.
@@ -40,7 +40,7 @@ Alert.propTypes = {
40
40
  height: _propTypes.default.string,
41
41
 
42
42
  /** Title displayed at top of Alert */
43
- title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),
43
+ title: _propTypes.default.node,
44
44
 
45
45
  /** Subtitle displayed at top of Alert */
46
46
  subtitle: _propTypes.default.string,
@@ -200,7 +200,7 @@ Dialog.propTypes = {
200
200
  /** Dialog content */
201
201
  children: _propTypes.default.node,
202
202
 
203
- /** Custom classname */
203
+ /** Custom class name */
204
204
  className: _propTypes.default.string,
205
205
 
206
206
  /** Controls the open state of the component */
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import Modal, { ModalProps } from "../modal/modal";
2
+ import { ModalProps } from "../modal/modal";
3
3
 
4
4
  export interface DialogProps extends ModalProps {
5
5
  /* Disables auto focus functionality on child elements */
@@ -24,6 +24,6 @@ export interface DialogProps extends ModalProps {
24
24
  title?: React.ReactNode;
25
25
  }
26
26
 
27
- declare class Dialog extends Modal<DialogProps> {}
27
+ declare function Dialog(props: DialogProps): JSX.Element;
28
28
 
29
29
  export default Dialog;
@@ -1,21 +1,24 @@
1
1
  import * as React from "react";
2
2
 
3
3
  export interface ModalProps {
4
+ /** Modal content */
5
+ children?: React.ReactNode;
4
6
  /** The ARIA role to be applied to the modal */
5
7
  ariaRole?: string;
6
8
  /** Determines if the Esc Key closes the modal */
7
9
  disableEscKey?: boolean;
10
+ /** Determines if the Dialog can be closed */
11
+ disableClose?: boolean;
8
12
  /** Determines if the background is disabled when the modal is open */
9
13
  enableBackgroundUI?: boolean;
10
14
  /** A custom close event handler */
11
15
  onCancel?: (ev: React.KeyboardEvent<HTMLElement>) => void;
12
16
  /** Sets the open state of the modal */
13
17
  open: boolean;
18
+ /** Transition time */
19
+ timeout?: number;
14
20
  }
15
21
 
16
- declare class Modal<T extends ModalProps> extends React.Component<
17
- T,
18
- Record<string, unknown>
19
- > {}
22
+ declare function Modal(props: ModalProps): JSX.Element;
20
23
 
21
24
  export default Modal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "102.4.0",
3
+ "version": "102.4.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {