@monolith-forensics/monolith-ui 1.1.38 → 1.1.40

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,19 +1,24 @@
1
1
  import { Size } from "../core";
2
2
  interface TextAreaInputProps {
3
+ defaultValue?: string;
4
+ value?: string;
5
+ onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
3
6
  label?: string;
4
7
  error?: string;
5
8
  required?: boolean;
6
9
  colSpan?: number;
7
10
  size?: Size;
8
11
  description?: string;
12
+ placeholder?: string;
9
13
  inputRef?: React.RefObject<HTMLTextAreaElement> | null;
10
14
  maxRows?: number;
11
15
  minRows?: number;
12
16
  onHeightChange?: (height: number, meta: {
13
17
  rowHeight: number;
14
18
  }) => void;
19
+ onKeyUp?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
15
20
  cacheMeasurements?: boolean;
16
21
  style?: any;
17
22
  }
18
- declare const TextAreaInput: ({ label, error, required, colSpan, size, description, inputRef, maxRows, minRows, onHeightChange, cacheMeasurements, style, }: TextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
23
+ declare const TextAreaInput: ({ defaultValue, value, onChange, label, error, required, colSpan, size, description, inputRef, maxRows, minRows, onHeightChange, onKeyUp, cacheMeasurements, style, }: TextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
19
24
  export default TextAreaInput;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TextArea, FieldLabel } from "..";
3
- const TextAreaInput = ({ label, error, required, colSpan = 1, size = "sm", description, inputRef = null, maxRows = 6, minRows = 3, onHeightChange, cacheMeasurements, style, }) => {
3
+ const TextAreaInput = ({ defaultValue, value, onChange, label, error, required, colSpan = 1, size = "sm", description, inputRef = null, maxRows = 6, minRows = 3, onHeightChange, onKeyUp, cacheMeasurements, style, }) => {
4
4
  return (_jsxs("div", { style: {
5
5
  gridColumn: `span ${colSpan}`,
6
6
  height: "fit-content",
7
- }, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsx(TextArea, { ref: inputRef, size: size, maxRows: maxRows, minRows: minRows, onHeightChange: onHeightChange, cacheMeasurements: cacheMeasurements, style: style })] }));
7
+ }, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsx(TextArea, { defaultValue: defaultValue, value: value, placeholder: "", onChange: onChange, onKeyUp: onKeyUp, ref: inputRef, size: size, maxRows: maxRows, minRows: minRows, onHeightChange: onHeightChange, cacheMeasurements: cacheMeasurements, style: style })] }));
8
8
  };
9
9
  export default TextAreaInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",