@zydon/common 2.5.14 → 2.5.16
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-FZ4WZF6K.js +11 -0
- package/dist/chunk-ISYQXE75.js +15 -0
- package/dist/chunk-JEBRSFLS.js +9 -0
- package/dist/{chunk-GVJPNJEL.js → chunk-RBHRP2UE.js} +1 -1
- package/dist/{chunk-OYK7T66A.js → chunk-XAJTYCRG.js} +2 -2
- package/dist/components/DragButton/index.js +1 -1
- package/dist/components/FileUpload/index.js +2 -2
- package/dist/components/FrameSkeleton/index.js +1 -1
- package/dist/components/IconButton/index.js +1 -1
- package/dist/components/form/DateRangePicker/index.d.ts +1 -1
- package/dist/components/form/DateRangePicker/index.js +4 -4
- package/dist/components/form/Password/index.d.ts +2 -1
- package/dist/components/form/Password/index.js +4 -4
- package/dist/components/form/UploadAvatarWithCrop/index.js +2 -2
- package/dist/components/form/UploadWithCrop/index.js +3 -3
- package/dist/components/upload/index.js +5 -5
- package/dist/types/dateRangePickerProps.d.ts +0 -1
- package/package.json +1 -1
- package/dist/chunk-7WCRRQEW.js +0 -15
- package/dist/chunk-DXACBPEV.js +0 -9
- package/dist/chunk-YXH2ZKVS.js +0 -11
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { a } from './chunk-MAK4JF5M.js';
|
|
2
|
+
import { forwardRef, useMemo } from 'react';
|
|
3
|
+
import p from '@mui/material/Box';
|
|
4
|
+
import S from '@mui/material/CircularProgress';
|
|
5
|
+
import b from '@mui/material/IconButton';
|
|
6
|
+
import k from '@mui/material/Tooltip';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var f=forwardRef(({icon:t,label:i,color:s="primary",loading:e=!1,disabled:B=!1,boxProps:n={},tooltipProps:I={},iconProps:c={},disableTooltip:d=!1,children:r,...h},M)=>{if(!t&&!r)throw new Error("IconButton: icon or children is required");let a$1=useMemo(()=>t?jsx(a,{icon:t,...c}):r,[t,r,c]),T=useMemo(()=>e?jsx(S,{size:20,color:"inherit"}):a$1,[e,a$1]),l=jsx(b,{ref:M,"aria-label":i,color:"inherit",disabled:e||B,...h,children:T});return d?jsx(p,{...n,color:s,children:l}):jsx(p,{...n,color:s,sx:{...n.sx,"@media (pointer:coarse)":{userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",touchAction:"none","&:active":{pointerEvents:"none"}}},children:jsx(k,{"data-testid":"button-tooltip",...I,title:i,children:jsx("span",{children:l})})})});f.displayName="IconButton";var v=f;
|
|
10
|
+
|
|
11
|
+
export { v as a };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { e } from './chunk-ANAHA3L6.js';
|
|
2
|
+
import { i as i$1 } from './chunk-D27ND54J.js';
|
|
3
|
+
import x from '@mui/material/Box';
|
|
4
|
+
import D from '@mui/material/Paper';
|
|
5
|
+
import z from '@mui/material/Typography';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import E from '@mui/material/CircularProgress';
|
|
8
|
+
import i from '@mui/material/IconButton';
|
|
9
|
+
import l from '@mui/material/Stack';
|
|
10
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
11
|
+
import { m } from 'framer-motion';
|
|
12
|
+
|
|
13
|
+
var y=["pdf"],f=["txt"],h=["psd"],k=["doc","docx"],I=["xls","xlsx"],v=["zip","rar","iso"],w=["ai","esp"],C=["ppt","pptx"],F=["wav","aif","mp3","aac"],T=["jpg","jpeg","gif","bmp","png","svg","webp"],R=["m4v","avi","mpg","mp4","webm"];function O(o){let e,t=s(o);switch(o.includes(t)){case f.includes(t):e="txt";break;case v.includes(t):e="zip";break;case F.includes(t):e="audio";break;case T.includes(t):e="image";break;case R.includes(t):e="video";break;case k.includes(t):e="word";break;case I.includes(t):e="excel";break;case C.includes(t):e="powerpoint";break;case y.includes(t):e="pdf";break;case h.includes(t):e="photoshop";break;case w.includes(t):e="illustrator";break;case o?.startsWith("http"):e="image";break;default:e=s(o);}return e}function B(o){let e;switch(O(o)){case"folder":e="IC_FOLDER";break;case"txt":e="IC_TXT";break;case"zip":e="IC_ZIP";break;case"audio":e="IC_AUDIO";break;case"video":e="IC_VIDEO";break;case"word":e="IC_WORD";break;case"excel":e="IC_EXCEL";break;case"powerpoint":e="IC_POWER_POINT";break;case"pdf":e="IC_PDF";break;case"photoshop":e="IC_PTS";break;case"illustrator":e="IC_AI";break;case"image":e="IC_IMG";break;default:e="IC_FILE";}return e}function s(o){return o&&o.split(".").pop()||""}function _(o){return o.split("/").pop()}function g(o){return typeof o=="string"?{key:o,preview:o,name:_(o),type:s(o),size:void 0,path:o,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${o.name}`,name:o.name,size:o.size,path:o.path,type:o.type,preview:o.preview,lastModified:o.lastModified,lastModifiedDate:o.lastModifiedDate}}function N({files:o}){return o.length?jsx(D,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:e=>i$1(e.vars.palette.error.mainChannel,.08)},children:o.map(({file:e$1,errors:t})=>{let{path:n,size:d}=g(e$1),m=d?e(d):"";return jsxs(x,{sx:{my:1},children:[jsxs(z,{variant:"subtitle2",noWrap:!0,children:[n," - ",m," "]}),t.map(c=>jsxs(x,{component:"span",sx:{typography:"caption"},children:["- ",c.message]},c.code))]},n)})}):null}var Y=styled(l)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),oo=styled(l)(({theme:o})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(o.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),eo=styled(E)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),to=styled(i)(({theme:o})=>({position:"relative",zIndex:999,pointerEvents:"auto",bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48)}})),ro=styled("div")({position:"relative",zIndex:1,userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none","&:hover":{zIndex:2}}),ao=styled(l)(({theme:o,width:e,isDragging:t})=>({width:e,height:80,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2,1,2,1),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:t?`0 0 0 2px ${o.palette.primary.main}, ${o.customShadows.z8}, inset 0 0 0 1000px ${alpha(o.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),io=styled(m.div)(({theme:o,width:e,isDragging:t})=>({width:e,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:t?`0 0 0 2px ${o.palette.primary.main}, ${o.customShadows.z8}, inset 0 0 0 1000px ${alpha(o.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),no=styled(i)(({theme:o})=>({width:36,height:36,position:"absolute",top:10,right:10,borderRadius:0,zIndex:1,opacity:0,transition:"opacity 50ms ease-in-out",color:o.palette.error.main,backgroundColor:alpha(o.palette.common.white,.8),"&:hover":{backgroundColor:alpha(o.palette.common.white,.8),opacity:1}})),so=styled(i)(({theme:o})=>({width:24,height:24,position:"absolute",top:18,right:8,borderRadius:12,opacity:1,zIndex:1,transition:"opacity 50ms ease-in-out",color:o.palette.grey[500],backgroundColor:o.palette.common.white,"&:hover":{backgroundColor:o.palette.common.white}})),po=styled(i,{shouldForwardProp:o=>o!=="isMainImage"})(({theme:o,isMainImage:e})=>({color:e?o.palette.secondary.main:o.palette.action.disabled,backgroundColor:o.palette.common.white," &:hover":{backgroundColor:o.palette.common.white},top:4,left:8,padding:o.spacing(.5),border:"1px solid",borderColor:e?o.palette.secondary.main:o.palette.divider})),lo=styled(i)(({theme:o})=>({top:16,right:16,zIndex:9,position:"absolute",color:alpha(o.palette.common.white,.8),bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{bgcolor:alpha(o.palette.grey[900],.48)}})),co=styled(x,{shouldForwardProp:o=>o!=="isDragActive"&&o!=="disabled"&&o!=="hasError"})(({theme:o,isDragActive:e,disabled:t,hasError:n})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:o.palette.text.disabled,justifyContent:"center",bgcolor:alpha(o.palette.grey[500],.08),border:`dashed 1px ${alpha(o.palette.grey[500],.16)}`,...e&&{opacity:.72},...t&&{opacity:.48,pointerEvents:"none"},...n&&{color:o.palette.error.main,borderColor:o.palette.error.main,bgcolor:alpha(o.palette.error.main,.08)},"&:hover":{opacity:.72}}));
|
|
14
|
+
|
|
15
|
+
export { O as a, B as b, g as c, Y as d, oo as e, eo as f, to as g, ro as h, ao as i, io as j, no as k, so as l, po as m, lo as n, co as o, N as p };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-MAK4JF5M.js';
|
|
2
|
+
import c from '@mui/material/IconButton';
|
|
3
|
+
import s from '@mui/material/Stack';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var a=styled(c)(({theme:t})=>({position:"absolute",top:0,left:-2,zIndex:1,color:t.palette.grey[500],padding:"22px 5px",userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",cursor:"grab","&:active":{cursor:"grabbing"},"@media (pointer:coarse)":{userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",touchAction:"none","&:active":{pointerEvents:"none"}}})),i=styled(s)({flexDirection:"row",alignItems:"center",justifyContent:"center",width:16,height:16,overflow:"hidden",transform:"scale(0.8)"});var u=({disableDrag:t,...l})=>t?null:jsx(a,{className:"dragIcon",disableRipple:!0,"aria-label":"Arrastar para ordenar",onTouchStart:e=>e.preventDefault(),onTouchMove:e=>e.preventDefault(),...l,children:jsxs(i,{children:[jsx(a$1,{sx:{marginLeft:0},icon:"MORE_BOLD",width:16}),jsx(a$1,{sx:{marginLeft:"-10px"},icon:"MORE_BOLD",width:16})]})}),D=u;
|
|
8
|
+
|
|
9
|
+
export { D as a };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c, g, p, n, d, e as e$1, a as a$6, b, h, i as i$1, l, m as m$1, j as j$1, k } from './chunk-
|
|
1
|
+
import { c, g, p, n, d, e as e$1, a as a$6, b, h, i as i$1, l, m as m$1, j as j$1, k } from './chunk-ISYQXE75.js';
|
|
2
2
|
import { a as a$5 } from './chunk-2E4HVMRH.js';
|
|
3
3
|
import { a as a$1 } from './chunk-H5L4ARDB.js';
|
|
4
4
|
import { e } from './chunk-ANAHA3L6.js';
|
|
5
|
-
import { a as a$7 } from './chunk-
|
|
5
|
+
import { a as a$7 } from './chunk-JEBRSFLS.js';
|
|
6
6
|
import { x } from './chunk-2P4CXK3O.js';
|
|
7
7
|
import { a as a$4 } from './chunk-FK7DDO5L.js';
|
|
8
8
|
import { i, o } from './chunk-D27ND54J.js';
|
|
@@ -4,9 +4,9 @@ import { a as a$5 } from '../../chunk-COTMNI3C.js';
|
|
|
4
4
|
import '../../chunk-7TFD7ZIP.js';
|
|
5
5
|
import '../../chunk-5NOG7L7I.js';
|
|
6
6
|
import { e } from '../../chunk-ANAHA3L6.js';
|
|
7
|
-
import { a } from '../../chunk-
|
|
7
|
+
import { a } from '../../chunk-FZ4WZF6K.js';
|
|
8
8
|
import { f } from '../../chunk-EUL6EPCK.js';
|
|
9
|
-
import { a as a$2 } from '../../chunk-
|
|
9
|
+
import { a as a$2 } from '../../chunk-JEBRSFLS.js';
|
|
10
10
|
import { x } from '../../chunk-2P4CXK3O.js';
|
|
11
11
|
import { a as a$7 } from '../../chunk-FK7DDO5L.js';
|
|
12
12
|
import { j as j$1 } from '../../chunk-DMQW3LDF.js';
|
|
@@ -6,6 +6,6 @@ import 'dayjs';
|
|
|
6
6
|
import '../../../types/baseField.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
|
|
9
|
-
declare const DateRangePicker: ({ name, label, rules,
|
|
9
|
+
declare const DateRangePicker: ({ name, label, rules, helperText, required, ...other }: DateRangePickerProps) => react_jsx_runtime.JSX.Element;
|
|
10
10
|
|
|
11
11
|
export { DateRangePicker as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import P from '@mui/material/FormHelperText';
|
|
3
|
+
import k from '@mui/material/Stack';
|
|
4
4
|
import { DateRangePicker } from '@mui/x-date-pickers-pro';
|
|
5
5
|
import i from 'dayjs';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var C=({name:e,label:s,rules:
|
|
8
|
+
var C=({name:e,label:s,rules:D,helperText:l,required:d,...r})=>{let{control:f,setError:c}=useFormContext();return jsx(Controller,{name:e,control:f,rules:D,render:({field:{value:o,onChange:p},fieldState:{error:a}})=>jsxs(k,{children:[jsx(DateRangePicker,{"data-intercom-target":e,...r,format:"DD/MM/YYYY",value:[o?.startDate?i(o.startDate):null,o?.endDate?i(o.endDate):null],onChange:t=>{let m={startDate:t[0]?t[0].toDate():null,endDate:t[1]?t[1].toDate():null};p(m),r.onChange&&r.onChange(m);},onError:t=>{c(e,{message:t[0]||t[1]||void 0});},slotProps:{textField:({position:t})=>({...r.slotProps?.textField,required:d,error:!!a,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:t==="start"?`${s} (Dt. In\xEDcio)`:`${s} (Dt. Fim)`,name:t==="start"?`${e}Start`:`${e}End`})},sx:{width:1}}),(a?.message||l)&&jsx(P,{error:!!a,sx:{mx:"14px"},children:a?.message||l})]})})},h=C;
|
|
9
9
|
|
|
10
|
-
export {
|
|
10
|
+
export { h as default };
|
|
@@ -12,8 +12,9 @@ type PasswordProps = BaseField<TextFieldProps> & {
|
|
|
12
12
|
match?: {
|
|
13
13
|
fieldPassword: string;
|
|
14
14
|
};
|
|
15
|
+
showButtonViewPassword?: boolean;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
|
-
declare const Password: ({ name, sx, rules, passwordSize, specialCharacter, upperCaseChar, numberChar, showErrorMessage, match, helperText, InputProps, ...other }: PasswordProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare const Password: ({ name, sx, rules, passwordSize, specialCharacter, upperCaseChar, numberChar, showErrorMessage, match, helperText, InputProps, showButtonViewPassword, ...other }: PasswordProps) => react_jsx_runtime.JSX.Element;
|
|
18
19
|
|
|
19
20
|
export { Password as default };
|
|
@@ -4,10 +4,10 @@ import { a as a$1 } from '../../../chunk-MAK4JF5M.js';
|
|
|
4
4
|
import '../../../chunk-FUB7WQS5.js';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { useFormContext } from 'react-hook-form';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import y from '@mui/material/IconButton';
|
|
8
|
+
import N from '@mui/material/InputAdornment';
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var O=({name:o,sx:P,rules:n,passwordSize:d$1,specialCharacter:i,upperCaseChar:p,numberChar:l,showErrorMessage:x,match:r,helperText:m,InputProps:u,showButtonViewPassword:I=!0,...g})=>{let{watch:f}=useFormContext(),v=f(o),[t,C]=useState(!1),{hasNumberChar:V,hasSpecialCharacter:A,hasUpperCaseChar:F,isLengthValid:S}=d(v,d$1,l,i,p),H=(!A||!F||!S||!V)&&!x?"none":void 0;return jsx(a,{"data-intercom-target":o,...g,name:o,type:t?"text":"password",InputProps:{...u,endAdornment:jsxs(N,{position:"end",children:[u?.endAdornment,I&&jsx(y,{onClick:()=>C(!t),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:jsx(a$1,{icon:t?"VIEW_ON":"VIEW_OFF"})})]})},rules:{...n,validate:{...n?.validate,validationPassword:h=>{let e=d(h,d$1,l,i,p);return !e.hasNumberChar||!e.hasSpecialCharacter||!e.hasUpperCaseChar||!e.isLengthValid?"Senha inv\xE1lida":r&&r.fieldPassword&&f(r.fieldPassword)!==h?"As senhas devem ser iguais":!0}}},sx:{...P,"& .MuiFormHelperText-root":{display:m?void 0:H}},forceShowHelperText:!0,helperText:m})},G=O;
|
|
12
12
|
|
|
13
|
-
export {
|
|
13
|
+
export { G as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-RBHRP2UE.js';
|
|
2
|
+
import '../../../chunk-ISYQXE75.js';
|
|
3
3
|
import '../../../chunk-2E4HVMRH.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
5
5
|
import '../../../chunk-5NOG7L7I.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-XAJTYCRG.js';
|
|
2
|
+
import '../../../chunk-ISYQXE75.js';
|
|
3
3
|
import '../../../chunk-2E4HVMRH.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
5
5
|
import '../../../chunk-H5L4ARDB.js';
|
|
6
6
|
import '../../../chunk-5NOG7L7I.js';
|
|
7
7
|
import '../../../chunk-ANAHA3L6.js';
|
|
8
|
-
import '../../../chunk-
|
|
8
|
+
import '../../../chunk-JEBRSFLS.js';
|
|
9
9
|
import '../../../chunk-2P4CXK3O.js';
|
|
10
10
|
import '../../../chunk-FK7DDO5L.js';
|
|
11
11
|
import '../../../chunk-D27ND54J.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
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-RBHRP2UE.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-XAJTYCRG.js';
|
|
3
|
+
import { o } from '../../chunk-ISYQXE75.js';
|
|
4
|
+
export { p as RejectionFiles } from '../../chunk-ISYQXE75.js';
|
|
5
5
|
import '../../chunk-2E4HVMRH.js';
|
|
6
6
|
import '../../chunk-T7I256S6.js';
|
|
7
7
|
import '../../chunk-H5L4ARDB.js';
|
|
8
8
|
import '../../chunk-5NOG7L7I.js';
|
|
9
9
|
import '../../chunk-ANAHA3L6.js';
|
|
10
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-JEBRSFLS.js';
|
|
11
11
|
import '../../chunk-2P4CXK3O.js';
|
|
12
12
|
import '../../chunk-FK7DDO5L.js';
|
|
13
13
|
import '../../chunk-D27ND54J.js';
|
package/package.json
CHANGED
package/dist/chunk-7WCRRQEW.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { e } from './chunk-ANAHA3L6.js';
|
|
2
|
-
import { i as i$1 } from './chunk-D27ND54J.js';
|
|
3
|
-
import x from '@mui/material/Box';
|
|
4
|
-
import D from '@mui/material/Paper';
|
|
5
|
-
import z from '@mui/material/Typography';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
import E from '@mui/material/CircularProgress';
|
|
8
|
-
import i from '@mui/material/IconButton';
|
|
9
|
-
import l from '@mui/material/Stack';
|
|
10
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
11
|
-
import { m } from 'framer-motion';
|
|
12
|
-
|
|
13
|
-
var y=["pdf"],f=["txt"],h=["psd"],I=["doc","docx"],k=["xls","xlsx"],v=["zip","rar","iso"],w=["ai","esp"],C=["ppt","pptx"],F=["wav","aif","mp3","aac"],R=["jpg","jpeg","gif","bmp","png","svg","webp"],T=["m4v","avi","mpg","mp4","webm"];function O(o){let e,t=s(o);switch(o.includes(t)){case f.includes(t):e="txt";break;case v.includes(t):e="zip";break;case F.includes(t):e="audio";break;case R.includes(t):e="image";break;case T.includes(t):e="video";break;case I.includes(t):e="word";break;case k.includes(t):e="excel";break;case C.includes(t):e="powerpoint";break;case y.includes(t):e="pdf";break;case h.includes(t):e="photoshop";break;case w.includes(t):e="illustrator";break;case o?.startsWith("http"):e="image";break;default:e=s(o);}return e}function B(o){let e;switch(O(o)){case"folder":e="IC_FOLDER";break;case"txt":e="IC_TXT";break;case"zip":e="IC_ZIP";break;case"audio":e="IC_AUDIO";break;case"video":e="IC_VIDEO";break;case"word":e="IC_WORD";break;case"excel":e="IC_EXCEL";break;case"powerpoint":e="IC_POWER_POINT";break;case"pdf":e="IC_PDF";break;case"photoshop":e="IC_PTS";break;case"illustrator":e="IC_AI";break;case"image":e="IC_IMG";break;default:e="IC_FILE";}return e}function s(o){return o&&o.split(".").pop()||""}function _(o){return o.split("/").pop()}function g(o){return typeof o=="string"?{key:o,preview:o,name:_(o),type:s(o),size:void 0,path:o,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${o.name}`,name:o.name,size:o.size,path:o.path,type:o.type,preview:o.preview,lastModified:o.lastModified,lastModifiedDate:o.lastModifiedDate}}function U({files:o}){return o.length?jsx(D,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:e=>i$1(e.vars.palette.error.mainChannel,.08)},children:o.map(({file:e$1,errors:t})=>{let{path:n,size:d}=g(e$1),m=d?e(d):"";return jsxs(x,{sx:{my:1},children:[jsxs(z,{variant:"subtitle2",noWrap:!0,children:[n," - ",m," "]}),t.map(c=>jsxs(x,{component:"span",sx:{typography:"caption"},children:["- ",c.message]},c.code))]},n)})}):null}var Y=styled(l)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),oo=styled(l)(({theme:o})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(o.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),eo=styled(E)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),to=styled(i)(({theme:o})=>({position:"relative",zIndex:999,pointerEvents:"auto",bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48)}})),ro=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),ao=styled(l)(({theme:o,width:e,isDragging:t})=>({width:e,height:80,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2,1,2,1),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:t?`0 0 0 2px ${o.palette.primary.main}, ${o.customShadows.z8}, inset 0 0 0 1000px ${alpha(o.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),io=styled(m.div)(({theme:o,width:e,isDragging:t})=>({width:e,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:t?`0 0 0 2px ${o.palette.primary.main}, ${o.customShadows.z8}, inset 0 0 0 1000px ${alpha(o.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),no=styled(i)(({theme:o})=>({width:36,height:36,position:"absolute",top:10,right:10,borderRadius:0,zIndex:1,opacity:0,transition:"opacity 50ms ease-in-out",color:o.palette.error.main,backgroundColor:alpha(o.palette.common.white,.8),"&:hover":{backgroundColor:alpha(o.palette.common.white,.8),opacity:1}})),so=styled(i)(({theme:o})=>({width:24,height:24,position:"absolute",top:18,right:8,borderRadius:12,opacity:1,zIndex:1,transition:"opacity 50ms ease-in-out",color:o.palette.grey[500],backgroundColor:o.palette.common.white,"&:hover":{backgroundColor:o.palette.common.white}})),po=styled(i,{shouldForwardProp:o=>o!=="isMainImage"})(({theme:o,isMainImage:e})=>({color:e?o.palette.secondary.main:o.palette.action.disabled,backgroundColor:o.palette.common.white," &:hover":{backgroundColor:o.palette.common.white},top:4,left:8,padding:o.spacing(.5),border:"1px solid",borderColor:e?o.palette.secondary.main:o.palette.divider})),lo=styled(i)(({theme:o})=>({top:16,right:16,zIndex:9,position:"absolute",color:alpha(o.palette.common.white,.8),bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{bgcolor:alpha(o.palette.grey[900],.48)}})),co=styled(x,{shouldForwardProp:o=>o!=="isDragActive"&&o!=="disabled"&&o!=="hasError"})(({theme:o,isDragActive:e,disabled:t,hasError:n})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:o.palette.text.disabled,justifyContent:"center",bgcolor:alpha(o.palette.grey[500],.08),border:`dashed 1px ${alpha(o.palette.grey[500],.16)}`,...e&&{opacity:.72},...t&&{opacity:.48,pointerEvents:"none"},...n&&{color:o.palette.error.main,borderColor:o.palette.error.main,bgcolor:alpha(o.palette.error.main,.08)},"&:hover":{opacity:.72}}));
|
|
14
|
-
|
|
15
|
-
export { O as a, B as b, g as c, Y as d, oo as e, eo as f, to as g, ro as h, ao as i, io as j, no as k, so as l, po as m, lo as n, co as o, U as p };
|
package/dist/chunk-DXACBPEV.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-MAK4JF5M.js';
|
|
2
|
-
import l from '@mui/material/IconButton';
|
|
3
|
-
import p from '@mui/material/Stack';
|
|
4
|
-
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var e=styled(l)(({theme:t})=>({position:"absolute",top:0,left:-2,zIndex:1,color:t.palette.grey[500],padding:"22px 5px",userSelect:"none",cursor:"grab","&:active":{cursor:"grabbing"}})),a=styled(p)({flexDirection:"row",alignItems:"center",justifyContent:"center",width:16,height:16,overflow:"hidden",transform:"scale(0.8)"});var s=({disableDrag:t,...i})=>t?null:jsx(e,{className:"dragIcon",disableRipple:!0,"aria-label":"Arrastar para ordenar",...i,children:jsxs(a,{children:[jsx(a$1,{sx:{marginLeft:0},icon:"MORE_BOLD",width:16}),jsx(a$1,{sx:{marginLeft:"-10px"},icon:"MORE_BOLD",width:16})]})}),D=s;
|
|
8
|
-
|
|
9
|
-
export { D as a };
|
package/dist/chunk-YXH2ZKVS.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-MAK4JF5M.js';
|
|
2
|
-
import { forwardRef, useMemo } from 'react';
|
|
3
|
-
import c from '@mui/material/Box';
|
|
4
|
-
import x from '@mui/material/CircularProgress';
|
|
5
|
-
import y from '@mui/material/IconButton';
|
|
6
|
-
import C from '@mui/material/Tooltip';
|
|
7
|
-
import { jsx } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var l=forwardRef(({icon:t,label:i,color:e="primary",loading:r=!1,disabled:B=!1,boxProps:m={},tooltipProps:I={},iconProps:u={},disableTooltip:d=!1,children:n,...M},w)=>{if(!t&&!n)throw new Error("IconButton: icon or children is required");let f=useMemo(()=>t?jsx(a,{icon:t,...u}):n,[t,n,u]),T=useMemo(()=>r?jsx(x,{size:20,color:"inherit"}):f,[r,f]),s=jsx(y,{ref:w,"aria-label":i,color:"inherit",disabled:r||B,...M,children:T});return d?jsx(c,{...m,color:e,children:s}):jsx(c,{...m,color:e,children:jsx(C,{"data-testid":"button-tooltip",...I,title:i,children:jsx("span",{children:s})})})});l.displayName="IconButton";var N=l;
|
|
10
|
-
|
|
11
|
-
export { N as a };
|