@npm_leadtech/legal-lib-components 7.22.12 → 7.23.0

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.
@@ -2165,9 +2165,6 @@ h2.react-datepicker__current-month {
2165
2165
  width: 50%;
2166
2166
  }
2167
2167
  }
2168
- .e-text--has-prefix .tooltip-form {
2169
- grid-row: 3;
2170
- }
2171
2168
  .e-text--has-prefix .has-currency-prefix {
2172
2169
  padding-left: 2rem;
2173
2170
  grid-column: 1;
@@ -26,7 +26,7 @@ export const DialogMenuIconStyled = styled.div `
26
26
  align-items: flex-start;
27
27
  justify-content: space-between;
28
28
  position: absolute;
29
- z-index: 2;
29
+ z-index: 1;
30
30
  top: 1.5rem;
31
31
  right: -5rem;
32
32
 
@@ -27,7 +27,7 @@ export const DialogMenuIconStyled = styled.div`
27
27
  align-items: flex-start;
28
28
  justify-content: space-between;
29
29
  position: absolute;
30
- z-index: 2;
30
+ z-index: 1;
31
31
  top: 1.5rem;
32
32
  right: -5rem;
33
33
 
@@ -14,7 +14,6 @@ interface InputProps {
14
14
  onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
15
15
  onKeyUp: (e: React.KeyboardEvent<HTMLInputElement>) => void;
16
16
  country: string;
17
- currrencySymbol?: string;
18
17
  }
19
18
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
20
19
  export {};
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useState } from 'react';
3
+ import currencyEuro from '../../../../images/svg/currencyDE.svg';
4
+ import currencyOthers from '../../../../images/svg/currencyUS.svg';
3
5
  import eyeCloseIcon from '../../../../images/svg/eye-close.svg';
4
6
  import eyeIcon from '../../../../images/svg/eye-24-px.svg';
5
7
  import percent from '../../../../images/svg/percent.svg';
6
- export const Input = React.forwardRef(({ value, name, placeholder, className, onChange, onClick, onBlur, onKeyDown, onKeyUp, disabled, type = 'text', maxLength, country, prefix, currrencySymbol }, ref) => {
8
+ export const Input = React.forwardRef(({ value, name, placeholder, className, onChange, onClick, onBlur, onKeyDown, onKeyUp, disabled, type = 'text', maxLength, country, prefix }, ref) => {
7
9
  const [hidden, setHidden] = useState(true);
8
10
  const showPassword = () => {
9
11
  if (value !== null)
@@ -23,13 +25,12 @@ export const Input = React.forwardRef(({ value, name, placeholder, className, on
23
25
  else if (isPercent) {
24
26
  finalClassName += ' has-percent-suffix';
25
27
  }
26
- return (_jsxs(_Fragment, { children: [isCurrency && !!prefix && otherCurrency && currrencySymbol && (_jsx("div", { className: 'input-icon-currency-prefix', children: _jsx("span", { children: currrencySymbol }) })), _jsx("input", { type: !hidden && type === 'password' ? 'text' : type, name: name, id: name, className: finalClassName, 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("button", { type: 'button', className: 'input-icon-password-button', onClick: showPassword, onKeyDown: (e) => {
28
+ return (_jsxs(_Fragment, { children: [isCurrency && !!prefix && otherCurrency && (_jsx("div", { className: 'input-icon-currency-prefix', children: _jsx("img", { src: currencyOthers, alt: 'currency' }) })), _jsx("input", { type: !hidden && type === 'password' ? 'text' : type, name: name, id: name, className: finalClassName, 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("button", { type: 'button', className: 'input-icon-password-button', onClick: showPassword, onKeyDown: (e) => {
27
29
  if (e.key === 'Enter')
28
30
  showPassword();
29
31
  }, children: _jsx("img", { src: hidden ? eyeIcon : eyeCloseIcon, alt: '' }) })), isCurrency
30
32
  ? !!prefix &&
31
- euro &&
32
- currrencySymbol && (_jsx("div", { className: 'input-icon-currency-suffix', children: _jsx("span", { children: currrencySymbol }) }))
33
+ euro && (_jsx("div", { className: 'input-icon-currency-suffix', children: _jsx("img", { src: currencyEuro, alt: 'currency' }) }))
33
34
  : isPercent && (_jsx("div", { className: 'input-icon-percent-suffix', children: _jsx("img", { src: percent, alt: 'percent' }) }))] }));
34
35
  });
35
36
  Input.displayName = 'Input';
@@ -1,5 +1,7 @@
1
1
  import React, { useState } from 'react'
2
2
 
3
+ import currencyEuro from '../../../../images/svg/currencyDE.svg'
4
+ import currencyOthers from '../../../../images/svg/currencyUS.svg'
3
5
  import eyeCloseIcon from '../../../../images/svg/eye-close.svg'
4
6
  import eyeIcon from '../../../../images/svg/eye-24-px.svg'
5
7
  import percent from '../../../../images/svg/percent.svg'
@@ -19,7 +21,6 @@ interface InputProps {
19
21
  onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void
20
22
  onKeyUp: (e: React.KeyboardEvent<HTMLInputElement>) => void
21
23
  country: string
22
- currrencySymbol?: string
23
24
  }
24
25
 
25
26
  export const Input = React.forwardRef<HTMLInputElement, InputProps>(
@@ -38,8 +39,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
38
39
  type = 'text',
39
40
  maxLength,
40
41
  country,
41
- prefix,
42
- currrencySymbol
42
+ prefix
43
43
  }: InputProps,
44
44
  ref
45
45
  ) => {
@@ -66,9 +66,9 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
66
66
 
67
67
  return (
68
68
  <>
69
- {isCurrency && !!prefix && otherCurrency && currrencySymbol && (
69
+ {isCurrency && !!prefix && otherCurrency && (
70
70
  <div className='input-icon-currency-prefix'>
71
- <span>{currrencySymbol}</span>
71
+ <img src={currencyOthers} alt='currency' />
72
72
  </div>
73
73
  )}
74
74
  <input
@@ -102,10 +102,9 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
102
102
  )}
103
103
  {isCurrency
104
104
  ? !!prefix &&
105
- euro &&
106
- currrencySymbol && (
105
+ euro && (
107
106
  <div className='input-icon-currency-suffix'>
108
- <span>{currrencySymbol}</span>
107
+ <img src={currencyEuro} alt='currency' />
109
108
  </div>
110
109
  )
111
110
  : isPercent && (
@@ -6,7 +6,7 @@ import { Input } from './Input';
6
6
  import { TextInputLabel } from './TextInputLabel';
7
7
  import { TextInputMessage } from './TextInputMessage';
8
8
  import { TextInputTooltip } from './TextInputTooltip';
9
- const TextInput = React.forwardRef(({ label, value, validate = true, isValidGroup = true, format = undefined, name, placeholder, onChange, onClick, onBlur, onKeyDown, onKeyUp, prefix = '', disabled, type = 'text', maxLength, errorMessage = '', notes, dialogMenuTip, tooltip = '', givenClass = '', children, country, currrencySymbol }, ref) => {
9
+ const TextInput = React.forwardRef(({ label, value, validate = true, isValidGroup = true, format = undefined, name, placeholder, onChange, onClick, onBlur, onKeyDown, onKeyUp, prefix = '', disabled, type = 'text', maxLength, errorMessage = '', notes, dialogMenuTip, tooltip = '', givenClass = '', children, country }, ref) => {
10
10
  const classnames = classNames('e-text', {
11
11
  [givenClass]: givenClass,
12
12
  'e-text--is-invalid': !validate,
@@ -26,7 +26,7 @@ const TextInput = React.forwardRef(({ label, value, validate = true, isValidGrou
26
26
  if (Boolean(format) && type !== 'number' && type !== 'tel') {
27
27
  return (_jsx(NumericFormat, { name: name, id: name, placeholder: placeholder, className: 'e-text-input', onChange: onChange, onClick: onClick, value: value, "data-qa": name, disabled: disabled, maxLength: maxLength, onBlur: onBlur }));
28
28
  }
29
- return (_jsx(Input, { name: name ?? '', type: type, prefix: prefix, 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, country: country, currrencySymbol: currrencySymbol }));
29
+ return (_jsx(Input, { name: name ?? '', type: type, prefix: prefix, 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, country: country }));
30
30
  };
31
31
  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 })] }));
32
32
  });
@@ -161,10 +161,6 @@
161
161
  width: 50%;
162
162
  }
163
163
 
164
- .tooltip-form {
165
- grid-row: 3;
166
- }
167
-
168
164
  .has-currency-prefix {
169
165
  padding-left: 2rem;
170
166
  grid-column: 1;
@@ -33,8 +33,7 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
33
33
  tooltip = '',
34
34
  givenClass = '',
35
35
  children,
36
- country,
37
- currrencySymbol
36
+ country
38
37
  }: TextInputProps,
39
38
  ref
40
39
  ) => {
@@ -94,7 +93,6 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
94
93
  onKeyDown={handleKeyDown}
95
94
  onKeyUp={handleKeyUp}
96
95
  country={country}
97
- currrencySymbol={currrencySymbol}
98
96
  />
99
97
  )
100
98
  }
@@ -23,5 +23,4 @@ export interface TextInputProps {
23
23
  prefix?: string;
24
24
  children?: React.ReactNode;
25
25
  country: string;
26
- currrencySymbol?: string;
27
26
  }
@@ -24,5 +24,4 @@ export interface TextInputProps {
24
24
  prefix?: string
25
25
  children?: React.ReactNode
26
26
  country: string
27
- currrencySymbol?: string
28
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.22.12",
3
+ "version": "7.23.0",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",