odaptos_design_system 1.4.197 → 1.4.199
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/Textarea/Textarea.d.ts +2 -1
- package/dist/odaptos_design_system.cjs.development.js +4 -2
- package/dist/odaptos_design_system.cjs.development.js.map +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js.map +1 -1
- package/dist/odaptos_design_system.esm.js +4 -2
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/TextInput/TextInput.tsx +1 -1
- package/src/Textarea/Textarea.tsx +3 -0
|
@@ -11,6 +11,7 @@ interface TextareaProps {
|
|
|
11
11
|
value: string | number;
|
|
12
12
|
onChange: (event: any) => void;
|
|
13
13
|
onBlur?: (event: any) => void;
|
|
14
|
+
onKeyDown?: () => void;
|
|
14
15
|
id?: string;
|
|
15
16
|
error?: boolean;
|
|
16
17
|
maxCharacters: number;
|
|
@@ -19,5 +20,5 @@ interface TextareaProps {
|
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
}
|
|
21
22
|
/** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=738-6407&mode=dev */
|
|
22
|
-
export declare const Textarea: ({ name, label, className, id, onChange, onBlur, placeholder, value, maxCharacters, topLabel, topLabelWeight, topLabelSize, errorText, helperText, error, disabled, required, }: TextareaProps) => React.JSX.Element;
|
|
23
|
+
export declare const Textarea: ({ name, label, className, id, onChange, onBlur, placeholder, value, maxCharacters, topLabel, topLabelWeight, topLabelSize, errorText, helperText, error, disabled, required, onKeyDown, }: TextareaProps) => React.JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -11808,7 +11808,7 @@ const TextInput = props => {
|
|
|
11808
11808
|
error: error,
|
|
11809
11809
|
onBlur: onBlur,
|
|
11810
11810
|
multiline: multiline,
|
|
11811
|
-
|
|
11811
|
+
onKeyUp: e => {
|
|
11812
11812
|
if (e.key === 'Enter' && onKeyDown) {
|
|
11813
11813
|
onKeyDown();
|
|
11814
11814
|
}
|
|
@@ -12600,7 +12600,8 @@ const Textarea = ({
|
|
|
12600
12600
|
helperText,
|
|
12601
12601
|
error,
|
|
12602
12602
|
disabled,
|
|
12603
|
-
required = false
|
|
12603
|
+
required = false,
|
|
12604
|
+
onKeyDown
|
|
12604
12605
|
}) => {
|
|
12605
12606
|
const [charCount, setCharCount] = React.useState(0);
|
|
12606
12607
|
const handleChange = e => {
|
|
@@ -12625,6 +12626,7 @@ const Textarea = ({
|
|
|
12625
12626
|
id: id,
|
|
12626
12627
|
onChange: handleChange,
|
|
12627
12628
|
onBlur: onBlur,
|
|
12629
|
+
onKeyDown: onKeyDown,
|
|
12628
12630
|
inputProps: {
|
|
12629
12631
|
maxLength: maxCharacters
|
|
12630
12632
|
},
|