diginet-core-ui 1.4.52-beta.13 → 1.4.52-beta.15

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.
@@ -0,0 +1,13 @@
1
+ <svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2302_32)">
3
+ <path d="M0 32.6C0 32.8 0.1 33 0.3 33.1C4.1 35 8 36.9 11.8 38.8C11.9 38.9 12 38.9 12.1 39C12.1 39 12.1 39 12.2 39C12.2 37 12.2 35 12.2 32.9H21.4C21.9 32.9 22.3 32.5 22.3 32V21L20.3 23V30.9C17.6 30.9 14.9 30.9 12.2 30.9C12.2 30.8 12.2 30.6 12.2 30.5C12.2 24.8 12.2 12.6 12.2 7C12.2 6.5 11.9 6 11.4 5.7C9.1 4.5 6.8 3.4 4.4 2.2C4.4 2.2 4.3 2.1 4.1 2C9.5 2 14.9 2 20.2 2V11L22.2 13V0.9C22.2 0.4 21.8 0 21.3 0H0C0 0.1 0 0.2 0 0.3C0 8.9 0 24 0 32.6ZM8.4 22.5C8.4 22 8.8 21.6 9.3 21.6C9.8 21.6 10.2 22 10.2 22.5C10.2 23 9.8 23.4 9.3 23.4C8.9 23.4 8.4 23 8.4 22.5Z" fill="#FFAA00"/>
4
+ <path d="M32.8002 12.7V22.2C32.8002 22.8 33.6002 23.2 34.0002 22.7L38.8002 17.9C39.1002 17.6 39.1002 17.2 38.8002 16.9L34.0002 12.2C33.6002 11.8 32.8002 12.1 32.8002 12.7Z" fill="#FF4444"/>
5
+ <path d="M24.8002 12.7V22.2C24.8002 22.8 25.6002 23.2 26.0002 22.7L30.8002 17.9C31.1002 17.6 31.1002 17.2 30.8002 16.9L26.0002 12.1C25.6002 11.8 24.8002 12.1 24.8002 12.7Z" fill="#FF4444"/>
6
+ <path d="M16.7002 12.7V22.2C16.7002 22.8 17.5002 23.2 17.9002 22.7L22.7002 17.9C23.0002 17.6 23.0002 17.2 22.7002 16.9L17.9002 12.1C17.5002 11.8 16.7002 12.1 16.7002 12.7Z" fill="#FF4444"/>
7
+ </g>
8
+ <defs>
9
+ <clipPath id="clip0_2302_32">
10
+ <rect width="39" height="39" fill="white"/>
11
+ </clipPath>
12
+ </defs>
13
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2302_42)">
3
+ <path d="M21.4 0H0V0.3C0 8.9 0 24 0 32.6C0 32.8 0.1 33 0.3 33.1C4.1 35 8 36.9 11.8 38.8C11.9 38.9 12 38.9 12.1 39H12.2V32.9H18.8C18.5 32.3 18.4 31.6 18.2 30.9H12.2V6.9C12.2 6.4 11.9 5.9 11.4 5.6C9.1 4.5 6.8 3.4 4.5 2.2C4.4 2.2 4.3 2.1 4.1 2H20.2V7L22.2 9V0.9C22.3 0.4 21.9 0 21.4 0ZM9.4 21.5C9.9 21.5 10.4 21.9 10.4 22.5C10.4 23.1 10 23.4 9.4 23.4C8.8 23.4 8.4 23 8.4 22.5C8.4 22 8.9 21.5 9.4 21.5Z" fill="#FFAA00"/>
4
+ <path d="M32.4999 7.29994V17.1999C32.4999 17.8999 33.2999 18.1999 33.7999 17.6999L38.7999 12.6999C39.0999 12.3999 39.0999 11.8999 38.7999 11.5999L33.7999 6.59994C33.3999 6.29994 32.4999 6.69994 32.4999 7.29994Z" fill="#FF4444"/>
5
+ <path d="M24.2999 7.29994V17.1999C24.2999 17.8999 25.0999 18.1999 25.5999 17.6999L30.5999 12.6999C30.8999 12.3999 30.8999 11.8999 30.5999 11.5999L25.5999 6.59994C25.0999 6.29994 24.2999 6.69994 24.2999 7.29994Z" fill="#FF4444"/>
6
+ <path d="M15.8999 7.29994V17.1999C15.8999 17.8999 16.6999 18.1999 17.1999 17.6999L22.1999 12.6999C22.4999 12.3999 22.4999 11.8999 22.1999 11.5999L17.1999 6.59994C16.6999 6.29994 15.8999 6.69994 15.8999 7.29994Z" fill="#FF4444"/>
7
+ <path d="M34.4 20.6C32.8 19.6 31 19 29 19C28.5 19 28.1 19 27.7 19.1C26.9 19.2 26 19.4 25.3 19.7C24.9 19.9 24.4 20.1 24 20.3C22 21.4 20.5 23.2 19.7 25.3C19.2 26.5 19 27.7 19 29C19 34.5 23.5 39 29 39C34.5 39 39 34.5 39 29C39 25.5 37.1 22.3 34.4 20.6ZM35.2 25.8L29.3 33.8C29 34.3 28.4 34.6 27.8 34.6H27.7C27.2 34.6 26.6 34.4 26.3 34L22.8 30.2C22.3 29.6 22.3 28.7 22.9 28.1C23.2 27.8 23.5 27.7 23.9 27.7C24.3 27.7 24.7 27.9 25 28.2L27.5 30.9L27.6 31C27.7 31 27.7 31 27.7 30.9L32.7 24.1C33 23.7 33.4 23.5 33.9 23.5C34.2 23.5 34.5 23.6 34.8 23.8C35.6 24.2 35.7 25.1 35.2 25.8Z" fill="#1CA261"/>
8
+ </g>
9
+ <defs>
10
+ <clipPath id="clip0_2302_42">
11
+ <rect width="39" height="39" fill="white"/>
12
+ </clipPath>
13
+ </defs>
14
+ </svg>
@@ -0,0 +1,15 @@
1
+ <svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2319_30)">
3
+ <path d="M19.5 19.2015C19.9 19.5995 20.3 19.898 20.8 20.2959C21.8 20.8929 23 21.4898 24.1 21.6888C24.8 21.8878 26.6 21.7883 26.9 21.7883C27.8 21.6888 28.7 21.4898 29.5 21.1913C30.5 20.7934 31.4 20.2959 32.1 19.5995C31.9 18.6046 31.7 17.6097 31.5 16.7143C31.3 15.9184 30.8 15.4209 30 15.4209H21.6C20.7 15.4209 20.2 15.9184 20 16.8138C19.9 17.5102 19.7 18.3061 19.5 19.2015Z" fill="#2680EB"/>
4
+ <path d="M25.8 13.8291C28.5 13.8291 30.6 11.6403 30.6 8.9541C30.6 6.26788 28.4 4.0791 25.8 4.0791C23.2 4.0791 21 6.26788 21 8.9541C21 11.7398 23.2 13.9286 25.8 13.8291Z" fill="#2680EB"/>
5
+ <path d="M35.2001 3.78061C32.8001 1.39286 29.5001 0 26.0001 0C25.7001 0 25.4001 0 25.1001 0C25.0001 0 25.0001 0 24.9001 0H9.1001C8.5001 0 8.0001 0.497449 8.0001 1.09439C8.0001 1.69133 8.5001 2.18878 9.1001 2.18878H18.6001C18.0001 2.58673 17.4001 3.08418 16.8001 3.68112C16.4001 4.07908 16.1001 4.47704 15.7001 4.875H7.0001C6.4001 4.97449 5.9001 5.47194 5.9001 6.06888C5.9001 6.66582 6.4001 7.26275 7.0001 7.26275H14.3001C13.9001 8.15816 13.6001 9.05357 13.3001 9.94898H9.0001C8.4001 9.94898 7.9001 10.4464 7.9001 11.0434C7.9001 11.6403 8.4001 12.1378 9.0001 12.1378H13.0001C13.0001 12.3367 13.0001 12.5357 13.0001 12.7347C13.0001 13.4311 13.1001 14.1276 13.2001 14.9235H5.0001C4.4001 14.9235 3.9001 15.4209 3.9001 16.0179C3.9001 16.6148 4.4001 17.1122 5.0001 17.1122H13.9001C14.3001 18.2066 14.9001 19.301 15.6001 20.2959L1.6001 31.3393C-0.3999 33.2296 -0.5999 36.2143 1.1001 37.8061C2.8001 39.4974 5.7001 39.2985 7.7001 37.4082L19.0001 23.5791C21.1001 24.8724 23.5001 25.5689 26.0001 25.5689C29.5001 25.5689 32.8001 24.176 35.2001 21.7883C37.6001 19.4005 39.0001 16.1173 39.0001 12.7347C39.0001 9.35204 37.6001 6.16837 35.2001 3.78061ZM33.4001 20.0969C32.4001 21.0918 31.3001 21.7883 30.0001 22.2857C28.7001 22.7832 27.3001 23.0816 26.0001 23.0816C23.9001 23.0816 21.9001 22.4847 20.2001 21.2908C18.5001 20.0969 17.1001 18.5051 16.3001 16.6148C15.5001 14.7245 15.3001 12.6352 15.7001 10.6454C16.1001 8.65561 17.1001 6.76531 18.6001 5.37245C20.1001 3.97959 22.0001 2.98469 24.0001 2.58673C26.0001 2.18878 28.2001 2.38776 30.1001 3.18367C32.0001 3.97959 33.6001 5.27296 34.8001 7.06378C35.9001 8.7551 36.6001 10.7449 36.5001 12.8342C36.5001 14.227 36.2001 15.5204 35.7001 16.8138C35.2001 18.0077 34.4001 19.102 33.4001 20.0969Z" fill="#FF8C00"/>
6
+ <path d="M1.1001 12.2372H5.8001C6.4001 12.2372 6.9001 11.7398 6.9001 11.1429C6.9001 10.5459 6.5001 9.94898 5.9001 9.94898H1.1001C0.5001 9.94898 0.000100322 10.4464 0.000100322 11.0434C0.000100322 11.6403 0.5001 12.2372 1.1001 12.2372Z" fill="#FF8C00"/>
7
+ <path d="M3.0001 7.26275H4.0001C4.6001 7.26275 5.1001 6.76531 5.1001 6.16837C5.1001 5.57143 4.6001 4.97449 4.0001 4.97449H3.0001C2.4001 4.97449 1.9001 5.47194 1.9001 6.06888C1.9001 6.66582 2.4001 7.26275 3.0001 7.26275Z" fill="#FF8C00"/>
8
+ <path d="M11.0001 22.1862C11.6001 22.1862 12.1001 21.6888 12.1001 21.0918C12.1001 20.4949 11.6001 19.898 11.0001 19.898H8.1001C7.5001 19.898 7.0001 20.3954 7.0001 20.9923C7.0001 21.5893 7.5001 22.0867 8.1001 22.0867H11.0001V22.1862Z" fill="#FF8C00"/>
9
+ </g>
10
+ <defs>
11
+ <clipPath id="clip0_2319_30">
12
+ <rect width="39" height="39" fill="white"/>
13
+ </clipPath>
14
+ </defs>
15
+ </svg>
@@ -79,7 +79,6 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
79
79
  const ref = useRef(null);
80
80
  const globalRef = useRef({});
81
81
  const inputRef = useRef(null);
82
- const inputTimer = useRef(null);
83
82
  const [value, setValue] = useState(defaultValue);
84
83
  const [error, setError] = useState(errorProp);
85
84
  const _NumberInputRootCSS = NumberInputRootCSS(theme);
@@ -123,7 +122,7 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
123
122
  const coreToFixed = (num, precision) => {
124
123
  return (+(Math.round(+(num + 'e' + precision)) + 'e' + -precision)).toFixed(precision);
125
124
  };
126
- const val = coreToFixed(Number(String(vl).replace(thousandSymbol, '')), decimalDigit);
125
+ const val = coreToFixed(Number(String(vl).replaceAll(thousandSymbol, '')), decimalDigit);
127
126
  number = String(val);
128
127
  }
129
128
  }
@@ -185,7 +184,7 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
185
184
  if (flag) _onChange(e);
186
185
  }, [min, max, decimalDigit]);
187
186
  const _onBlur = useCallback(e => {
188
- var _e$value;
187
+ var _e$value, _e$value2;
189
188
  let value = (_e$value = e.value) !== null && _e$value !== void 0 ? _e$value : e.target.value;
190
189
  if (fixedDecimalDigit) value = Number(value).toFixed(decimalDigit);
191
190
  value = convertMoneyToNumber(value);
@@ -197,6 +196,15 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
197
196
  target
198
197
  }, true);
199
198
  }
199
+ if (((_e$value2 = e.value) !== null && _e$value2 !== void 0 ? _e$value2 : e.target.value).slice(-1) === decimalSymbol) {
200
+ var _e$value3;
201
+ const target = e.target;
202
+ target.value = Number(String((_e$value3 = e.value) !== null && _e$value3 !== void 0 ? _e$value3 : e.target.value).replaceAll(thousandSymbol, ''));
203
+ _onInput({
204
+ ...e,
205
+ target
206
+ }, true);
207
+ }
200
208
  onBlur && onBlur(e);
201
209
  }, [min, max]);
202
210
  const _onKeyDown = e => {
@@ -284,26 +292,18 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
284
292
  onFocus && onFocus(e);
285
293
  };
286
294
  const _onChange = e => {
287
- if (delayOnChange) {
288
- var _e$target;
289
- if (inputTimer.current) clearTimeout(inputTimer.current);
290
- const target = e.target;
291
- target.value = globalRef.current.valueString;
292
- target.valueString = globalRef.current.returnValue;
293
- // eslint-disable-next-line no-extra-boolean-cast
294
- if (!!((_e$target = e.target) !== null && _e$target !== void 0 && _e$target.valueString)) {
295
- if (e.target.valueString.includes(decimalSymbol) && e.target.valueString.split(decimalSymbol)[1] === '') {
296
- return;
297
- }
298
- }
299
- inputTimer.current = setTimeout(() => {
300
- onChange({
301
- ...e,
302
- value: globalRef.current.value,
303
- target
304
- });
305
- }, delayOnChange);
295
+ const target = e.target;
296
+ target.value = globalRef.current.valueString;
297
+ target.valueString = globalRef.current.returnValue;
298
+ // eslint-disable-next-line no-extra-boolean-cast
299
+ if (String(e.target.valueString).slice(-1) === decimalSymbol) {
300
+ return;
306
301
  }
302
+ onChange({
303
+ ...e,
304
+ value: globalRef.current.value,
305
+ target
306
+ });
307
307
  };
308
308
  const validateResult = validates && onValidate(Number(convertMoneyToNumber(value) || 0), validates, true);
309
309
  useEffect(() => {
@@ -403,7 +403,7 @@ const NumberInputRootCSS = ({
403
403
  }
404
404
  `;
405
405
  NumberInput.defaultProps = {
406
- delayOnChange: 500
406
+ // delayOnChange: 500,
407
407
  // autoFocus: false,
408
408
  // className: '',
409
409
  // decimalDigit: Infinity,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.4.52-beta.13",
3
+ "version": "1.4.52-beta.15",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "license": "UNLICENSED",