@npm_leadtech/legal-lib-components 7.43.2 → 7.43.3

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,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TextAreaStyled } from './TextArea.styled';
3
3
  import error from '../../../../images/svg/info-error_24px_outlined.svg';
4
- const TextArea = ({ customClass = '', disabled, errorMessage, label, name, onChange, placeholder, tooltip, validate = false, value, dataQa }) => {
4
+ const TextArea = ({ customClass = '', disabled, errorMessage, label, name, onChange, placeholder, tooltip, validate = false, value, dataQa, maxLength }) => {
5
5
  const classNames = `${validate ? 'e-textarea' : 'e-textarea --is-invalid'}
6
6
  ${customClass}`;
7
- return (_jsxs(TextAreaStyled, { className: classNames, children: [Boolean(tooltip) && _jsx("p", { className: 'tooltip-form sans-serif --small', children: tooltip }), Boolean(errorMessage) && !validate && (_jsxs("span", { className: 'e-text--error sans-serif --small', children: [_jsx("img", { src: error, alt: errorMessage }), errorMessage] })), _jsx("textarea", { id: name, name: name, placeholder: placeholder, onChange: onChange, value: value, disabled: disabled, "data-qa": dataQa }), Boolean(label) && (_jsx("div", { className: 'e-textarea__inner', children: _jsx("div", { className: 'inputLabel', children: label }) }))] }));
7
+ return (_jsxs(TextAreaStyled, { className: classNames, children: [Boolean(tooltip) && _jsx("p", { className: 'tooltip-form sans-serif --small', children: tooltip }), Boolean(errorMessage) && !validate && (_jsxs("span", { className: 'e-text--error sans-serif --small', children: [_jsx("img", { src: error, alt: errorMessage }), errorMessage] })), _jsx("textarea", { id: name, name: name, placeholder: placeholder, onChange: onChange, value: value, disabled: disabled, "data-qa": dataQa, maxLength: maxLength }), Boolean(label) && (_jsx("div", { className: 'e-textarea__inner', children: _jsx("div", { className: 'inputLabel', children: label }) }))] }));
8
8
  };
9
9
  export default TextArea;
@@ -15,7 +15,8 @@ const TextArea: FC<TextAreaProps> = ({
15
15
  tooltip,
16
16
  validate = false,
17
17
  value,
18
- dataQa
18
+ dataQa,
19
+ maxLength
19
20
  }) => {
20
21
  const classNames = `${validate ? 'e-textarea' : 'e-textarea --is-invalid'}
21
22
  ${customClass}`
@@ -37,6 +38,7 @@ const TextArea: FC<TextAreaProps> = ({
37
38
  value={value}
38
39
  disabled={disabled}
39
40
  data-qa={dataQa}
41
+ maxLength={maxLength}
40
42
  />
41
43
  {Boolean(label) && (
42
44
  <div className={'e-textarea__inner'}>
@@ -10,4 +10,5 @@ export interface TextAreaProps {
10
10
  validate?: boolean;
11
11
  disabled?: boolean;
12
12
  onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
13
+ maxLength?: number;
13
14
  }
@@ -10,4 +10,5 @@ export interface TextAreaProps {
10
10
  validate?: boolean
11
11
  disabled?: boolean
12
12
  onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void
13
+ maxLength?: number
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.43.2",
3
+ "version": "7.43.3",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",