@carbon/react 1.49.0-rc.0 → 1.49.0

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.
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import PropTypes from 'prop-types';
8
- import React, { FocusEvent, ReactNode } from 'react';
8
+ import { ChangeEvent, FocusEvent, ReactNode } from 'react';
9
9
  export interface TableToolbarSearchProps {
10
10
  children?: ReactNode;
11
11
  /**
@@ -45,7 +45,7 @@ export interface TableToolbarSearchProps {
45
45
  /**
46
46
  * Provide an optional hook that is called each time the input is updated
47
47
  */
48
- onChange?: (event: '' | Partial<React.ChangeEventHandler<HTMLInputElement>>, value?: string) => void;
48
+ onChange?: (event: '' | ChangeEvent<HTMLInputElement>, value?: string) => void;
49
49
  /**
50
50
  * Optional callback called when the search value is cleared.
51
51
  */
@@ -54,11 +54,11 @@ function Tooltip(_ref) {
54
54
  onTouchStart: onDragStart
55
55
  };
56
56
  function getChildEventHandlers(childProps) {
57
- const eventHandlerFunctions = ['onFocus', 'onBlur', 'onClick', 'onMouseEnter'];
57
+ const eventHandlerFunctions = Object.keys(triggerProps).filter(prop => prop.startsWith('on'));
58
58
  const eventHandlers = {};
59
59
  eventHandlerFunctions.forEach(functionName => {
60
60
  eventHandlers[functionName] = evt => {
61
- triggerProps[functionName]();
61
+ triggerProps[functionName](evt);
62
62
  if (childProps?.[functionName]) {
63
63
  childProps?.[functionName](evt);
64
64
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import PropTypes from 'prop-types';
8
- import React, { FocusEvent, ReactNode } from 'react';
8
+ import { ChangeEvent, FocusEvent, ReactNode } from 'react';
9
9
  export interface TableToolbarSearchProps {
10
10
  children?: ReactNode;
11
11
  /**
@@ -45,7 +45,7 @@ export interface TableToolbarSearchProps {
45
45
  /**
46
46
  * Provide an optional hook that is called each time the input is updated
47
47
  */
48
- onChange?: (event: '' | Partial<React.ChangeEventHandler<HTMLInputElement>>, value?: string) => void;
48
+ onChange?: (event: '' | ChangeEvent<HTMLInputElement>, value?: string) => void;
49
49
  /**
50
50
  * Optional callback called when the search value is cleared.
51
51
  */
@@ -64,11 +64,11 @@ function Tooltip(_ref) {
64
64
  onTouchStart: onDragStart
65
65
  };
66
66
  function getChildEventHandlers(childProps) {
67
- const eventHandlerFunctions = ['onFocus', 'onBlur', 'onClick', 'onMouseEnter'];
67
+ const eventHandlerFunctions = Object.keys(triggerProps).filter(prop => prop.startsWith('on'));
68
68
  const eventHandlers = {};
69
69
  eventHandlerFunctions.forEach(functionName => {
70
70
  eventHandlers[functionName] = evt => {
71
- triggerProps[functionName]();
71
+ triggerProps[functionName](evt);
72
72
  if (childProps?.[functionName]) {
73
73
  childProps?.[functionName](evt);
74
74
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/react",
3
3
  "description": "React components for the Carbon Design System",
4
- "version": "1.49.0-rc.0",
4
+ "version": "1.49.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -49,9 +49,9 @@
49
49
  "dependencies": {
50
50
  "@babel/runtime": "^7.18.3",
51
51
  "@carbon/feature-flags": "^0.16.0",
52
- "@carbon/icons-react": "^11.35.0-rc.0",
52
+ "@carbon/icons-react": "^11.35.0",
53
53
  "@carbon/layout": "^11.20.0",
54
- "@carbon/styles": "^1.49.0-rc.0",
54
+ "@carbon/styles": "^1.49.0",
55
55
  "@ibm/telemetry-js": "^1.2.0",
56
56
  "classnames": "2.5.1",
57
57
  "copy-to-clipboard": "^3.3.1",
@@ -79,7 +79,7 @@
79
79
  "@babel/preset-react": "^7.22.3",
80
80
  "@babel/preset-typescript": "^7.21.5",
81
81
  "@carbon/test-utils": "^10.30.0",
82
- "@carbon/themes": "^11.30.0-rc.0",
82
+ "@carbon/themes": "^11.30.0",
83
83
  "@rollup/plugin-babel": "^6.0.0",
84
84
  "@rollup/plugin-commonjs": "^25.0.0",
85
85
  "@rollup/plugin-node-resolve": "^15.0.0",
@@ -119,7 +119,7 @@
119
119
  "rollup": "^2.79.1",
120
120
  "rollup-plugin-strip-banner": "^3.0.0",
121
121
  "sass": "^1.51.0",
122
- "sass-loader": "^13.0.0",
122
+ "sass-loader": "^14.0.0",
123
123
  "storybook": "^7.1.0",
124
124
  "storybook-addon-accessibility-checker": "^3.1.61-rc.2",
125
125
  "stream-browserify": "^3.0.0",
@@ -139,5 +139,5 @@
139
139
  "**/*.scss",
140
140
  "**/*.css"
141
141
  ],
142
- "gitHead": "79048666dc3d8f66c3d64b46de45b25ce13d9adf"
142
+ "gitHead": "741ec54a40159b2438b2b09bf55c013bbff2c4ad"
143
143
  }