carbon-react 117.7.0 → 117.7.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.
@@ -81,6 +81,9 @@ const Link = /*#__PURE__*/React.forwardRef(({
81
81
  "aria-label": ariaLabel,
82
82
  ...ariaProps
83
83
  };
84
+ const buttonProps = {
85
+ type: "button"
86
+ };
84
87
 
85
88
  const createLinkBasedOnType = () => {
86
89
  let type = "a";
@@ -89,7 +92,10 @@ const Link = /*#__PURE__*/React.forwardRef(({
89
92
  type = "button";
90
93
  }
91
94
 
92
- return /*#__PURE__*/React.createElement(type, { ...componentProps,
95
+ return /*#__PURE__*/React.createElement(type, type === "button" ? { ...componentProps,
96
+ ...buttonProps,
97
+ placeholderTabIndex
98
+ } : { ...componentProps,
93
99
  ...(placeholderTabIndex && href === undefined && !onClick && {
94
100
  tabIndex: -1
95
101
  })
@@ -49,7 +49,7 @@ const PagerNavigationLink = ({
49
49
  }
50
50
  }, [disabled]);
51
51
 
52
- const handleOnCLick = ev => {
52
+ const handleOnClick = ev => {
53
53
  onClick === null || onClick === void 0 ? void 0 : onClick(ev);
54
54
  onPagination === null || onPagination === void 0 ? void 0 : onPagination(navLinkConfig[type].destination, pageSize, type);
55
55
  };
@@ -64,7 +64,7 @@ const PagerNavigationLink = ({
64
64
  disabled: disabled(),
65
65
  onClick: // Type assertion due to the fact that StyledPagerLink
66
66
  // will always return a button element
67
- handleOnCLick,
67
+ handleOnClick,
68
68
  ref: linkRef
69
69
  }, text);
70
70
  };
@@ -102,6 +102,9 @@ const Link = /*#__PURE__*/_react.default.forwardRef(({
102
102
  "aria-label": ariaLabel,
103
103
  ...ariaProps
104
104
  };
105
+ const buttonProps = {
106
+ type: "button"
107
+ };
105
108
 
106
109
  const createLinkBasedOnType = () => {
107
110
  let type = "a";
@@ -110,7 +113,10 @@ const Link = /*#__PURE__*/_react.default.forwardRef(({
110
113
  type = "button";
111
114
  }
112
115
 
113
- return /*#__PURE__*/_react.default.createElement(type, { ...componentProps,
116
+ return /*#__PURE__*/_react.default.createElement(type, type === "button" ? { ...componentProps,
117
+ ...buttonProps,
118
+ placeholderTabIndex
119
+ } : { ...componentProps,
114
120
  ...(placeholderTabIndex && href === undefined && !onClick && {
115
121
  tabIndex: -1
116
122
  })
@@ -65,7 +65,7 @@ const PagerNavigationLink = ({
65
65
  }
66
66
  }, [disabled]);
67
67
 
68
- const handleOnCLick = ev => {
68
+ const handleOnClick = ev => {
69
69
  onClick === null || onClick === void 0 ? void 0 : onClick(ev);
70
70
  onPagination === null || onPagination === void 0 ? void 0 : onPagination(navLinkConfig[type].destination, pageSize, type);
71
71
  };
@@ -80,7 +80,7 @@ const PagerNavigationLink = ({
80
80
  disabled: disabled(),
81
81
  onClick: // Type assertion due to the fact that StyledPagerLink
82
82
  // will always return a button element
83
- handleOnCLick,
83
+ handleOnClick,
84
84
  ref: linkRef
85
85
  }, text);
86
86
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "117.7.0",
3
+ "version": "117.7.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -142,7 +142,7 @@
142
142
  "fs-extra": "^10.0.0",
143
143
  "husky": "^4.3.6",
144
144
  "jest": "^27.5.1",
145
- "jest-canvas-mock": "^2.3.1",
145
+ "jest-canvas-mock": "^2.5.0",
146
146
  "jest-environment-jsdom": "^27.5.1",
147
147
  "jest-fetch-mock": "^3.0.3",
148
148
  "jest-styled-components": "^6.3.1",