@zydon/common 2.5.2 → 2.5.3
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-4DJLMMNT.js +15 -0
- package/dist/chunk-7TFD7ZIP.js +9 -0
- package/dist/{chunk-6GEASWVI.js → chunk-GNUXGUIG.js} +1 -1
- package/dist/{chunk-YFT2GBNW.js → chunk-J3OVV7V5.js} +1 -1
- package/dist/{chunk-XBU7CMPL.js → chunk-SCXQE4YJ.js} +1 -1
- package/dist/chunk-XFEJWGQW.js +13 -0
- package/dist/components/EasyCrop/index.js +1 -1
- package/dist/components/EasyCropModal/index.js +4 -3
- package/dist/components/FileUpload/index.js +3 -3
- package/dist/components/ImageCropModal/index.js +2 -2
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js +3 -3
- package/dist/components/form/UploadWithCrop/index.js +3 -3
- package/dist/components/upload/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-INWICD33.js +0 -13
- package/dist/chunk-JEX3SO7Q.js +0 -14
- package/dist/chunk-XSYQAWOD.js +0 -9
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-7TFD7ZIP.js';
|
|
2
|
+
import { a } from './chunk-XFEJWGQW.js';
|
|
3
|
+
import { b } from './chunk-ILHUUK4X.js';
|
|
4
|
+
import P from '@mui/lab/LoadingButton';
|
|
5
|
+
import k from '@mui/material/Button';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import I from '@mui/material/Slider';
|
|
8
|
+
import r from '@mui/material/Stack';
|
|
9
|
+
import S from '@mui/material/TextField';
|
|
10
|
+
import d from '@mui/material/Typography';
|
|
11
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
|
+
|
|
13
|
+
var w=({imageSrc:c,aspectRatio:p,cropShape:g,cropSize:u,onInitialized:h})=>{let[i,n]=useState(1),[t,m]=useState({x:0,y:0}),[y,l]=useState(0);return jsxs(r,{gap:2,children:[jsx(a$1,{imageSrc:c,aspectRatio:p,cropShape:g,zoom:i,crop:t,onZoomChange:n,onCropChange:m,onInitialized:h,rotation:y,onRotationChange:l,cropSize:u}),jsxs(r,{gap:1.5,children:[jsxs(r,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[jsx(d,{component:"label",htmlFor:"zoom-slider",width:85,color:"textSecondary",variant:"body2",children:"Zoom"}),jsx(I,{id:"zoom-slider",value:i,onChange:(e,C)=>n(Array.isArray(C)?C[0]:C),min:.1,max:4,size:"medium",step:.0125}),jsx(S,{size:"small",id:"zoom-slider",type:"number",value:i,onChange:e=>n(Number(e.target.value)),inputProps:{step:.0125},sx:{width:130}})]}),jsxs(r,{direction:"row",gap:4,justifyContent:"flex-start",children:[jsx(d,{component:"label",htmlFor:"rotation-slider",width:"45px",color:"textSecondary",variant:"body2",lineHeight:"39px",children:"Position"}),jsxs(r,{direction:"row",alignItems:"center",gap:3,children:[jsx(d,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"Y"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.y,onChange:e=>m({...t,y:Number(e.target.value)}),sx:{width:90}})]}),jsxs(r,{gap:3,direction:"row",alignItems:"center",children:[jsx(d,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"X"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.x,onChange:e=>m({...t,x:Number(e.target.value)}),sx:{width:90}})]})]})]})]})},v=w;var M=({open:c,onClose:p,label:g,onSave:u,imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m,loading:y})=>{let l=b("down","sm");return jsx(a,{open:c,onClose:p,dialogTitle:g,actions:jsxs(Fragment,{children:[jsx(k,{variant:"outlined",size:"medium",onClick:p,color:"inherit",children:"Cancelar"}),jsx(P,{variant:"contained",size:"medium",onClick:u,loading:y,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",fullScreen:l,PaperProps:{sx:l?{borderRadius:0,m:0}:void 0},dialogContentProps:{sx:l?{p:0}:void 0},children:jsx(v,{imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m})})},q=M;
|
|
14
|
+
|
|
15
|
+
export { q as a };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useRef, useState, useEffect, useMemo } from 'react';
|
|
2
|
+
import P from 'react-easy-crop';
|
|
3
|
+
import v from '@mui/material/Stack';
|
|
4
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var l=styled(v)(({theme:n})=>({"& .reactEasyCrop_Container":{position:"relative"},"& .reactEasyCrop_CropArea":{border:`2px solid ${n.palette.primary.main}`,borderColor:alpha(n.palette.primary.main,.75)},"& .reactEasyCrop_CropAreaRound":{border:`2px solid ${n.palette.primary.main}`,borderColor:alpha(n.palette.primary.main,.75)}}));var W=({onInitialized:n,aspectRatio:i=1,imageSrc:C="",zoom:f=1,crop:c,cropShape:h="rect",cropSize:o,rotation:u=0,onZoomChange:a,onCropChange:y,onRotationChange:g})=>{let b=r=>{if(r>4){a(4);return}if(r<.1){a(.1);return}a(r);},p=useRef(null),[e,w]=useState(550);useEffect(()=>{let r=()=>{let t=p.current?.clientWidth||550;w(Math.min(t,550));};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]);let E=useMemo(()=>{let r=typeof o=="number"?o:o?.width,t=typeof o=="number"?o:o?.height;if(r=r||e,t=t||e,r<=e&&t<=e)return {width:r,height:t};let m=i>1;return r=m?e:e*i,t=m?e/i:e,{width:r,height:t}},[i,e,o]);return jsx(l,{ref:p,children:jsx(P,{image:C,crop:c,zoom:f,aspect:i,onCropChange:y,onZoomChange:b,onCropComplete:n,restrictPosition:!1,cropSize:E,cropShape:h,zoomWithScroll:!1,objectFit:"contain",minZoom:.1,maxZoom:4,style:{containerStyle:{width:e,height:e,position:"relative"}},rotation:u,onRotationChange:g})})},D=W;
|
|
8
|
+
|
|
9
|
+
export { D as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c, g, p, n, d, e as e$1, a as a$6, b, h, i as i$1, l, m as m$1, j as j$1, k } from './chunk-4VAXJ4XM.js';
|
|
2
|
-
import { a as a$5 } from './chunk-
|
|
2
|
+
import { a as a$5 } from './chunk-J3OVV7V5.js';
|
|
3
3
|
import { a as a$1 } from './chunk-H5L4ARDB.js';
|
|
4
4
|
import { e } from './chunk-ANAHA3L6.js';
|
|
5
5
|
import { a as a$7 } from './chunk-7R3XV4AP.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p, f } from './chunk-4VAXJ4XM.js';
|
|
2
|
-
import { a as a$3 } from './chunk-
|
|
2
|
+
import { a as a$3 } from './chunk-J3OVV7V5.js';
|
|
3
3
|
import { e } from './chunk-ANAHA3L6.js';
|
|
4
4
|
import { i } from './chunk-D27ND54J.js';
|
|
5
5
|
import { a as a$1 } from './chunk-X24QANPC.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { a } from './chunk-I6Y6PKTA.js';
|
|
2
|
+
import I from '@mui/material/Dialog';
|
|
3
|
+
import M from '@mui/material/DialogTitle';
|
|
4
|
+
import k from '@mui/material/IconButton';
|
|
5
|
+
import u from '@mui/material/DialogActions';
|
|
6
|
+
import y from '@mui/material/DialogContent';
|
|
7
|
+
import D from '@mui/material/Stack';
|
|
8
|
+
import { styled } from '@mui/material/styles';
|
|
9
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var p=styled(D)(({theme:o})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${o.palette.grey[300]}`,button:{marginRight:24}})),c=styled(y)({padding:24}),d=styled(u)(({theme:o})=>({borderTop:`1px solid ${o.palette.grey[300]}`,backgroundColor:o.palette.grey[50]}));var P=({children:o,actionsProps:i})=>jsx(d,{"data-testid":"modal-actions",sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...i,children:o}),m=P;var B=({actions:o,actionsProps:i,children:g,dialogContentProps:b,dialogTitle:r,dialogTitleProps:A,onClose:n,id:a$1,...C})=>{let x=a$1||"modal-actions",l="caixa de di\xE1logo";return jsxs(I,{"aria-label":r?`${l}: ${r}`:l,id:a$1,scroll:"body",...C,onClose:n,children:[jsxs(p,{children:[r&&jsx(M,{variant:"subtitle1",...A,children:r}),jsx(k,{onClick:n,"aria-label":"fechar caixa de di\xE1logo",children:jsx(a,{icon:"CLOSE_MARK_BUTTON"})})]}),jsx(c,{"data-testid":"modal-content",...b,children:g}),o&&jsx(m,{actionsProps:{...i,id:x},children:o})]})},U=B;
|
|
12
|
+
|
|
13
|
+
export { U as a };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-7TFD7ZIP.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-4DJLMMNT.js';
|
|
2
|
+
import '../../chunk-7TFD7ZIP.js';
|
|
3
|
+
import '../../chunk-XFEJWGQW.js';
|
|
4
4
|
import '../../chunk-I6Y6PKTA.js';
|
|
5
5
|
import '../../chunk-75E6MEWM.js';
|
|
6
|
+
import '../../chunk-ILHUUK4X.js';
|
|
@@ -3,9 +3,9 @@ import { e } from '../../chunk-ANAHA3L6.js';
|
|
|
3
3
|
import { a as a$3 } from '../../chunk-IPOTBSM7.js';
|
|
4
4
|
import { a } from '../../chunk-OFA5VB7M.js';
|
|
5
5
|
import { f } from '../../chunk-NANDXKZD.js';
|
|
6
|
-
import { a as a$5 } from '../../chunk-
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
6
|
+
import { a as a$5 } from '../../chunk-4DJLMMNT.js';
|
|
7
|
+
import '../../chunk-7TFD7ZIP.js';
|
|
8
|
+
import '../../chunk-XFEJWGQW.js';
|
|
9
9
|
import { a as a$2 } from '../../chunk-7R3XV4AP.js';
|
|
10
10
|
import { x } from '../../chunk-2P4CXK3O.js';
|
|
11
11
|
import { a as a$7 } from '../../chunk-FK7DDO5L.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-J3OVV7V5.js';
|
|
2
2
|
import '../../chunk-T7I256S6.js';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-XFEJWGQW.js';
|
|
4
4
|
import '../../chunk-I6Y6PKTA.js';
|
|
5
5
|
import '../../chunk-75E6MEWM.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-SCXQE4YJ.js';
|
|
2
2
|
import '../../../chunk-4VAXJ4XM.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-J3OVV7V5.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
5
5
|
import '../../../chunk-ANAHA3L6.js';
|
|
6
|
-
import '../../../chunk-
|
|
6
|
+
import '../../../chunk-XFEJWGQW.js';
|
|
7
7
|
import '../../../chunk-D27ND54J.js';
|
|
8
8
|
import '../../../chunk-X24QANPC.js';
|
|
9
9
|
import '../../../chunk-I6Y6PKTA.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-GNUXGUIG.js';
|
|
2
2
|
import '../../../chunk-4VAXJ4XM.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-J3OVV7V5.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
5
5
|
import '../../../chunk-H5L4ARDB.js';
|
|
6
6
|
import '../../../chunk-ANAHA3L6.js';
|
|
7
|
-
import '../../../chunk-
|
|
7
|
+
import '../../../chunk-XFEJWGQW.js';
|
|
8
8
|
import '../../../chunk-7R3XV4AP.js';
|
|
9
9
|
import '../../../chunk-2P4CXK3O.js';
|
|
10
10
|
import '../../../chunk-FK7DDO5L.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-
|
|
2
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-SCXQE4YJ.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-GNUXGUIG.js';
|
|
3
3
|
import { o } from '../../chunk-4VAXJ4XM.js';
|
|
4
4
|
export { p as RejectionFiles } from '../../chunk-4VAXJ4XM.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-J3OVV7V5.js';
|
|
6
6
|
import '../../chunk-T7I256S6.js';
|
|
7
7
|
import '../../chunk-H5L4ARDB.js';
|
|
8
8
|
import '../../chunk-ANAHA3L6.js';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-XFEJWGQW.js';
|
|
10
10
|
import '../../chunk-7R3XV4AP.js';
|
|
11
11
|
import '../../chunk-2P4CXK3O.js';
|
|
12
12
|
import '../../chunk-FK7DDO5L.js';
|
package/package.json
CHANGED
package/dist/chunk-INWICD33.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-I6Y6PKTA.js';
|
|
2
|
-
import I from '@mui/material/Dialog';
|
|
3
|
-
import M from '@mui/material/DialogTitle';
|
|
4
|
-
import k from '@mui/material/IconButton';
|
|
5
|
-
import u from '@mui/material/DialogActions';
|
|
6
|
-
import y from '@mui/material/DialogContent';
|
|
7
|
-
import D from '@mui/material/Stack';
|
|
8
|
-
import { styled } from '@mui/material/styles';
|
|
9
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
var s=styled(D)(({theme:o})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${o.palette.grey[300]}`,button:{marginRight:24}})),m=styled(y)({padding:"24px !important"}),c=styled(u)(({theme:o})=>({borderTop:`1px solid ${o.palette.grey[300]}`,backgroundColor:o.palette.grey[50]}));var P=({children:o,actionsProps:i})=>jsx(c,{"data-testid":"modal-actions",sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...i,children:o}),d=P;var B=({actions:o,actionsProps:i,children:g,dialogContentProps:b,dialogTitle:r,dialogTitleProps:A,onClose:n,id:a$1,...C})=>{let x=a$1||"modal-actions",l="caixa de di\xE1logo";return jsxs(I,{"aria-label":r?`${l}: ${r}`:l,id:a$1,scroll:"body",...C,onClose:n,children:[jsxs(s,{children:[r&&jsx(M,{variant:"subtitle1",...A,children:r}),jsx(k,{onClick:n,"aria-label":"fechar caixa de di\xE1logo",children:jsx(a,{icon:"CLOSE_MARK_BUTTON"})})]}),jsx(m,{"data-testid":"modal-content",...b,children:g}),o&&jsx(d,{actionsProps:{...i,id:x},children:o})]})},U=B;
|
|
12
|
-
|
|
13
|
-
export { U as a };
|
package/dist/chunk-JEX3SO7Q.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-XSYQAWOD.js';
|
|
2
|
-
import { a } from './chunk-INWICD33.js';
|
|
3
|
-
import w from '@mui/lab/LoadingButton';
|
|
4
|
-
import k from '@mui/material/Button';
|
|
5
|
-
import { useState } from 'react';
|
|
6
|
-
import v from '@mui/material/Slider';
|
|
7
|
-
import r from '@mui/material/Stack';
|
|
8
|
-
import S from '@mui/material/TextField';
|
|
9
|
-
import p from '@mui/material/Typography';
|
|
10
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
|
-
|
|
12
|
-
var I=({imageSrc:s,aspectRatio:l,cropShape:c,cropSize:g,onInitialized:h})=>{let[i,n]=useState(1),[t,m]=useState({x:0,y:0}),[u,z]=useState(0);return jsxs(r,{gap:2,children:[jsx(a$1,{imageSrc:s,aspectRatio:l,cropShape:c,zoom:i,crop:t,onZoomChange:n,onCropChange:m,onInitialized:h,rotation:u,onRotationChange:z,cropSize:g}),jsxs(r,{gap:1.5,children:[jsxs(r,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[jsx(p,{component:"label",htmlFor:"zoom-slider",width:85,color:"textSecondary",variant:"body2",children:"Zoom"}),jsx(v,{id:"zoom-slider",value:i,onChange:(e,y)=>n(Array.isArray(y)?y[0]:y),min:.1,max:4,size:"medium",step:.0125}),jsx(S,{size:"small",id:"zoom-slider",type:"number",value:i,onChange:e=>n(Number(e.target.value)),inputProps:{step:.0125},sx:{width:130}})]}),jsxs(r,{direction:"row",gap:4,justifyContent:"flex-start",children:[jsx(p,{component:"label",htmlFor:"rotation-slider",width:"45px",color:"textSecondary",variant:"body2",lineHeight:"39px",children:"Position"}),jsxs(r,{direction:"row",alignItems:"center",gap:3,children:[jsx(p,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"Y"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.y,onChange:e=>m({...t,y:Number(e.target.value)}),sx:{width:90}})]}),jsxs(r,{gap:3,direction:"row",alignItems:"center",children:[jsx(p,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"X"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.x,onChange:e=>m({...t,x:Number(e.target.value)}),sx:{width:90}})]})]})]})]})},b=I;var M=({open:s,onClose:l,label:c,onSave:g,imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m,loading:u})=>jsx(a,{open:s,onClose:l,dialogTitle:c,actions:jsxs(Fragment,{children:[jsx(k,{variant:"outlined",size:"medium",onClick:l,color:"inherit",children:"Cancelar"}),jsx(w,{variant:"contained",size:"medium",onClick:g,loading:u,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",children:jsx(b,{imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m})}),_=M;
|
|
13
|
-
|
|
14
|
-
export { _ as a };
|
package/dist/chunk-XSYQAWOD.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import I from 'react-easy-crop';
|
|
3
|
-
import b from '@mui/material/Stack';
|
|
4
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var m=styled(b)(({theme:t})=>({"& .reactEasyCrop_Container":{position:"relative"},"& .reactEasyCrop_CropArea":{border:`2px solid ${t.palette.primary.main}`,borderColor:alpha(t.palette.primary.main,.75)},"& .reactEasyCrop_CropAreaRound":{border:`2px solid ${t.palette.primary.main}`,borderColor:alpha(t.palette.primary.main,.75)}}));var P=({onInitialized:t,aspectRatio:n=1,imageSrc:C="",zoom:s=1,crop:f,cropShape:d="rect",cropSize:o,rotation:y=0,onZoomChange:i,onCropChange:h,onRotationChange:c})=>{let g=r=>{if(r>4){i(4);return}if(r<.1){i(.1);return}i(r);},u=useMemo(()=>{let r=typeof o=="number"?o:o?.width,e=typeof o=="number"?o:o?.height;if(r=r||550,e=e||550,(r||e)<=550)return {width:r,height:e};let a=n>1;return r=a?550:550*n,e=a?550/n:550,{width:r,height:e}},[n,o]);return jsx(m,{children:jsx(I,{image:C,crop:f,zoom:s,aspect:n,onCropChange:h,onZoomChange:g,onCropComplete:t,restrictPosition:!1,cropSize:u,cropShape:d,zoomWithScroll:!1,objectFit:"contain",minZoom:.1,maxZoom:4,style:{containerStyle:{minHeight:"550px",position:"relative"}},rotation:y,onRotationChange:c})})},$=P;
|
|
8
|
-
|
|
9
|
-
export { $ as a };
|