@npm_leadtech/legal-lib-components 5.34.0 → 5.34.1

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.
@@ -1780,8 +1780,6 @@ h2.react-datepicker__current-month {
1780
1780
  flex-flow: row wrap;
1781
1781
  width: 100%;
1782
1782
  margin-left: 1.5rem;
1783
- margin-top: 2rem;
1784
- margin-bottom: 1rem;
1785
1783
  }
1786
1784
  .e-radio.--regular .e-radio__inner label {
1787
1785
  margin-bottom: 0.25rem;
@@ -1873,8 +1871,6 @@ h2.react-datepicker__current-month {
1873
1871
  flex-flow: row wrap;
1874
1872
  width: 100%;
1875
1873
  margin-left: 1.5rem;
1876
- margin-top: 2rem;
1877
- margin-bottom: 1rem;
1878
1874
  }
1879
1875
  .e-radio.--regular:not(.--icons) .e-radio__inner label {
1880
1876
  margin-bottom: 0.25rem;
@@ -2286,7 +2282,7 @@ h2.react-datepicker__current-month {
2286
2282
  display: none;
2287
2283
  }
2288
2284
  .e-text__inner {
2289
- margin-bottom: 0.6rem;
2285
+ margin-bottom: 0.5rem;
2290
2286
  }
2291
2287
  .e-text__children {
2292
2288
  margin-top: 0.5rem;
@@ -17,7 +17,6 @@ export const AddButtonStyled = styled.div `
17
17
  .e-addButton {
18
18
  &__inner {
19
19
  display: inline-block;
20
- margin-top: 1rem;
21
20
  color: var(--primary-main);
22
21
  border-radius: var(--global-border-radius);
23
22
  transition: all 0.3s ease;
@@ -18,7 +18,6 @@ export const AddButtonStyled = styled.div`
18
18
  .e-addButton {
19
19
  &__inner {
20
20
  display: inline-block;
21
- margin-top: 1rem;
22
21
  color: var(--primary-main);
23
22
  border-radius: var(--global-border-radius);
24
23
  transition: all 0.3s ease;
@@ -7,8 +7,6 @@
7
7
  flex-flow: row wrap;
8
8
  width: 100%;
9
9
  margin-left: 1.5rem;
10
- margin-top: 2rem;
11
- margin-bottom: 1rem;
12
10
 
13
11
  label {
14
12
  margin-bottom: 0.25rem;
@@ -5,7 +5,6 @@ export const RemoveButtonStyled = styled.section `
5
5
  .e-removeButton {
6
6
  &__inner {
7
7
  display: inline-block;
8
- margin-top: 1rem;
9
8
  color: var(--error-main);
10
9
 
11
10
  border-radius: var(--global-border-radius);
@@ -6,7 +6,6 @@ export const RemoveButtonStyled = styled.section`
6
6
  .e-removeButton {
7
7
  &__inner {
8
8
  display: inline-block;
9
- margin-top: 1rem;
10
9
  color: var(--error-main);
11
10
 
12
11
  border-radius: var(--global-border-radius);
@@ -4,6 +4,6 @@ import error from '../../../../images/svg/info-error_24px_outlined.svg';
4
4
  const TextArea = ({ customClass = '', disabled, errorMessage, label, name, onChange, placeholder, tooltip, validate = false, value, dataQa }) => {
5
5
  const classNames = `${validate ? 'e-textarea' : 'e-textarea --is-invalid'}
6
6
  ${customClass}`;
7
- return (_jsxs(TextAreaStyled, { className: classNames, children: [tooltip !== undefined && _jsx("p", { className: 'tooltip-form sans-serif --small', children: tooltip }), errorMessage !== undefined && !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 }), label !== undefined && (_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 }), Boolean(label) && (_jsx("div", { className: 'e-textarea__inner', children: _jsx("div", { className: 'inputLabel', children: label }) }))] }));
8
8
  };
9
9
  export default TextArea;
@@ -92,8 +92,8 @@ export const TextAreaStyled = styled.div `
92
92
  bottom: 0;
93
93
  }
94
94
 
95
- &__inner {
96
- margin-bottom: 0;
95
+ .e-textarea__inner {
96
+ margin-bottom: 0.5rem;
97
97
  }
98
98
 
99
99
  .inputLabel {
@@ -93,8 +93,8 @@ export const TextAreaStyled = styled.div`
93
93
  bottom: 0;
94
94
  }
95
95
 
96
- &__inner {
97
- margin-bottom: 0;
96
+ .e-textarea__inner {
97
+ margin-bottom: 0.5rem;
98
98
  }
99
99
 
100
100
  .inputLabel {
@@ -22,8 +22,8 @@ const TextArea: FC<TextAreaProps> = ({
22
22
 
23
23
  return (
24
24
  <TextAreaStyled className={classNames}>
25
- {tooltip !== undefined && <p className='tooltip-form sans-serif --small'>{tooltip}</p>}
26
- {errorMessage !== undefined && !validate && (
25
+ {Boolean(tooltip) && <p className='tooltip-form sans-serif --small'>{tooltip}</p>}
26
+ {Boolean(errorMessage) && !validate && (
27
27
  <span className='e-text--error sans-serif --small'>
28
28
  <img src={error} alt={errorMessage} />
29
29
  {errorMessage}
@@ -38,7 +38,7 @@ const TextArea: FC<TextAreaProps> = ({
38
38
  disabled={disabled}
39
39
  data-qa={dataQa}
40
40
  />
41
- {label !== undefined && (
41
+ {Boolean(label) && (
42
42
  <div className={'e-textarea__inner'}>
43
43
  <div className='inputLabel'>{label}</div>
44
44
  </div>
@@ -32,7 +32,7 @@ const TextInput = React.forwardRef(({ label, value, validate = true, isValidGrou
32
32
  }
33
33
  return (_jsx(Input, { name: name ?? '', type: type, placeholder: placeholder ?? '', className: 'e-text-input', onChange: handleChange, onClick: onClick ?? (() => { }), value: value, "data-qa": name, disabled: disabled ?? false, maxLength: maxLength, onBlur: onBlur ?? (() => { }), ref: ref, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp }));
34
34
  };
35
- return (_jsxs("div", { className: classnames, children: [children !== null && _jsx("div", { className: 'e-text__children', children: children }), _jsx(TextInputTooltip, { tooltip: tooltip }), _jsx(TextInputMessage, { errorMessage: errorMessage, validate: validate }), renderInput(), _jsx(TextInputLabel, { label: label, htmlFor: name, notes: notes, dialogMenuTip: dialogMenuTip })] }));
35
+ return (_jsxs("div", { className: classnames, children: [Boolean(children) && _jsx("div", { className: 'e-text__children', children: children }), _jsx(TextInputTooltip, { tooltip: tooltip }), _jsx(TextInputMessage, { errorMessage: errorMessage, validate: validate }), renderInput(), _jsx(TextInputLabel, { label: label, htmlFor: name, notes: notes, dialogMenuTip: dialogMenuTip })] }));
36
36
  });
37
37
  export default TextInput;
38
38
  TextInput.displayName = 'TextInput';
@@ -77,7 +77,7 @@
77
77
  }
78
78
 
79
79
  &__inner {
80
- margin-bottom: 0.6rem;
80
+ margin-bottom: 0.5rem;
81
81
  }
82
82
 
83
83
  &__children {
@@ -97,7 +97,7 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
97
97
 
98
98
  return (
99
99
  <div className={classnames}>
100
- {children !== null && <div className='e-text__children'>{children}</div>}
100
+ {Boolean(children) && <div className='e-text__children'>{children}</div>}
101
101
  <TextInputTooltip tooltip={tooltip} />
102
102
  <TextInputMessage errorMessage={errorMessage} validate={validate} />
103
103
  {renderInput()}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { DialogMenuIcon } from '../../atoms';
3
3
  export const TextInputLabel = ({ label, htmlFor, notes, dialogMenuTip = '' }) => {
4
- if (label === undefined && notes === undefined)
4
+ if (!label && !notes)
5
5
  return null;
6
6
  return (_jsxs("div", { className: 'e-text__inner', children: [_jsxs("label", { htmlFor: htmlFor, className: dialogMenuTip.length > 0 ? 'form-group__label-icon' : 'form-group__label', children: [label, dialogMenuTip.length > 0 ? _jsx(DialogMenuIcon, { content: dialogMenuTip }) : null] }), _jsx("p", { className: 'e-text__inner__notes', children: notes })] }));
7
7
  };
@@ -12,7 +12,7 @@ interface TextInputLabelProps {
12
12
  }
13
13
 
14
14
  export const TextInputLabel: FC<TextInputLabelProps> = ({ label, htmlFor, notes, dialogMenuTip = '' }) => {
15
- if (label === undefined && notes === undefined) return null
15
+ if (!label && !notes) return null
16
16
 
17
17
  return (
18
18
  <div className='e-text__inner'>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "5.34.0",
3
+ "version": "5.34.1",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",