carbon-react 142.8.0 → 142.8.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.
@@ -69,8 +69,7 @@ export const ValidationIcon = ({
69
69
  setTriggeredByIcon(false);
70
70
  if (onBlur) onBlur(e);
71
71
  },
72
- isPartOfInput: isPartOfInput,
73
- "data-role": `validation-icon-${validationType}`
72
+ isPartOfInput: isPartOfInput
74
73
  }, filterStyledSystemMarginProps(rest)), /*#__PURE__*/React.createElement(Icon, {
75
74
  "aria-describedby": validationTooltipId.current,
76
75
  key: `${validationType}-icon`,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="jest" />
2
2
  export declare const setupMatchMediaMock: () => void;
3
3
  export declare const mockMatchMedia: (matches: boolean) => {
4
- removeEventListener: jest.Mock<any, any>;
4
+ removeEventListener: jest.Mock<any, any, any>;
5
5
  };
@@ -76,6 +76,13 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
76
76
  }
77
77
  startCharacterTimeout();
78
78
  }, [startCharacterTimeout]);
79
+ useEffect(() => {
80
+ return () => {
81
+ if (characterTimer.current) {
82
+ clearTimeout(characterTimer.current);
83
+ }
84
+ };
85
+ }, []);
79
86
  const openSubmenu = useCallback(() => {
80
87
  setSubmenuOpen(true);
81
88
  setOpenSubmenuId(submenuId.current);
@@ -78,8 +78,7 @@ const ValidationIcon = ({
78
78
  setTriggeredByIcon(false);
79
79
  if (onBlur) onBlur(e);
80
80
  },
81
- isPartOfInput: isPartOfInput,
82
- "data-role": `validation-icon-${validationType}`
81
+ isPartOfInput: isPartOfInput
83
82
  }, (0, _utils.filterStyledSystemMarginProps)(rest)), /*#__PURE__*/_react.default.createElement(_icon.default, {
84
83
  "aria-describedby": validationTooltipId.current,
85
84
  key: `${validationType}-icon`,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="jest" />
2
2
  export declare const setupMatchMediaMock: () => void;
3
3
  export declare const mockMatchMedia: (matches: boolean) => {
4
- removeEventListener: jest.Mock<any, any>;
4
+ removeEventListener: jest.Mock<any, any, any>;
5
5
  };
@@ -85,6 +85,13 @@ const Submenu = /*#__PURE__*/_react.default.forwardRef(({
85
85
  }
86
86
  startCharacterTimeout();
87
87
  }, [startCharacterTimeout]);
88
+ (0, _react.useEffect)(() => {
89
+ return () => {
90
+ if (characterTimer.current) {
91
+ clearTimeout(characterTimer.current);
92
+ }
93
+ };
94
+ }, []);
88
95
  const openSubmenu = (0, _react.useCallback)(() => {
89
96
  setSubmenuOpen(true);
90
97
  setOpenSubmenuId(submenuId.current);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "142.8.0",
3
+ "version": "142.8.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -11,8 +11,8 @@
11
11
  "scripts": {
12
12
  "start": "node ./scripts/check_node_version.mjs && cross-env storybook dev -p 9001 -c .storybook",
13
13
  "start:debug-theme": "cross-env STORYBOOK_DEBUG_THEME=true npm run start",
14
- "test": "jest --config=./jest.config.json",
15
- "test-update": "jest --config=./jest.config.json --updateSnapshot",
14
+ "test": "jest --config=./jest.config.ts",
15
+ "test-update": "jest --config=./jest.config.ts --updateSnapshot",
16
16
  "format": "prettier --write './{src,playwright}/**/*.{js,jsx,ts,tsx}'",
17
17
  "lint": "eslint ./src ./playwright",
18
18
  "build": "node ./scripts/build.js",
@@ -90,7 +90,7 @@
90
90
  "@storybook/theming": "^8.2.6",
91
91
  "@storybook/types": "^8.2.6",
92
92
  "@testing-library/dom": "^9.0.0",
93
- "@testing-library/jest-dom": "^5.16.5",
93
+ "@testing-library/jest-dom": "^6.5.0",
94
94
  "@testing-library/react": "^12.1.5",
95
95
  "@testing-library/react-hooks": "^8.0.1",
96
96
  "@testing-library/user-event": "^14.5.1",
@@ -99,7 +99,7 @@
99
99
  "@types/enzyme": "3.10.13",
100
100
  "@types/glob": "^8.1.0",
101
101
  "@types/invariant": "^2.2.37",
102
- "@types/jest": "^27.5.0",
102
+ "@types/jest": "^29.5.0",
103
103
  "@types/lodash": "^4.14.202",
104
104
  "@types/node": "^20.9.0",
105
105
  "@types/react": "^17.0.59",
@@ -149,11 +149,12 @@
149
149
  "file-loader": "^6.2.0",
150
150
  "fs-extra": "^10.1.0",
151
151
  "husky": "^8.0.3",
152
- "jest": "^27.5.1",
152
+ "jest": "^29.5.0",
153
153
  "jest-canvas-mock": "^2.5.2",
154
- "jest-environment-jsdom": "^27.5.1",
154
+ "jest-environment-jsdom": "^29.5.0",
155
155
  "jest-fetch-mock": "^3.0.3",
156
156
  "jest-styled-components": "^6.3.4",
157
+ "jsdom": "^21.1.0",
157
158
  "jsdom-testing-mocks": "^1.11.0",
158
159
  "lint-staged": "^11.2.6",
159
160
  "mockdate": "^2.0.5",
@@ -205,7 +206,8 @@
205
206
  },
206
207
  "overrides": {
207
208
  "playwright-core": "$@playwright/experimental-ct-react17",
208
- "@testing-library/dom": "$@testing-library/dom"
209
+ "@testing-library/dom": "$@testing-library/dom",
210
+ "jsdom": "$jsdom"
209
211
  },
210
212
  "config": {
211
213
  "commitizen": {