@zydon/common 2.5.33 → 2.5.34
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.
- package/dist/{chunk-DV6IZYG2.js → chunk-I5MHUDAY.js} +1 -1
- package/dist/chunk-U3MGKUUY.js +8 -0
- package/dist/components/Incrementer/index.js +2 -2
- package/dist/components/NumberInput/index.js +1 -1
- package/dist/components/form/Incrementer/index.js +2 -2
- package/dist/components/form/NumberInput/index.js +1 -1
- package/dist/types/numberInputProps.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-2FXXN6VA.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { forwardRef, useState, useRef, useEffect } from 'react';
|
|
2
|
+
import { NumericFormat } from 'react-number-format';
|
|
3
|
+
import B from '@mui/material/TextField';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var s=forwardRef(({decimalScale:c=0,fixedDecimalScale:m=!0,prefix:d,suffix:I,allowNegative:N,minValue:u,maxValue:n=1/0,maxLength:T,value:b,inputProps:g,InputProps:y,size:S,disabled:h,name:t,helperText:x,error:R,fullWidth:v,label:w,required:D,onChange:r,tabIndex:F,placeholder:P,margin:k,className:E,delay:l},L)=>{let[V,q]=useState(Date.now()),e=useRef(null),i=()=>q(Date.now()),z=(C,o)=>{if(!r)return;e.current&&clearTimeout(e.current);let f=()=>{let{floatValue:a}=C,p=a||0;if(u!==void 0&&u>p){r({target:{name:t,value:u},event:o}),i();return}if(a!==void 0&&n<p){r({target:{name:t,value:n},event:o}),i();return}r({target:{name:t,value:a},event:o});};l===0?f():e.current=setTimeout(f,l||1e3);};return useEffect(()=>()=>{e.current&&clearTimeout(e.current);},[]),jsx(NumericFormat,{getInputRef:L,value:b,prefix:d,suffix:I,decimalSeparator:",",thousandSeparator:".",decimalScale:c,fixedDecimalScale:m,autoComplete:"off",allowNegative:N,maxLength:T,onValueChange:z,customInput:B,InputProps:{...y},inputProps:{...g,name:t,tabIndex:F},disabled:h,size:S,helperText:x,error:R,fullWidth:v,label:w,required:D,placeholder:P,margin:k,className:E},V)});s.displayName="NumberInput";var Y=s;
|
|
7
|
+
|
|
8
|
+
export { Y as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-I5MHUDAY.js';
|
|
2
|
+
import '../../chunk-U3MGKUUY.js';
|
|
3
3
|
import '../../chunk-ANAHA3L6.js';
|
|
4
4
|
import '../../chunk-UAJ3YCCD.js';
|
|
5
5
|
import '../../chunk-L3B2VMIX.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-U3MGKUUY.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-I5MHUDAY.js';
|
|
2
|
+
import '../../../chunk-U3MGKUUY.js';
|
|
3
3
|
import '../../../chunk-ANAHA3L6.js';
|
|
4
4
|
import '../../../chunk-UAJ3YCCD.js';
|
|
5
5
|
import '../../../chunk-L3B2VMIX.js';
|
package/package.json
CHANGED
package/dist/chunk-2FXXN6VA.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { forwardRef, useState, useRef, useEffect } from 'react';
|
|
2
|
-
import { NumericFormat } from 'react-number-format';
|
|
3
|
-
import A from '@mui/material/TextField';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var c=forwardRef(({decimalScale:s=0,fixedDecimalScale:m=!0,prefix:d,allowNegative:I,minValue:u,maxValue:n=1/0,maxLength:N,value:T,inputProps:b,InputProps:g,size:y,disabled:S,name:t,helperText:h,error:x,fullWidth:R,label:v,required:w,onChange:r,tabIndex:D,placeholder:F,margin:P,className:k,delay:l},E)=>{let[L,V]=useState(Date.now()),e=useRef(null),i=()=>V(Date.now()),q=(z,o)=>{if(!r)return;e.current&&clearTimeout(e.current);let p=()=>{let{floatValue:a}=z,f=a||0;if(u!==void 0&&u>f){r({target:{name:t,value:u},event:o}),i();return}if(a!==void 0&&n<f){r({target:{name:t,value:n},event:o}),i();return}r({target:{name:t,value:a},event:o});};l===0?p():e.current=setTimeout(p,l||1e3);};return useEffect(()=>()=>{e.current&&clearTimeout(e.current);},[]),jsx(NumericFormat,{getInputRef:E,value:T,prefix:d,decimalSeparator:",",thousandSeparator:".",decimalScale:s,fixedDecimalScale:m,autoComplete:"off",allowNegative:I,maxLength:N,onValueChange:q,customInput:A,InputProps:{...g},inputProps:{...b,name:t,tabIndex:D},disabled:S,size:y,helperText:h,error:x,fullWidth:R,label:v,required:w,placeholder:F,margin:P,className:k},L)});c.displayName="NumberInput";var X=c;
|
|
7
|
-
|
|
8
|
-
export { X as a };
|