@monolith-forensics/monolith-ui 1.1.40 → 1.1.42

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.
@@ -20,5 +20,5 @@ interface TextAreaInputProps {
20
20
  cacheMeasurements?: boolean;
21
21
  style?: any;
22
22
  }
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;
23
+ declare const TextAreaInput: ({ defaultValue, value, placeholder, onChange, label, error, required, colSpan, size, description, inputRef, maxRows, minRows, onHeightChange, onKeyUp, cacheMeasurements, style, }: TextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
24
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 = ({ defaultValue, value, onChange, label, error, required, colSpan = 1, size = "sm", description, inputRef = null, maxRows = 6, minRows = 3, onHeightChange, onKeyUp, cacheMeasurements, style, }) => {
3
+ const TextAreaInput = ({ defaultValue, value, placeholder, 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, { defaultValue: defaultValue, value: value, placeholder: "", onChange: onChange, onKeyUp: onKeyUp, 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: 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;
@@ -9,5 +9,7 @@ interface TextInputProps extends InputProps {
9
9
  colSpan?: number;
10
10
  description?: string;
11
11
  }
12
- declare const TextInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<TextInputProps, never>> & string & Omit<({ className, label, error, required, colSpan, description, size, ...rest }: TextInputProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
12
+ declare const TextInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
13
+ ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
14
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>, keyof import("react").Component<any, {}, any>>;
13
15
  export default TextInput;
@@ -13,10 +13,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import styled from "styled-components";
14
14
  import { FieldLabel } from "..";
15
15
  import Input from "../Input/Input";
16
- const TextInput = styled((_a) => {
16
+ import { forwardRef } from "react";
17
+ const TextInput = styled(forwardRef((_a, ref) => {
17
18
  var { className, label, error, required, colSpan = 1, description, size = "sm" } = _a, rest = __rest(_a, ["className", "label", "error", "required", "colSpan", "description", "size"]);
18
- return (_jsxs("div", { className: className, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsx(Input, Object.assign({ size: size }, rest))] }));
19
- }) `
19
+ return (_jsxs("div", { className: className, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsx(Input, Object.assign({ ref: ref, size: size }, rest))] }));
20
+ })) `
20
21
  grid-column: span ${({ colSpan }) => colSpan || 1};
21
22
  display: flex;
22
23
  flex-direction: column;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.1.40",
3
+ "version": "1.1.42",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",