carbon-react 141.0.4 → 141.0.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.
@@ -10,7 +10,7 @@ export interface ContentPaddingInterface {
10
10
  py?: PaddingValues;
11
11
  px?: PaddingValues;
12
12
  }
13
- export interface DialogProps extends ModalProps, Omit<TagProps, "data-component"> {
13
+ export interface DialogProps extends ModalProps, TagProps {
14
14
  /** Custom class name */
15
15
  className?: string;
16
16
  /** Prop to specify the aria-describedby property of the Dialog component */
@@ -16,6 +16,7 @@ import useModalAria from "../../hooks/__internal__/useModalAria/useModalAria";
16
16
  const PADDING_VALUES = [0, 1, 2, 3, 4, 5, 6, 7, 8];
17
17
  const Dialog = /*#__PURE__*/forwardRef(({
18
18
  className,
19
+ "data-component": dataComponent = "dialog",
19
20
  "data-element": dataElement = "dialog",
20
21
  "data-role": dataRole,
21
22
  children,
@@ -166,7 +167,7 @@ const Dialog = /*#__PURE__*/forwardRef(({
166
167
  isOpen: open,
167
168
  additionalWrapperRefs: focusableContainers
168
169
  }, /*#__PURE__*/React.createElement(StyledDialog, _extends({
169
- "data-component": "dialog",
170
+ "data-component": dataComponent,
170
171
  "data-element": dataElement,
171
172
  "data-role": dataRole,
172
173
  "aria-modal": isTopModal ? true : undefined,
@@ -202,6 +203,7 @@ if (process.env.NODE_ENV !== "production") {
202
203
  "px": PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
203
204
  "py": PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8])
204
205
  }),
206
+ "data-component": PropTypes.string,
205
207
  "data-element": PropTypes.string,
206
208
  "data-role": PropTypes.string,
207
209
  "disableAutoFocus": PropTypes.bool,
@@ -10,7 +10,7 @@ export interface ContentPaddingInterface {
10
10
  py?: PaddingValues;
11
11
  px?: PaddingValues;
12
12
  }
13
- export interface DialogProps extends ModalProps, Omit<TagProps, "data-component"> {
13
+ export interface DialogProps extends ModalProps, TagProps {
14
14
  /** Custom class name */
15
15
  className?: string;
16
16
  /** Prop to specify the aria-describedby property of the Dialog component */
@@ -25,6 +25,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
25
25
  const PADDING_VALUES = [0, 1, 2, 3, 4, 5, 6, 7, 8];
26
26
  const Dialog = exports.Dialog = /*#__PURE__*/(0, _react.forwardRef)(({
27
27
  className,
28
+ "data-component": dataComponent = "dialog",
28
29
  "data-element": dataElement = "dialog",
29
30
  "data-role": dataRole,
30
31
  children,
@@ -175,7 +176,7 @@ const Dialog = exports.Dialog = /*#__PURE__*/(0, _react.forwardRef)(({
175
176
  isOpen: open,
176
177
  additionalWrapperRefs: focusableContainers
177
178
  }, /*#__PURE__*/_react.default.createElement(_dialog.StyledDialog, _extends({
178
- "data-component": "dialog",
179
+ "data-component": dataComponent,
179
180
  "data-element": dataElement,
180
181
  "data-role": dataRole,
181
182
  "aria-modal": isTopModal ? true : undefined,
@@ -211,6 +212,7 @@ if (process.env.NODE_ENV !== "production") {
211
212
  "px": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
212
213
  "py": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8])
213
214
  }),
215
+ "data-component": _propTypes.default.string,
214
216
  "data-element": _propTypes.default.string,
215
217
  "data-role": _propTypes.default.string,
216
218
  "disableAutoFocus": _propTypes.default.bool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "141.0.4",
3
+ "version": "141.0.5",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",