@npm_leadtech/legal-lib-components 5.43.4 → 5.43.5

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.
@@ -9,7 +9,7 @@ export const MidBannerRatafiaSampleStyled = styled.div `
9
9
  img {
10
10
  border-radius: 8px 8px 0 0;
11
11
  box-shadow: var(--box-shadow-small);
12
- width: 727px;
12
+ max-width: 727px;
13
13
  }
14
14
  }
15
15
  &__sumarized-tag {
@@ -10,7 +10,7 @@ export const MidBannerRatafiaSampleStyled = styled.div`
10
10
  img {
11
11
  border-radius: 8px 8px 0 0;
12
12
  box-shadow: var(--box-shadow-small);
13
- width: 727px;
13
+ max-width: 727px;
14
14
  }
15
15
  }
16
16
  &__sumarized-tag {
@@ -6,16 +6,11 @@ import React, { useState } from 'react';
6
6
  import eyeCloseIcon from '../../../../images/svg/eye-close.svg';
7
7
  import eyeIcon from '../../../../images/svg/eye-24-px.svg';
8
8
  export const Input = React.forwardRef(({ value, name, placeholder, className, onChange, onClick, onBlur, onKeyDown, onKeyUp, disabled, type = 'text', maxLength }, ref) => {
9
- const [currentValue, setCurrentValue] = useState(value);
10
9
  const [hidden, setHidden] = useState(true);
11
10
  const showPassword = () => {
12
11
  if (value !== null)
13
12
  setHidden(!hidden);
14
13
  };
15
- const handleChange = (event) => {
16
- setCurrentValue(event.target.value);
17
- onChange(event);
18
- };
19
- return (_jsxs(_Fragment, { children: [_jsx("input", { type: !hidden && type === 'password' ? 'text' : type, name: name, id: name, className: className, maxLength: maxLength, placeholder: placeholder, onChange: handleChange, onClick: onClick, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onBlur: onBlur, value: currentValue, "data-qa": name, disabled: disabled, ref: ref }), type === 'password' && (_jsx("img", { className: 'input-icon-password', src: hidden ? eyeIcon : eyeCloseIcon, onClick: showPassword, alt: '' }))] }));
14
+ return (_jsxs(_Fragment, { children: [_jsx("input", { type: !hidden && type === 'password' ? 'text' : type, name: name, id: name, className: className, maxLength: maxLength, placeholder: placeholder, onChange: onChange, onClick: onClick, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onBlur: onBlur, value: value, "data-qa": name, disabled: disabled, ref: ref }), type === 'password' && (_jsx("img", { className: 'input-icon-password', src: hidden ? eyeIcon : eyeCloseIcon, onClick: showPassword, alt: '' }))] }));
20
15
  });
21
16
  Input.displayName = 'Input';
@@ -40,18 +40,12 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
40
40
  }: InputProps,
41
41
  ref
42
42
  ) => {
43
- const [currentValue, setCurrentValue] = useState(value)
44
43
  const [hidden, setHidden] = useState(true)
45
44
 
46
45
  const showPassword = (): any => {
47
46
  if (value !== null) setHidden(!hidden)
48
47
  }
49
48
 
50
- const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
51
- setCurrentValue(event.target.value)
52
- onChange(event)
53
- }
54
-
55
49
  return (
56
50
  <>
57
51
  <input
@@ -61,12 +55,12 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
61
55
  className={className}
62
56
  maxLength={maxLength}
63
57
  placeholder={placeholder}
64
- onChange={handleChange}
58
+ onChange={onChange}
65
59
  onClick={onClick}
66
60
  onKeyDown={onKeyDown}
67
61
  onKeyUp={onKeyUp}
68
62
  onBlur={onBlur}
69
- value={currentValue}
63
+ value={value}
70
64
  data-qa={name}
71
65
  disabled={disabled}
72
66
  ref={ref}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "5.43.4",
3
+ "version": "5.43.5",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",