@idds/react 1.6.23 → 1.6.25
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/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +2227 -2232
- package/dist/types/components/TextArea.d.ts +7 -4
- package/dist/types/components/TextArea.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ChangeEvent } from 'react';
|
|
2
2
|
import { SecurityConfig } from '../utils/security';
|
|
3
3
|
export type TextAreaStatus = 'neutral' | 'error' | 'warning' | 'success';
|
|
4
4
|
/**
|
|
@@ -12,7 +12,8 @@ export type TextAreaStatus = 'neutral' | 'error' | 'warning' | 'success';
|
|
|
12
12
|
* - autosize antara `minRows` hingga `maxRows`
|
|
13
13
|
*
|
|
14
14
|
* @param {string} value Controlled value.
|
|
15
|
-
* @param {(val: string) => void} onChange Callback on change.
|
|
15
|
+
* @param {(val: string, e?: ChangeEvent<HTMLTextAreaElement>) => void} onChange Callback on change.
|
|
16
|
+
* @param {(event: React.FormEvent<HTMLTextAreaElement>) => void} [onInput]
|
|
16
17
|
* @param {number} [debounce=0] Debounce ms untuk onChangeDebounced.
|
|
17
18
|
* @param {(val: string) => void} [onChangeDebounced]
|
|
18
19
|
* Callback setelah debounce.
|
|
@@ -34,7 +35,9 @@ export type TextAreaStatus = 'neutral' | 'error' | 'warning' | 'success';
|
|
|
34
35
|
*/
|
|
35
36
|
export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'> {
|
|
36
37
|
value: string;
|
|
37
|
-
onChange: (val: string) => void;
|
|
38
|
+
onChange: (val: string, e?: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
39
|
+
/** Callback yang memberikan akses ke event object lengkap, sama seperti emit('input', event) di Vue */
|
|
40
|
+
onInput?: (event: React.FormEvent<HTMLTextAreaElement>) => void;
|
|
38
41
|
debounce?: number;
|
|
39
42
|
onChangeDebounced?: (val: string) => void;
|
|
40
43
|
prefixIcon?: ReactNode;
|
|
@@ -53,5 +56,5 @@ export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTex
|
|
|
53
56
|
className?: string;
|
|
54
57
|
securityConfig?: SecurityConfig;
|
|
55
58
|
}
|
|
56
|
-
export default function TextArea({ value, onChange, debounce, onChangeDebounced, prefixIcon, suffixIcon, label, helperText, status, statusMessage, maxLength, showCharCount, showClearButton, minRows, maxRows, placeholder, disabled, className, securityConfig, onBlur, ...rest }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export default function TextArea({ value, onChange, onInput, debounce, onChangeDebounced, prefixIcon, suffixIcon, label, helperText, status, statusMessage, maxLength, showCharCount, showClearButton, minRows, maxRows, placeholder, disabled, className, securityConfig, onBlur, ...rest }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
57
60
|
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAIZ,SAAS,
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAIZ,SAAS,EACT,WAAW,EAEZ,MAAM,OAAO,CAAC;AAIf,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,UAAU,C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EAAE,aAAa,2CA2Lf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idds/react",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.25",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"./*": "./dist/*"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@idds/styles": "^1.6.
|
|
56
|
+
"@idds/styles": "^1.6.23",
|
|
57
57
|
"clsx": "^2.1.1",
|
|
58
58
|
"react-hook-form": "^7.60.0"
|
|
59
59
|
},
|