@zydon/common 2.6.0 → 2.6.2
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-2VNFVDQG.js → chunk-3CYQV3UB.js} +5 -5
- package/dist/chunk-4QRHLV4A.js +7 -0
- package/dist/{chunk-7XPVH2FH.js → chunk-6L2WNJLX.js} +2 -2
- package/dist/chunk-D6MGCVOI.js +7 -0
- package/dist/{chunk-N23NY6P2.js → chunk-EEQLNUZR.js} +3 -3
- package/dist/chunk-FM2MGTJJ.js +15 -0
- package/dist/{chunk-23D6RMEB.js → chunk-JB5LMSRD.js} +2 -2
- package/dist/chunk-LBOAQZCG.js +43 -0
- package/dist/{chunk-6AOD6RDY.js → chunk-OPDDRGEQ.js} +2 -2
- package/dist/{chunk-YBXBZBVR.js → chunk-SKVPLI5W.js} +1 -1
- package/dist/{chunk-IDDEVRZE.js → chunk-UF3ZODG6.js} +3 -3
- package/dist/chunk-UIKMO2ZR.js +40 -0
- package/dist/{chunk-SNZT4HH2.js → chunk-V2UHZWRE.js} +3 -3
- package/dist/chunk-VGBOXRXD.js +21 -0
- package/dist/components/BuilderLayout/index.js +3 -3
- package/dist/components/BuilderSidebar/index.js +5 -5
- package/dist/components/CardWithHeader/index.js +3 -3
- package/dist/components/Common/index.js +7 -7
- package/dist/components/DataCards/index.js +8 -8
- package/dist/components/DataGrid/index.js +3 -3
- package/dist/components/DataView/index.d.ts +2 -2
- package/dist/components/DataView/index.js +9 -9
- package/dist/components/DragButton/index.d.ts +1 -1
- package/dist/components/EmptyContent/index.js +2 -2
- package/dist/components/ExpandableGroup/index.js +2 -2
- package/dist/components/FileUpload/index.js +1 -1
- package/dist/components/FrameSkeleton/index.d.ts +2 -1
- package/dist/components/FrameSkeleton/index.js +7 -7
- package/dist/components/Label/index.js +2 -2
- package/dist/components/ListBundles/index.js +2 -2
- package/dist/components/SeoPreview/index.js +1 -1
- package/dist/components/SimpleCard/index.js +3 -3
- package/dist/components/SplashScreen/index.js +2 -2
- package/dist/components/WebhookCard/index.js +3 -3
- package/dist/components/WhiteBox/index.d.ts +2 -2
- package/dist/components/WhiteBox/index.js +1 -1
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/form/UploadAvatarWithCrop/index.js +3 -3
- package/dist/components/form/UploadWithCrop/index.js +3 -3
- package/dist/components/upload/index.js +5 -5
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/{index-e650f573.d.ts → index-1d50facd.d.ts} +16 -16
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/{props-4cea54f9.d.ts → props-a62a2c29.d.ts} +2 -2
- package/dist/theme/core/index.d.ts +1 -1
- package/dist/theme/core/index.js +3 -3
- package/dist/theme/settings-provider.js +1 -1
- package/dist/theme/styles/index.d.ts +14 -24
- package/dist/theme/styles/index.js +1 -1
- package/dist/theme/theme-provider.js +6 -6
- package/dist/theme/with-settings/index.js +3 -3
- package/dist/types/sectionProps.d.ts +3 -2
- package/package.json +1 -1
- package/dist/chunk-2GLJBMLZ.js +0 -7
- package/dist/chunk-BGP32EV2.js +0 -21
- package/dist/chunk-FIHMJDNW.js +0 -7
- package/dist/chunk-VX5PCLBR.js +0 -15
- package/dist/chunk-ZG4KB3ZH.js +0 -43
- package/dist/chunk-ZSQOZI55.js +0 -40
|
@@ -33,6 +33,6 @@ import zr from '@mui/material/Tooltip';
|
|
|
33
33
|
import { useDropzone } from 'react-dropzone';
|
|
34
34
|
import Lt from '@mui/material/CircularProgress';
|
|
35
35
|
|
|
36
|
-
var Wo=({helperText:e,disabled:o,isError:r})=>e?jsx(Bo,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,S=memo(Wo);var ye=styled(ge)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Le=styled(ge)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),ro=styled(Ee,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${alpha(e.palette.grey[500],.32)}`,...o&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...t&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));styled(ge)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}}));var to=styled(jo)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),Ge=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),io=styled(ge,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:o,isDragging:r})=>({width:o,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),ao=styled(m.div)(({theme:e,width:o,isDragging:r})=>({width:o,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),no=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),so=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:t})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),lo=styled(Ee)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover":{filter:"blur(3px)"}})),po=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"&&e!=="maxWidth"&&e!=="maxHeight"&&e!=="cropSize"})(({theme:e,aspectRatio:o,maxWidth:r,maxHeight:t,isLoading:n,isUploading:s})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,maxWidth:r,maxHeight:t,backgroundColor:e.palette.background.paper,aspectRatio:Math.abs(o),...Math.abs(o)>1?{width:"calc(100% - 16px)",height:void 0}:{width:void 0,height:"calc(100% - 16px)"},transition:"all 0.5s ease-in-out",...n||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{},"&:hover":{transition:"all 0.2s ease-in-out"}})),mo=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:o})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...o&&{opacity:.7,filter:"blur(2rem)"}})),co=styled(ge)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(Zo)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var je=styled(Ee,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:o,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...o&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),go=styled(ge)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(ge)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.grey[200],color:e.palette.text.disabled,height:160}));var uo=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:t,hasFile:n})=>({padding:e.spacing(1),margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${alpha(e.palette.grey[500],.2)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...n&&{...t&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),fo=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),xo=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var qo=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:n,listeners:s,innerWidth:a,isDragging:l})=>{let p=r?.id;return p?jsx($o,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(ao,{width:a,isDragging:l,"data-testid":`preview-multi-img-${p}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...n,...s}),jsx(Pe,{imageView:!0,file:r}),jsx(Le,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(xo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${p}`):null},ho=memo(qo);var Yo=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:n=!1})=>{let s=e$1.size||0,a$1=e$1.name||e$1.id,l=e$1.id,p=typeof e$1=="string",c=n?70:80,{attributes:d,listeners:x$1,setNodeRef:I,transform:v,transition:F,isDragging:A}=useSortable({id:l,disabled:n}),M={transform:x.Transform.toString(v),transition:F,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${c+8}px`,height:"68px"};return o&&e$1?jsx(Ge,{ref:I,style:M,children:jsx(ho,{innerWidth:c,isDragging:A,sx:t,file:e$1,disableDrag:n,attributes:d,listeners:x$1,onRemove:r})}):jsx(Ge,{ref:I,style:{...M,height:"80px",width:`${c+38}px`},children:jsxs(io,{width:c+30,isDragging:A,"data-testid":`preview-multi-img-${l}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:n,...d,...x$1}),e$1&&jsx(Pe,{file:e$1}),jsxs(ge,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:a$1,children:jsx(qe,{variant:"subtitle2",noWrap:!0,children:a$1})}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:p?"":e(s)})]}),jsx(Le,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},bo=memo(Yo);var ur=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:n})=>{let s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),a=useCallback(p=>{let{active:c,over:d}=p;if(!(!c||!d||c.id===d.id)&&t){let x=o.findIndex(({id:v})=>v===c.id),I=o.findIndex(({id:v})=>v===d.id);x!==-1&&I!==-1&&t(x,I,o);}},[o,t]),l=jsx(AnimatePresence,{initial:!1,children:o.map(p=>jsx(bo,{sx:n,id:`preview-file-${p.id}`,file:p,onRemove:r,thumbnail:e,disableDrag:!t},`preview-file-${p.id}`))});return t?jsx(DndContext,{sensors:s,collisionDetection:closestCenter,onDragEnd:a,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(p=>p.id),strategy:horizontalListSortingStrategy,children:l})}):l},Ae=memo(ur);var Eo=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},n)=>{let{maxWidth:s,maxHeight:a}=useMemo(()=>r&&typeof r=="object"?{maxWidth:r.width,maxHeight:r.height}:r&&typeof r=="number"?{maxWidth:r,maxHeight:r}:{maxWidth:"100%",maxHeight:"100%"},[r]);a$1(()=>{e?.(!0);}),useLayoutEffect(()=>{typeof n=="object"&&n?.current?e?.(!n.current.complete):e?.(!1);},[n,e]);function l(){e?.(!1);}return jsx(po,{...t,maxWidth:s,maxHeight:a,ref:n,aspectRatio:o,onLoad:l,onError:l})});Eo.displayName="LoadingPreviewImage";var Fo=Eo;var vr=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:n,cropSize:s,maxWidth:a,maxHeight:l})=>{let p=useRef(null),c=e?.id||"",d=e?.name||"",x=URL.createObjectURL(e);return c?jsxs(lo,{className:"single-file-preview-box",children:[jsx(Fo,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:d,src:x,ref:p,loading:"lazy",onLoading:n,onLoad:()=>n?.(!1),onError:()=>n?.(!1),maxWidth:a,maxHeight:l},`image-preview-${c}`),jsx(mo,{className:"single-file-preview-bg",alt:d,src:x,isLoading:t,isUploading:r})]}):null},Ze=memo(vr);var Fr=["pdf"],Ar=["txt"],wr=["psd"],Dr=["doc","docx"],Rr=["xls","xlsx"],_r=["zip","rar","iso"],Sr=["ai","eps"],Tr=["ppt","pptx"],Or=["wav","aif","mp3","aac"],Ur=["jpg","jpeg","gif","bmp","png","svg","webp"],yr=["m4v","avi","mpg","mp4","webm"];function He(e){let o,r=wo(e);return Ar.includes(r)?o="txt":_r.includes(r)?o="zip":Or.includes(r)?o="audio":Ur.includes(r)?o="image":yr.includes(r)?o="video":Dr.includes(r)?o="word":Rr.includes(r)?o="excel":Tr.includes(r)?o="powerpoint":Fr.includes(r)?o="pdf":wr.includes(r)?o="photoshop":Sr.includes(r)?o="illustrator":e?.startsWith("http")?o="image":o=wo(e),o}function Do(e){let o;switch(He(e)){case"folder":o="IC_FOLDER";break;case"txt":o="IC_TXT";break;case"zip":o="IC_ZIP";break;case"audio":o="IC_AUDIO";break;case"video":o="IC_VIDEO";break;case"word":o="IC_WORD";break;case"excel":o="IC_EXCEL";break;case"powerpoint":o="IC_POWER_POINT";break;case"pdf":o="IC_PDF";break;case"photoshop":o="IC_PTS";break;case"illustrator":o="IC_AI";break;case"image":o="IC_IMG";break;default:o="IC_FILE";}return o}function wo(e){return e&&e.split(".").pop()||""}function Vi(e){return e.split("/").pop()}var Ce={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},Pe=({sx:e,file:o,tooltip:r,onRemove:t,imageView:n,slotProps:s,onDownload:a,...l})=>{let p=URL.createObjectURL(o),c=o?.name||"",x=o.type.startsWith("image/")?"image":He(p),I=jsx(Ee,{component:"img",src:p,className:Ce.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),v=jsx(a$4,{icon:Do(x),sx:{width:32,height:32,flexShrink:0,...e}}),F=jsxs(ge,{component:"span",className:Ce.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...l,children:[x==="image"&&n?I:v,t&&jsx(Mr,{onClick:t,className:Ce.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),a&&jsx(jo,{onClick:a,className:Ce.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(zr,{arrow:!0,title:c,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:F}):F};var na=e=>e.startsWith("image/"),Ro=(e,o=.8)=>new Promise((r,t)=>{let n=document.createElement("canvas"),s=n.getContext("2d"),a=new Image;a.onload=()=>{n.width=a.width,n.height=a.height,s?(s.drawImage(a,0,0),n.toBlob(l=>{if(l){let p=new File([l],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(p);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},a.onerror=()=>t(new Error("Falha ao carregar imagem")),a.src=URL.createObjectURL(e);}),_o=e=>{let o=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return o?.[1]||o?.[2]||""};var Zr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:n,filesPreview:s,dropzoneOptions:a,enableCrop:l=!1,customAspectRatio:p,convertToWebp:c=!0,cropSize:d,maxFiles:x})=>{let{showErrorMessage:I}=a$8(),v=useMemo(()=>p||(d&&typeof d!="number"?d.width/d.height:1),[p,d]),[F,A]=useState([]),[M,E]=useState(!1),[g,P]=useState(null),[R,U]=useState(null),[C,u]=useState(""),[b,m]=useState(!1),[_,O]=useState([]),[L,w]=useState(0),[$,q]=useState(0),ee=f=>{if(f.length<1)return;let h=f[0];P(h),w(y=>y+1);let D=new FileReader;D.onload=()=>{u(D.result),E(!0);},D.readAsDataURL(h);},oe=(f,h)=>{U(h);},ae=async f=>!g||!R?null:new Promise(h=>{let D=document.createElement("canvas"),y=D.getContext("2d"),j=new Image;j.onload=async()=>{let{width:fe,height:we,x:De,y:Co}=R,ko=Math.abs(v),Re=fe,_e=we;d&&typeof d=="object"?(Re=d.width,_e=d.height):d&&typeof d=="number"&&(Re=d,_e=d/ko),D.width=Re,D.height=_e,y?(y.drawImage(j,De,Co,fe,we,0,0,Re,_e),D.toBlob(async Je=>{if(Je){let We=new File([Je],g.name,{type:g.type,lastModified:Date.now()});if(c)try{We=await Ro(We);}catch(zo){I(zo,"Erro ao converter para WebP");}let Qe=We;Qe.id=f,h(Qe);}else h(null);},"image/png")):h(null);},j.src=C;}),pe=async()=>{if(!(!g||!R||_.length===0)){m(!0);try{let f=_[0],h=await ae(f.id);if(h){let y=await n([h]);y&&(!e$1&&!o&&A(j=>[...j,...y]),e$1?.([...s||[],...y]),o?.(h));}E(!1),m(!1),u(""),P(null);let D=_.slice(1);O(D),ee(D);}catch(f){I(f,"Erro ao processar imagem"),m(!1);}}},de=()=>{E(!1),m(!1),u(""),P(null),O([]),w(0),q(0);},me=async f=>{if(f.length===0)return;let h=Object.keys(a?.accept||{}).some(y=>y.includes("image/")),D=F.length+f.length;if(x&&D>x){I(new Error(`M\xE1ximo de ${x} arquivos`),"Erro ao fazer upload");return}try{if(h&&l){let j=f.filter(fe=>fe.type.startsWith("image/")).map((fe,we)=>{let De=fe;return De.id=`temp-crop-${Date.now()}-${we}`,De});q(j.length),w(0),O(j),ee(j);}else {let y=await n(f);y&&(!e$1&&!o&&A(j=>[...j,...y]),e$1?.([...s||[],...y]),o?.(y[0]));}}catch(y){I(y,"Erro ao processar arquivos");}},ce=f=>{if(!f.length)return;let h=f[0]?.errors[0]?.code,D=a?.maxSize||3145728;I(h==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(D)}`):h==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):f[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:N,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:B}=useDropzone({onDrop:me,onDropRejected:ce,...a}),i=f=>{if(!f){t||A([]),t?.(void 0);return}let h=F.filter(D=>D.id!==f.id);t||A(h),t?.(f);},W=(f,h,D)=>{r?.(f,h,D);},G=useRef("");return useEffect(()=>{let f=s?.map(h=>h.id).join(",")||"";f!==G.current&&(G.current=f,A(s||[]));},[s]),{file:F?.[0],files:F,aspectRatio:v,dropzoneProps:{getRootProps:N,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:B},cropState:{cropModalOpen:M,imagePreview:C,cropLoading:b,setCropModalOpen:E,onCropInitialized:oe,handleCropSave:pe,handleCropCancel:de,currentImageIndex:L,totalPendingImages:$},setInitialFiles:A,handleRemove:i,handleReorder:W}},H=Zr;var Xe=(i=>(i.APPLICATION_OCTET_STREAM="application/octet-stream",i.IMAGE_JPEG="image/jpeg",i.IMAGE_JPG="image/jpg",i.IMAGE_PNG="image/png",i.IMAGE_GIF="image/gif",i.IMAGE_WEBP="image/webp",i.IMAGE_SVG="image/svg+xml",i.IMAGE_BMP="image/bmp",i.IMAGE_TIFF="image/tiff",i.IMAGE_ICO="image/x-icon",i.IMAGE_AVIF="image/avif",i.APPLICATION_PDF="application/pdf",i.TEXT_PLAIN="text/plain",i.TEXT_CSV="text/csv",i.APPLICATION_RTF="application/rtf",i.APPLICATION_MSWORD="application/msword",i.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",i.APPLICATION_MSEXCEL="application/vnd.ms-excel",i.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",i.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",i.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",i.APPLICATION_ODT="application/vnd.oasis.opendocument.text",i.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",i.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",i.APPLICATION_XML="application/xml",i.TEXT_XML="text/xml",i.TEXT_HTML="text/html",i.TEXT_CSS="text/css",i.APPLICATION_JSON="application/json",i.TEXT_JAVASCRIPT="text/javascript",i.APPLICATION_ZIP="application/zip",i.APPLICATION_GZIP="application/gzip",i.APPLICATION_RAR="application/vnd.rar",i.APPLICATION_7Z="application/x-7z-compressed",i.AUDIO_MPEG="audio/mpeg",i.AUDIO_WAV="audio/wav",i.AUDIO_OGG="audio/ogg",i.AUDIO_WEBM="audio/webm",i.AUDIO_AAC="audio/aac",i.VIDEO_MP4="video/mp4",i.VIDEO_MPEG="video/mpeg",i.VIDEO_OGG="video/ogg",i.VIDEO_WEBM="video/webm",i.VIDEO_QUICKTIME="video/quicktime",i))(Xe||{}),ke=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(ke||{});var qr=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r}=a$8(),[t,n]=useState(!1),[s,a]=useState(!1),[l,p]=useState(null),[c,d]=useState([]),x=useMemo(()=>c?.[0],[c]),I=s||t,v=useCallback(async E=>{if(!E.length){d([]),a(!1);return}a(!0);try{let P=(await Promise.all(E.map(async({url:R,id:U,name:C})=>{try{if(!R)return null;let u=await fetch(R);if(!u.ok)throw new Error(u.statusText);let b=await u.blob(),m=null;if(!C){let L=u.headers.get("content-disposition")||void 0;if(L){let w=_o(L);if(w)try{m=decodeURIComponent(w);}catch{m=w;}}}let _=m||C||U,O=new File([b],_,{type:b.type});return O.id=U,O.url=R,O}catch{return null}}))).filter(Boolean);d(P),a(!1);}catch(g){r(g,"Erro ao carregar arquivos"),d([]),a(!1);}},[r]),F=useRef("");useEffect(()=>{let E=o?.map(({id:g})=>g).join(",")||"";E!==F.current&&(async()=>(F.current=E,await v(o)))();},[o,v]);let A=async E=>{if(!E||!Array.isArray(E))throw new Error("Arquivos inv\xE1lidos");let g=E.filter(P=>P instanceof File);if(g?.length){n(!0);try{let P=g.map(u=>{let b=u.type||"application/octet-stream",m=ke[b];if(!m)throw new Error(`Tipo de arquivo n\xE3o suportado: ${b}`);return {file:u,mimeType:b,contentTypeEnum:m}}),R=await e({files:P.map(({file:u,contentTypeEnum:b})=>({content_type:b,name:u.name}))}).unwrap(),U=R.files.map((u,b)=>{let m=P[b].file,_=m;return _.id=u.id,_.url=URL.createObjectURL(m),_});return await(await Promise.all(R.files.map((u,b)=>{let{mimeType:m}=P[b],_=U[b];return fetch(u.url,{method:"PUT",headers:{"Content-Type":m,"Content-Disposition":`inline; filename="${_.name}"`,"X-File-Id":u.id},body:_})}))).forEach(async u=>{if(!u.ok)throw new Error("Erro no upload do arquivo.")}),U}catch(P){throw p(P),r(P,"Erro no upload"),P}finally{n(!1);}}},M=useMemo(()=>l&&l instanceof Error?l.message:l,[l]);return {setFilesPreview:d,uploadFiles:A,filesPreview:c,filePreview:x,isLoadingPreview:s,isUploadingFiles:t,isUploadOrLoadingFiles:I,uploadErrorText:M}},X=qr;var Kr=({sx:e,id:o,name:r,tabIndex:t,uploading:n,getRootProps:s,getInputProps:a,isDragActive:l,isError:p,disabled:c,dropZoneSxProps:d,dropZoneContent:x,children:I,...v})=>jsxs(ye,{children:[n&&jsx(a$7,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(Ee,{sx:{width:1,position:"relative",...e},children:[jsxs(ro,{...s(),"data-testid":"drop-zone-styled-area",isError:p,isDragActive:l,disabled:!!c,sx:d,...v,children:[jsx("input",{...a(),id:o,tabIndex:t,name:r}),x]}),I]})]}),ne=Kr;var Yr=({header:e,description:o,sx:r,...t})=>jsxs(ge,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...t,children:[jsx(a$5,{sx:{width:220}}),jsxs("div",{children:[jsx(qe,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(qe,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(qe,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),se=memo(Yr);var it=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:n=[],id:s,disabled:a,error:l,helperText:p,thumbnail:c,dropZoneSxProps:d,uploading:x,tabIndex:I,maxFiles:v,placeholderAlt:F,placeholderProps:A,...M})=>{let{filesPreview:E,isUploadOrLoadingFiles:g,uploadErrorText:P,uploadFiles:R}=X({createFilesMutation:t,filesDetails:n}),{files:U,dropzoneProps:C,handleRemove:u,handleReorder:b}=H({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:E,dropzoneOptions:{multiple:!0,disabled:a,...M},maxFiles:v,uploadFiles:R}),{getRootProps:m,getInputProps:_,isDragActive:O,isDragReject:L}=C,w=!!U?.filter(q=>!!q.id).length,$=L||!!l||!!P;return jsxs(ne,{id:s,uploading:x||g,disabled:a,dropZoneSxProps:d,tabIndex:I,getRootProps:m,getInputProps:_,isDragActive:O,isError:$,dropZoneContent:jsx(Fragment,{children:F?jsx(ge,{children:F}):jsx(se,{header:A?.header,description:A?.description})}),children:[jsx(S,{disabled:a,helperText:p,isError:$}),l?jsx(S,{helperText:l,isError:!0}):null,P?jsx(S,{helperText:P,isError:!0}):null,w&&jsx(Ee,{sx:{my:3},children:jsx(Ae,{files:U,thumbnail:!!c,onRemove:e?u:void 0,onReorder:o?b:void 0})})]})},at=memo(it);var ct=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:n=[],id:s,disabled:a,error:l,helperText:p,dropZoneSxProps:c,placeholderProps:d,placeholderAlt:x,uploading:I,tabIndex:v,maxFiles:F,aspectRatio:A,enableCrop:M=!0,convertToWebp:E=!0,cropSize:g,name:P,label:R,...U})=>{let{filesPreview:C,isUploadOrLoadingFiles:u,uploadErrorText:b,uploadFiles:m}=X({createFilesMutation:t,filesDetails:n}),_=I||u,{files:O,dropzoneProps:L,cropState:w,aspectRatio:$,handleRemove:q,handleReorder:ee}=H({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:C,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:a,...U},enableCrop:M,customAspectRatio:A,convertToWebp:E,maxFiles:F,cropSize:g,uploadFiles:m}),{getRootProps:oe,getInputProps:ae,isDragActive:pe,isDragReject:de}=L,{cropModalOpen:me,imagePreview:ce,cropLoading:N,onCropInitialized:V,handleCropSave:K,handleCropCancel:re,currentImageIndex:B,totalPendingImages:i}=w,W=!!O?.filter(h=>!!h.id).length,G=de||!!l||!!b,f=useMemo(()=>{let h=R??"Ajustar Imagem",D=i>1||B>1?` (${B} de ${i})`:"";return `${h}${D}`},[R,i,B]);return jsxs(ne,{id:s,name:P,uploading:_,disabled:a,dropZoneSxProps:c,tabIndex:v,getRootProps:oe,getInputProps:ae,isDragActive:pe,isError:G,dropZoneContent:jsx(Fragment,{children:x?jsx(ge,{children:x}):jsx(se,{header:d?.header,description:d?.description})}),children:[jsx(S,{disabled:a,helperText:p,isError:G}),l?jsx(S,{helperText:l,isError:!0}):null,b?jsx(S,{helperText:b,isError:!0}):null,W&&jsx(Ee,{sx:{my:3,ml:.5},children:jsx(Ae,{files:O,thumbnail:!0,onRemove:q,onReorder:o?ee:void 0})}),jsx(a$6,{open:me,onClose:re,label:f,imageSrc:ce,aspectRatio:$,onInitialized:V,onSave:K,loading:N,cropSize:g})]})},gt=memo(ct);var Pt=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:n,disabled:s,error:a,helperText:l,sx:p,dropZoneSxProps:c,uploading:d,tabIndex:x,...I})=>{let{filesPreview:v,isUploadOrLoadingFiles:F,uploadErrorText:A,uploadFiles:M}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),E=F||d,{file:g,dropzoneProps:P,handleRemove:R}=H({uploadFiles:M,onFileSelect:e$1,onRemove:o,filesPreview:v,dropzoneOptions:{multiple:!1,disabled:s,...I}}),{getRootProps:U,getInputProps:C,isDragActive:u,isDragReject:b}=P,m$1=useCallback(w=>{w.stopPropagation(),R(g||void 0);},[g,R]),_=!!g,O=typeof g=="string",L=b||!!a||!!A;return jsxs(ne,{id:n,uploading:E,disabled:s,dropZoneSxProps:c,tabIndex:x,getRootProps:U,getInputProps:C,isDragActive:u,isError:L,dropZoneContent:jsxs(Fragment,{children:[!_&&jsx(se,{}),_&&jsxs(ge,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:w=>`solid 1px ${w.palette.divider}`,...p},children:[jsx(Pe,{file:g}),jsxs(ge,{flexGrow:1,sx:{minWidth:0},children:[jsx(qe,{variant:"subtitle2",noWrap:!0,children:O?g:g.name}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:O?"":e(g.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(to,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:m$1,children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(S,{disabled:s,helperText:l,isError:L}),a?jsx(S,{helperText:a,isError:!0}):null,A?jsx(S,{helperText:A,isError:!0}):null]})},bt=memo(Pt);var Rt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:n,disabled:s,error:a,helperText:l,dropZoneSxProps:p,placeholderProps:c,placeholderAlt:d,uploading:x,tabIndex:I,aspectRatio:v,enableCrop:F=!0,convertToWebp:A=!0,name:M,label:E,cropSize:g,sx:P,maxWidth:R,maxHeight:U,...C})=>{let{filesPreview:u,isUploadOrLoadingFiles:b,uploadErrorText:m,uploadFiles:_}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),[O,L]=useState(!1),{file:w,dropzoneProps:$,cropState:q,handleRemove:ee,aspectRatio:oe}=H({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...C},filesPreview:u,enableCrop:F,customAspectRatio:v,convertToWebp:A,cropSize:g,uploadFiles:_}),{getRootProps:ae,getInputProps:pe,isDragActive:de,isDragReject:me}=$,{cropModalOpen:ce,imagePreview:N,cropLoading:V,onCropInitialized:K,handleCropSave:re,handleCropCancel:B}=q,i=useCallback(()=>{ee(w||void 0);},[w,ee]),W=!!w,G=me||!!a||!!m,f=x||b,h=W?{opacity:0}:{opacity:1},D=p?.width;return useEffect(()=>{W||L(!1);},[W]),jsxs(ye,{sx:{...P,...D&&{width:D}},children:[(f||O)&&jsx(a$7,{}),jsxs(ne,{id:n,uploading:f,disabled:s,dropZoneSxProps:p,tabIndex:I,getRootProps:ae,getInputProps:pe,isDragActive:de,isError:G,name:M,dropZoneContent:jsxs(Fragment,{children:[d?jsx(ge,{sx:h,children:d}):jsx(se,{sx:h,header:c?.title,description:c?.description}),W&&jsx(Ze,{file:w,cropSize:g,isLoading:O,isUploading:f,onLoading:L,aspectRatio:oe,maxWidth:R,maxHeight:U})]}),children:[jsx(S,{disabled:s,helperText:l,isError:G}),a?jsx(S,{helperText:a,isError:!0}):null,m?jsx(S,{helperText:m,isError:!0}):null,W&&e&&jsx(no,{size:"small",onClick:i,disabled:s,label:"Remover arquivo",children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$6,{open:ce,onClose:B,label:E??"Ajustar Imagem",imageSrc:N,aspectRatio:oe,onInitialized:K,onSave:re,loading:V,cropSize:g})]})]})},_t=memo(Rt);var Mt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:n,label:s,id:a,tabIndex:l,error:p,helperText:c,sx:d,name:x,maxSize:I,uploading:v,aspectRatio:F=1,enableCrop:A=!0,convertToWebp:M=!0,cropSize:E,...g})=>{let[P,R]=useState(!1),{filesPreview:U,isUploadOrLoadingFiles:C,uploadErrorText:u,uploadFiles:b}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:m,dropzoneProps:_,cropState:O,handleRemove:L}=H({filesPreview:U,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:n,maxSize:I,...g},enableCrop:A,customAspectRatio:F,convertToWebp:M,cropSize:E,uploadFiles:b}),{getRootProps:w,getInputProps:$,isDragActive:q,isDragReject:ee}=_,{cropModalOpen:oe,imagePreview:ae,cropLoading:pe,onCropInitialized:de,handleCropSave:me,handleCropCancel:ce}=O,N=ee||!!p||!!u,V=P||C||v,K=!!e,re=useRef(t?.url||""),B=useRef();useEffect(()=>{if(!m){re.current="",B.current=void 0;return}if(B.current===m.id)return;B.current=m.id,R(!0);let G=URL.createObjectURL(m);return re.current=G,()=>{URL.revokeObjectURL(G);}},[m]);let i=()=>{R(!1);},W=useCallback(()=>K&&m?()=>L(m):w().onClick,[K,m,w,L]);return jsxs(Fragment,{children:[jsxs(ge,{sx:{alignItems:"center"},children:[jsxs(uo,{sx:d,isError:N,isDragActive:q,hasFile:!!m,...w(),onClick:W(),children:[jsxs(co,{children:[V&&jsx(go,{children:jsx(Lt,{size:135,thickness:2,color:"primary"})}),m&&jsx(fo,{alt:"Avatar Preview",src:re.current,onLoad:i,...V&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!m&&!V&&jsxs(je,{isError:N,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:N?"error.main":"text.disabled"},children:"Adicionar foto"})]}),m&&!V&&jsxs(je,{isError:N,hasFile:!0,children:[jsx(a$4,{icon:K?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:N?"error.main":"common.white"},children:K?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:x,id:a,tabIndex:l,...$()})]}),jsx(ge,{sx:{alignItems:"center",mt:-.5},children:jsx(S,{helperText:c,disabled:n,isError:N})}),u?jsx(S,{helperText:u,isError:!0}):null,p?jsx(S,{helperText:p,isError:!0}):null]}),oe&&ae&&jsx(a$6,{open:oe,onClose:ce,label:s??"Ajustar Imagem",imageSrc:ae,aspectRatio:F,onInitialized:de,onSave:me,loading:pe,cropSize:E,cropShape:"round"})]})},Ct=memo(Mt);var Bt=({error:e,name:o,disabled:r,sx:t,...n})=>{let{getRootProps:s,getInputProps:a,isDragActive:l,isDragReject:p}=useDropzone({disabled:r,...n}),c=p||e;return jsxs(so,{...s(),isDragActive:l,hasError:!!c,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...a()}),"Selecionar arquivo"]})},Wt=memo(Bt);
|
|
36
|
+
var Wo=({helperText:e,disabled:o,isError:r})=>e?jsx(Bo,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,S=memo(Wo);var ye=styled(ge)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Le=styled(ge)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),ro=styled(Ee,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`dashed 1px ${e.palette.divider}`,...o&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...t&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));styled(ge)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:e.palette.background.paper}}}));var to=styled(jo)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),Ge=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),io=styled(ge,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:o,isDragging:r})=>({width:o,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),ao=styled(m.div)(({theme:e,width:o,isDragging:r})=>({width:o,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),no=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),so=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:t})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),lo=styled(Ee)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover":{filter:"blur(3px)"}})),po=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"&&e!=="maxWidth"&&e!=="maxHeight"&&e!=="cropSize"})(({theme:e,aspectRatio:o,maxWidth:r,maxHeight:t,isLoading:n,isUploading:s})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,maxWidth:r,maxHeight:t,backgroundColor:e.palette.background.paper,aspectRatio:Math.abs(o),...Math.abs(o)>1?{width:"calc(100% - 16px)",height:void 0}:{width:void 0,height:"calc(100% - 16px)"},transition:"all 0.5s ease-in-out",...n||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{},"&:hover":{transition:"all 0.2s ease-in-out"}})),mo=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:o})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...o&&{opacity:.7,filter:"blur(2rem)"}})),co=styled(ge)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(Zo)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var je=styled(Ee,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:o,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...o&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),go=styled(ge)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(ge)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.divider,color:e.palette.text.disabled,height:160}));var uo=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:t,hasFile:n})=>({padding:e.spacing(1),margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${e.palette.divider}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...n&&{...t&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),fo=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),xo=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var qo=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:n,listeners:s,innerWidth:a,isDragging:l})=>{let p=r?.id;return p?jsx($o,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(ao,{width:a,isDragging:l,"data-testid":`preview-multi-img-${p}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...n,...s}),jsx(Pe,{imageView:!0,file:r}),jsx(Le,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(xo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${p}`):null},ho=memo(qo);var Yo=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:n=!1})=>{let s=e$1.size||0,a$1=e$1.name||e$1.id,l=e$1.id,p=typeof e$1=="string",c=n?70:80,{attributes:d,listeners:x$1,setNodeRef:I,transform:v,transition:F,isDragging:A}=useSortable({id:l,disabled:n}),M={transform:x.Transform.toString(v),transition:F,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${c+8}px`,height:"68px"};return o&&e$1?jsx(Ge,{ref:I,style:M,children:jsx(ho,{innerWidth:c,isDragging:A,sx:t,file:e$1,disableDrag:n,attributes:d,listeners:x$1,onRemove:r})}):jsx(Ge,{ref:I,style:{...M,height:"80px",width:`${c+38}px`},children:jsxs(io,{width:c+30,isDragging:A,"data-testid":`preview-multi-img-${l}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:n,...d,...x$1}),e$1&&jsx(Pe,{file:e$1}),jsxs(ge,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:a$1,children:jsx(qe,{variant:"subtitle2",noWrap:!0,children:a$1})}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:p?"":e(s)})]}),jsx(Le,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},bo=memo(Yo);var ur=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:n})=>{let s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),a=useCallback(p=>{let{active:c,over:d}=p;if(!(!c||!d||c.id===d.id)&&t){let x=o.findIndex(({id:v})=>v===c.id),I=o.findIndex(({id:v})=>v===d.id);x!==-1&&I!==-1&&t(x,I,o);}},[o,t]),l=jsx(AnimatePresence,{initial:!1,children:o.map(p=>jsx(bo,{sx:n,id:`preview-file-${p.id}`,file:p,onRemove:r,thumbnail:e,disableDrag:!t},`preview-file-${p.id}`))});return t?jsx(DndContext,{sensors:s,collisionDetection:closestCenter,onDragEnd:a,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(p=>p.id),strategy:horizontalListSortingStrategy,children:l})}):l},Ae=memo(ur);var Eo=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},n)=>{let{maxWidth:s,maxHeight:a}=useMemo(()=>r&&typeof r=="object"?{maxWidth:r.width,maxHeight:r.height}:r&&typeof r=="number"?{maxWidth:r,maxHeight:r}:{maxWidth:"100%",maxHeight:"100%"},[r]);a$1(()=>{e?.(!0);}),useLayoutEffect(()=>{typeof n=="object"&&n?.current?e?.(!n.current.complete):e?.(!1);},[n,e]);function l(){e?.(!1);}return jsx(po,{...t,maxWidth:s,maxHeight:a,ref:n,aspectRatio:o,onLoad:l,onError:l})});Eo.displayName="LoadingPreviewImage";var Fo=Eo;var vr=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:n,cropSize:s,maxWidth:a,maxHeight:l})=>{let p=useRef(null),c=e?.id||"",d=e?.name||"",x=URL.createObjectURL(e);return c?jsxs(lo,{className:"single-file-preview-box",children:[jsx(Fo,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:d,src:x,ref:p,loading:"lazy",onLoading:n,onLoad:()=>n?.(!1),onError:()=>n?.(!1),maxWidth:a,maxHeight:l},`image-preview-${c}`),jsx(mo,{className:"single-file-preview-bg",alt:d,src:x,isLoading:t,isUploading:r})]}):null},Ze=memo(vr);var Fr=["pdf"],Ar=["txt"],wr=["psd"],Dr=["doc","docx"],Rr=["xls","xlsx"],_r=["zip","rar","iso"],Sr=["ai","eps"],Tr=["ppt","pptx"],Or=["wav","aif","mp3","aac"],Ur=["jpg","jpeg","gif","bmp","png","svg","webp"],yr=["m4v","avi","mpg","mp4","webm"];function He(e){let o,r=wo(e);return Ar.includes(r)?o="txt":_r.includes(r)?o="zip":Or.includes(r)?o="audio":Ur.includes(r)?o="image":yr.includes(r)?o="video":Dr.includes(r)?o="word":Rr.includes(r)?o="excel":Tr.includes(r)?o="powerpoint":Fr.includes(r)?o="pdf":wr.includes(r)?o="photoshop":Sr.includes(r)?o="illustrator":e?.startsWith("http")?o="image":o=wo(e),o}function Do(e){let o;switch(He(e)){case"folder":o="IC_FOLDER";break;case"txt":o="IC_TXT";break;case"zip":o="IC_ZIP";break;case"audio":o="IC_AUDIO";break;case"video":o="IC_VIDEO";break;case"word":o="IC_WORD";break;case"excel":o="IC_EXCEL";break;case"powerpoint":o="IC_POWER_POINT";break;case"pdf":o="IC_PDF";break;case"photoshop":o="IC_PTS";break;case"illustrator":o="IC_AI";break;case"image":o="IC_IMG";break;default:o="IC_FILE";}return o}function wo(e){return e&&e.split(".").pop()||""}function Vi(e){return e.split("/").pop()}var Ce={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},Pe=({sx:e,file:o,tooltip:r,onRemove:t,imageView:n,slotProps:s,onDownload:a,...l})=>{let p=URL.createObjectURL(o),c=o?.name||"",x=o.type.startsWith("image/")?"image":He(p),I=jsx(Ee,{component:"img",src:p,className:Ce.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),v=jsx(a$4,{icon:Do(x),sx:{width:32,height:32,flexShrink:0,...e}}),F=jsxs(ge,{component:"span",className:Ce.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...l,children:[x==="image"&&n?I:v,t&&jsx(Mr,{onClick:t,className:Ce.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),a&&jsx(jo,{onClick:a,className:Ce.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(zr,{arrow:!0,title:c,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:F}):F};var na=e=>e.startsWith("image/"),Ro=(e,o=.8)=>new Promise((r,t)=>{let n=document.createElement("canvas"),s=n.getContext("2d"),a=new Image;a.onload=()=>{n.width=a.width,n.height=a.height,s?(s.drawImage(a,0,0),n.toBlob(l=>{if(l){let p=new File([l],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(p);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},a.onerror=()=>t(new Error("Falha ao carregar imagem")),a.src=URL.createObjectURL(e);}),_o=e=>{let o=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return o?.[1]||o?.[2]||""};var Zr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:n,filesPreview:s,dropzoneOptions:a,enableCrop:l=!1,customAspectRatio:p,convertToWebp:c=!0,cropSize:d,maxFiles:x})=>{let{showErrorMessage:I}=a$8(),v=useMemo(()=>p||(d&&typeof d!="number"?d.width/d.height:1),[p,d]),[F,A]=useState([]),[M,E]=useState(!1),[g,P]=useState(null),[R,U]=useState(null),[C,u]=useState(""),[b,m]=useState(!1),[_,O]=useState([]),[L,w]=useState(0),[$,q]=useState(0),ee=f=>{if(f.length<1)return;let h=f[0];P(h),w(y=>y+1);let D=new FileReader;D.onload=()=>{u(D.result),E(!0);},D.readAsDataURL(h);},oe=(f,h)=>{U(h);},ae=async f=>!g||!R?null:new Promise(h=>{let D=document.createElement("canvas"),y=D.getContext("2d"),j=new Image;j.onload=async()=>{let{width:fe,height:we,x:De,y:Co}=R,ko=Math.abs(v),Re=fe,_e=we;d&&typeof d=="object"?(Re=d.width,_e=d.height):d&&typeof d=="number"&&(Re=d,_e=d/ko),D.width=Re,D.height=_e,y?(y.drawImage(j,De,Co,fe,we,0,0,Re,_e),D.toBlob(async Je=>{if(Je){let We=new File([Je],g.name,{type:g.type,lastModified:Date.now()});if(c)try{We=await Ro(We);}catch(zo){I(zo,"Erro ao converter para WebP");}let Qe=We;Qe.id=f,h(Qe);}else h(null);},"image/png")):h(null);},j.src=C;}),pe=async()=>{if(!(!g||!R||_.length===0)){m(!0);try{let f=_[0],h=await ae(f.id);if(h){let y=await n([h]);y&&(!e$1&&!o&&A(j=>[...j,...y]),e$1?.([...s||[],...y]),o?.(h));}E(!1),m(!1),u(""),P(null);let D=_.slice(1);O(D),ee(D);}catch(f){I(f,"Erro ao processar imagem"),m(!1);}}},de=()=>{E(!1),m(!1),u(""),P(null),O([]),w(0),q(0);},me=async f=>{if(f.length===0)return;let h=Object.keys(a?.accept||{}).some(y=>y.includes("image/")),D=F.length+f.length;if(x&&D>x){I(new Error(`M\xE1ximo de ${x} arquivos`),"Erro ao fazer upload");return}try{if(h&&l){let j=f.filter(fe=>fe.type.startsWith("image/")).map((fe,we)=>{let De=fe;return De.id=`temp-crop-${Date.now()}-${we}`,De});q(j.length),w(0),O(j),ee(j);}else {let y=await n(f);y&&(!e$1&&!o&&A(j=>[...j,...y]),e$1?.([...s||[],...y]),o?.(y[0]));}}catch(y){I(y,"Erro ao processar arquivos");}},ce=f=>{if(!f.length)return;let h=f[0]?.errors[0]?.code,D=a?.maxSize||3145728;I(h==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(D)}`):h==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):f[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:N,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:B}=useDropzone({onDrop:me,onDropRejected:ce,...a}),i=f=>{if(!f){t||A([]),t?.(void 0);return}let h=F.filter(D=>D.id!==f.id);t||A(h),t?.(f);},W=(f,h,D)=>{r?.(f,h,D);},G=useRef("");return useEffect(()=>{let f=s?.map(h=>h.id).join(",")||"";f!==G.current&&(G.current=f,A(s||[]));},[s]),{file:F?.[0],files:F,aspectRatio:v,dropzoneProps:{getRootProps:N,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:B},cropState:{cropModalOpen:M,imagePreview:C,cropLoading:b,setCropModalOpen:E,onCropInitialized:oe,handleCropSave:pe,handleCropCancel:de,currentImageIndex:L,totalPendingImages:$},setInitialFiles:A,handleRemove:i,handleReorder:W}},H=Zr;var Xe=(i=>(i.APPLICATION_OCTET_STREAM="application/octet-stream",i.IMAGE_JPEG="image/jpeg",i.IMAGE_JPG="image/jpg",i.IMAGE_PNG="image/png",i.IMAGE_GIF="image/gif",i.IMAGE_WEBP="image/webp",i.IMAGE_SVG="image/svg+xml",i.IMAGE_BMP="image/bmp",i.IMAGE_TIFF="image/tiff",i.IMAGE_ICO="image/x-icon",i.IMAGE_AVIF="image/avif",i.APPLICATION_PDF="application/pdf",i.TEXT_PLAIN="text/plain",i.TEXT_CSV="text/csv",i.APPLICATION_RTF="application/rtf",i.APPLICATION_MSWORD="application/msword",i.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",i.APPLICATION_MSEXCEL="application/vnd.ms-excel",i.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",i.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",i.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",i.APPLICATION_ODT="application/vnd.oasis.opendocument.text",i.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",i.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",i.APPLICATION_XML="application/xml",i.TEXT_XML="text/xml",i.TEXT_HTML="text/html",i.TEXT_CSS="text/css",i.APPLICATION_JSON="application/json",i.TEXT_JAVASCRIPT="text/javascript",i.APPLICATION_ZIP="application/zip",i.APPLICATION_GZIP="application/gzip",i.APPLICATION_RAR="application/vnd.rar",i.APPLICATION_7Z="application/x-7z-compressed",i.AUDIO_MPEG="audio/mpeg",i.AUDIO_WAV="audio/wav",i.AUDIO_OGG="audio/ogg",i.AUDIO_WEBM="audio/webm",i.AUDIO_AAC="audio/aac",i.VIDEO_MP4="video/mp4",i.VIDEO_MPEG="video/mpeg",i.VIDEO_OGG="video/ogg",i.VIDEO_WEBM="video/webm",i.VIDEO_QUICKTIME="video/quicktime",i))(Xe||{}),ke=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(ke||{});var qr=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r}=a$8(),[t,n]=useState(!1),[s,a]=useState(!1),[l,p]=useState(null),[c,d]=useState([]),x=useMemo(()=>c?.[0],[c]),I=s||t,v=useCallback(async E=>{if(!E.length){d([]),a(!1);return}a(!0);try{let P=(await Promise.all(E.map(async({url:R,id:U,name:C})=>{try{if(!R)return null;let u=await fetch(R);if(!u.ok)throw new Error(u.statusText);let b=await u.blob(),m=null;if(!C){let L=u.headers.get("content-disposition")||void 0;if(L){let w=_o(L);if(w)try{m=decodeURIComponent(w);}catch{m=w;}}}let _=m||C||U,O=new File([b],_,{type:b.type});return O.id=U,O.url=R,O}catch{return null}}))).filter(Boolean);d(P),a(!1);}catch(g){r(g,"Erro ao carregar arquivos"),d([]),a(!1);}},[r]),F=useRef("");useEffect(()=>{let E=o?.map(({id:g})=>g).join(",")||"";E!==F.current&&(async()=>(F.current=E,await v(o)))();},[o,v]);let A=async E=>{if(!E||!Array.isArray(E))throw new Error("Arquivos inv\xE1lidos");let g=E.filter(P=>P instanceof File);if(g?.length){n(!0);try{let P=g.map(u=>{let b=u.type||"application/octet-stream",m=ke[b];if(!m)throw new Error(`Tipo de arquivo n\xE3o suportado: ${b}`);return {file:u,mimeType:b,contentTypeEnum:m}}),R=await e({files:P.map(({file:u,contentTypeEnum:b})=>({content_type:b,name:u.name}))}).unwrap(),U=R.files.map((u,b)=>{let m=P[b].file,_=m;return _.id=u.id,_.url=URL.createObjectURL(m),_});return await(await Promise.all(R.files.map((u,b)=>{let{mimeType:m}=P[b],_=U[b];return fetch(u.url,{method:"PUT",headers:{"Content-Type":m,"Content-Disposition":`inline; filename="${_.name}"`,"X-File-Id":u.id},body:_})}))).forEach(async u=>{if(!u.ok)throw new Error("Erro no upload do arquivo.")}),U}catch(P){throw p(P),r(P,"Erro no upload"),P}finally{n(!1);}}},M=useMemo(()=>l&&l instanceof Error?l.message:l,[l]);return {setFilesPreview:d,uploadFiles:A,filesPreview:c,filePreview:x,isLoadingPreview:s,isUploadingFiles:t,isUploadOrLoadingFiles:I,uploadErrorText:M}},X=qr;var Kr=({sx:e,id:o,name:r,tabIndex:t,uploading:n,getRootProps:s,getInputProps:a,isDragActive:l,isError:p,disabled:c,dropZoneSxProps:d,dropZoneContent:x,children:I,...v})=>jsxs(ye,{children:[n&&jsx(a$7,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(Ee,{sx:{width:1,position:"relative",...e},children:[jsxs(ro,{...s(),"data-testid":"drop-zone-styled-area",isError:p,isDragActive:l,disabled:!!c,sx:d,...v,children:[jsx("input",{...a(),id:o,tabIndex:t,name:r}),x]}),I]})]}),ne=Kr;var Yr=({header:e,description:o,sx:r,...t})=>jsxs(ge,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...t,children:[jsx(a$5,{sx:{width:220}}),jsxs("div",{children:[jsx(qe,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(qe,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(qe,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),se=memo(Yr);var it=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:n=[],id:s,disabled:a,error:l,helperText:p,thumbnail:c,dropZoneSxProps:d,uploading:x,tabIndex:I,maxFiles:v,placeholderAlt:F,placeholderProps:A,...M})=>{let{filesPreview:E,isUploadOrLoadingFiles:g,uploadErrorText:P,uploadFiles:R}=X({createFilesMutation:t,filesDetails:n}),{files:U,dropzoneProps:C,handleRemove:u,handleReorder:b}=H({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:E,dropzoneOptions:{multiple:!0,disabled:a,...M},maxFiles:v,uploadFiles:R}),{getRootProps:m,getInputProps:_,isDragActive:O,isDragReject:L}=C,w=!!U?.filter(q=>!!q.id).length,$=L||!!l||!!P;return jsxs(ne,{id:s,uploading:x||g,disabled:a,dropZoneSxProps:d,tabIndex:I,getRootProps:m,getInputProps:_,isDragActive:O,isError:$,dropZoneContent:jsx(Fragment,{children:F?jsx(ge,{children:F}):jsx(se,{header:A?.header,description:A?.description})}),children:[jsx(S,{disabled:a,helperText:p,isError:$}),l?jsx(S,{helperText:l,isError:!0}):null,P?jsx(S,{helperText:P,isError:!0}):null,w&&jsx(Ee,{sx:{my:3},children:jsx(Ae,{files:U,thumbnail:!!c,onRemove:e?u:void 0,onReorder:o?b:void 0})})]})},at=memo(it);var ct=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:n=[],id:s,disabled:a,error:l,helperText:p,dropZoneSxProps:c,placeholderProps:d,placeholderAlt:x,uploading:I,tabIndex:v,maxFiles:F,aspectRatio:A,enableCrop:M=!0,convertToWebp:E=!0,cropSize:g,name:P,label:R,...U})=>{let{filesPreview:C,isUploadOrLoadingFiles:u,uploadErrorText:b,uploadFiles:m}=X({createFilesMutation:t,filesDetails:n}),_=I||u,{files:O,dropzoneProps:L,cropState:w,aspectRatio:$,handleRemove:q,handleReorder:ee}=H({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:C,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:a,...U},enableCrop:M,customAspectRatio:A,convertToWebp:E,maxFiles:F,cropSize:g,uploadFiles:m}),{getRootProps:oe,getInputProps:ae,isDragActive:pe,isDragReject:de}=L,{cropModalOpen:me,imagePreview:ce,cropLoading:N,onCropInitialized:V,handleCropSave:K,handleCropCancel:re,currentImageIndex:B,totalPendingImages:i}=w,W=!!O?.filter(h=>!!h.id).length,G=de||!!l||!!b,f=useMemo(()=>{let h=R??"Ajustar Imagem",D=i>1||B>1?` (${B} de ${i})`:"";return `${h}${D}`},[R,i,B]);return jsxs(ne,{id:s,name:P,uploading:_,disabled:a,dropZoneSxProps:c,tabIndex:v,getRootProps:oe,getInputProps:ae,isDragActive:pe,isError:G,dropZoneContent:jsx(Fragment,{children:x?jsx(ge,{children:x}):jsx(se,{header:d?.header,description:d?.description})}),children:[jsx(S,{disabled:a,helperText:p,isError:G}),l?jsx(S,{helperText:l,isError:!0}):null,b?jsx(S,{helperText:b,isError:!0}):null,W&&jsx(Ee,{sx:{my:3,ml:.5},children:jsx(Ae,{files:O,thumbnail:!0,onRemove:q,onReorder:o?ee:void 0})}),jsx(a$6,{open:me,onClose:re,label:f,imageSrc:ce,aspectRatio:$,onInitialized:V,onSave:K,loading:N,cropSize:g})]})},gt=memo(ct);var Pt=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:n,disabled:s,error:a,helperText:l,sx:p,dropZoneSxProps:c,uploading:d,tabIndex:x,...I})=>{let{filesPreview:v,isUploadOrLoadingFiles:F,uploadErrorText:A,uploadFiles:M}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),E=F||d,{file:g,dropzoneProps:P,handleRemove:R}=H({uploadFiles:M,onFileSelect:e$1,onRemove:o,filesPreview:v,dropzoneOptions:{multiple:!1,disabled:s,...I}}),{getRootProps:U,getInputProps:C,isDragActive:u,isDragReject:b}=P,m$1=useCallback(w=>{w.stopPropagation(),R(g||void 0);},[g,R]),_=!!g,O=typeof g=="string",L=b||!!a||!!A;return jsxs(ne,{id:n,uploading:E,disabled:s,dropZoneSxProps:c,tabIndex:x,getRootProps:U,getInputProps:C,isDragActive:u,isError:L,dropZoneContent:jsxs(Fragment,{children:[!_&&jsx(se,{}),_&&jsxs(ge,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:w=>`solid 1px ${w.palette.divider}`,...p},children:[jsx(Pe,{file:g}),jsxs(ge,{flexGrow:1,sx:{minWidth:0},children:[jsx(qe,{variant:"subtitle2",noWrap:!0,children:O?g:g.name}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:O?"":e(g.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(to,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:m$1,children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(S,{disabled:s,helperText:l,isError:L}),a?jsx(S,{helperText:a,isError:!0}):null,A?jsx(S,{helperText:A,isError:!0}):null]})},bt=memo(Pt);var Rt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:n,disabled:s,error:a,helperText:l,dropZoneSxProps:p,placeholderProps:c,placeholderAlt:d,uploading:x,tabIndex:I,aspectRatio:v,enableCrop:F=!0,convertToWebp:A=!0,name:M,label:E,cropSize:g,sx:P,maxWidth:R,maxHeight:U,...C})=>{let{filesPreview:u,isUploadOrLoadingFiles:b,uploadErrorText:m,uploadFiles:_}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),[O,L]=useState(!1),{file:w,dropzoneProps:$,cropState:q,handleRemove:ee,aspectRatio:oe}=H({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...C},filesPreview:u,enableCrop:F,customAspectRatio:v,convertToWebp:A,cropSize:g,uploadFiles:_}),{getRootProps:ae,getInputProps:pe,isDragActive:de,isDragReject:me}=$,{cropModalOpen:ce,imagePreview:N,cropLoading:V,onCropInitialized:K,handleCropSave:re,handleCropCancel:B}=q,i=useCallback(()=>{ee(w||void 0);},[w,ee]),W=!!w,G=me||!!a||!!m,f=x||b,h=W?{opacity:0}:{opacity:1},D=p?.width;return useEffect(()=>{W||L(!1);},[W]),jsxs(ye,{sx:{...P,...D&&{width:D}},children:[(f||O)&&jsx(a$7,{}),jsxs(ne,{id:n,uploading:f,disabled:s,dropZoneSxProps:p,tabIndex:I,getRootProps:ae,getInputProps:pe,isDragActive:de,isError:G,name:M,dropZoneContent:jsxs(Fragment,{children:[d?jsx(ge,{sx:h,children:d}):jsx(se,{sx:h,header:c?.title,description:c?.description}),W&&jsx(Ze,{file:w,cropSize:g,isLoading:O,isUploading:f,onLoading:L,aspectRatio:oe,maxWidth:R,maxHeight:U})]}),children:[jsx(S,{disabled:s,helperText:l,isError:G}),a?jsx(S,{helperText:a,isError:!0}):null,m?jsx(S,{helperText:m,isError:!0}):null,W&&e&&jsx(no,{size:"small",onClick:i,disabled:s,label:"Remover arquivo",children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$6,{open:ce,onClose:B,label:E??"Ajustar Imagem",imageSrc:N,aspectRatio:oe,onInitialized:K,onSave:re,loading:V,cropSize:g})]})]})},_t=memo(Rt);var Mt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:n,label:s,id:a,tabIndex:l,error:p,helperText:c,sx:d,name:x,maxSize:I,uploading:v,aspectRatio:F=1,enableCrop:A=!0,convertToWebp:M=!0,cropSize:E,...g})=>{let[P,R]=useState(!1),{filesPreview:U,isUploadOrLoadingFiles:C,uploadErrorText:u,uploadFiles:b}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:m,dropzoneProps:_,cropState:O,handleRemove:L}=H({filesPreview:U,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:n,maxSize:I,...g},enableCrop:A,customAspectRatio:F,convertToWebp:M,cropSize:E,uploadFiles:b}),{getRootProps:w,getInputProps:$,isDragActive:q,isDragReject:ee}=_,{cropModalOpen:oe,imagePreview:ae,cropLoading:pe,onCropInitialized:de,handleCropSave:me,handleCropCancel:ce}=O,N=ee||!!p||!!u,V=P||C||v,K=!!e,re=useRef(t?.url||""),B=useRef();useEffect(()=>{if(!m){re.current="",B.current=void 0;return}if(B.current===m.id)return;B.current=m.id,R(!0);let G=URL.createObjectURL(m);return re.current=G,()=>{URL.revokeObjectURL(G);}},[m]);let i=()=>{R(!1);},W=useCallback(()=>K&&m?()=>L(m):w().onClick,[K,m,w,L]);return jsxs(Fragment,{children:[jsxs(ge,{sx:{alignItems:"center"},children:[jsxs(uo,{sx:d,isError:N,isDragActive:q,hasFile:!!m,...w(),onClick:W(),children:[jsxs(co,{children:[V&&jsx(go,{children:jsx(Lt,{size:135,thickness:2,color:"primary"})}),m&&jsx(fo,{alt:"Avatar Preview",src:re.current,onLoad:i,...V&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!m&&!V&&jsxs(je,{isError:N,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:N?"error.main":"text.disabled"},children:"Adicionar foto"})]}),m&&!V&&jsxs(je,{isError:N,hasFile:!0,children:[jsx(a$4,{icon:K?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:N?"error.main":"common.white"},children:K?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:x,id:a,tabIndex:l,...$()})]}),jsx(ge,{sx:{alignItems:"center",mt:-.5},children:jsx(S,{helperText:c,disabled:n,isError:N})}),u?jsx(S,{helperText:u,isError:!0}):null,p?jsx(S,{helperText:p,isError:!0}):null]}),oe&&ae&&jsx(a$6,{open:oe,onClose:ce,label:s??"Ajustar Imagem",imageSrc:ae,aspectRatio:F,onInitialized:de,onSave:me,loading:pe,cropSize:E,cropShape:"round"})]})},Ct=memo(Mt);var Bt=({error:e,name:o,disabled:r,sx:t,...n})=>{let{getRootProps:s,getInputProps:a,isDragActive:l,isDragReject:p}=useDropzone({disabled:r,...n}),c=p||e;return jsxs(so,{...s(),isDragActive:l,hasError:!!c,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...a()}),"Selecionar arquivo"]})},Wt=memo(Bt);
|
|
37
37
|
|
|
38
38
|
export { Xe as ContentType, ke as FileContentType, Pe as FileThumbnail, S as HelperText, Ae as MultiFilePreview, at as MultipleFileUpload, gt as MultipleImageUpload, Ze as SingleFilePreview, bt as SingleFileUpload, _t as SingleImageUpload, Ct as UploadAvatar, Wt as UploadSimpleBox, Ro as convertToWebP, He as fileFormat, Vi as fileNameByUrl, Do as fileThumb, Ce as fileThumbnailClasses, wo as fileTypeByUrl, _o as getFileNameFromContentDisposition, na as isImageFile, H as useDropzoneUploader, X as useFileUploadService };
|
|
@@ -7,11 +7,12 @@ type FrameSkeletonProps = {
|
|
|
7
7
|
subtitle?: ReactNode;
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
sections: SectionProps[];
|
|
10
|
+
showLeftContent?: boolean;
|
|
10
11
|
headerLeftContent?: ReactNode;
|
|
11
12
|
headerRightContent?: ReactNode;
|
|
12
13
|
onClickBack: VoidFunction;
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
declare const FrameSkeleton: ({ title, subtitle, children, sections, headerLeftContent, headerRightContent, onClickBack, }: FrameSkeletonProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare const FrameSkeleton: ({ title, subtitle, children, sections, headerLeftContent, headerRightContent, showLeftContent, onClickBack, }: FrameSkeletonProps) => react_jsx_runtime.JSX.Element;
|
|
16
17
|
|
|
17
18
|
export { FrameSkeleton as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from '../../chunk-
|
|
1
|
+
import { a } from '../../chunk-4QRHLV4A.js';
|
|
2
2
|
import { a as a$2 } from '../../chunk-26GV7WKC.js';
|
|
3
3
|
import { a as a$3 } from '../../chunk-P26W2RT7.js';
|
|
4
4
|
import '../../chunk-QGFD5EQE.js';
|
|
@@ -8,13 +8,13 @@ import '../../chunk-QQDMA4TE.js';
|
|
|
8
8
|
import '../../chunk-Z2TDWMRU.js';
|
|
9
9
|
import '../../chunk-4INDXVIX.js';
|
|
10
10
|
import '../../chunk-3APKMSVD.js';
|
|
11
|
-
import
|
|
11
|
+
import P from '@mui/material/IconButton';
|
|
12
12
|
import i from '@mui/material/Stack';
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { styled
|
|
13
|
+
import p from '@mui/material/Typography';
|
|
14
|
+
import O from '@mui/material/Button';
|
|
15
|
+
import { styled } from '@mui/material/styles';
|
|
16
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var S=styled(i)(({theme:t})=>({backgroundColor:t.palette.background.paper,maxWidth:300,flex:1,borderRight:`1px solid ${t.palette.divider}`,[t.breakpoints.down("md")]:{display:"none"}})),b=styled(i)({position:"sticky",top:"calc(var(--sticky-header-height, 64px))",height:"calc(100vh - var(--sticky-header-height, 64px))"}),u=styled(i)(({theme:t})=>({flex:1,width:"100%",[t.breakpoints.up("md")]:{maxWidth:"calc(100% - 300px)"}})),k=styled(i)(({theme:t})=>({position:"sticky",top:"var(--sticky-header-height, 64px)",flexDirection:"row",alignItems:"center",backgroundColor:t.palette.background.paper,zIndex:999,width:"100%",padding:"12px 24px",height:64,gap:12,[t.breakpoints.down("md")]:{padding:"14px 16px",gap:6},borderBottom:`1px solid ${t.palette.divider}`})),y=styled(O)(({theme:t})=>({height:50,background:"none",fontSize:13,fontWeight:400,justifyContent:"flex-start",padding:"12px 8px",color:t.palette.text.secondary,borderBottom:`1px dashed ${t.palette.divider}`,borderRadius:0,gap:4,"&:hover":{backgroundColor:"transparent"},"& .required":{color:t.palette.error.main}})),d=styled(i)(({theme:t})=>({flex:1,flexDirection:"row",alignItems:"center",gap:24,"&.header-left-content":{justifyContent:"flex-start",marginLeft:12},[t.breakpoints.down("md")]:{gap:8,flex:"initial","& button, & a":{display:"flex",textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:"auto"}},"&.header-left-content":{justifyContent:"flex-end",marginLeft:"auto",marginRight:-6,"& label":{marginRight:0},"& .MuiTypography-root":{display:"none"}}}})),C=styled(i)(({theme:t})=>({flex:1,width:"100%",padding:24,gap:24,alignItems:"center",overflow:"hidden",[t.breakpoints.down("md")]:{padding:"24px 16px"}})),v=styled(i)(({theme:t})=>({alignItems:"start",width:"100%",maxWidth:700,[t.breakpoints.down("md")]:{maxWidth:"100%"}})),w=styled(a)(({theme:t})=>({width:"100%",borderRadius:12,gap:12,[t.breakpoints.down("md")]:{padding:"24px 16px"}})),T=styled(p)(({theme:t})=>({color:t.palette.grey[800],fontSize:18,fontWeight:700})),W=styled(p)(({theme:t})=>({color:t.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24}));var j=({title:t,subtitle:l,children:B,sections:c,headerLeftContent:I,headerRightContent:R,showLeftContent:L=!0,onClickBack:H})=>(a$1(!0),jsxs(i,{direction:"row",flex:1,children:[L&&jsx(S,{id:"frame-skeleton-left-box",children:jsx(b,{children:jsx(a$2,{fillContent:!0,sx:{p:3},children:jsxs(i,{gap:1.5,children:[jsx(p,{variant:"overline",color:"text.disabled",fontWeight:700,pl:1,children:"ACESSO R\xC1PIDO"}),jsx(i,{children:c.map(o=>jsxs(y,{onClick:()=>{o.ref.current&&o.ref.current.scrollIntoView({block:"center",behavior:"smooth"});},children:[o.title,o.isRequired&&jsx("span",{className:"required",children:"*"})]},o.title))})]})})})}),jsxs(u,{children:[jsxs(k,{children:[jsx(P,{color:"inherit",onClick:()=>H(),"data-testid":"backToPreviousPage","aria-label":"Voltar",children:jsx(a$3,{icon:"CHEVRON_LEFT"})}),jsxs(i,{overflow:"hidden",children:[jsx(p,{variant:"subtitle1",noWrap:!0,component:"div",children:t}),l&&jsx(p,{variant:"caption",color:"text.secondary",noWrap:!0,component:"div",children:l})]}),jsx(d,{className:"header-left-content",children:I}),jsx(d,{justifyContent:"flex-end",color:"text.secondary",children:R})]}),jsxs(C,{children:[B,c.map((o,z)=>{let s=o.id||`section-${z}`;return jsxs(v,{id:s,children:[o.title&&jsx(T,{ref:o.ref,children:o.title}),o.subTitle&&jsx(W,{children:o.subTitle}),jsx(w,{children:o.child})]},o.title||s)})]})]})]})),Q=j;
|
|
19
19
|
|
|
20
|
-
export {
|
|
20
|
+
export { Q as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-SKVPLI5W.js';
|
|
2
|
+
import '../../chunk-V2UHZWRE.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as a$2 } from '../../chunk-Q7HPO5OB.js';
|
|
2
2
|
import { a as a$1 } from '../../chunk-TWGGHTU5.js';
|
|
3
|
-
import { o, a, f, k as k$1 } from '../../chunk-
|
|
3
|
+
import { o, a, f, k as k$1 } from '../../chunk-EEQLNUZR.js';
|
|
4
4
|
import '../../chunk-P26W2RT7.js';
|
|
5
5
|
import '../../chunk-QGFD5EQE.js';
|
|
6
|
-
import '../../chunk-
|
|
6
|
+
import '../../chunk-V2UHZWRE.js';
|
|
7
7
|
import { Fragment } from 'react';
|
|
8
8
|
import k from '@mui/material/Stack';
|
|
9
9
|
import { styled } from '@mui/material/styles';
|
|
@@ -8,6 +8,6 @@ import r from '@mui/material/Typography';
|
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var k=styled(p)(({theme:a})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:a.palette.background.default,border:`1px solid ${a.palette.grey[300]}`})),P=styled(o)(({theme:a})=>({minHeight:180,maxWidth:700,border:`4px dotted ${a.palette.grey[300]}`,borderRadius:8,backgroundColor:
|
|
11
|
+
var k=styled(p)(({theme:a})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:a.palette.background.default,border:`1px solid ${a.palette.grey[300]}`})),P=styled(o)(({theme:a})=>({minHeight:180,maxWidth:700,border:`4px dotted ${a.palette.grey[300]}`,borderRadius:8,backgroundColor:a.palette.background.paper,padding:24})),I=styled(p)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),S=styled(p)(({theme:a})=>({backgroundColor:a.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),v=styled(o)(({theme:a})=>({border:`4px dotted ${a.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),B=styled(p)(({theme:a})=>({width:"100%",aspectRatio:16/9,overflow:"hidden",padding:2,borderBottom:`4px dotted ${a.palette.grey[300]}`}));var R=({titlePreview:a$2,logoImage:g,brandingName:L,url:m,title:x,description:h,keyWords:w,customTitles:y,productImage:b,child:C,previewLinkImage:u,hasPreviewLink:T})=>jsx(k,{children:jsxs(o,{gap:3,display:"flex",flex:1,children:[jsx(r,{variant:"overline",color:"text.disabled",children:a$2??"PR\xC9-VISUALIZA\xC7\xC3O"}),jsxs(P,{children:[jsxs(o,{direction:"row",pb:3,gap:.5,children:[jsx(p,{height:0,width:10,children:jsx(a,{icon:"CIRCLE",width:30,color:"error.main"})}),jsx(p,{height:0,width:10,children:jsx(a,{icon:"CIRCLE",width:30,color:"warning.main"})}),jsx(p,{height:0,width:10,children:jsx(a,{icon:"CIRCLE",width:30,color:"success.main"})})]}),jsxs(o,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[jsxs(o,{gap:1,width:"100%",children:[jsxs(o,{direction:"row",gap:1.5,pb:.5,children:[g&&jsx(I,{children:jsx("img",{alt:"Logo",src:g})}),jsxs(o,{children:[jsx(r,{variant:"overline",color:"grey.600",pb:.5,children:L??"SUAEMPRESA"}),jsxs(o,{direction:"row",gap:2,children:[jsx(r,{variant:"caption",color:"grey.600",children:m??"https://www.exemplo.com"}),jsx(a,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),jsx(a$1,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:x??"Suampresa | P\xE1scoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),jsx(a$1,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:5,children:h??"A P\xE1scoa chegou e a Sua Empresa est\xE1 com ofertas chocantes em tecnologia! Descontos de at\xE9 50% em notebooks, smartphones, tablets e muito mais!"}),w&&jsx(o,{direction:"row",gap:1,alignItems:"center",children:w.map((s,d)=>jsxs(o,{direction:"row",gap:1,alignItems:"center",children:[jsx(r,{variant:"caption",color:"text.disabled",children:s}),d<w.length-1&&jsx(p,{width:4,height:16,children:jsx(a,{icon:"CIRCLE",color:"text.disabled",width:10})})]},`keyword-${d}`))}),y&&jsx(o,{pt:2,children:y.map((s,d)=>jsxs(o,{gap:1,children:[jsx(r,{variant:"subtitle1",color:"#4E5BEC",children:s.title}),jsx(a$1,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:s.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},d))}),C]}),b&&jsx(S,{children:jsx("img",{alt:"ProductImage",src:b})})]})]}),T&&jsxs(o,{gap:3,display:"flex",flex:1,width:"100%",children:[jsx(r,{variant:"overline",color:"text.disabled",children:"pr\xE9-visualiza\xE7\xE3o link de compartilhamento".toUpperCase()}),jsxs(v,{children:[u&&jsx(B,{children:jsx("img",{alt:"PreviewLinkImage",src:u,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),jsxs(o,{gap:.2,p:2,width:"100%",children:[jsx(r,{variant:"caption",children:x??"Suampresa | P\xE1scoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),jsx(r,{variant:"caption",color:"grey.600",children:h??"A P\xE1scoa chegou e a Sua Empresa est\xE1 com ofertas chocantes em tecnologia! Descontos de at\xE9 50% em notebooks, smartphones, tablets e muito mais!"}),jsx(r,{variant:"caption",color:"grey.500",children:m??"https://www.exemplo.com"})]})]}),jsx(v,{children:jsxs(o,{direction:"row",gap:1,alignItems:"center",children:[jsx(p,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:jsx("img",{alt:"Logo",src:g,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),jsxs(o,{padding:1,gap:.2,width:"80%",children:[jsx(a$1,{variant:"caption",children:x??"Suampresa | P\xE1scoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),jsx(a$1,{variant:"caption",color:"grey.600",children:h??"A P\xE1scoa chegou e a Sua Empresa est\xE1 com ofertas chocantes em tecnologia! Descontos de at\xE9 50% em notebooks, smartphones, tablets e muito mais!"}),jsx(a$1,{variant:"caption",color:"grey.500",line:1,children:m??"https://www.exemplo.com"})]})]})})]})]})}),U=R;
|
|
12
12
|
|
|
13
13
|
export { U as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from '@mui/material/Stack';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var o=styled(
|
|
5
|
+
var o=styled(a)(({theme:r})=>({backgroundColor:r.palette.background.paper,border:`1px solid ${r.palette.divider}`,borderRadius:12}));var d=({children:r,...p})=>jsx(o,{borderRadius:2,gap:1.25,p:3,...p,children:r}),m=d;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { m as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j } from '../../chunk-V2UHZWRE.js';
|
|
2
2
|
import t from '@mui/material/Box';
|
|
3
3
|
import { m } from 'framer-motion';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var l=({children:s,sx:r,...n})=>jsx(t,{sx:{overflow:"hidden"},children:jsx(t,{"data-testid":"splash-outer-box",sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"fixed",alignItems:"center",justifyContent:"center",bgcolor:"background.default",...r},...n,children:jsxs(t,{"data-testid":"splash-inner-box",sx:{width:120,height:120,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...r},...n,children:[jsx(m.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,repeatDelay:1,repeat:1/0,ease:"easeInOut"},style:{display:"inline-flex"},children:s}),jsx(t,{component:m.div,animate:{scale:[1.6,1,1,1.6,1.6],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{position:"absolute",width:"calc(100% - 20px)",height:"calc(100% - 20px)",border:i=>`solid 3px ${
|
|
6
|
+
var l=({children:s,sx:r,...n})=>jsx(t,{sx:{overflow:"hidden"},children:jsx(t,{"data-testid":"splash-outer-box",sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"fixed",alignItems:"center",justifyContent:"center",bgcolor:"background.default",...r},...n,children:jsxs(t,{"data-testid":"splash-inner-box",sx:{width:120,height:120,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...r},...n,children:[jsx(m.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,repeatDelay:1,repeat:1/0,ease:"easeInOut"},style:{display:"inline-flex"},children:s}),jsx(t,{component:m.div,animate:{scale:[1.6,1,1,1.6,1.6],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{position:"absolute",width:"calc(100% - 20px)",height:"calc(100% - 20px)",border:i=>`solid 3px ${j(i.vars.palette.primary.darkChannel,.24)}`}}),jsx(t,{component:m.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:1,height:1,position:"absolute",border:i=>`solid 8px ${j(i.vars.palette.primary.darkChannel,.24)}`}})]})})}),x=l;
|
|
7
7
|
|
|
8
8
|
export { x as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { d } from '../../chunk-WUQSPJPN.js';
|
|
2
|
-
import { a as a$3 } from '../../chunk-
|
|
3
|
-
import { a as a$2 } from '../../chunk-
|
|
2
|
+
import { a as a$3 } from '../../chunk-SKVPLI5W.js';
|
|
3
|
+
import { a as a$2 } from '../../chunk-4QRHLV4A.js';
|
|
4
4
|
import { a } from '../../chunk-X2EIL7EB.js';
|
|
5
5
|
import { a as a$4 } from '../../chunk-P26W2RT7.js';
|
|
6
6
|
import '../../chunk-QGFD5EQE.js';
|
|
7
7
|
import { a as a$1 } from '../../chunk-ORYAES3Q.js';
|
|
8
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-V2UHZWRE.js';
|
|
9
9
|
import E from '@mui/material/Button';
|
|
10
10
|
import N from '@mui/material/FormControlLabel';
|
|
11
11
|
import O from '@mui/material/IconButton';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { P as PanelProps } from '../../props-a62a2c29.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@mui/material/Stack';
|
|
5
5
|
|
|
6
|
-
declare const WhiteBox: (
|
|
6
|
+
declare const WhiteBox: (props: PanelProps) => react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
8
8
|
export { WhiteBox as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-4QRHLV4A.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { j as ArrowButton, f as Carousel, g as CarouselArrowBasicButtons, i as CarouselArrowFloatButtons, h as CarouselArrowNumberButtons, k as CarouselDotButtons, l as CarouselProgressBar, c as CarouselSlide, n as CarouselThumb, m as CarouselThumbs, e as StyledContainer, d as StyledRoot, a as carouselBreakpoints, b as carouselClasses, o as useCarousel } from '../../chunk-
|
|
1
|
+
export { j as ArrowButton, f as Carousel, g as CarouselArrowBasicButtons, i as CarouselArrowFloatButtons, h as CarouselArrowNumberButtons, k as CarouselDotButtons, l as CarouselProgressBar, c as CarouselSlide, n as CarouselThumb, m as CarouselThumbs, e as StyledContainer, d as StyledRoot, a as carouselBreakpoints, b as carouselClasses, o as useCarousel } from '../../chunk-EEQLNUZR.js';
|
|
2
2
|
import '../../chunk-P26W2RT7.js';
|
|
3
3
|
import '../../chunk-QGFD5EQE.js';
|
|
4
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-V2UHZWRE.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-VGBOXRXD.js';
|
|
2
|
+
import '../../../chunk-FM2MGTJJ.js';
|
|
3
3
|
import '../../../chunk-2IY4TQAU.js';
|
|
4
4
|
import '../../../chunk-ANAHA3L6.js';
|
|
5
5
|
import '../../../chunk-YYZAP6KG.js';
|
|
@@ -10,7 +10,7 @@ import '../../../chunk-P26W2RT7.js';
|
|
|
10
10
|
import '../../../chunk-QGFD5EQE.js';
|
|
11
11
|
import '../../../chunk-KFZEM7KS.js';
|
|
12
12
|
import '../../../chunk-W3MYAMTH.js';
|
|
13
|
-
import '../../../chunk-
|
|
13
|
+
import '../../../chunk-V2UHZWRE.js';
|
|
14
14
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
15
15
|
import W from '@mui/material/FormHelperText';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-UIKMO2ZR.js';
|
|
2
|
+
import '../../../chunk-FM2MGTJJ.js';
|
|
3
3
|
import '../../../chunk-2IY4TQAU.js';
|
|
4
4
|
import '../../../chunk-H5L4ARDB.js';
|
|
5
5
|
import '../../../chunk-ANAHA3L6.js';
|
|
@@ -16,7 +16,7 @@ import '../../../chunk-QGFD5EQE.js';
|
|
|
16
16
|
import '../../../chunk-ILHUUK4X.js';
|
|
17
17
|
import '../../../chunk-KFZEM7KS.js';
|
|
18
18
|
import '../../../chunk-W3MYAMTH.js';
|
|
19
|
-
import '../../../chunk-
|
|
19
|
+
import '../../../chunk-V2UHZWRE.js';
|
|
20
20
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
21
21
|
import b from '@mui/material/FormHelperText';
|
|
22
22
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
3
|
-
import { o } from '../../chunk-
|
|
4
|
-
export { p as RejectionFiles } from '../../chunk-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-VGBOXRXD.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-UIKMO2ZR.js';
|
|
3
|
+
import { o } from '../../chunk-FM2MGTJJ.js';
|
|
4
|
+
export { p as RejectionFiles } from '../../chunk-FM2MGTJJ.js';
|
|
5
5
|
import '../../chunk-2IY4TQAU.js';
|
|
6
6
|
import '../../chunk-H5L4ARDB.js';
|
|
7
7
|
import '../../chunk-ANAHA3L6.js';
|
|
@@ -17,7 +17,7 @@ import '../../chunk-QGFD5EQE.js';
|
|
|
17
17
|
import '../../chunk-ILHUUK4X.js';
|
|
18
18
|
import '../../chunk-KFZEM7KS.js';
|
|
19
19
|
import '../../chunk-W3MYAMTH.js';
|
|
20
|
-
import '../../chunk-
|
|
20
|
+
import '../../chunk-V2UHZWRE.js';
|
|
21
21
|
import { useDropzone } from 'react-dropzone';
|
|
22
22
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
23
23
|
|
|
@@ -286,10 +286,13 @@ declare const components: {
|
|
|
286
286
|
MuiTimelineDot: {
|
|
287
287
|
defaultProps?: Partial<_mui_lab_TimelineDot.TimelineDotProps> | undefined;
|
|
288
288
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<keyof _mui_lab_TimelineDot.TimelineDotClasses, "MuiTimelineDot", {
|
|
289
|
-
|
|
289
|
+
cssVarPrefix: string;
|
|
290
|
+
zIndex: _mui_material.ZIndex;
|
|
291
|
+
direction: _mui_system.Direction;
|
|
292
|
+
opacity: _mui_material.Opacity;
|
|
293
|
+
typography: _mui_material.TypographyVariants;
|
|
290
294
|
palette: _mui_material.Palette;
|
|
291
295
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
292
|
-
cssVarPrefix: string;
|
|
293
296
|
vars: _mui_material.ThemeVars;
|
|
294
297
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
295
298
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -300,16 +303,13 @@ declare const components: {
|
|
|
300
303
|
spacing: _mui_system.Spacing;
|
|
301
304
|
breakpoints: _mui_system.Breakpoints;
|
|
302
305
|
shape: _mui_system.Shape;
|
|
303
|
-
|
|
306
|
+
transitions: _mui_material.Transitions;
|
|
304
307
|
shadows: _mui_material.Shadows;
|
|
305
308
|
mixins: _mui_material.Mixins;
|
|
306
|
-
zIndex: _mui_material.ZIndex;
|
|
307
|
-
direction: _mui_system.Direction;
|
|
308
309
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
309
310
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
310
311
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
311
312
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
312
|
-
opacity: _mui_material.Opacity;
|
|
313
313
|
overlays: _mui_material.Overlays;
|
|
314
314
|
customShadows: CustomShadows;
|
|
315
315
|
unstable_strictMode?: boolean | undefined;
|
|
@@ -326,10 +326,13 @@ declare const components: {
|
|
|
326
326
|
MuiTimelineConnector: {
|
|
327
327
|
defaultProps?: Partial<_mui_lab_TimelineConnector.TimelineConnectorProps> | undefined;
|
|
328
328
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<"root", "MuiTimelineConnector", {
|
|
329
|
-
|
|
329
|
+
cssVarPrefix: string;
|
|
330
|
+
zIndex: _mui_material.ZIndex;
|
|
331
|
+
direction: _mui_system.Direction;
|
|
332
|
+
opacity: _mui_material.Opacity;
|
|
333
|
+
typography: _mui_material.TypographyVariants;
|
|
330
334
|
palette: _mui_material.Palette;
|
|
331
335
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
332
|
-
cssVarPrefix: string;
|
|
333
336
|
vars: _mui_material.ThemeVars;
|
|
334
337
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
335
338
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -340,16 +343,13 @@ declare const components: {
|
|
|
340
343
|
spacing: _mui_system.Spacing;
|
|
341
344
|
breakpoints: _mui_system.Breakpoints;
|
|
342
345
|
shape: _mui_system.Shape;
|
|
343
|
-
|
|
346
|
+
transitions: _mui_material.Transitions;
|
|
344
347
|
shadows: _mui_material.Shadows;
|
|
345
348
|
mixins: _mui_material.Mixins;
|
|
346
|
-
zIndex: _mui_material.ZIndex;
|
|
347
|
-
direction: _mui_system.Direction;
|
|
348
349
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
349
350
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
350
351
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
351
352
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
352
|
-
opacity: _mui_material.Opacity;
|
|
353
353
|
overlays: _mui_material.Overlays;
|
|
354
354
|
customShadows: CustomShadows;
|
|
355
355
|
unstable_strictMode?: boolean | undefined;
|
|
@@ -1013,9 +1013,9 @@ declare const basePalette: {
|
|
|
1013
1013
|
common: {
|
|
1014
1014
|
[x: string]: string;
|
|
1015
1015
|
};
|
|
1016
|
-
divider: string;
|
|
1017
1016
|
};
|
|
1018
1017
|
declare const lightPalette: {
|
|
1018
|
+
divider: string;
|
|
1019
1019
|
text: {
|
|
1020
1020
|
[x: string]: string;
|
|
1021
1021
|
};
|
|
@@ -1056,11 +1056,12 @@ declare const lightPalette: {
|
|
|
1056
1056
|
common: {
|
|
1057
1057
|
[x: string]: string;
|
|
1058
1058
|
};
|
|
1059
|
-
divider: string;
|
|
1060
1059
|
};
|
|
1061
1060
|
declare const darkPalette: {
|
|
1061
|
+
divider: string;
|
|
1062
1062
|
text: {
|
|
1063
|
-
|
|
1063
|
+
secondary: string;
|
|
1064
|
+
disabled: string;
|
|
1064
1065
|
};
|
|
1065
1066
|
background: {
|
|
1066
1067
|
[x: string]: string;
|
|
@@ -1099,7 +1100,6 @@ declare const darkPalette: {
|
|
|
1099
1100
|
common: {
|
|
1100
1101
|
[x: string]: string;
|
|
1101
1102
|
};
|
|
1102
|
-
divider: string;
|
|
1103
1103
|
};
|
|
1104
1104
|
declare const colorSchemes: Partial<Record<'dark' | 'light', ColorSystemOptions>>;
|
|
1105
1105
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as CustomShadows } from './index-
|
|
2
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-
|
|
1
|
+
import { C as CustomShadows } from './index-1d50facd.js';
|
|
2
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-1d50facd.js';
|
|
3
3
|
export { S as SettingsContextValue, _ as SettingsProvider, T as ThemeProviderProps, u as useSettingsContext } from './settings-provider-570069f1.js';
|
|
4
4
|
export { default as ThemeProvider } from './theme/theme-provider.js';
|
|
5
5
|
import { S as SettingsState } from './settings-5a31f5b8.js';
|
|
6
6
|
import { Theme as Theme$1 } from '@mui/material/styles';
|
|
7
7
|
import { a as ThemeLocaleComponents } from './types-2a4efc17.js';
|
|
8
|
-
export { BgBlurProps, BgGradientProps, BorderGradientProps, ColorWithAlpha, MaxLineProps, MediaFontSize, bgBlur, bgGradient, borderGradient, createPaletteChannel,
|
|
8
|
+
export { BgBlurProps, BgGradientProps, BorderGradientProps, ColorWithAlpha, MaxLineProps, MediaFontSize, bgBlur, bgGradient, borderGradient, createPaletteChannel, hexToRgbChannel, hexToRgbaChannel, hideScrollX, hideScrollY, maxLine, mediaQueries, menuItem, paper, pxToRem, remToPx, responsiveFontSizes, setFont, stylesMode, textGradient, varAlpha } from './theme/styles/index.js';
|
|
9
9
|
import '@mui/lab/TimelineConnector';
|
|
10
10
|
import '@mui/system';
|
|
11
11
|
import '@mui/lab/TimelineDot';
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { b as ThemeProvider, a as createTheme } from './chunk-
|
|
1
|
+
export { b as ThemeProvider, a as createTheme } from './chunk-3CYQV3UB.js';
|
|
2
2
|
import './chunk-SO64ZYQB.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-JB5LMSRD.js';
|
|
4
4
|
import './chunk-CFVUZ4S5.js';
|
|
5
5
|
import './chunk-GUFT6XPG.js';
|
|
6
|
-
export { c as SettingsProvider, b as useSettingsContext } from './chunk-
|
|
7
|
-
export { b as defaultFont, c as primaryFont, d as secondaryFont, a as shadows, e as typography } from './chunk-
|
|
8
|
-
export { l as action, k as background, m as basePalette, p as colorSchemes, i as common, a as components, q as createShadowColor, r as customShadows, o as darkPalette, h as error, b as grey, e as info, n as lightPalette, c as primary, d as secondary, f as success, j as text, g as warning } from './chunk-
|
|
9
|
-
export {
|
|
6
|
+
export { c as SettingsProvider, b as useSettingsContext } from './chunk-D6MGCVOI.js';
|
|
7
|
+
export { b as defaultFont, c as primaryFont, d as secondaryFont, a as shadows, e as typography } from './chunk-UF3ZODG6.js';
|
|
8
|
+
export { l as action, k as background, m as basePalette, p as colorSchemes, i as common, a as components, q as createShadowColor, r as customShadows, o as darkPalette, h as error, b as grey, e as info, n as lightPalette, c as primary, d as secondary, f as success, j as text, g as warning } from './chunk-LBOAQZCG.js';
|
|
9
|
+
export { p as bgBlur, o as bgGradient, n as borderGradient, i as createPaletteChannel, g as hexToRgbChannel, h as hexToRgbaChannel, k as hideScrollX, l as hideScrollY, q as maxLine, b as mediaQueries, s as menuItem, r as paper, e as pxToRem, d as remToPx, f as responsiveFontSizes, c as setFont, a as stylesMode, m as textGradient, j as varAlpha } from './chunk-V2UHZWRE.js';
|
|
10
10
|
import './chunk-QQDMA4TE.js';
|
|
11
11
|
import './chunk-Z2TDWMRU.js';
|
|
12
12
|
import './chunk-4INDXVIX.js';
|
|
13
13
|
import './chunk-3APKMSVD.js';
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var X=()=>!0;
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { X as test };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StackProps } from '@mui/material/Stack';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface PanelProps extends StackProps {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { PanelProps as P };
|