@zydon/common 2.3.46 → 2.3.47
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-7BK54YIS.js +8 -0
- package/dist/{chunk-VDF4CJSE.js → chunk-W5NAJOPC.js} +1 -1
- 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.d.ts +2 -1
- package/dist/components/form/NumberInput/index.js +3 -3
- package/dist/theme/styles/index.d.ts +1 -1
- package/dist/types/numberInputProps.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-NRL7VKLK.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
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:m=0,fixedDecimalScale:s=!0,prefix:d,allowNegative:I,minValue:r,maxValue:n=1/0,maxLength:N,value:T,inputProps:b,InputProps:g,size:y,disabled:S,name:u,helperText:h,error:x,fullWidth:R,label:v,required:w,onChange:t,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(!t)return;e.current&&clearTimeout(e.current);let p=()=>{let{floatValue:a}=z,f=a||0;if(r!==void 0&&r>f){t({target:{name:u,value:r},event:o}),i();return}if(a!==void 0&&n<f){t({target:{name:u,value:n},event:o}),i();return}t({target:{name:u,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:m,fixedDecimalScale:s,autoComplete:"off",allowNegative:I,maxLength:N,onValueChange:q,customInput:A,InputProps:{...g},inputProps:{...b,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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f } from './chunk-ANAHA3L6.js';
|
|
2
|
-
import { a } from './chunk-
|
|
2
|
+
import { a } from './chunk-7BK54YIS.js';
|
|
3
3
|
import { a as a$1 } from './chunk-CCKFJ4VI.js';
|
|
4
4
|
import { forwardRef, useState, useRef, useMemo, useCallback } from 'react';
|
|
5
5
|
import A from '@mui/material/IconButton';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-W5NAJOPC.js';
|
|
2
2
|
import '../../chunk-ANAHA3L6.js';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-7BK54YIS.js';
|
|
4
4
|
import '../../chunk-CCKFJ4VI.js';
|
|
5
5
|
import '../../chunk-AXMFYXPA.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-7BK54YIS.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-W5NAJOPC.js';
|
|
2
2
|
import '../../../chunk-ANAHA3L6.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-7BK54YIS.js';
|
|
4
4
|
import '../../../chunk-CCKFJ4VI.js';
|
|
5
5
|
import '../../../chunk-AXMFYXPA.js';
|
|
6
6
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
@@ -18,9 +18,10 @@ interface Props {
|
|
|
18
18
|
prefix?: string;
|
|
19
19
|
minValue?: number;
|
|
20
20
|
maxValue?: number;
|
|
21
|
+
delay?: number;
|
|
21
22
|
}
|
|
22
23
|
type NumberInputProps = BaseField<Props & Omit<TextFieldProps, 'onChange'>>;
|
|
23
24
|
|
|
24
|
-
declare const NumberInput: ({ name, helperText, rules, onChange, className, ...other }: NumberInputProps) => react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare const NumberInput: ({ name, helperText, rules, onChange, className, delay, ...other }: NumberInputProps) => react_jsx_runtime.JSX.Element;
|
|
25
26
|
|
|
26
27
|
export { NumberInput as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-7BK54YIS.js';
|
|
2
2
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var N=({name:r,helperText:p,rules:u,onChange:t,className:s,delay:a$1=1e3,...f})=>{let{control:d}=useFormContext();return jsx(Controller,{name:r,control:d,rules:u,render:({field:o,fieldState:{error:e}})=>jsx(a,{...o,onChange:n=>{o.onChange(n),t&&t(n);},fullWidth:!0,error:!!e,helperText:e?.message||p,"data-intercom-target":r,className:`field-${r} ${s}`,delay:a$1,...f})})},I=N;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { I as default };
|
|
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
443
443
|
wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
|
|
444
444
|
writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
445
445
|
zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
|
|
446
|
-
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal"
|
|
446
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
|
|
447
447
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
448
448
|
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "linear" | "none" | "auto" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start")[] | undefined;
|
|
449
449
|
animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
|
package/package.json
CHANGED
package/dist/chunk-NRL7VKLK.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { forwardRef, useState, useRef, useEffect } from 'react';
|
|
2
|
-
import { NumericFormat } from 'react-number-format';
|
|
3
|
-
import W from '@mui/material/TextField';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var p=forwardRef(({decimalScale:f=0,fixedDecimalScale:m=!0,prefix:c,allowNegative:s,minValue:t,maxValue:n=1/0,maxLength:d,value:I,inputProps:N,InputProps:T,size:b,disabled:y,name:u,helperText:S,error:g,fullWidth:h,label:R,required:v,onChange:r,tabIndex:w,placeholder:x,margin:D,className:F},P)=>{let[k,E]=useState(Date.now()),e=useRef(null),l=()=>E(Date.now()),L=(V,o)=>{r&&(e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{let{floatValue:a}=V,i=a||0;if(t!==void 0&&t>i){r({target:{name:u,value:t},event:o}),l();return}if(a!==void 0&&n<i){r({target:{name:u,value:n},event:o}),l();return}r({target:{name:u,value:a},event:o});},1e3));};return useEffect(()=>()=>{e.current&&clearTimeout(e.current);},[]),jsx(NumericFormat,{getInputRef:P,value:I,prefix:c,decimalSeparator:",",thousandSeparator:".",decimalScale:f,fixedDecimalScale:m,autoComplete:"off",allowNegative:s,maxLength:d,onValueChange:L,customInput:W,InputProps:{...T},inputProps:{...N,tabIndex:w},disabled:y,size:b,helperText:S,error:g,fullWidth:h,label:R,required:v,placeholder:x,margin:D,className:F},k)});p.displayName="NumberInput";var Q=p;
|
|
7
|
-
|
|
8
|
-
export { Q as a };
|