@carbon/react 1.76.0-rc.0 → 1.76.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.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +829 -829
- package/es/components/ComboBox/ComboBox.js +2 -1
- package/es/components/FluidTextInput/FluidTextInput.d.ts +8 -0
- package/es/components/FluidTextInput/FluidTextInput.js +8 -0
- package/es/components/TextArea/TextArea.js +2 -1
- package/lib/components/ComboBox/ComboBox.js +2 -1
- package/lib/components/FluidTextInput/FluidTextInput.d.ts +8 -0
- package/lib/components/FluidTextInput/FluidTextInput.js +8 -0
- package/lib/components/TextArea/TextArea.js +2 -1
- package/package.json +4 -4
|
@@ -462,7 +462,8 @@ const ComboBox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
462
462
|
selectedItem: newSelectedItem
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
if (type === useCombobox.stateChangeTypes.FunctionSelectItem || type === useCombobox.stateChangeTypes.InputKeyDownEnter)
|
|
465
|
+
if ((type === useCombobox.stateChangeTypes.FunctionSelectItem || type === useCombobox.stateChangeTypes.InputKeyDownEnter) && !isEqual(selectedItemProp, newSelectedItem) // Only fire if there's an actual change
|
|
466
|
+
) {
|
|
466
467
|
onChange({
|
|
467
468
|
selectedItem: newSelectedItem
|
|
468
469
|
});
|
|
@@ -34,6 +34,14 @@ export interface FluidTextInputProps {
|
|
|
34
34
|
* Specify whether the control is a password input
|
|
35
35
|
*/
|
|
36
36
|
isPassword?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Max character count allowed for the textInput. This is needed in order for enableCounter to display
|
|
39
|
+
*/
|
|
40
|
+
maxCount?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Specify whether to display the character counter
|
|
43
|
+
*/
|
|
44
|
+
enableCounter?: boolean;
|
|
37
45
|
/**
|
|
38
46
|
* Provide the text that will be read by a screen reader when visiting this
|
|
39
47
|
* control
|
|
@@ -67,6 +67,14 @@ FluidTextInput.propTypes = {
|
|
|
67
67
|
* Specify whether the control is a password input
|
|
68
68
|
*/
|
|
69
69
|
isPassword: PropTypes.bool,
|
|
70
|
+
/**
|
|
71
|
+
* Max character count allowed for the textInput. This is needed in order for enableCounter to display
|
|
72
|
+
*/
|
|
73
|
+
maxCount: PropTypes.number,
|
|
74
|
+
/**
|
|
75
|
+
* Specify whether to display the character counter
|
|
76
|
+
*/
|
|
77
|
+
enableCounter: PropTypes.bool,
|
|
70
78
|
/**
|
|
71
79
|
* Provide the text that will be read by a screen reader when visiting this
|
|
72
80
|
* control
|
|
@@ -168,7 +168,8 @@ const TextArea = /*#__PURE__*/React__default.forwardRef((props, forwardRef) => {
|
|
|
168
168
|
[`${prefix}--text-area--warn`]: warn
|
|
169
169
|
});
|
|
170
170
|
const counterClasses = cx(`${prefix}--label`, {
|
|
171
|
-
[`${prefix}--label--disabled`]: disabled
|
|
171
|
+
[`${prefix}--label--disabled`]: disabled,
|
|
172
|
+
[`${prefix}--text-area__label-counter`]: true
|
|
172
173
|
});
|
|
173
174
|
const helperTextClasses = cx(`${prefix}--form__helper-text`, {
|
|
174
175
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
|
@@ -473,7 +473,8 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
473
473
|
selectedItem: newSelectedItem
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
|
-
if (type === Downshift.useCombobox.stateChangeTypes.FunctionSelectItem || type === Downshift.useCombobox.stateChangeTypes.InputKeyDownEnter)
|
|
476
|
+
if ((type === Downshift.useCombobox.stateChangeTypes.FunctionSelectItem || type === Downshift.useCombobox.stateChangeTypes.InputKeyDownEnter) && !isEqual__default["default"](selectedItemProp, newSelectedItem) // Only fire if there's an actual change
|
|
477
|
+
) {
|
|
477
478
|
onChange({
|
|
478
479
|
selectedItem: newSelectedItem
|
|
479
480
|
});
|
|
@@ -34,6 +34,14 @@ export interface FluidTextInputProps {
|
|
|
34
34
|
* Specify whether the control is a password input
|
|
35
35
|
*/
|
|
36
36
|
isPassword?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Max character count allowed for the textInput. This is needed in order for enableCounter to display
|
|
39
|
+
*/
|
|
40
|
+
maxCount?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Specify whether to display the character counter
|
|
43
|
+
*/
|
|
44
|
+
enableCounter?: boolean;
|
|
37
45
|
/**
|
|
38
46
|
* Provide the text that will be read by a screen reader when visiting this
|
|
39
47
|
* control
|
|
@@ -77,6 +77,14 @@ FluidTextInput.propTypes = {
|
|
|
77
77
|
* Specify whether the control is a password input
|
|
78
78
|
*/
|
|
79
79
|
isPassword: PropTypes__default["default"].bool,
|
|
80
|
+
/**
|
|
81
|
+
* Max character count allowed for the textInput. This is needed in order for enableCounter to display
|
|
82
|
+
*/
|
|
83
|
+
maxCount: PropTypes__default["default"].number,
|
|
84
|
+
/**
|
|
85
|
+
* Specify whether to display the character counter
|
|
86
|
+
*/
|
|
87
|
+
enableCounter: PropTypes__default["default"].bool,
|
|
80
88
|
/**
|
|
81
89
|
* Provide the text that will be read by a screen reader when visiting this
|
|
82
90
|
* control
|
|
@@ -178,7 +178,8 @@ const TextArea = /*#__PURE__*/React__default["default"].forwardRef((props, forwa
|
|
|
178
178
|
[`${prefix}--text-area--warn`]: warn
|
|
179
179
|
});
|
|
180
180
|
const counterClasses = cx__default["default"](`${prefix}--label`, {
|
|
181
|
-
[`${prefix}--label--disabled`]: disabled
|
|
181
|
+
[`${prefix}--label--disabled`]: disabled,
|
|
182
|
+
[`${prefix}--text-area__label-counter`]: true
|
|
182
183
|
});
|
|
183
184
|
const helperTextClasses = cx__default["default"](`${prefix}--form__helper-text`, {
|
|
184
185
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
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.76.0
|
|
4
|
+
"version": "1.76.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@babel/runtime": "^7.24.7",
|
|
53
53
|
"@carbon/feature-flags": "^0.24.0",
|
|
54
|
-
"@carbon/icons-react": "^11.55.0
|
|
54
|
+
"@carbon/icons-react": "^11.55.0",
|
|
55
55
|
"@carbon/layout": "^11.29.0",
|
|
56
|
-
"@carbon/styles": "^1.75.0
|
|
56
|
+
"@carbon/styles": "^1.75.0",
|
|
57
57
|
"@floating-ui/react": "^0.26.0",
|
|
58
58
|
"@ibm/telemetry-js": "^1.5.0",
|
|
59
59
|
"classnames": "2.5.1",
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"**/*.scss",
|
|
146
146
|
"**/*.css"
|
|
147
147
|
],
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "fd1b7ab668473833c250488e0f7fc4feb55f1d88"
|
|
149
149
|
}
|