@zydon/common 2.2.55 → 2.2.57
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-VLEKZG4Z.js → chunk-KSHE7G62.js} +1 -1
- package/dist/{chunk-3OZF4JYB.js → chunk-LFU6HXGC.js} +1 -1
- package/dist/chunk-X24QANPC.js +7 -0
- package/dist/{chunk-VIFKNVAE.js → chunk-XBSIQXDG.js} +1 -1
- package/dist/components/Incrementer/index.js +1 -1
- package/dist/components/form/Incrementer/index.js +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js +2 -2
- package/dist/components/form/UploadWithCrop/index.js +2 -2
- package/dist/components/upload/index.js +3 -3
- package/dist/hooks/useUploadImage.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-M6QHAL4V.js +0 -7
|
@@ -6,6 +6,6 @@ import A from '@mui/material/IconButton';
|
|
|
6
6
|
import C from '@mui/material/InputAdornment';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
-
var M=forwardRef(({name:R,increment:r=1,updadteForMultiple:D,allowNegative:u=!1,value:I,onChange:f$1,minValue:n,maxValue:e,decimalScale:p,disabled:m,tabIndex:T,labelIncrementer:w,labelDecrementer:B,placeholder:O,...v},z)=>{let[E,L]=useState(`incrementer-input-${Date.now()}`),i=useRef(null),s=Number(I||0),b=()=>{i.current&&(clearTimeout(i.current),i.current=null);},N=useMemo(()=>{let o=s-r;return typeof n=="number"&&o<n?!0:m||!u&&o<0},[m,s,r,n,u]),_=useMemo(()=>{let o=s+r;return typeof e=="number"&&o>e?!0:m},[m,s,r,e]),$=useCallback(()=>{if(b(),!u&&s-r<0)return;let o=s-r,t=n!==void 0&&o<n?n:f(o,p);f$1(t);},[s,r,n,p,f$1,u]),G=useCallback(()=>{b();let o=s+r,t=e!==void 0&&o>e?e:f(o,p);f$1(t);},[s,r,e,p,f$1]),H=useCallback(o=>{b();let t=Number(o.target.value||0);(r!==1||D)&&(t=t+r/2,t-=t%r),!u&&t<0&&(t=0),typeof n=="number"&&t<n&&(t=n),typeof e=="number"&&t>e&&(t=e),t=f(t,p),t===I&&(i.current=setTimeout(()=>{L(`incrementer-input-${Date.now()}`);},600)),f$1(t);},[I,r,n,e,p,f$1,D,u]);return jsx(a,{ref:z,name:R,value:I,minValue:n,maxValue:e,allowNegative:u,decimalScale:p,InputProps:{startAdornment:jsx(C,{position:"start",children:jsx(A,{size:"medium",onClick:$,disabled:N,"aria-label":B||"Decrementa",children:jsx(a$1,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:jsx(C,{position:"end",children:jsx(A,{size:"medium",onClick:G,disabled:_,"aria-label":w||"Incrementa",children:jsx(a$1,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:T},onChange:H,disabled:m,placeholder:O,...v},E)});M.displayName="Incrementer";var j=M;
|
|
9
|
+
var M=forwardRef(({name:R,increment:r=1,updadteForMultiple:D,allowNegative:u=!1,value:I,onChange:f$1,minValue:n,maxValue:e,decimalScale:p,disabled:m,tabIndex:T,labelIncrementer:w,labelDecrementer:B,placeholder:O,...v},z)=>{let[E,L]=useState(`incrementer-input-${Date.now()}`),i=useRef(null),s=Number(I||0),b=()=>{i.current&&(clearTimeout(i.current),i.current=null);},N=useMemo(()=>{let o=s-r;return typeof n=="number"&&o<n?!0:m||!u&&o<0},[m,s,r,n,u]),_=useMemo(()=>{let o=s+r;return typeof e=="number"&&o>e?!0:m},[m,s,r,e]),$=useCallback(()=>{if(b(),!u&&s-r<0)return;let o=s-r,t=n!==void 0&&o<n?n:f(o,p);f$1(t);},[s,r,n,p,f$1,u]),G=useCallback(()=>{b();let o=s+r,t=e!==void 0&&o>e?e:f(o,p);f$1(t);},[s,r,e,p,f$1]),H=useCallback(o=>{b();let t=Number(o.target.value||0);(r!==1||D)&&(t=t+r/2,t-=t%r),!u&&t<0&&(t=0),typeof n=="number"&&t<n&&(t=n),typeof e=="number"&&t>e&&(t=e),t=f(t,p),(!t||t===I)&&(i.current=setTimeout(()=>{L(`incrementer-input-${Date.now()}`);},600)),f$1(t);},[I,r,n,e,p,f$1,D,u]);return jsx(a,{ref:z,name:R,value:I,minValue:n,maxValue:e,allowNegative:u,decimalScale:p,InputProps:{startAdornment:jsx(C,{position:"start",children:jsx(A,{size:"medium",onClick:$,disabled:N,"aria-label":B||"Decrementa",children:jsx(a$1,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:jsx(C,{position:"end",children:jsx(A,{size:"medium",onClick:G,disabled:_,"aria-label":w||"Incrementa",children:jsx(a$1,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:T},onChange:H,disabled:m,placeholder:O,...v},E)});M.displayName="Incrementer";var j=M;
|
|
10
10
|
|
|
11
11
|
export { j as a };
|
|
@@ -4,7 +4,7 @@ import { e } from './chunk-ANAHA3L6.js';
|
|
|
4
4
|
import { i } from './chunk-D27ND54J.js';
|
|
5
5
|
import { a } from './chunk-M6UXUQUU.js';
|
|
6
6
|
import { a as a$2 } from './chunk-KFZEM7KS.js';
|
|
7
|
-
import { a as a$1 } from './chunk-
|
|
7
|
+
import { a as a$1 } from './chunk-X24QANPC.js';
|
|
8
8
|
import { useState, useEffect } from 'react';
|
|
9
9
|
import { useDropzone } from 'react-dropzone';
|
|
10
10
|
import A from '@mui/material/Box';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a } from './chunk-W3MYAMTH.js';
|
|
2
|
+
import { useId, useState } from 'react';
|
|
3
|
+
import I from 'browser-image-compression';
|
|
4
|
+
|
|
5
|
+
var h=5242880,y=({onFileCropped:n,onImageUploaded:d,onCancel:i})=>{let l=useId(),[e,m]=useState(),[f,o,a$1]=a(),[u,r]=useState(),[v,p]=useState(!1);return {id:l,setCropModalOpen:a$1,handleRemove:()=>{n(void 0),d(void 0),a$1(!1);},toggleCropModalOpen:o,cropModalOpen:f,cancelChanges:()=>{i&&i(),a$1(!1);},saveChanges:()=>{e!==void 0&&e.getCroppedCanvas().toBlob(async g=>{try{if(!g)return;p(!0);let s=new File([g],"imagem.png",{type:"image/png"});if(s.size>h){let C=await I(s,{maxSizeMB:5});n(C),o();return}n(s),o();}finally{p(!1);}},"image/png",1);},previewImage:()=>{e!==void 0&&r(e.getCroppedCanvas().toDataURL());},setCropper:m,preview:u,closePreviewImage:()=>r(void 0),saving:v}},x=y;
|
|
6
|
+
|
|
7
|
+
export { x as a };
|
|
@@ -6,7 +6,7 @@ import { j } from './chunk-23GJSDGU.js';
|
|
|
6
6
|
import { i, o } from './chunk-D27ND54J.js';
|
|
7
7
|
import { a } from './chunk-M6UXUQUU.js';
|
|
8
8
|
import { a as a$3 } from './chunk-KFZEM7KS.js';
|
|
9
|
-
import { a as a$2 } from './chunk-
|
|
9
|
+
import { a as a$2 } from './chunk-X24QANPC.js';
|
|
10
10
|
import U1 from '@mui/material/Badge';
|
|
11
11
|
import J from '@mui/material/IconButton';
|
|
12
12
|
import P from '@mui/material/Stack';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-LFU6HXGC.js';
|
|
2
2
|
import '../../../chunk-4CNAGEPZ.js';
|
|
3
3
|
import '../../../chunk-HHFPLJQO.js';
|
|
4
4
|
import '../../../chunk-OAI5M2WE.js';
|
|
@@ -9,7 +9,7 @@ import '../../../chunk-M6UXUQUU.js';
|
|
|
9
9
|
import '../../../chunk-LCIGSQCM.js';
|
|
10
10
|
import '../../../chunk-KFZEM7KS.js';
|
|
11
11
|
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
12
|
-
import '../../../chunk-
|
|
12
|
+
import '../../../chunk-X24QANPC.js';
|
|
13
13
|
import '../../../chunk-W3MYAMTH.js';
|
|
14
14
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
15
15
|
import W from '@mui/material/FormHelperText';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-XBSIQXDG.js';
|
|
2
2
|
import '../../../chunk-4CNAGEPZ.js';
|
|
3
3
|
import '../../../chunk-HHFPLJQO.js';
|
|
4
4
|
import '../../../chunk-OAI5M2WE.js';
|
|
@@ -12,7 +12,7 @@ import '../../../chunk-LCIGSQCM.js';
|
|
|
12
12
|
import '../../../chunk-ILHUUK4X.js';
|
|
13
13
|
import '../../../chunk-KFZEM7KS.js';
|
|
14
14
|
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
15
|
-
import '../../../chunk-
|
|
15
|
+
import '../../../chunk-X24QANPC.js';
|
|
16
16
|
import '../../../chunk-W3MYAMTH.js';
|
|
17
17
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
18
18
|
import b from '@mui/material/FormHelperText';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-
|
|
2
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-
|
|
1
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-XBSIQXDG.js';
|
|
2
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-LFU6HXGC.js';
|
|
3
3
|
export { d as RejectionFiles } from '../../chunk-4CNAGEPZ.js';
|
|
4
4
|
import '../../chunk-HHFPLJQO.js';
|
|
5
5
|
import '../../chunk-OAI5M2WE.js';
|
|
@@ -12,7 +12,7 @@ import '../../chunk-M6UXUQUU.js';
|
|
|
12
12
|
import '../../chunk-LCIGSQCM.js';
|
|
13
13
|
import '../../chunk-ILHUUK4X.js';
|
|
14
14
|
import '../../chunk-KFZEM7KS.js';
|
|
15
|
-
import '../../chunk-
|
|
15
|
+
import '../../chunk-X24QANPC.js';
|
|
16
16
|
import '../../chunk-W3MYAMTH.js';
|
|
17
17
|
import { useDropzone } from 'react-dropzone';
|
|
18
18
|
import h from '@mui/material/Box';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as default } from '../chunk-
|
|
1
|
+
export { a as default } from '../chunk-X24QANPC.js';
|
|
2
2
|
import '../chunk-W3MYAMTH.js';
|
package/package.json
CHANGED
package/dist/chunk-M6QHAL4V.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-W3MYAMTH.js';
|
|
2
|
-
import { useId, useState } from 'react';
|
|
3
|
-
import I from 'browser-image-compression';
|
|
4
|
-
|
|
5
|
-
var h=5242880,y=({onFileCropped:o,onImageUploaded:d,onCancel:i})=>{let l=useId(),[e,m]=useState(),[f,a$1,s]=a(),[u,r]=useState(),[v,g]=useState(!1);return {id:l,setCropModalOpen:s,handleRemove:()=>{o(void 0),d(void 0),s(!1);},toggleCropModalOpen:a$1,cropModalOpen:f,cancelChanges:()=>{i&&i(),s(!1);},saveChanges:()=>{e!==void 0&&e.getCroppedCanvas().toBlob(async p=>{try{if(!p)return;g(!0);let n=new File([p],"imagem.png",{type:"image/png"});if(console.log({file:n}),n.size>h){let C=await I(n,{maxSizeMB:5});o(C),a$1();return}o(n),a$1();}finally{g(!1);}},"image/png",1);},previewImage:()=>{e!==void 0&&r(e.getCroppedCanvas().toDataURL());},setCropper:m,preview:u,closePreviewImage:()=>r(void 0),saving:v}},x=y;
|
|
6
|
-
|
|
7
|
-
export { x as a };
|