@zydon/common 2.2.27 → 2.2.28
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-7KZ2UT76.js +8 -0
- package/dist/{chunk-XXEER5EI.js → chunk-TDNB3ZFQ.js} +1 -1
- package/dist/chunk-VTHBHXM2.js +7 -0
- package/dist/components/Incrementer/index.js +2 -2
- package/dist/components/NumberInput/index.js +1 -1
- package/dist/components/form/Address/index.js +1 -1
- package/dist/components/form/Field/index.d.ts +1 -1
- package/dist/components/form/Field/index.js +1 -1
- package/dist/components/form/Incrementer/index.js +2 -2
- package/dist/components/form/NumberInput/index.d.ts +1 -1
- package/dist/components/form/NumberInput/index.js +2 -2
- package/dist/components/form/Password/index.js +1 -1
- package/dist/components/form/Webhook/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-HKE5Q5ID.js +0 -7
- package/dist/chunk-PV522B4W.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
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 m=forwardRef(({decimalScale:p=0,fixedDecimalScale:f=!0,prefix:c,allowNegative:s,minValue:t,maxValue:n=1/0,maxLength:d,value:I,inputProps:N,InputProps:b,size:S,disabled:T,name:u,helperText:g,error:y,fullWidth:h,label:v,required:w,onChange:r,tabIndex:x,placeholder:D,margin:F,className:P},R)=>{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});},500));};return useEffect(()=>()=>{e.current&&clearTimeout(e.current);},[]),jsx(NumericFormat,{getInputRef:R,value:I,prefix:c,decimalSeparator:",",thousandSeparator:".",decimalScale:p,fixedDecimalScale:f,autoComplete:"off",allowNegative:s,maxLength:d,onValueChange:L,customInput:W,InputProps:{...b},inputProps:{...N,tabIndex:x},disabled:T,size:S,helperText:g,error:y,fullWidth:h,label:v,required:w,placeholder:D,margin:F,className:P},k)});m.displayName="NumberInput";var Q=m;
|
|
7
|
+
|
|
8
|
+
export { Q as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f } from './chunk-ANAHA3L6.js';
|
|
2
|
-
import { a } from './chunk-
|
|
2
|
+
import { a } from './chunk-7KZ2UT76.js';
|
|
3
3
|
import { a as a$1 } from './chunk-A3HKJM7C.js';
|
|
4
4
|
import { forwardRef, useState, useRef, useMemo, useCallback } from 'react';
|
|
5
5
|
import A from '@mui/material/IconButton';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
+
import F from '@mui/material/TextField';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var P=({name:e,helperText:p,rules:s,onChange:o,tabIndex:d,className:f,...t})=>{let{control:m}=useFormContext();return jsx(Controller,{name:e,control:m,rules:s,render:({field:{ref:a,...r},fieldState:{error:l}})=>jsx(F,{...r,onChange:i=>{r.onChange(i),o&&o(i);},inputRef:a,fullWidth:!0,error:!!l,helperText:l?.message||p,"data-intercom-target":e,...t,inputProps:{...t.inputProps,tabIndex:d},className:`field-${e} ${f}`})})},C=P;
|
|
6
|
+
|
|
7
|
+
export { C as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-TDNB3ZFQ.js';
|
|
2
2
|
import '../../chunk-ANAHA3L6.js';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-7KZ2UT76.js';
|
|
4
4
|
import '../../chunk-A3HKJM7C.js';
|
|
5
5
|
import '../../chunk-HR73D35E.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-7KZ2UT76.js';
|
|
@@ -4,6 +4,6 @@ import '@mui/material/TextField';
|
|
|
4
4
|
import '../../../types/baseField.js';
|
|
5
5
|
import 'react-hook-form';
|
|
6
6
|
|
|
7
|
-
declare const Field: ({ name, helperText, rules, onChange, tabIndex, ...other }: FieldProps) => react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare const Field: ({ name, helperText, rules, onChange, tabIndex, className, ...other }: FieldProps) => react_jsx_runtime.JSX.Element;
|
|
8
8
|
|
|
9
9
|
export { Field as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as default } from '../../../chunk-
|
|
1
|
+
export { a as default } from '../../../chunk-VTHBHXM2.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-TDNB3ZFQ.js';
|
|
2
2
|
import '../../../chunk-ANAHA3L6.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-7KZ2UT76.js';
|
|
4
4
|
import '../../../chunk-A3HKJM7C.js';
|
|
5
5
|
import '../../../chunk-HR73D35E.js';
|
|
6
6
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
@@ -21,6 +21,6 @@ interface Props {
|
|
|
21
21
|
}
|
|
22
22
|
type NumberInputProps = BaseField<Props & Omit<TextFieldProps, 'onChange'>>;
|
|
23
23
|
|
|
24
|
-
declare const NumberInput: ({ name, helperText, rules, onChange, ...other }: NumberInputProps) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare const NumberInput: ({ name, helperText, rules, onChange, className, ...other }: NumberInputProps) => react_jsx_runtime.JSX.Element;
|
|
25
25
|
|
|
26
26
|
export { NumberInput as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-7KZ2UT76.js';
|
|
2
2
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var d=({name:r,helperText:u,rules:l,onChange:t,className:s,...a$1})=>{let{control:f}=useFormContext();return jsx(Controller,{name:r,control:f,rules:l,render:({field:o,fieldState:{error:e}})=>jsx(a,{...o,onChange:n=>{o.onChange(n),t&&t(n);},fullWidth:!0,error:!!e,helperText:e?.message||u,"data-intercom-target":r,className:`field-${r} ${s}`,...a$1})})},C=d;
|
|
6
6
|
|
|
7
7
|
export { C as default };
|
package/package.json
CHANGED
package/dist/chunk-HKE5Q5ID.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
-
import F from '@mui/material/TextField';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var c=({name:o,helperText:p,rules:d,onChange:t,tabIndex:s,...e})=>{let{control:f}=useFormContext();return jsx(Controller,{name:o,control:f,rules:d,render:({field:{ref:m,...r},fieldState:{error:l}})=>jsx(F,{...r,onChange:i=>{r.onChange(i),t&&t(i);},inputRef:m,fullWidth:!0,error:!!l,helperText:l?.message||p,...e,inputProps:{...e.inputProps,tabIndex:s,"data-intercom-target":o}})})},x=c;
|
|
6
|
-
|
|
7
|
-
export { x as a };
|
package/dist/chunk-PV522B4W.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { forwardRef, useState, useRef, useEffect } from 'react';
|
|
2
|
-
import { NumericFormat } from 'react-number-format';
|
|
3
|
-
import M 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:b,InputProps:N,size:S,disabled:T,name:u,helperText:g,error:y,fullWidth:h,label:v,required:w,onChange:r,tabIndex:x,placeholder:D,margin:F},P)=>{let[R,k]=useState(Date.now()),e=useRef(null),l=()=>k(Date.now()),E=(L,o)=>{r&&(e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{let{floatValue:a}=L,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});},500));};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:E,customInput:M,InputProps:{...N},inputProps:{...b,tabIndex:x},disabled:T,size:S,helperText:g,error:y,fullWidth:h,label:v,required:w,placeholder:D,margin:F},R)});p.displayName="NumberInput";var O=p;
|
|
7
|
-
|
|
8
|
-
export { O as a };
|