rsuite 6.0.0-canary-20250825 → 6.0.0-canary-20250827

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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { InputBaseCommonProps } from '../internals/InputBase';
3
- import type { SanitizedTextareaProps, PropsWithoutChange, FormControlBaseProps, Size } from '../internals/types';
3
+ import type { PrependParameters, SanitizedTextareaProps, PropsWithoutChange, FormControlBaseProps, Size } from '../internals/types';
4
4
  export interface TextareaProps extends InputBaseCommonProps, SanitizedTextareaProps, PropsWithoutChange<FormControlBaseProps> {
5
5
  /**
6
6
  * The size of the textarea.
@@ -27,6 +27,10 @@ export interface TextareaProps extends InputBaseCommonProps, SanitizedTextareaPr
27
27
  * Called when Enter key is pressed
28
28
  */
29
29
  onPressEnter?: React.KeyboardEventHandler<HTMLTextAreaElement>;
30
+ /**
31
+ * The callback function in which value is changed.
32
+ */
33
+ onChange?: PrependParameters<React.ChangeEventHandler<HTMLTextAreaElement>, [value: string]>;
30
34
  }
31
35
  declare const Textarea: import("../internals/types").InternalRefForwardingComponent<"textarea", TextareaProps, never> & Record<string, never>;
32
36
  export default Textarea;
@@ -42,7 +42,7 @@ const Dialog = forwardRef((props, ref) => {
42
42
  inputRef.current.focus();
43
43
  }
44
44
  }, [type]);
45
- const handleClose = useCallback(result => {
45
+ const handleCancel = useCallback(result => {
46
46
  setIsOpen(false);
47
47
  setTimeout(() => {
48
48
  onClose === null || onClose === void 0 || onClose(result);
@@ -58,11 +58,12 @@ const Dialog = forwardRef((props, ref) => {
58
58
  return;
59
59
  }
60
60
  }
61
- handleClose(value);
61
+ handleCancel(value);
62
62
  } else {
63
- handleClose(true);
63
+ handleCancel(true);
64
64
  }
65
- }, [type, inputValue, validate, handleClose]);
65
+ }, [type, inputValue, validate, handleCancel]);
66
+ const handleClose = useCallback(() => handleCancel(false), [handleCancel]);
66
67
  const handleInputKeyDown = useCallback(event => {
67
68
  if (event.key === 'Enter') {
68
69
  handleConfirm();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsuite",
3
- "version": "6.0.0-canary-20250825",
3
+ "version": "6.0.0-canary-20250827",
4
4
  "description": "A suite of react components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -9,6 +9,9 @@
9
9
  "directories": {
10
10
  "lib": "cjs/"
11
11
  },
12
+ "scripts": {
13
+ "prepublishOnly": "node ../scripts/validate-builds.js"
14
+ },
12
15
  "keywords": [
13
16
  "react",
14
17
  "rsuite",