@trackunit/react-form-components 0.0.90 → 0.0.92
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/index.cjs +2 -2
- package/index.js +2 -2
- package/package.json +4 -4
package/index.cjs
CHANGED
|
@@ -14440,7 +14440,7 @@ const StyledTextInput = tailwindStyledComponents.twx(TextInput) `
|
|
|
14440
14440
|
* For most cases the TextAreaField is the correct component.
|
|
14441
14441
|
*/
|
|
14442
14442
|
const TextArea = React__namespace.forwardRef((_a, ref) => {
|
|
14443
|
-
var { id, name, value, rows, disabled, placeholder, readOnly, tabIndex, onChange, onFocus, onBlur, maxLength, resize = "vertical", defaultValue,
|
|
14443
|
+
var { id, name, value, rows, disabled, placeholder, readOnly, tabIndex, onChange, onFocus, onBlur, maxLength, resize = "vertical", defaultValue, required, dataTestId, isInvalid } = _a, rest = __rest(_a, ["id", "name", "value", "rows", "disabled", "placeholder", "readOnly", "tabIndex", "onChange", "onFocus", "onBlur", "maxLength", "resize", "defaultValue", "required", "dataTestId", "isInvalid"]);
|
|
14444
14444
|
return (jsxRuntime.jsx(StyledTextArea, Object.assign({ id: id, name: name, value: value, rows: rows, disabled: disabled, placeholder: placeholder, readOnly: readOnly, tabIndex: tabIndex, onFocus: onFocus, onBlur: onBlur, maxLength: maxLength, "$resize": resize, "$invalid": isInvalid, ref: ref, defaultValue: defaultValue, required: required }, rest, { onChange: onChange, "data-testid": dataTestId })));
|
|
14445
14445
|
});
|
|
14446
14446
|
const StyledTextArea = tailwindStyledComponents.tw.textarea `
|
|
@@ -14489,7 +14489,7 @@ const TextAreaField = React__namespace.forwardRef((_a, ref) => {
|
|
|
14489
14489
|
}
|
|
14490
14490
|
}, [onChange]);
|
|
14491
14491
|
return (jsxRuntime.jsx(FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon ||
|
|
14492
|
-
(maxLength !== null && maxLength !== undefined && (jsxRuntime.jsx(TextLengthIndicator, { length: valueLength, maxLength: maxLength }))), className: className
|
|
14492
|
+
(maxLength !== null && maxLength !== undefined && (jsxRuntime.jsx(TextLengthIndicator, { length: valueLength, maxLength: maxLength }))), className: `${className} grid grid-rows-[auto_1fr_auto]`, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsxRuntime.jsx(TextArea, Object.assign({ id: htmlForId, "aria-labelledby": htmlForId + "-label", ref: ref, maxLength: maxLength, value: value, isInvalid: renderAsInvalid }, rest, { className: "h-auto", onChange: handleChange, dataTestId: dataTestId })) }));
|
|
14493
14493
|
});
|
|
14494
14494
|
|
|
14495
14495
|
/**
|
package/index.js
CHANGED
|
@@ -14414,7 +14414,7 @@ const StyledTextInput = twx(TextInput) `
|
|
|
14414
14414
|
* For most cases the TextAreaField is the correct component.
|
|
14415
14415
|
*/
|
|
14416
14416
|
const TextArea = React.forwardRef((_a, ref) => {
|
|
14417
|
-
var { id, name, value, rows, disabled, placeholder, readOnly, tabIndex, onChange, onFocus, onBlur, maxLength, resize = "vertical", defaultValue,
|
|
14417
|
+
var { id, name, value, rows, disabled, placeholder, readOnly, tabIndex, onChange, onFocus, onBlur, maxLength, resize = "vertical", defaultValue, required, dataTestId, isInvalid } = _a, rest = __rest(_a, ["id", "name", "value", "rows", "disabled", "placeholder", "readOnly", "tabIndex", "onChange", "onFocus", "onBlur", "maxLength", "resize", "defaultValue", "required", "dataTestId", "isInvalid"]);
|
|
14418
14418
|
return (jsx$1(StyledTextArea, Object.assign({ id: id, name: name, value: value, rows: rows, disabled: disabled, placeholder: placeholder, readOnly: readOnly, tabIndex: tabIndex, onFocus: onFocus, onBlur: onBlur, maxLength: maxLength, "$resize": resize, "$invalid": isInvalid, ref: ref, defaultValue: defaultValue, required: required }, rest, { onChange: onChange, "data-testid": dataTestId })));
|
|
14419
14419
|
});
|
|
14420
14420
|
const StyledTextArea = tw.textarea `
|
|
@@ -14463,7 +14463,7 @@ const TextAreaField = React.forwardRef((_a, ref) => {
|
|
|
14463
14463
|
}
|
|
14464
14464
|
}, [onChange]);
|
|
14465
14465
|
return (jsx$1(FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon ||
|
|
14466
|
-
(maxLength !== null && maxLength !== undefined && (jsx$1(TextLengthIndicator, { length: valueLength, maxLength: maxLength }))), className: className
|
|
14466
|
+
(maxLength !== null && maxLength !== undefined && (jsx$1(TextLengthIndicator, { length: valueLength, maxLength: maxLength }))), className: `${className} grid grid-rows-[auto_1fr_auto]`, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsx$1(TextArea, Object.assign({ id: htmlForId, "aria-labelledby": htmlForId + "-label", ref: ref, maxLength: maxLength, value: value, isInvalid: renderAsInvalid }, rest, { className: "h-auto", onChange: handleChange, dataTestId: dataTestId })) }));
|
|
14467
14467
|
});
|
|
14468
14468
|
|
|
14469
14469
|
/**
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.92",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=16.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/css-class-variance-utilities": "0.0.
|
|
11
|
-
"@trackunit/i18n-library-translation": "0.0.
|
|
12
|
-
"@trackunit/react-components": "0.1.
|
|
10
|
+
"@trackunit/css-class-variance-utilities": "0.0.9",
|
|
11
|
+
"@trackunit/i18n-library-translation": "0.0.64",
|
|
12
|
+
"@trackunit/react-components": "0.1.131",
|
|
13
13
|
"@trackunit/tailwind-styled-components": "0.0.58",
|
|
14
14
|
"date-fns": "2.29.3",
|
|
15
15
|
"libphonenumber-js": "1.10.36",
|