carbon-react 147.0.0 → 147.0.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.
@@ -31,7 +31,7 @@ export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gri
31
31
  rowGap?: Gap;
32
32
  /** Design Token for Box Shadow. Note: please check that the box shadow design token you are using is compatible with the Box component. */
33
33
  boxShadow?: BoxShadowsType;
34
- /** Design Token for Border Radius. Note: please check that the border radius design token you are using is compatible with the Box component. **This prop will not do anything if you have the roundedCornerOptOut flag set in the CarbonProvider** */
34
+ /** Design Token for Border Radius. Note: please check that the border radius design token you are using is compatible with the Box component. */
35
35
  borderRadius?: BorderRadiusType;
36
36
  /**
37
37
  * @private
@@ -39,6 +39,9 @@ const Dialog = /*#__PURE__*/forwardRef(({
39
39
  topModalOverride,
40
40
  closeButtonDataProps,
41
41
  restoreFocusOnClose = true,
42
+ "aria-labelledby": ariaLabelledBy,
43
+ "aria-describedby": ariaDescribedBy,
44
+ "aria-label": ariaLabel,
42
45
  ...rest
43
46
  }, ref) => {
44
47
  const locale = useLocale();
@@ -86,11 +89,11 @@ const Dialog = /*#__PURE__*/forwardRef(({
86
89
  const dialogProps = {
87
90
  size,
88
91
  dialogHeight,
89
- "aria-labelledby": title && typeof title === "string" ? titleId : rest["aria-labelledby"],
90
- "aria-describedby": subtitle && typeof subtitle === "string" ? subtitleId : rest["aria-describedby"],
91
- "aria-label": rest["aria-label"]
92
+ "aria-labelledby": title && typeof title === "string" ? titleId : ariaLabelledBy,
93
+ "aria-describedby": subtitle && typeof subtitle === "string" ? subtitleId : ariaDescribedBy,
94
+ "aria-label": ariaLabel
92
95
  };
93
- return /*#__PURE__*/React.createElement(Modal, {
96
+ return /*#__PURE__*/React.createElement(Modal, _extends({
94
97
  open: open,
95
98
  onCancel: onCancel,
96
99
  disableEscKey: disableEscKey,
@@ -98,7 +101,7 @@ const Dialog = /*#__PURE__*/forwardRef(({
98
101
  className: className ? `${className} carbon-dialog` : "carbon-dialog",
99
102
  topModalOverride: topModalOverride,
100
103
  restoreFocusOnClose: restoreFocusOnClose
101
- }, /*#__PURE__*/React.createElement(FocusTrap, {
104
+ }, rest), /*#__PURE__*/React.createElement(FocusTrap, {
102
105
  autoFocus: !disableAutoFocus,
103
106
  focusFirstElement: focusFirstElement,
104
107
  bespokeTrap: bespokeFocusTrap,
@@ -31,7 +31,7 @@ export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gri
31
31
  rowGap?: Gap;
32
32
  /** Design Token for Box Shadow. Note: please check that the box shadow design token you are using is compatible with the Box component. */
33
33
  boxShadow?: BoxShadowsType;
34
- /** Design Token for Border Radius. Note: please check that the border radius design token you are using is compatible with the Box component. **This prop will not do anything if you have the roundedCornerOptOut flag set in the CarbonProvider** */
34
+ /** Design Token for Border Radius. Note: please check that the border radius design token you are using is compatible with the Box component. */
35
35
  borderRadius?: BorderRadiusType;
36
36
  /**
37
37
  * @private
@@ -48,6 +48,9 @@ const Dialog = exports.Dialog = /*#__PURE__*/(0, _react.forwardRef)(({
48
48
  topModalOverride,
49
49
  closeButtonDataProps,
50
50
  restoreFocusOnClose = true,
51
+ "aria-labelledby": ariaLabelledBy,
52
+ "aria-describedby": ariaDescribedBy,
53
+ "aria-label": ariaLabel,
51
54
  ...rest
52
55
  }, ref) => {
53
56
  const locale = (0, _useLocale.default)();
@@ -95,11 +98,11 @@ const Dialog = exports.Dialog = /*#__PURE__*/(0, _react.forwardRef)(({
95
98
  const dialogProps = {
96
99
  size,
97
100
  dialogHeight,
98
- "aria-labelledby": title && typeof title === "string" ? titleId : rest["aria-labelledby"],
99
- "aria-describedby": subtitle && typeof subtitle === "string" ? subtitleId : rest["aria-describedby"],
100
- "aria-label": rest["aria-label"]
101
+ "aria-labelledby": title && typeof title === "string" ? titleId : ariaLabelledBy,
102
+ "aria-describedby": subtitle && typeof subtitle === "string" ? subtitleId : ariaDescribedBy,
103
+ "aria-label": ariaLabel
101
104
  };
102
- return /*#__PURE__*/_react.default.createElement(_modal.default, {
105
+ return /*#__PURE__*/_react.default.createElement(_modal.default, _extends({
103
106
  open: open,
104
107
  onCancel: onCancel,
105
108
  disableEscKey: disableEscKey,
@@ -107,7 +110,7 @@ const Dialog = exports.Dialog = /*#__PURE__*/(0, _react.forwardRef)(({
107
110
  className: className ? `${className} carbon-dialog` : "carbon-dialog",
108
111
  topModalOverride: topModalOverride,
109
112
  restoreFocusOnClose: restoreFocusOnClose
110
- }, /*#__PURE__*/_react.default.createElement(_focusTrap.default, {
113
+ }, rest), /*#__PURE__*/_react.default.createElement(_focusTrap.default, {
111
114
  autoFocus: !disableAutoFocus,
112
115
  focusFirstElement: focusFirstElement,
113
116
  bespokeTrap: bespokeFocusTrap,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "147.0.0",
3
+ "version": "147.0.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",