@zydon/common 2.7.63 → 2.7.65

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.
Files changed (109) hide show
  1. package/README.md +1 -0
  2. package/dist/chunk-2CY62UZ5.js +21 -0
  3. package/dist/chunk-2CY62UZ5.js.map +1 -0
  4. package/dist/{chunk-5NIMUEW5.js → chunk-6FG5S5PI.js} +2 -2
  5. package/dist/{chunk-VPKUUY5Q.js → chunk-CU7PKEY2.js} +2 -2
  6. package/dist/{chunk-MP2LAJS5.js → chunk-KQTA6B4Y.js} +2 -2
  7. package/dist/chunk-QVUHCBI2.js +35 -0
  8. package/dist/chunk-QVUHCBI2.js.map +1 -0
  9. package/dist/chunk-RPPQBAVO.js +12 -0
  10. package/dist/chunk-RPPQBAVO.js.map +1 -0
  11. package/dist/components/AvatarButton/index.js +2 -2
  12. package/dist/components/Common/index.js +2 -2
  13. package/dist/components/DataView/index.js +2 -2
  14. package/dist/components/DatePicker/index.d.ts +2 -1
  15. package/dist/components/DatePicker/index.js +3 -3
  16. package/dist/components/DatePicker/index.js.map +1 -1
  17. package/dist/components/DragContainer/index.js +2 -2
  18. package/dist/components/DragContainer/index.js.map +1 -1
  19. package/dist/components/DynamicDataView/index.js +2 -2
  20. package/dist/components/FileUpload/index.js +1 -4
  21. package/dist/components/FrameSkeleton/index.d.ts +1 -0
  22. package/dist/components/FrameSkeleton/index.js +2 -2
  23. package/dist/components/FrameSkeleton/index.js.map +1 -1
  24. package/dist/components/ImageCropModal/index.js +14 -4
  25. package/dist/components/ImageCropModal/index.js.map +1 -1
  26. package/dist/components/Incrementer/index.d.ts +0 -3
  27. package/dist/components/ListBundles/index.d.ts +0 -8
  28. package/dist/components/SearchInput/index.js +1 -1
  29. package/dist/components/SelectList/index.d.ts +7 -0
  30. package/dist/components/SelectList/index.js +10 -0
  31. package/dist/components/SelectList/index.js.map +1 -0
  32. package/dist/components/SelectableCards/index.js +2 -2
  33. package/dist/components/StateDisplay/index.d.ts +0 -42
  34. package/dist/components/SwapList/index.js +1 -1
  35. package/dist/components/ToggleTheme/index.js +2 -2
  36. package/dist/components/carousel/index.d.ts +0 -18
  37. package/dist/components/form/Codes/index.d.ts +2 -1
  38. package/dist/components/form/Codes/index.js +4 -4
  39. package/dist/components/form/Codes/index.js.map +1 -1
  40. package/dist/components/form/FileUpload/index.d.ts +0 -200
  41. package/dist/components/form/FileUpload/index.js +2 -5
  42. package/dist/components/form/FileUpload/index.js.map +1 -1
  43. package/dist/components/form/SelectList/index.d.ts +13 -0
  44. package/dist/components/form/SelectList/index.js +16 -0
  45. package/dist/components/form/SelectList/index.js.map +1 -0
  46. package/dist/components/form/SelectableCards/index.js +2 -2
  47. package/dist/hooks/useMount.d.ts +0 -20
  48. package/dist/hooks/useSnackbar.d.ts +7 -7
  49. package/dist/hooks/useThemeToggle.js +2 -2
  50. package/dist/hooks/useUpload.js +6 -1
  51. package/dist/hooks/useUpload.js.map +1 -1
  52. package/dist/hooks/useUploadImage.js +7 -2
  53. package/dist/hooks/useUploadImage.js.map +1 -1
  54. package/dist/hooks/useWindowFocus.d.ts +0 -3
  55. package/dist/index.d.ts +3 -5
  56. package/dist/index.js +2 -6
  57. package/dist/index.js.map +1 -1
  58. package/dist/theme/core/index.d.ts +1 -1
  59. package/dist/theme/styles/index.d.ts +12 -76
  60. package/dist/theme/theme-provider.js +2 -2
  61. package/dist/theme/with-settings/index.d.ts +0 -4
  62. package/dist/types/sectionProps.d.ts +2 -0
  63. package/dist/types/selectList.d.ts +31 -0
  64. package/dist/types/selectList.js +3 -0
  65. package/dist/types/selectList.js.map +1 -0
  66. package/dist/utils/compare.d.ts +0 -21
  67. package/dist/utils/dnd.js +4 -4
  68. package/dist/utils/dnd.js.map +1 -1
  69. package/dist/utils/execution.d.ts +0 -70
  70. package/dist/utils/object.d.ts +0 -6
  71. package/dist/utils/paymentValidators.d.ts +0 -6
  72. package/dist/utils/popup.d.ts +0 -7
  73. package/dist/utils/string.d.ts +0 -5
  74. package/package.json +6 -1
  75. package/dist/chunk-33C6UWPV.js +0 -7
  76. package/dist/chunk-33C6UWPV.js.map +0 -1
  77. package/dist/chunk-6WGKIN5L.js +0 -18
  78. package/dist/chunk-6WGKIN5L.js.map +0 -1
  79. package/dist/chunk-DTIGB5NW.js +0 -10
  80. package/dist/chunk-DTIGB5NW.js.map +0 -1
  81. package/dist/chunk-IEGF6HVV.js +0 -43
  82. package/dist/chunk-IEGF6HVV.js.map +0 -1
  83. package/dist/chunk-JFZOAS75.js +0 -23
  84. package/dist/chunk-JFZOAS75.js.map +0 -1
  85. package/dist/chunk-KR3DUHA6.js +0 -16
  86. package/dist/chunk-KR3DUHA6.js.map +0 -1
  87. package/dist/chunk-OTVEMGF2.js +0 -12
  88. package/dist/chunk-OTVEMGF2.js.map +0 -1
  89. package/dist/chunk-SBMEL2IJ.js +0 -9
  90. package/dist/chunk-SBMEL2IJ.js.map +0 -1
  91. package/dist/chunk-VYNBVZSA.js +0 -37
  92. package/dist/chunk-VYNBVZSA.js.map +0 -1
  93. package/dist/chunk-WQSRNCNF.js +0 -5
  94. package/dist/chunk-WQSRNCNF.js.map +0 -1
  95. package/dist/chunk-YCEQDXLR.js +0 -8
  96. package/dist/chunk-YCEQDXLR.js.map +0 -1
  97. package/dist/components/form/UploadAvatarWithCrop/index.d.ts +0 -21
  98. package/dist/components/form/UploadAvatarWithCrop/index.js +0 -23
  99. package/dist/components/form/UploadAvatarWithCrop/index.js.map +0 -1
  100. package/dist/components/form/UploadWithCrop/index.d.ts +0 -21
  101. package/dist/components/form/UploadWithCrop/index.js +0 -29
  102. package/dist/components/form/UploadWithCrop/index.js.map +0 -1
  103. package/dist/components/upload/index.d.ts +0 -70
  104. package/dist/components/upload/index.js +0 -31
  105. package/dist/components/upload/index.js.map +0 -1
  106. package/dist/{chunk-5NIMUEW5.js.map → chunk-6FG5S5PI.js.map} +0 -0
  107. package/dist/{chunk-VPKUUY5Q.js.map → chunk-CU7PKEY2.js.map} +0 -0
  108. package/dist/{chunk-MP2LAJS5.js.map → chunk-KQTA6B4Y.js.map} +0 -0
  109. package/dist/{index-5a5e5dc8.d.ts → index-c8f1e6e7.d.ts} +12 -12
@@ -1,18 +0,0 @@
1
- import { d, c } from './chunk-WQSRNCNF.js';
2
- import { e } from './chunk-OF6623HG.js';
3
- import { k } from './chunk-GLRLKFPS.js';
4
- import b from '@mui/material/Box';
5
- import h from '@mui/material/Paper';
6
- import f from '@mui/material/Typography';
7
- import { jsx, jsxs } from 'react/jsx-runtime';
8
- import C from '@mui/material/CircularProgress';
9
- import a from '@mui/material/IconButton';
10
- import l from '@mui/material/Stack';
11
- import { styled, alpha } from '@mui/material/styles';
12
- import { m } from 'framer-motion';
13
-
14
- function x(o){return typeof o=="string"?{key:o,preview:o,name:d(o),type:c(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 M({files:o}){return o.length?jsx(h,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:t=>k(t.vars.palette.error.mainChannel,.08)},children:o.map(({file:t,errors:i})=>{let{path:n,size:s}=x(t),y=s?e(s):"";return jsxs(b,{sx:{my:1},children:[jsxs(f,{variant:"subtitle2",noWrap:!0,children:[n," - ",y," "]}),i.map(d=>jsxs(b,{component:"span",sx:{typography:"caption"},children:["- ",d.message]},d.code))]},n)})}):null}var q=styled(l)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),G=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:o.palette.background.paper}}})),H=styled(C)(({theme:o})=>({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:o.palette.background.paper,borderRadius:"50%"})),J=styled(a)(({theme:o})=>({position:"relative",zIndex:999,pointerEvents:"auto",bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48)}})),K=styled("div")({position:"relative",zIndex:1,userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none","&:hover":{zIndex:2}}),Q=styled(l)(({theme:o,width:t,isDragging:i})=>({width:t,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:i?`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)"})),V=styled(m.div)(({theme:o,width:t,isDragging:i})=>({width:t,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:i?`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)"})),X=styled(a)(({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}})),Y=styled(a)(({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}})),Z=styled(a,{shouldForwardProp:o=>o!=="isMainImage"})(({theme:o,isMainImage:t})=>({color:t?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:t?o.palette.secondary.main:o.palette.divider})),_=styled(a)(({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)}})),oo=styled(b,{shouldForwardProp:o=>o!=="isDragActive"&&o!=="disabled"&&o!=="hasError"})(({theme:o,isDragActive:t,disabled:i,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)}`,...t&&{opacity:.72},...i&&{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}}));
15
-
16
- export { x as a, q as b, G as c, H as d, J as e, K as f, Q as g, V as h, X as i, Y as j, Z as k, _ as l, oo as m, M as n };
17
- //# sourceMappingURL=out.js.map
18
- //# sourceMappingURL=chunk-6WGKIN5L.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/upload/components/rejection-files.tsx","../src/components/file-thumbnail/utils.ts","../src/components/upload/styles.ts"],"names":["Box","Paper","Typography","fileData","file","fileNameByUrl","fileTypeByUrl","jsx","jsxs","RejectionFiles","files","theme","varAlpha","errors","path","size","sizeText","fData","error","CircularProgress","IconButton","Stack","alpha","styled","m","Container","OverlayActions","AvatarLoading","CloseIconButton","DragWrapper","FrameFileThumbnail","width","isDragging","FrameImageThumbnail","DeleteItemButton","DeleteFileButton","StarButton","prop","isMainImage","DeleteButton","BoxUpload","isDragActive","disabled","hasError"],"mappings":"+HAEA,OAAOA,MAAS,oBAChB,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,2BCOhB,SAASC,EAASC,EAAqB,CAE5C,OAAI,OAAOA,GAAS,SACX,CACL,IAAKA,EACL,QAASA,EACT,KAAMC,EAAcD,CAAI,EACxB,KAAME,EAAcF,CAAI,EACxB,KAAM,OACN,KAAMA,EACN,aAAc,OACd,iBAAkB,MACpB,EAIK,CACL,IAAK,OAAOA,EAAK,OACjB,KAAMA,EAAK,KACX,KAAMA,EAAK,KACX,KAAOA,EAAoB,KAC3B,KAAMA,EAAK,KACX,QAAUA,EAAoB,QAC9B,aAAcA,EAAK,aACnB,iBAAmBA,EAAoB,gBACzC,CACF,CDdI,cAAAG,EAkBQ,QAAAC,MAlBR,oBANG,SAASC,EAAe,CAAE,MAAAC,CAAM,EAAU,CAC/C,OAAKA,EAAM,OAKTH,EAACN,EAAA,CACC,QAAQ,WACR,GAAI,CACF,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,UAAW,OACX,YAAa,SACb,YAAa,aACb,QAASU,GAASC,EAASD,EAAM,KAAK,QAAQ,MAAM,YAAa,GAAI,CACvE,EAEC,SAAAD,EAAM,IAAI,CAAC,CAAE,KAAAN,EAAM,OAAAS,CAAO,IAAM,CAC/B,GAAM,CAAE,KAAAC,EAAM,KAAAC,CAAK,EAAIZ,EAASC,CAAI,EAE9BY,EAAWD,EAAOE,EAAMF,CAAI,EAAI,GACtC,OACEP,EAACR,EAAA,CAAe,GAAI,CAAE,GAAI,CAAE,EAC1B,UAAAQ,EAACN,EAAA,CAAW,QAAQ,YAAY,OAAM,GACnC,UAAAY,EAAK,MAAIE,EAAU,KACtB,EACCH,EAAO,IAAIK,GACVV,EAACR,EAAA,CAEC,UAAU,OACV,GAAI,CAAE,WAAY,SAAU,EAC7B,eACIkB,EAAM,UAJJA,EAAM,IAKb,CACD,IAZOJ,C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AAC,EAIE,CAAC,CAAE,MAAA1B,EAAO,aAAA8B,EAAc,SAAAC,EAAU,SAAAC,CAAS,KAAO,CACnD,MAAO,GACP,OAAQ,GACR,WAAY,EACZ,QAAS,OACT,aAAc,EACd,OAAQ,UACR,WAAY,SACZ,MAAOhC,EAAM,QAAQ,KAAK,SAC1B,eAAgB,SAChB,QAASW,EAAMX,EAAM,QAAQ,KAAK,GAAG,EAAG,GAAI,EAC5C,OAAQ,cAAcW,EAAMX,EAAM,QAAQ,KAAK,GAAG,EAAG,GAAI,IACzD,GAAI8B,GAAgB,CAAE,QAAS,GAAK,EACpC,GAAIC,GAAY,CAAE,QAAS,IAAM,cAAe,MAAO,EACvD,GAAIC,GAAY,CACd,MAAOhC,EAAM,QAAQ,MAAM,KAC3B,YAAaA,EAAM,QAAQ,MAAM,KACjC,QAASW,EAAMX,EAAM,QAAQ,MAAM,KAAM,GAAI,CAC/C,EACA,UAAW,CAAE,QAAS,GAAK,CAC7B,EAAE","sourcesContent":["/* eslint-disable react/function-component-definition */\nimport type { FileRejection } from 'react-dropzone';\nimport Box from '@mui/material/Box';\nimport Paper from '@mui/material/Paper';\nimport Typography from '@mui/material/Typography';\n\nimport { varAlpha } from 'theme/styles';\nimport { fData } from 'utils/formatNumber';\n\nimport { fileData } from '../../file-thumbnail';\n\n// ----------------------------------------------------------------------\n\ntype Props = {\n files: FileRejection[];\n};\n\nexport function RejectionFiles({ files }: Props) {\n if (!files.length) {\n return null;\n }\n\n return (\n <Paper\n variant=\"outlined\"\n sx={{\n py: 1,\n px: 2,\n mt: 3,\n textAlign: 'left',\n borderStyle: 'dashed',\n borderColor: 'error.main',\n bgcolor: theme => varAlpha(theme.vars.palette.error.mainChannel, 0.08),\n }}\n >\n {files.map(({ file, errors }) => {\n const { path, size } = fileData(file);\n /* istanbul ignore else */\n const sizeText = size ? fData(size) : '';\n return (\n <Box key={path} sx={{ my: 1 }}>\n <Typography variant=\"subtitle2\" noWrap>\n {path} - {sizeText}{' '}\n </Typography>\n {errors.map(error => (\n <Box\n key={error.code}\n component=\"span\"\n sx={{ typography: 'caption' }}\n >\n - {error.message}\n </Box>\n ))}\n </Box>\n );\n })}\n </Paper>\n );\n}\n","import {\n fileFormat,\n fileNameByUrl,\n fileThumb,\n fileTypeByUrl,\n} from '../FileUpload/FileThumbnail/utils';\n\nimport type { ExtendFile } from './types';\n\nexport { fileFormat, fileNameByUrl, fileThumb, fileTypeByUrl };\n\nexport function fileData(file: File | string) {\n // From url\n if (typeof file === 'string') {\n return {\n key: file,\n preview: file,\n name: fileNameByUrl(file),\n type: fileTypeByUrl(file),\n size: undefined,\n path: file,\n lastModified: undefined,\n lastModifiedDate: undefined,\n };\n }\n\n // From file\n return {\n key: `key:${file.name}`,\n name: file.name,\n size: file.size,\n path: (file as ExtendFile).path,\n type: file.type,\n preview: (file as ExtendFile).preview,\n lastModified: file.lastModified,\n lastModifiedDate: (file as ExtendFile).lastModifiedDate,\n };\n}\n","import Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport IconButton from '@mui/material/IconButton';\nimport Stack from '@mui/material/Stack';\nimport { alpha, styled } from '@mui/material/styles';\nimport { m } from 'framer-motion';\n\nexport const Container = styled(Stack)({\n position: 'relative',\n width: '100%',\n borderRadius: 8,\n overflow: 'hidden',\n\n '&:hover .actions': {\n display: 'flex',\n },\n});\n\nexport const OverlayActions = styled(Stack)(({ theme }) => ({\n display: 'none',\n position: 'absolute',\n alignItems: 'center',\n justifyContent: 'center',\n flexDirection: 'row',\n gap: 12,\n width: '100%',\n height: '100%',\n backgroundColor: alpha(theme.palette.primary.main, 0.9),\n zIndex: 999,\n\n button: {\n '&, &:hover, &:focus': {\n backgroundColor: theme.palette.background.paper,\n },\n },\n}));\n\nexport const AvatarLoading = styled(CircularProgress)(({ theme }) => ({\n position: 'absolute',\n width: '100%',\n height: '100%',\n zIndex: 99,\n backgroundColor: theme.palette.background.paper,\n borderRadius: '50%',\n}));\n\nexport const CloseIconButton = styled(IconButton)(({ theme }) => ({\n position: 'relative',\n zIndex: 999,\n pointerEvents: 'auto',\n bgcolor: alpha(theme.palette.grey[900], 0.72),\n\n '&:hover': {\n backgroundColor: alpha(theme.palette.grey[900], 0.48),\n },\n}));\n\nexport const DragWrapper = styled('div')({\n position: 'relative',\n zIndex: 1,\n userSelect: 'none',\n WebkitUserSelect: 'none',\n WebkitTouchCallout: 'none',\n '&:hover': {\n zIndex: 2,\n },\n});\n\nexport const FrameFileThumbnail = styled(Stack)<{\n width: number;\n isDragging: boolean;\n}>(({ theme, width, isDragging }) => ({\n width,\n height: 80,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n margin: theme.spacing(0.5),\n padding: theme.spacing(2, 1, 2, 1),\n borderRadius: theme.spacing(1.25),\n overflow: 'hidden',\n position: 'relative',\n border: `solid 1px ${theme.palette.divider}`,\n backgroundColor: theme.palette.common.white,\n zIndex: 1,\n transition: 'box-shadow 150ms ease-in-out',\n boxShadow: !isDragging\n ? '0px 0px 0px 0px rgba(0, 0, 0, 0)'\n : `0 0 0 2px ${theme.palette.primary.main}, ${theme.customShadows.z8}, inset 0 0 0 1000px ${alpha(\n theme.palette.primary.main,\n 0.06,\n )}`,\n}));\n\nexport const FrameImageThumbnail = styled(m.div)<{\n width: number;\n isDragging: boolean;\n}>(({ theme, width, isDragging }) => ({\n width,\n height: 60,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n margin: theme.spacing(0.5),\n padding: theme.spacing(2),\n borderRadius: theme.spacing(1.25),\n overflow: 'hidden',\n position: 'relative',\n border: `solid 1px ${theme.palette.divider}`,\n backgroundColor: theme.palette.common.white,\n zIndex: 1,\n transition: 'box-shadow 150ms ease-in-out',\n boxShadow: !isDragging\n ? '0px 0px 0px 0px rgba(0, 0, 0, 0)'\n : `0 0 0 2px ${theme.palette.primary.main}, ${theme.customShadows.z8}, inset 0 0 0 1000px ${alpha(\n theme.palette.primary.main,\n 0.06,\n )}`,\n}));\n\nexport const DeleteItemButton = styled(IconButton)(({ theme }) => ({\n width: 36,\n height: 36,\n position: 'absolute',\n top: 10,\n right: 10,\n borderRadius: 0,\n zIndex: 1,\n opacity: 0,\n transition: 'opacity 50ms ease-in-out',\n color: theme.palette.error.main,\n backgroundColor: alpha(theme.palette.common.white, 0.8),\n '&:hover': {\n backgroundColor: alpha(theme.palette.common.white, 0.8),\n opacity: 1,\n },\n}));\n\nexport const DeleteFileButton = styled(IconButton)(({ theme }) => ({\n width: 24,\n height: 24,\n position: 'absolute',\n top: 18,\n right: 8,\n borderRadius: 12,\n opacity: 1,\n zIndex: 1,\n transition: 'opacity 50ms ease-in-out',\n color: theme.palette.grey[500],\n backgroundColor: theme.palette.common.white,\n '&:hover': {\n backgroundColor: theme.palette.common.white,\n },\n}));\n\nexport const StarButton = styled(IconButton, {\n shouldForwardProp: prop => prop !== 'isMainImage',\n})<{\n isMainImage: boolean;\n}>(({ theme, isMainImage }) => ({\n color: isMainImage\n ? theme.palette.secondary.main\n : theme.palette.action.disabled,\n backgroundColor: theme.palette.common.white,\n ' &:hover': {\n backgroundColor: theme.palette.common.white,\n },\n top: 4,\n left: 8,\n padding: theme.spacing(0.5),\n border: '1px solid',\n borderColor: isMainImage\n ? theme.palette.secondary.main\n : theme.palette.divider,\n}));\n\nexport const DeleteButton = styled(IconButton)(({ theme }) => ({\n top: 16,\n right: 16,\n zIndex: 9,\n position: 'absolute',\n color: alpha(theme.palette.common.white, 0.8),\n bgcolor: alpha(theme.palette.grey[900], 0.72),\n '&:hover': {\n bgcolor: alpha(theme.palette.grey[900], 0.48),\n },\n}));\n\nexport const BoxUpload = styled(Box, {\n shouldForwardProp: prop =>\n prop !== 'isDragActive' && prop !== 'disabled' && prop !== 'hasError',\n})<{\n isDragActive: boolean;\n disabled: boolean;\n hasError: boolean;\n}>(({ theme, isDragActive, disabled, hasError }) => ({\n width: 64,\n height: 64,\n flexShrink: 0,\n display: 'flex',\n borderRadius: 1,\n cursor: 'pointer',\n alignItems: 'center',\n color: theme.palette.text.disabled,\n justifyContent: 'center',\n bgcolor: alpha(theme.palette.grey[500], 0.08),\n border: `dashed 1px ${alpha(theme.palette.grey[500], 0.16)}`,\n ...(isDragActive && { opacity: 0.72 }),\n ...(disabled && { opacity: 0.48, pointerEvents: 'none' }),\n ...(hasError && {\n color: theme.palette.error.main,\n borderColor: theme.palette.error.main,\n bgcolor: alpha(theme.palette.error.main, 0.08),\n }),\n '&:hover': { opacity: 0.72 },\n}));\n"]}
@@ -1,10 +0,0 @@
1
- import { memo, useId } from 'react';
2
- import M from '@mui/material/Box';
3
- import { useTheme } from '@mui/material/styles';
4
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
-
6
- function c(){let i=useTheme(),a=useId(),r=i.vars.palette.primary.main;return jsxs(Fragment,{children:[jsx("defs",{children:jsxs("linearGradient",{id:a,x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[jsx("stop",{offset:"0%",stopColor:r}),jsx("stop",{offset:"100%",stopColor:r,stopOpacity:"0"})]})}),jsx("path",{fill:`url(#${a})`,fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}function y({hideBackground:i,sx:a,...r}){let n=useTheme(),o=n.vars.palette.primary.main,f=n.vars.palette.primary.dark,t=n.vars.palette.primary.darker;return jsxs(M,{component:"svg",width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",sx:{width:320,maxWidth:1,flexShrink:0,height:"auto",...a},...r,children:[!i&&jsx(c,{}),jsx("defs",{children:jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopOpacity:"0"}),jsx("stop",{offset:"100%"})]})}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),jsx("ellipse",{cx:"380.363",cy:"298.487",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),jsx("ellipse",{cx:"390.052",cy:"264.383",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),jsx("ellipse",{cx:"346.97",cy:"270.022",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:o,fillRule:"nonzero",opacity:"0.2"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),jsx("path",{fill:f,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),jsx("ellipse",{cx:"119.593",cy:"258.664",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"101.03",cy:"260.545",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"108.459",cy:"265.905",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("ellipse",{cx:"89.193",cy:"265.433",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("path",{fill:f,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),jsx("path",{fill:f,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}var g=memo(y);
7
-
8
- export { g as a };
9
- //# sourceMappingURL=out.js.map
10
- //# sourceMappingURL=chunk-DTIGB5NW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/assets/illustrations/UploadIllustration.tsx","../src/assets/illustrations/BackgroundShape.tsx"],"names":["memo","Box","useTheme","useId","Fragment","jsx","jsxs","BackgroundShape","theme","gradientId","PRIMARY_MAIN","UploadIllustration","hideBackground","sx","other","PRIMARY_DARK","PRIMARY_DARKER","UploadIllustration_default"],"mappings":"AACA,OAAS,QAAAA,MAAY,QAErB,OAAOC,MAAS,oBAChB,OAAS,YAAAC,MAAgB,uBCHzB,OAAS,SAAAC,MAAa,QACtB,OAAS,YAAAD,MAAgB,uBAUrB,mBAAAE,EASM,OAAAC,EAPF,QAAAC,MAFJ,oBARG,SAASC,GAAkB,CAChC,IAAMC,EAAQN,EAAS,EAEjBO,EAAaN,EAAM,EAEnBO,EAAeF,EAAM,KAAK,QAAQ,QAAQ,KAEhD,OACEF,EAAAF,EAAA,CACE,UAAAC,EAAC,QACC,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E,SACF,KAAMK,EACN,SAAS,UACT,QAAQ,MACV,EAEAL,EAAC,QACC,KAAMU,EACN,SAAS,UACT,EAAE,6HACJ,EAEAV,EAAC,QACC,KAAMK,EACN,SAAS,UACT,EAAE,gKACF,QAAQ,OACV,EAEAL,EAAC,QACC,KAAMU,EACN,SAAS,UACT,EAAE,uTACJ,GACF,CAEJ,CAEA,IAAOE,EAAQjB,EAAKW,CAAkB","sourcesContent":["/* eslint-disable react/function-component-definition */\nimport { memo } from 'react';\nimport type { BoxProps } from '@mui/material/Box';\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { BackgroundShape } from './BackgroundShape';\n\ntype Props = BoxProps & {\n hideBackground?: boolean;\n};\n\nfunction UploadIllustration({ hideBackground, sx, ...other }: Props) {\n const theme = useTheme();\n\n const PRIMARY_MAIN = theme.vars.palette.primary.main;\n\n const PRIMARY_DARK = theme.vars.palette.primary.dark;\n\n const PRIMARY_DARKER = theme.vars.palette.primary.darker;\n\n return (\n <Box\n component=\"svg\"\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 480 360\"\n xmlns=\"http://www.w3.org/2000/svg\"\n sx={{ width: 320, maxWidth: 1, flexShrink: 0, height: 'auto', ...sx }}\n {...other}\n >\n {!hideBackground && <BackgroundShape />}\n\n <defs>\n <linearGradient\n id=\"linearGradient-2\"\n x1=\"30.113%\"\n x2=\"30.113%\"\n y1=\"0%\"\n y2=\"100%\"\n >\n <stop offset=\"0%\" stopOpacity=\"0\" />\n <stop offset=\"100%\" />\n </linearGradient>\n </defs>\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z\"\n opacity=\"0.05\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z\"\n opacity=\"0.05\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z\"\n opacity=\"0.05\"\n />\n\n <path\n fill={PRIMARY_DARKER}\n fillRule=\"nonzero\"\n d=\"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z\"\n transform=\"rotate(34.64 262.678 162.06)\"\n />\n\n <path\n fill=\"#FFC107\"\n fillRule=\"nonzero\"\n d=\"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z\"\n transform=\"rotate(34.804 278.687 137.92)\"\n />\n\n <path\n fill=\"#FFC107\"\n fillRule=\"nonzero\"\n d=\"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z\"\n opacity=\"0.5\"\n transform=\"rotate(34.64 268.35 153.887)\"\n />\n\n <path\n fill=\"#FFC107\"\n fillRule=\"nonzero\"\n d=\"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z\"\n opacity=\"0.3\"\n transform=\"rotate(34.64 257.265 169.926)\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z\"\n transform=\"rotate(16.29 248.893 159.951)\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z\"\n transform=\"rotate(16.29 257.127 131.835)\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z\"\n opacity=\"0.5\"\n transform=\"rotate(16.29 251.658 150.547)\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z\"\n opacity=\"0.3\"\n transform=\"rotate(16.29 246.19 169.256)\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z\"\n transform=\"rotate(4.6 241.52 160.258)\"\n />\n\n <path\n fill=\"#1890FF\"\n fillRule=\"nonzero\"\n d=\"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z\"\n transform=\"rotate(4.6 243.874 131.06)\"\n />\n\n <path\n fill=\"#1890FF\"\n fillRule=\"nonzero\"\n d=\"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z\"\n opacity=\"0.5\"\n transform=\"rotate(4.6 242.308 150.487)\"\n />\n\n <path\n fill=\"#1890FF\"\n fillRule=\"nonzero\"\n d=\"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z\"\n opacity=\"0.3\"\n transform=\"rotate(4.6 240.746 169.92)\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z\"\n transform=\"rotate(-2.61 236.157 162.002)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z\"\n transform=\"rotate(-2.61 234.825 132.734)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z\"\n opacity=\"0.5\"\n transform=\"rotate(-2.862 236.39 151.563)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z\"\n opacity=\"0.3\"\n transform=\"rotate(-2.61 236.599 171.683)\"\n />\n\n <path\n fill=\"#F4F6F8\"\n fillRule=\"nonzero\"\n d=\"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z\"\n />\n\n <path\n fill=\"#000\"\n fillRule=\"nonzero\"\n d=\"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z\"\n opacity=\"0.1\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z\"\n opacity=\"0.1\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z\"\n opacity=\"0.3\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z\"\n />\n\n <ellipse\n cx=\"380.363\"\n cy=\"298.487\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"8.945\"\n ry=\"1.513\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z\"\n />\n\n <ellipse\n cx=\"390.052\"\n cy=\"264.383\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"5.044\"\n ry=\"1\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z\"\n />\n\n <ellipse\n cx=\"346.97\"\n cy=\"270.022\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"6.09\"\n ry=\"1.028\"\n />\n\n <rect\n width=\"51.026\"\n height=\"91.312\"\n x=\"303.926\"\n y=\"69.211\"\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n rx=\"4.737\"\n transform=\"rotate(-71.99 329.44 114.867)\"\n />\n\n <circle\n cx=\"303.613\"\n cy=\"103.507\"\n r=\"9.376\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.2\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 345.867 106.913)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 334.312 110.042)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 338.393 118.259)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 339.79 125.599)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z\"\n opacity=\"0.5\"\n transform=\"rotate(-71.99 350.544 140.3)\"\n />\n\n <rect\n width=\"50.3\"\n height=\"78.305\"\n x=\"291.549\"\n y=\"174.486\"\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n rx=\"4\"\n transform=\"rotate(-57.265 316.7 213.638)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z\"\n transform=\"rotate(-57.57 285.154 205.563)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z\"\n transform=\"rotate(-57.57 298.635 200.737)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z\"\n transform=\"rotate(-57.57 304.171 204.251)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z\"\n transform=\"rotate(-57.57 309.706 207.771)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z\"\n transform=\"rotate(-57.265 315.485 212.94)\"\n />\n\n <path\n fill=\"#F4F6F8\"\n fillRule=\"nonzero\"\n d=\"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z\"\n transform=\"rotate(-57.57 320.777 214.804)\"\n />\n\n <path\n fill=\"#F4F6F8\"\n fillRule=\"nonzero\"\n d=\"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z\"\n transform=\"rotate(-57.57 326.313 218.318)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z\"\n transform=\"rotate(-57.57 345.465 214.454)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z\"\n />\n\n <path\n fill={PRIMARY_DARK}\n fillRule=\"nonzero\"\n d=\"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z\"\n opacity=\"0.243\"\n />\n\n <path\n fill=\"url(#linearGradient-2)\"\n fillRule=\"nonzero\"\n d=\"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z\"\n opacity=\"0.32\"\n />\n\n <ellipse\n cx=\"119.593\"\n cy=\"258.664\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"4.846\"\n ry=\"1\"\n />\n\n <ellipse\n cx=\"101.03\"\n cy=\"260.545\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"4.846\"\n ry=\"1\"\n />\n\n <ellipse\n cx=\"108.459\"\n cy=\"265.905\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"3.444\"\n ry=\"1\"\n />\n\n <ellipse\n cx=\"89.193\"\n cy=\"265.433\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"3.444\"\n ry=\"1\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M91.113 247.808s8.353 12.115 9.968 12.647\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M90.344 249.701L92.293 249.701\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M92.68 254.132L95.738 254.263\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M94.542 250.586L94.21 252.179\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M97.792 255.432L97.732 256.879\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M111.051 247.808s-8.371 12.115-9.97 12.647\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M111.82 249.701L109.871 249.701\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M109.485 254.132L106.426 254.263\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M107.622 250.586L107.954 252.179\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M104.372 255.432L104.432 256.879\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z\"\n />\n\n <circle\n cx=\"84.467\"\n cy=\"87.003\"\n r=\"6.467\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <circle\n cx=\"395.425\"\n cy=\"138.681\"\n r=\"6.467\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <circle\n cx=\"279.178\"\n cy=\"66.467\"\n r=\"6.467\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <circle\n cx=\"97.4\"\n cy=\"122.68\"\n r=\"10.838\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <path\n fill={PRIMARY_DARK}\n fillRule=\"nonzero\"\n d=\"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761\"\n opacity=\"0.72\"\n />\n\n <path\n fill={PRIMARY_DARK}\n fillRule=\"nonzero\"\n d=\"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z\"\n />\n </Box>\n );\n}\n\nexport default memo(UploadIllustration);\n","/* eslint-disable react/function-component-definition */\nimport { useId } from 'react';\nimport { useTheme } from '@mui/material/styles';\n\nexport function BackgroundShape() {\n const theme = useTheme();\n\n const gradientId = useId();\n\n const PRIMARY_MAIN = theme.vars.palette.primary.main;\n\n return (\n <>\n <defs>\n <linearGradient\n id={gradientId}\n x1=\"19.496%\"\n x2=\"77.479%\"\n y1=\"71.822%\"\n y2=\"16.69%\"\n >\n <stop offset=\"0%\" stopColor={PRIMARY_MAIN} />\n <stop offset=\"100%\" stopColor={PRIMARY_MAIN} stopOpacity=\"0\" />\n </linearGradient>\n </defs>\n\n <path\n fill={`url(#${gradientId})`}\n fillRule=\"nonzero\"\n d=\"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z\"\n opacity=\"0.2\"\n />\n </>\n );\n}\n"]}
@@ -1,43 +0,0 @@
1
- import { a, e as e$1, n, l, b, c, f, g, j as j$1, k as k$1, h, i } from './chunk-6WGKIN5L.js';
2
- import { a as a$6 } from './chunk-KR3DUHA6.js';
3
- import { a as a$2 } from './chunk-DTIGB5NW.js';
4
- import { a as a$7, b as b$1 } from './chunk-WQSRNCNF.js';
5
- import { e } from './chunk-OF6623HG.js';
6
- import { a as a$8 } from './chunk-N4DW7EIC.js';
7
- import { x } from './chunk-33C6UWPV.js';
8
- import { a as a$5 } from './chunk-6U5LS7MP.js';
9
- import { a as a$1 } from './chunk-NQNNMRLC.js';
10
- import { a as a$3 } from './chunk-SBMEL2IJ.js';
11
- import { j } from './chunk-VITOOMKK.js';
12
- import { a as a$4 } from './chunk-IAOMC4C4.js';
13
- import { k, q } from './chunk-GLRLKFPS.js';
14
- import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
15
- import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
16
- import { sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
17
- import { AnimatePresence, m } from 'framer-motion';
18
- import Ho from '@mui/material/ButtonBase';
19
- import Go from '@mui/material/IconButton';
20
- import { styled, alpha, useTheme } from '@mui/material/styles';
21
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
22
- import No from '@mui/material/Box';
23
- import G from '@mui/material/Stack';
24
- import Qo from '@mui/material/Tooltip';
25
- import ro from '@mui/material/Typography';
26
- import Yo from '@mui/material/Badge';
27
- import { useDropzone } from 'react-dropzone';
28
- import Wo from '@mui/material/Button';
29
- import Re from '@mui/material/FormHelperText';
30
- import { memo } from 'react';
31
- import we from '@mui/material/Dialog';
32
-
33
- function _o({sx:o,...e}){let r=useTheme();return jsx(Ho,{sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",color:"common.white",borderRadius:"inherit",transition:r.transitions.create(["opacity"]),"&:hover":{...q({color:k(r.vars.palette.grey["900Channel"],.64)}),opacity:1},...o},...e,children:jsx(a$1,{icon:"ARROW_DOWN_CICLE",width:24})})}function wo({sx:o,...e}){return jsx(Go,{size:"small",sx:{p:.35,top:4,right:4,position:"absolute",color:"common.white",bgcolor:r=>k(r.vars.palette.grey["900Channel"],.48),"&:hover":{bgcolor:r=>k(r.vars.palette.grey["900Channel"],.72)},...o},...e,children:jsx(a$1,{icon:"CLOSE_MARK_BUTTON",width:12})})}var A={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"};process.env.NODE_ENV==="development"&&console.warn(`\u26A0\uFE0F DEPRECATED: FileThumbnail (components/file-thumbnail) est\xE1 obsoleto. Use FileThumbnail do @zydon/common em seu lugar.
34
- Migra\xE7\xE3o: import { FileThumbnail } from "@zydon/common/components/FileUpload";
35
- O novo FileThumbnail oferece melhor integra\xE7\xE3o com o sistema de FileUpload e mais funcionalidades.`);function F({sx:o,file:e,tooltip:r,onRemove:i,imageView:l,slotProps:t,onDownload:m,...p}){let u=typeof e=="string"?e:URL.createObjectURL(e),{name:d,path:a$2}=a(e),n=a$7(a$2||u),g=jsx(No,{component:"img",src:u,className:A.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...t?.img}}),h=jsx(a$1,{icon:b$1(n),sx:{width:32,height:32,flexShrink:0,...o}}),f=jsxs(G,{component:"span",className:A.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...o},...p,children:[n==="image"&&l?g:h,i&&jsx(wo,{onClick:i,className:A.removeBtn,sx:t?.removeBtn}),m&&jsx(_o,{onClick:m,className:A.downloadBtn,sx:t?.downloadBtn})]});return r?jsx(Qo,{arrow:!0,title:d,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:f}):f}var oe=({onRemove:o,onHandleMainImage:e,key:r,sx:i$1,file:l,disableDrag:t,attributes:m,listeners:p,mainUrl:u,innerWidth:d,isDragging:a})=>{let n=l===u;return jsx(Yo,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:e&&jsx(k$1,{isMainImage:n,size:"small",onClick:()=>e(l),"aria-label":n?"Remover imagem principal":"Definir como imagem principal",children:jsx(a$1,{icon:n?"STAR_02":"STAR",width:12})}),children:jsxs(h,{width:d,isDragging:a,"data-testid":`preview-multi-img-${r}`,...j().inUp,sx:i$1,children:[jsx(a$8,{disableDrag:t,...m,...p}),jsx(F,{imageView:!0,file:l,sx:{position:"absolute",right:10,top:10}}),o&&jsx(i,{size:"small","aria-label":"Remover imagem",onClick:()=>o(l),children:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})},`badge-${r}`)},Fo=oe;var ie=({file:o,thumbnail:e$1,onRemove:r,onHandleMainImage:i,mainUrl:l,sx:t,disableDrag:m=!1})=>{let{key:p,name:u="",size:d=0}=a(o),a$2=typeof o=="string",n=m?60:80,{attributes:g$1,listeners:h,setNodeRef:f$1,transform:b,transition:v,isDragging:E}=useSortable({id:p,disabled:m}),S={transform:x.Transform.toString(b),transition:v,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${n+8}px`,height:"68px"};return e$1?jsx(f,{ref:f$1,style:S,children:jsx(Fo,{innerWidth:n,isDragging:E,sx:t,file:o,disableDrag:m,attributes:g$1,listeners:h,mainUrl:l,onRemove:r,onHandleMainImage:i},p)}):jsx(f,{ref:f$1,style:{...S,height:"80px",width:`${n+38}px`},children:jsxs(g,{width:n+30,isDragging:E,"data-testid":`preview-multi-img-${p}`,...j().inUp,sx:t,children:[jsx(a$8,{disableDrag:m,...g$1,...h}),jsx(F,{file:o}),jsxs(G,{flexGrow:1,sx:{minWidth:0,width:"100%"},children:[jsx(ro,{variant:"subtitle2",noWrap:!0,children:a$2?o:u}),jsx(ro,{variant:"caption",sx:{color:"text.secondary"},children:a$2?"":e(d)})]}),r&&jsx(j$1,{size:"small","aria-label":"Remover arquivo",onClick:()=>r(o),children:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})})},Ao=ie;var eo=({thumbnail:o,files:e,onRemove:r,onReorder:i,onHandleMainImage:l,mainUrl:t,sx:m})=>{let p=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!e?.length)return null;let u=a$1=>{let{active:n,over:g}=a$1;if(!(!n||!g||n.id===g.id)&&i){let h=e.findIndex(b=>{let{key:v}=a(b);return v===n.id}),f=e.findIndex(b=>{let{key:v}=a(b);return v===g.id});h!==-1&&f!==-1&&i(h,f);}},d=jsx(AnimatePresence,{initial:!1,children:e.map(a$1=>jsx(Ao,{file:a$1,thumbnail:o,onRemove:r,onHandleMainImage:l,mainUrl:t,sx:m,disableDrag:!i},a(a$1).key))});return i?jsx(DndContext,{sensors:p,collisionDetection:closestCenter,onDragEnd:u,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:e.map(a$1=>a(a$1).key),strategy:horizontalListSortingStrategy,children:d})}):d};function Oo({file:o}){let e=typeof o=="string"?o:o.name,r=typeof o=="string"?o:URL.createObjectURL(o);return jsx(No,{sx:{p:1,top:0,left:0,width:1,height:1,position:"absolute"},children:jsx(No,{component:"img",alt:e,src:r,sx:{width:1,height:1,borderRadius:1,objectFit:"cover"}})})}function wr({sx:o,...e}){return jsx(Go,{size:"small",sx:{top:16,right:16,zIndex:9,position:"absolute",color:r=>k(r.vars.palette.common.whiteChannel,.8),bgcolor:r=>k(r.vars.palette.grey["900Channel"],.72),"&:hover":{bgcolor:r=>k(r.vars.palette.grey["900Channel"],.48)},...o},...e,"aria-label":"Remover arquivo",children:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02",width:18})})}var xe=({header:o,description:e,sx:r,...i})=>jsxs(G,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...i,children:[jsx(a$2,{sx:{width:220}}),jsxs("div",{children:[jsx(ro,{gutterBottom:!0,variant:"h5",children:o||"Soltar ou selecionar arquivos"}),jsx(ro,{variant:"body2",sx:{color:"text.secondary"},children:e||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(ro,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),io=memo(xe);var Mo=styled(No,{shouldForwardProp:o=>!["isDragActive","isError","disabled"].includes(o)})(({theme:o,isDragActive:e,isError:r,disabled:i})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:o.spacing(5),borderRadius:o.shape.borderRadius,transition:o.transitions.create("padding"),backgroundColor:o.palette.background.neutral,border:`1px dashed ${alpha(o.palette.grey[500],.32)}`,...e&&{opacity:.72},...r&&{color:o.palette.error.main,backgroundColor:o.palette.error.lighter,borderColor:o.palette.error.light},...i&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));var Ee=({sx:o,id:e,tabIndex:r,uploading:i,getRootProps:l,getInputProps:t,isDragActive:m,isError:p,disabled:u,dropZoneSxProps:d,dropZoneContent:a,children:n,...g})=>jsxs(b,{children:[i&&jsx(a$5,{"data-testid":"uploading-progress-bar"}),jsxs(No,{sx:{width:1,position:"relative",...o},children:[jsxs(Mo,{...l(),"data-testid":"drop-zone-styled-area",isError:p,isDragActive:m,disabled:!!u,sx:d,...g,children:[jsx("input",{...t(),id:e,tabIndex:r}),a]}),n]})]}),ao=Ee;process.env.NODE_ENV==="development"&&console.warn(`\u26A0\uFE0F DEPRECATED: Upload est\xE1 obsoleto. Use FileUpload do @zydon/common em seu lugar.
36
- Migra\xE7\xE3o: import { SingleFileUpload, MultipleFileUpload } from "@zydon/common/components/FileUpload";
37
- O FileUpload oferece melhor gerenciamento de upload, integra\xE7\xE3o com APIs e hooks especializados.`);var _e=({id:o,disabled:e$2,multiple:r=!1,error:i,helperText:l$1,file:t,onDelete:m$1,files:p,thumbnail:u,onRemove:d,onHandleMainImage:a,mainUrl:n$1,sx:g,dropZoneProps:h,placeholderProps:f,placeholderAlt:b,uploading:v,image:E,tabIndex:S,preview:j$1="image",onRemoveAll:N,onUpload:T,onReorder:O,...J})=>{let{getRootProps:M,getInputProps:B,isDragActive:P,isDragReject:U,fileRejections:mo}=useDropzone({multiple:r,disabled:e$2,...J}),Q=!!t&&!r,X=Q||E,lo=p&&r&&p.length>0,po=typeof t=="string",co=U||!!i;if(j$1==="file")return jsxs(ao,{id:o,uploading:v,disabled:e$2,dropZoneSxProps:h,tabIndex:S,getRootProps:M,getInputProps:B,isDragActive:P,isError:co,dropZoneContent:jsxs(Fragment,{children:[!Q&&jsx(io,{}),Q&&jsxs(G,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:k=>`solid 1px ${k.palette.divider}`,...g},children:[jsx(F,{file:t}),jsxs(G,{flexGrow:1,sx:{minWidth:0},children:[jsx(ro,{variant:"subtitle2",noWrap:!0,children:po?t:t.name}),jsx(ro,{variant:"caption",sx:{color:"text.secondary"},children:po?"":e(t.size)})]}),m$1&&jsx(e$1,{edge:"end",size:"small",disabled:e$2,"aria-label":"Remover arquivo",onClick:k=>{k.stopPropagation(),m$1();},children:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})]}),children:[l$1&&l$1,jsx(n,{files:mo}),lo&&jsxs(Fragment,{children:[jsx(No,{sx:{my:3},children:jsx(eo,{files:p,thumbnail:u,onRemove:d,onHandleMainImage:a,mainUrl:n$1,onReorder:O})}),jsxs(G,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[N&&jsx(Wo,{color:"inherit",variant:"outlined",size:"small",onClick:N,children:"Remover todos"}),T&&jsx(Wo,{size:"small",variant:"contained",onClick:T,children:"Enviar arquivos"})]})]})]});let go=X?{opacity:0}:void 0;return jsxs(ao,{id:o,uploading:v,disabled:e$2,dropZoneSxProps:h,tabIndex:S,getRootProps:M,getInputProps:B,isDragActive:P,isError:co,dropZoneContent:jsxs(Fragment,{children:[b?jsx(G,{sx:go,children:b}):jsx(io,{sx:go,header:f?.title,description:f?.description}),X&&jsx(Oo,{file:t||E||""})]}),children:[l$1&&jsx(Re,{error:!!i,sx:k=>({mx:"14px",color:e$2?k.palette.grey[500]:void 0}),children:l$1}),jsx(n,{files:mo}),X&&m$1&&jsx(l,{size:"small",onClick:m$1,disabled:e$2,"aria-label":"Remover arquivo",children:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02",width:16})}),lo&&jsx(Fragment,{children:jsx(No,{sx:{my:3,ml:.5},children:jsx(eo,{files:p,thumbnail:u,onRemove:d,onHandleMainImage:a,mainUrl:n$1,onReorder:O})})})]})},Ko=_e;process.env.NODE_ENV==="development"&&console.warn(`\u26A0\uFE0F DEPRECATED: UploadWithCrop est\xE1 obsoleto. Use SingleImageUpload do @zydon/common em seu lugar.
38
- Migra\xE7\xE3o: import { SingleImageUpload } from "@zydon/common/components/FileUpload";
39
- O SingleImageUpload oferece crop integrado, melhor gerenciamento de upload e integra\xE7\xE3o com APIs.`);var Fe=({onFileCropped:o,onImageUploaded:e$1,onCancel:r,aspect:i,label:l,image:t="",uploading:m,file:p,tabIndex:u,maxSize:d,onDropRejected:a,...n})=>{let{id:g,setCropModalOpen:h,handleRemove:f,toggleCropModalOpen:b$1,cropModalOpen:v,cancelChanges:E,saveChanges:S,previewImage:j,setCropper:N,preview:T,closePreviewImage:O,saving:J}=a$3({onFileCropped:o,onImageUploaded:e$1,onCancel:r}),{error:M}=a$4();return jsxs(Fragment,{children:[jsxs(b,{children:[m&&jsx(a$5,{}),jsx(Ko,{...n,maxSize:d,id:g,file:p,onDrop:B=>{if(B.length>0){h(!0);let P=new FileReader;P.addEventListener("load",()=>{let U=P.result?.toString()||"";e$1(U),o(void 0);}),P.readAsDataURL(B[0]);}},image:t,tabIndex:u,onDropRejected:(B,P)=>{let U=B[0]?.errors[0]?.code;e$1(void 0),o(void 0),M(U==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(d)}`:"Erro ao enviar imagem"),a&&a(B,P);}}),(p||t)&&jsxs(c,{className:"actions",children:[jsx(Wo,{color:"inherit",startIcon:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:f,children:"Remover"}),jsx(Wo,{color:"inherit",startIcon:jsx(a$1,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:b$1,children:"Editar"})]})]}),jsx(a$6,{id:g,open:v,onClose:E,label:l,aspectRatio:i,imageSrc:t,onRemove:f,onSave:S,onPreview:j,onInitialized:N,loading:J}),jsx(we,{open:!!T,onClose:O,scroll:"body",PaperProps:{sx:{p:2}},children:T&&jsx("img",{src:T,alt:"Preview"})})]})},St=Fe;
40
-
41
- export { eo as a, Oo as b, wr as c, Ko as d, St as e };
42
- //# sourceMappingURL=out.js.map
43
- //# sourceMappingURL=chunk-IEGF6HVV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/upload/components/preview-multi-file.tsx","../src/components/file-thumbnail/action-buttons.tsx","../src/components/file-thumbnail/file-thumbnail.tsx","../src/components/file-thumbnail/classes.ts","../src/components/upload/components/SortableItem.tsx","../src/components/upload/components/ThumbnailBadge.tsx","../src/components/upload/components/preview-single-file.tsx","../src/components/upload/Upload.tsx","../src/components/upload/components/DropZonePlaceholder.tsx","../src/components/upload/CustomDropZone.tsx","../src/components/upload/CustomDropZone.styles.ts","../src/components/upload/upload-with-crop.tsx"],"names":["closestCenter","DndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","restrictToHorizontalAxis","restrictToParentElement","restrictToWindowEdges","horizontalListSortingStrategy","SortableContext","sortableKeyboardCoordinates","AnimatePresence","ButtonBase","IconButton","useTheme","jsx","DownloadButton","sx","other","theme","bgBlur","varAlpha","Icon_default","RemoveButton","Box","Stack","Tooltip","fileThumbnailClasses","jsxs","FileThumbnail","file","tooltip","onRemove","imageView","slotProps","onDownload","previewUrl","name","path","fileData","format","fileFormat","renderImg","renderIcon","fileThumb","renderContent","useSortable","Typography","Badge","ThumbnailBadge","onHandleMainImage","key","disableDrag","attributes","listeners","mainUrl","innerWidth","isDragging","isMainImage","StarButton","FrameImageThumbnail","varFade","DragButton_default","DeleteItemButton","ThumbnailBadge_default","SortableFile","thumbnail","size","isNotFormatFile","setNodeRef","transform","transition","style","CSS","DragWrapper","FrameFileThumbnail","fData","DeleteFileButton","SortableItem_default","MultiFilePreview","files","onReorder","sensors","handleDragEnd","event","active","over","oldIndex","newIndex","sortableFile","SingleFilePreview","fileName","DeleteButton","useDropzone","Button","FormHelperText","m","memo","Fragment","DropZonePlaceholder","header","description","UploadIllustration_default","DropZonePlaceholder_default","alpha","styled","StyledDropZone","prop","isDragActive","isError","disabled","CustomDropZone","id","tabIndex","uploading","getRootProps","getInputProps","dropZoneSxProps","dropZoneContent","children","props","Container","FixedProgressBar_default","CustomDropZone_default","Upload","multiple","error","helperText","onDelete","dropZoneProps","placeholderProps","placeholderAlt","image","preview","onRemoveAll","onUpload","isDragReject","fileRejections","hasFile","hasFileOrImage","hasFiles","CloseIconButton","e","RejectionFiles","hidePlaceholder","Upload_default","Dialog","UploadWithCrop","onFileCropped","onImageUploaded","onCancel","aspect","label","maxSize","onDropRejected","setCropModalOpen","handleRemove","toggleCropModalOpen","cropModalOpen","cancelChanges","saveChanges","previewImage","setCropper","closePreviewImage","saving","useUploadImage_default","useSnackbar_default","acceptedFiles","reader","src","errorCode","OverlayActions","ImageCropModal_default","upload_with_crop_default"],"mappings":"onBAAA,OACE,iBAAAA,GACA,cAAAC,GAEA,kBAAAC,GACA,iBAAAC,GACA,aAAAC,GACA,cAAAC,OACK,gBACP,OACE,4BAAAC,GACA,2BAAAC,GACA,yBAAAC,OACK,qBACP,OACE,iCAAAC,GACA,mBAAAC,GACA,+BAAAC,OACK,oBACP,OAAS,mBAAAC,OAAuB,gBChBhC,OAAOC,OAAgB,2BAEvB,OAAOC,OAAgB,2BACvB,OAAS,YAAAC,OAAgB,uBAgCnB,cAAAC,MAAA,oBA3BC,SAASC,GAAe,CAAE,GAAAC,EAAI,GAAGC,CAAM,EAAoB,CAChE,IAAMC,EAAQL,GAAS,EAEvB,OACEC,EAACH,GAAA,CACC,GAAI,CACF,EAAG,EACH,IAAK,EACL,MAAO,EACP,MAAO,EACP,OAAQ,EACR,OAAQ,EACR,QAAS,EACT,SAAU,WACV,MAAO,eACP,aAAc,UACd,WAAYO,EAAM,YAAY,OAAO,CAAC,SAAS,CAAC,EAChD,UAAW,CACT,GAAGC,GAAO,CACR,MAAOC,EAASF,EAAM,KAAK,QAAQ,KAAK,YAAY,EAAG,GAAI,CAC7D,CAAC,EACD,QAAS,CACX,EACA,GAAGF,CACL,EACC,GAAGC,EAEJ,SAAAH,EAACO,EAAA,CAAK,KAAK,mBAAmB,MAAO,GAAI,EAC3C,CAEJ,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iB,EAAI,EAErB,IAAMa,EAAS,IAAI,WACnBA,EAAO,iBAAiB,OAAQ,IAAM,CACpC,IAAMC,EAAMD,EAAO,QAAQ,SAAS,GAAK,GAEzCnB,EAAgBoB,CAAG,EACnBrB,EAAc,MAAS,CACzB,CAAC,EAEDoB,EAAO,cAAcD,EAAc,CAAC,CAAC,EAEzC,EACA,MAAOnC,EACP,SAAUnB,EACV,eAAgB,CAACwB,EAAgBrD,IAAU,CACzC,IAAMsF,EAAYjC,EAAe,CAAC,GAAG,OAAO,CAAC,GAAG,KAChDY,EAAgB,MAAS,EACzBD,EAAc,MAAS,EAEvBtB,EACE4C,IAAc,iBACV,oCAAiC9F,EAAM6E,CAAO,IAC9C,uBACN,EAEIC,GAAgBA,EAAejB,EAAgBrD,CAAK,CAC1D,EACF,GAEEtD,GAAQsG,IACRxG,GAAC+I,GAAA,CAAe,UAAU,UACxB,UAAA5J,EAAC+E,GAAA,CACC,MAAM,UACN,UACE/E,EAACO,EAAA,CAAK,KAAK,wBAAwB,MAAM,aAAa,EAExD,QAASsI,EACV,mBAED,EAEA7I,EAAC+E,GAAA,CACC,MAAM,UACN,UAAW/E,EAACO,EAAA,CAAK,KAAK,eAAe,MAAM,eAAe,EAC1D,QAASuI,EACV,kBAED,GACF,GAEJ,EAEA9I,EAAC6J,GAAA,CACC,GAAI5D,EACJ,KAAM8C,EACN,QAASC,EACT,MAAOP,EACP,YAAaD,EACb,SAAUnB,EACV,SAAUwB,EACV,OAAQI,EACR,UAAWC,EACX,cAAeC,EACf,QAASE,EACX,EAEArJ,EAACmI,GAAA,CACC,KAAM,CAAC,CAACb,EACR,QAAS8B,EACT,OAAO,OACP,WAAY,CACV,GAAI,CACF,EAAG,CACL,CACF,EAEC,SAAA9B,GAAWtH,EAAC,OAAI,IAAKsH,EAAS,IAAI,UAAU,EAC/C,GACF,CAEJ,EAEOwC,GAAQ1B","sourcesContent":["import {\n closestCenter,\n DndContext,\n DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport {\n restrictToHorizontalAxis,\n restrictToParentElement,\n restrictToWindowEdges,\n} from '@dnd-kit/modifiers';\nimport {\n horizontalListSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n} from '@dnd-kit/sortable';\nimport { AnimatePresence } from 'framer-motion';\n\nimport { fileData } from 'components/file-thumbnail';\nimport { UploadProps } from 'types/upload';\n\nimport SortableFile from './SortableItem';\n\nexport const MultiFilePreview = ({\n thumbnail,\n files,\n onRemove,\n onReorder,\n onHandleMainImage,\n mainUrl,\n sx,\n}: UploadProps) => {\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 8,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n if (!files?.length) {\n return null;\n }\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (!active || !over || active.id === over.id) return;\n\n if (onReorder) {\n const oldIndex = files.findIndex(file => {\n const { key } = fileData(file);\n return key === active.id;\n });\n\n const newIndex = files.findIndex(file => {\n const { key } = fileData(file);\n return key === over.id;\n });\n\n if (oldIndex !== -1 && newIndex !== -1) {\n onReorder(oldIndex, newIndex);\n }\n }\n };\n\n const sortableFile = (\n <AnimatePresence initial={false}>\n {files.map(file => (\n <SortableFile\n key={fileData(file).key}\n file={file}\n thumbnail={thumbnail}\n onRemove={onRemove}\n onHandleMainImage={onHandleMainImage}\n mainUrl={mainUrl}\n sx={sx}\n disableDrag={!onReorder}\n />\n ))}\n </AnimatePresence>\n );\n\n if (!onReorder) {\n return sortableFile;\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n modifiers={[\n restrictToHorizontalAxis,\n restrictToParentElement,\n restrictToWindowEdges,\n ]}\n >\n <SortableContext\n items={files.map(file => fileData(file).key)}\n strategy={horizontalListSortingStrategy}\n >\n {sortableFile}\n </SortableContext>\n </DndContext>\n );\n};\n","/* eslint-disable react/function-component-definition */\n// eslint-disable-next-line simple-import-sort/imports\nimport type { ButtonBaseProps } from '@mui/material/ButtonBase';\nimport ButtonBase from '@mui/material/ButtonBase';\nimport type { IconButtonProps } from '@mui/material/IconButton';\nimport IconButton from '@mui/material/IconButton';\nimport { useTheme } from '@mui/material/styles';\nimport Icon from 'components/Icon';\n\nimport { bgBlur, varAlpha } from 'theme/styles';\n\nexport function DownloadButton({ sx, ...other }: ButtonBaseProps) {\n const theme = useTheme();\n\n return (\n <ButtonBase\n sx={{\n p: 0,\n top: 0,\n right: 0,\n width: 1,\n height: 1,\n zIndex: 9,\n opacity: 0,\n position: 'absolute',\n color: 'common.white',\n borderRadius: 'inherit',\n transition: theme.transitions.create(['opacity']),\n '&:hover': {\n ...bgBlur({\n color: varAlpha(theme.vars.palette.grey['900Channel'], 0.64),\n }),\n opacity: 1,\n },\n ...sx,\n }}\n {...other}\n >\n <Icon icon=\"ARROW_DOWN_CICLE\" width={24} />\n </ButtonBase>\n );\n}\n\nexport function RemoveButton({ sx, ...other }: IconButtonProps) {\n return (\n <IconButton\n size=\"small\"\n sx={{\n p: 0.35,\n top: 4,\n right: 4,\n position: 'absolute',\n color: 'common.white',\n bgcolor: theme => varAlpha(theme.vars.palette.grey['900Channel'], 0.48),\n '&:hover': {\n bgcolor: theme =>\n varAlpha(theme.vars.palette.grey['900Channel'], 0.72),\n },\n ...sx,\n }}\n {...other}\n >\n <Icon icon=\"CLOSE_MARK_BUTTON\" width={12} />\n </IconButton>\n );\n}\n","/* eslint-disable react/function-component-definition */\nimport Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport Tooltip from '@mui/material/Tooltip';\n\nimport Icon from 'components/Icon';\nimport { Icon as IconEnum } from 'types/icon';\n\nimport { DownloadButton, RemoveButton } from './action-buttons';\nimport { fileThumbnailClasses } from './classes';\nimport type { FileThumbnailProps } from './types';\nimport { fileData, fileFormat, fileThumb } from './utils';\n\nif (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '⚠️ DEPRECATED: FileThumbnail (components/file-thumbnail) está obsoleto. Use FileThumbnail do @zydon/common em seu lugar.\\n' +\n 'Migração: import { FileThumbnail } from \"@zydon/common/components/FileUpload\";\\n' +\n 'O novo FileThumbnail oferece melhor integração com o sistema de FileUpload e mais funcionalidades.',\n );\n}\n\nexport function FileThumbnail({\n sx,\n file,\n tooltip,\n onRemove,\n imageView,\n slotProps,\n onDownload,\n ...other\n}: FileThumbnailProps) {\n const previewUrl =\n typeof file === 'string' ? file : URL.createObjectURL(file);\n\n const { name, path } = fileData(file);\n\n const format = fileFormat(path || previewUrl);\n\n const renderImg = (\n <Box\n component=\"img\"\n src={previewUrl}\n className={fileThumbnailClasses.img}\n sx={{\n width: 1,\n height: 1,\n objectFit: 'cover',\n borderRadius: 'inherit',\n ...slotProps?.img,\n }}\n />\n );\n\n const renderIcon = (\n <Icon\n icon={fileThumb(format) as keyof typeof IconEnum}\n sx={{\n width: 32,\n height: 32,\n flexShrink: 0,\n ...sx,\n }}\n />\n );\n\n const renderContent = (\n <Stack\n component=\"span\"\n className={fileThumbnailClasses.root}\n sx={{\n width: 36,\n height: 36,\n flexShrink: 0,\n borderRadius: 1.25,\n alignItems: 'center',\n position: 'relative',\n display: 'inline-flex',\n justifyContent: 'center',\n ...sx,\n }}\n {...other}\n >\n {format === 'image' && imageView ? renderImg : renderIcon}\n\n {onRemove && (\n <RemoveButton\n onClick={onRemove}\n className={fileThumbnailClasses.removeBtn}\n sx={slotProps?.removeBtn}\n />\n )}\n\n {onDownload && (\n <DownloadButton\n onClick={onDownload}\n className={fileThumbnailClasses.downloadBtn}\n sx={slotProps?.downloadBtn}\n />\n )}\n </Stack>\n );\n\n if (tooltip) {\n return (\n <Tooltip\n arrow\n title={name}\n slotProps={{\n popper: {\n modifiers: [{ name: 'offset', options: { offset: [0, -12] } }],\n },\n }}\n >\n {renderContent}\n </Tooltip>\n );\n }\n\n return renderContent;\n}\n","export const fileThumbnailClasses = {\n root: 'mnl__file__thumbnail__root',\n img: 'mnl__file__thumbnail__img',\n icon: 'mnl__file__thumbnail__icon',\n removeBtn: 'mnl__file__thumbnail__remove__button',\n downloadBtn: 'mnl__file__thumbnail__download__button',\n};\n","import { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport { varFade } from 'components/animate';\nimport DragButton from 'components/DragButton';\nimport { fileData, FileThumbnail } from 'components/file-thumbnail';\nimport Icon from 'components/Icon';\nimport { UploadProps } from 'types/upload';\nimport { fData } from 'utils/formatNumber';\n\nimport { DeleteFileButton, DragWrapper, FrameFileThumbnail } from '../styles';\n\nimport ThumbnailBadge from './ThumbnailBadge';\n\nconst SortableFile = ({\n file,\n thumbnail,\n onRemove,\n onHandleMainImage,\n mainUrl,\n sx,\n disableDrag = false,\n}: UploadProps & { file: string | File; disableDrag?: boolean }) => {\n const { key, name = '', size = 0 } = fileData(file);\n const isNotFormatFile = typeof file === 'string';\n const innerWidth = disableDrag ? 60 : 80;\n\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: key, disabled: disableDrag });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n display: 'inline-block',\n alignItems: 'center',\n justifyContent: 'center',\n width: `${innerWidth + 8}px`,\n height: '68px',\n };\n\n if (thumbnail) {\n return (\n <DragWrapper ref={setNodeRef} style={style}>\n <ThumbnailBadge\n innerWidth={innerWidth}\n isDragging={isDragging}\n sx={sx}\n key={key}\n file={file}\n disableDrag={disableDrag}\n attributes={attributes}\n listeners={listeners}\n mainUrl={mainUrl}\n onRemove={onRemove}\n onHandleMainImage={onHandleMainImage}\n />\n </DragWrapper>\n );\n }\n\n return (\n <DragWrapper\n ref={setNodeRef}\n style={{\n ...style,\n height: '80px',\n width: `${innerWidth + 38}px`,\n }}\n >\n <FrameFileThumbnail\n width={innerWidth + 30}\n isDragging={isDragging}\n data-testid={`preview-multi-img-${key}`}\n {...varFade().inUp}\n sx={sx}\n >\n <DragButton disableDrag={disableDrag} {...attributes} {...listeners} />\n\n <FileThumbnail file={file} />\n\n <Stack flexGrow={1} sx={{ minWidth: 0, width: '100%' }}>\n <Typography variant=\"subtitle2\" noWrap>\n {isNotFormatFile ? file : name}\n </Typography>\n\n <Typography variant=\"caption\" sx={{ color: 'text.secondary' }}>\n {isNotFormatFile ? '' : fData(size)}\n </Typography>\n </Stack>\n\n {onRemove && (\n <DeleteFileButton\n size=\"small\"\n aria-label=\"Remover arquivo\"\n onClick={() => onRemove(file)}\n >\n <Icon icon=\"DELETE_MARK_BUTTON_02\" width={16} />\n </DeleteFileButton>\n )}\n </FrameFileThumbnail>\n </DragWrapper>\n );\n};\n\nexport default SortableFile;\n","import {\n DraggableAttributes,\n DraggableSyntheticListeners,\n} from '@dnd-kit/core';\nimport Badge from '@mui/material/Badge';\n\nimport { varFade } from 'components/animate';\nimport DragButton from 'components/DragButton';\nimport { FileThumbnail } from 'components/file-thumbnail';\nimport Icon from 'components/Icon';\nimport { UploadProps } from 'types/upload';\n\nimport { DeleteItemButton, FrameImageThumbnail, StarButton } from '../styles';\n\nconst ThumbnailBadge = ({\n onRemove,\n onHandleMainImage,\n key,\n sx,\n file,\n disableDrag,\n attributes,\n listeners,\n mainUrl,\n innerWidth,\n isDragging,\n}: UploadProps & {\n key: string;\n file: string | File;\n disableDrag: boolean;\n attributes: DraggableAttributes;\n listeners: DraggableSyntheticListeners;\n innerWidth: number;\n isDragging: boolean;\n}) => {\n const isMainImage = file === mainUrl;\n const mainImageIcon = isMainImage ? 'STAR_02' : 'STAR';\n const mainImageLabel = isMainImage\n ? 'Remover imagem principal'\n : 'Definir como imagem principal';\n\n return (\n <Badge\n key={`badge-${key}`}\n anchorOrigin={{ vertical: 'top', horizontal: 'left' }}\n badgeContent={\n onHandleMainImage && (\n <StarButton\n isMainImage={isMainImage}\n size=\"small\"\n onClick={() => onHandleMainImage(file)}\n aria-label={mainImageLabel}\n >\n <Icon icon={mainImageIcon} width={12} />\n </StarButton>\n )\n }\n >\n <FrameImageThumbnail\n width={innerWidth}\n isDragging={isDragging}\n data-testid={`preview-multi-img-${key}`}\n {...varFade().inUp}\n sx={sx}\n >\n <DragButton disableDrag={disableDrag} {...attributes} {...listeners} />\n\n <FileThumbnail\n imageView\n file={file}\n sx={{ position: 'absolute', right: 10, top: 10 }}\n />\n\n {onRemove && (\n <DeleteItemButton\n size=\"small\"\n aria-label=\"Remover imagem\"\n onClick={() => onRemove(file)}\n >\n <Icon icon=\"DELETE_MARK_BUTTON_02\" width={16} />\n </DeleteItemButton>\n )}\n </FrameImageThumbnail>\n </Badge>\n );\n};\n\nexport default ThumbnailBadge;\n","/* eslint-disable react/function-component-definition */\nimport Box from '@mui/material/Box';\nimport type { IconButtonProps } from '@mui/material/IconButton';\nimport IconButton from '@mui/material/IconButton';\n\nimport Icon from 'components/Icon';\nimport { varAlpha } from 'theme/styles';\n\nimport type { SingleFilePreviewProps } from '../types';\n\n// ----------------------------------------------------------------------\n\nexport function SingleFilePreview({ file }: SingleFilePreviewProps) {\n const fileName = typeof file === 'string' ? file : file.name;\n\n const previewUrl =\n typeof file === 'string' ? file : URL.createObjectURL(file);\n\n return (\n <Box\n sx={{\n p: 1,\n top: 0,\n left: 0,\n width: 1,\n height: 1,\n position: 'absolute',\n }}\n >\n <Box\n component=\"img\"\n alt={fileName}\n src={previewUrl}\n sx={{\n width: 1,\n height: 1,\n borderRadius: 1,\n objectFit: 'cover',\n }}\n />\n </Box>\n );\n}\n\n// ----------------------------------------------------------------------\n\nexport function DeleteButton({ sx, ...other }: IconButtonProps) {\n return (\n <IconButton\n size=\"small\"\n sx={{\n top: 16,\n right: 16,\n zIndex: 9,\n position: 'absolute',\n color: theme => varAlpha(theme.vars.palette.common.whiteChannel, 0.8),\n bgcolor: theme => varAlpha(theme.vars.palette.grey['900Channel'], 0.72),\n '&:hover': {\n bgcolor: theme =>\n varAlpha(theme.vars.palette.grey['900Channel'], 0.48),\n },\n ...sx,\n }}\n {...other}\n aria-label=\"Remover arquivo\"\n >\n <Icon icon=\"DELETE_MARK_BUTTON_02\" width={18} />\n </IconButton>\n );\n}\n","import React from 'react';\nimport { FileRejection, useDropzone } from 'react-dropzone';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { m } from 'framer-motion';\n\nimport { varFade } from 'components/animate';\nimport { FileThumbnail } from 'components/file-thumbnail';\nimport Icon from 'components/Icon';\nimport { UploadProps } from 'types/upload';\nimport { fData } from 'utils/formatNumber';\n\nimport DropZonePlaceholder from './components/DropZonePlaceholder';\nimport { MultiFilePreview } from './components/preview-multi-file';\nimport { SingleFilePreview } from './components/preview-single-file';\nimport { RejectionFiles } from './components/rejection-files';\nimport CustomDropZone from './CustomDropZone';\nimport { CloseIconButton, DeleteButton } from './styles';\n\nif (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '⚠️ DEPRECATED: Upload está obsoleto. Use FileUpload do @zydon/common em seu lugar.\\n' +\n 'Migração: import { SingleFileUpload, MultipleFileUpload } from \"@zydon/common/components/FileUpload\";\\n' +\n 'O FileUpload oferece melhor gerenciamento de upload, integração com APIs e hooks especializados.',\n );\n}\n\nconst Upload = ({\n id,\n disabled,\n multiple = false,\n error,\n helperText,\n file,\n onDelete,\n files,\n thumbnail,\n onRemove,\n onHandleMainImage,\n mainUrl,\n sx,\n dropZoneProps,\n placeholderProps,\n placeholderAlt,\n uploading,\n image,\n tabIndex,\n preview = 'image',\n onRemoveAll,\n onUpload,\n onReorder,\n ...other\n}: UploadProps) => {\n const {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragReject,\n fileRejections,\n } = useDropzone({\n multiple,\n disabled,\n ...other,\n });\n\n const hasFile = !!file && !multiple;\n const hasFileOrImage = hasFile || image;\n const hasFiles = files && multiple && files.length > 0;\n const isNotFormatFile = typeof file === 'string';\n const isError = isDragReject || !!error;\n\n if (preview === 'file') {\n return (\n <CustomDropZone\n id={id}\n uploading={uploading}\n disabled={disabled}\n dropZoneSxProps={dropZoneProps}\n tabIndex={tabIndex}\n getRootProps={getRootProps}\n getInputProps={getInputProps}\n isDragActive={isDragActive}\n isError={isError}\n dropZoneContent={\n <>\n {!hasFile && <DropZonePlaceholder />}\n\n {hasFile && (\n <Stack\n component={m.div}\n {...varFade().inUp}\n spacing={2}\n direction=\"row\"\n alignItems=\"center\"\n sx={{\n my: 1,\n px: 1,\n py: 0.75,\n borderRadius: 0.75,\n border: theme => `solid 1px ${theme.palette.divider}`,\n ...sx,\n }}\n >\n <FileThumbnail file={file} />\n\n <Stack flexGrow={1} sx={{ minWidth: 0 }}>\n <Typography variant=\"subtitle2\" noWrap>\n {isNotFormatFile ? file : file.name}\n </Typography>\n\n <Typography\n variant=\"caption\"\n sx={{ color: 'text.secondary' }}\n >\n {isNotFormatFile ? '' : fData(file.size)}\n </Typography>\n </Stack>\n\n {onDelete && (\n <CloseIconButton\n edge=\"end\"\n size=\"small\"\n disabled={disabled}\n aria-label=\"Remover arquivo\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onDelete();\n }}\n >\n <Icon icon=\"DELETE_MARK_BUTTON_02\" width={16} />\n </CloseIconButton>\n )}\n </Stack>\n )}\n </>\n }\n >\n {helperText && helperText}\n\n <RejectionFiles files={fileRejections as FileRejection[]} />\n\n {hasFiles && (\n <>\n <Box sx={{ my: 3 }}>\n <MultiFilePreview\n files={files}\n thumbnail={thumbnail}\n onRemove={onRemove}\n onHandleMainImage={onHandleMainImage}\n mainUrl={mainUrl}\n onReorder={onReorder}\n />\n </Box>\n\n <Stack direction=\"row\" justifyContent=\"flex-end\" spacing={1.5}>\n {onRemoveAll && (\n <Button\n color=\"inherit\"\n variant=\"outlined\"\n size=\"small\"\n onClick={onRemoveAll}\n >\n Remover todos\n </Button>\n )}\n\n {onUpload && (\n <Button size=\"small\" variant=\"contained\" onClick={onUpload}>\n Enviar arquivos\n </Button>\n )}\n </Stack>\n </>\n )}\n </CustomDropZone>\n );\n }\n\n const hidePlaceholder = hasFileOrImage ? { opacity: 0 } : undefined;\n\n return (\n <CustomDropZone\n id={id}\n uploading={uploading}\n disabled={disabled}\n dropZoneSxProps={dropZoneProps}\n tabIndex={tabIndex}\n getRootProps={getRootProps}\n getInputProps={getInputProps}\n isDragActive={isDragActive}\n isError={isError}\n dropZoneContent={\n <>\n {placeholderAlt ? (\n <Stack sx={hidePlaceholder}>{placeholderAlt}</Stack>\n ) : (\n <DropZonePlaceholder\n sx={hidePlaceholder}\n header={placeholderProps?.title}\n description={placeholderProps?.description}\n />\n )}\n\n {hasFileOrImage && <SingleFilePreview file={file || image || ''} />}\n </>\n }\n >\n {helperText && (\n <FormHelperText\n error={!!error}\n sx={theme => ({\n mx: '14px',\n color: disabled ? theme.palette.grey[500] : undefined,\n })}\n >\n {helperText}\n </FormHelperText>\n )}\n\n <RejectionFiles files={fileRejections as FileRejection[]} />\n\n {hasFileOrImage && onDelete && (\n <DeleteButton\n size=\"small\"\n onClick={onDelete}\n disabled={disabled}\n aria-label=\"Remover arquivo\"\n >\n <Icon icon=\"DELETE_MARK_BUTTON_02\" width={16} />\n </DeleteButton>\n )}\n\n {hasFiles && (\n <>\n <Box sx={{ my: 3, ml: 0.5 }}>\n <MultiFilePreview\n files={files}\n thumbnail={thumbnail}\n onRemove={onRemove}\n onHandleMainImage={onHandleMainImage}\n mainUrl={mainUrl}\n onReorder={onReorder}\n />\n </Box>\n </>\n )}\n </CustomDropZone>\n );\n};\n\nexport default Upload;\n","import { memo } from 'react';\nimport Stack, { StackProps } from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport UploadIllustration from 'assets/illustrations/UploadIllustration';\n\ninterface PlaceholderProps extends StackProps {\n header?: React.ReactNode;\n description?: React.ReactNode;\n}\n\nconst DropZonePlaceholder = ({\n header,\n description,\n sx,\n ...other\n}: PlaceholderProps) => {\n return (\n <Stack\n spacing={5}\n alignItems=\"center\"\n justifyContent=\"center\"\n direction={{\n xs: 'column',\n md: 'row',\n }}\n sx={{\n width: 1,\n textAlign: {\n xs: 'center',\n md: 'left',\n },\n ...sx,\n }}\n {...other}\n >\n <UploadIllustration sx={{ width: 220 }} />\n\n <div>\n <Typography gutterBottom variant=\"h5\">\n {header || 'Soltar ou selecionar arquivos'}\n </Typography>\n\n <Typography variant=\"body2\" sx={{ color: 'text.secondary' }}>\n {description || (\n <>\n Solte os arquivos aqui ou clique\n <Typography\n variant=\"body2\"\n component=\"span\"\n sx={{\n mx: 0.5,\n color: 'primary.main',\n textDecoration: 'underline',\n }}\n >\n procurar\n </Typography>\n na sua máquina\n </>\n )}\n </Typography>\n </div>\n </Stack>\n );\n};\n\nexport default memo(DropZonePlaceholder);\n","import { DropzoneInputProps, DropzoneRootProps } from 'react-dropzone';\nimport Box from '@mui/material/Box';\nimport { SxProps } from '@mui/material/styles';\n\nimport FixedProgressBar from 'components/FixedProgressBar';\n\nimport { StyledDropZone } from './CustomDropZone.styles';\nimport { Container } from './styles';\n\ninterface CustomDropZoneProps {\n sx?: SxProps;\n uploading?: boolean;\n id?: string;\n tabIndex?: number;\n getRootProps: () => DropzoneRootProps;\n getInputProps: () => DropzoneInputProps;\n isDragActive: boolean;\n isError: boolean;\n disabled?: boolean;\n dropZoneSxProps?: SxProps;\n dropZoneContent?: React.ReactNode;\n children?: React.ReactNode;\n}\n\nconst CustomDropZone = ({\n sx,\n id,\n tabIndex,\n uploading,\n getRootProps,\n getInputProps,\n isDragActive,\n isError,\n disabled,\n dropZoneSxProps,\n dropZoneContent,\n children,\n ...props\n}: CustomDropZoneProps) => {\n return (\n <Container>\n {uploading && <FixedProgressBar data-testid=\"uploading-progress-bar\" />}\n <Box sx={{ width: 1, position: 'relative', ...sx }}>\n <StyledDropZone\n {...getRootProps()}\n data-testid=\"drop-zone-styled-area\"\n isError={isError}\n isDragActive={isDragActive}\n disabled={!!disabled}\n sx={dropZoneSxProps}\n {...props}\n >\n <input {...getInputProps()} id={id} tabIndex={tabIndex} />\n\n {dropZoneContent}\n </StyledDropZone>\n {children}\n </Box>\n </Container>\n );\n};\n\nexport default CustomDropZone;\n","import { DropzoneRootProps } from 'react-dropzone/.';\nimport Box, { BoxProps } from '@mui/material/Box';\nimport { alpha, styled } from '@mui/material/styles';\n\ntype StyledDropZoneProps = BoxProps &\n Omit<DropzoneRootProps, 'children' | 'onDrop' | 'onError'> & {\n isDragActive: boolean;\n isError: boolean;\n disabled: boolean;\n };\nexport const StyledDropZone = styled(Box, {\n shouldForwardProp: prop =>\n !['isDragActive', 'isError', 'disabled'].includes(prop as string),\n})<StyledDropZoneProps>(({ theme, isDragActive, isError, disabled }) => ({\n outline: 'none',\n cursor: 'pointer',\n overflow: 'hidden',\n position: 'relative',\n padding: theme.spacing(5),\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create('padding'),\n backgroundColor: theme.palette.background.neutral,\n border: `1px dashed ${alpha(theme.palette.grey[500], 0.32)}`,\n ...(isDragActive && {\n opacity: 0.72,\n }),\n ...(isError && {\n color: theme.palette.error.main,\n backgroundColor: theme.palette.error.lighter,\n borderColor: theme.palette.error.light,\n }),\n ...(disabled && {\n opacity: 0.48,\n pointerEvents: 'none',\n }),\n '&:hover': {\n opacity: 0.72,\n },\n}));\n","import Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\n\nimport useSnackbar from 'hooks/useSnackbar';\nimport useUploadImage from 'hooks/useUploadImage';\nimport { fData } from 'utils/formatNumber';\n\nimport FixedProgressBar from '../FixedProgressBar';\nimport Icon from '../Icon';\nimport ImageCropModal from '../ImageCropModal';\n\nimport { Container, OverlayActions } from './styles';\nimport { UploadWithCropProps } from './types';\nimport Upload from './Upload';\n\nif (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '⚠️ DEPRECATED: UploadWithCrop está obsoleto. Use SingleImageUpload do @zydon/common em seu lugar.\\n' +\n 'Migração: import { SingleImageUpload } from \"@zydon/common/components/FileUpload\";\\n' +\n 'O SingleImageUpload oferece crop integrado, melhor gerenciamento de upload e integração com APIs.',\n );\n}\n\nconst UploadWithCrop = ({\n onFileCropped,\n onImageUploaded,\n onCancel,\n aspect,\n label,\n image = '',\n uploading,\n file,\n tabIndex,\n maxSize,\n onDropRejected,\n ...other\n}: UploadWithCropProps) => {\n const {\n id,\n setCropModalOpen,\n handleRemove,\n toggleCropModalOpen,\n cropModalOpen,\n cancelChanges,\n saveChanges,\n previewImage,\n setCropper,\n preview,\n closePreviewImage,\n saving,\n } = useUploadImage({ onFileCropped, onImageUploaded, onCancel });\n const { error } = useSnackbar();\n\n return (\n <>\n <Container>\n {uploading && <FixedProgressBar />}\n\n <Upload\n {...other}\n maxSize={maxSize}\n id={id}\n file={file}\n onDrop={acceptedFiles => {\n if (acceptedFiles.length > 0) {\n setCropModalOpen(true);\n\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n const src = reader.result?.toString() || '';\n\n onImageUploaded(src);\n onFileCropped(undefined);\n });\n\n reader.readAsDataURL(acceptedFiles[0]);\n }\n }}\n image={image}\n tabIndex={tabIndex}\n onDropRejected={(fileRejections, event) => {\n const errorCode = fileRejections[0]?.errors[0]?.code;\n onImageUploaded(undefined);\n onFileCropped(undefined);\n\n error(\n errorCode === 'file-too-large'\n ? `Imagem não pode ser maior que ${fData(maxSize)}`\n : 'Erro ao enviar imagem',\n );\n\n if (onDropRejected) onDropRejected(fileRejections, event);\n }}\n />\n\n {(file || image) && (\n <OverlayActions className=\"actions\">\n <Button\n color=\"inherit\"\n startIcon={\n <Icon icon=\"DELETE_MARK_BUTTON_02\" color=\"error.main\" />\n }\n onClick={handleRemove}\n >\n Remover\n </Button>\n\n <Button\n color=\"inherit\"\n startIcon={<Icon icon=\"SEARCH_IMAGE\" color=\"primary.maon\" />}\n onClick={toggleCropModalOpen}\n >\n Editar\n </Button>\n </OverlayActions>\n )}\n </Container>\n\n <ImageCropModal\n id={id}\n open={cropModalOpen}\n onClose={cancelChanges}\n label={label}\n aspectRatio={aspect}\n imageSrc={image}\n onRemove={handleRemove}\n onSave={saveChanges}\n onPreview={previewImage}\n onInitialized={setCropper}\n loading={saving}\n />\n\n <Dialog\n open={!!preview}\n onClose={closePreviewImage}\n scroll=\"body\"\n PaperProps={{\n sx: {\n p: 2,\n },\n }}\n >\n {preview && <img src={preview} alt=\"Preview\" />}\n </Dialog>\n </>\n );\n};\n\nexport default UploadWithCrop;\n"]}
@@ -1,23 +0,0 @@
1
- import { n, d } from './chunk-6WGKIN5L.js';
2
- import { a as a$3 } from './chunk-KR3DUHA6.js';
3
- import { e } from './chunk-OF6623HG.js';
4
- import { a } from './chunk-NQNNMRLC.js';
5
- import { a as a$1 } from './chunk-SBMEL2IJ.js';
6
- import { a as a$2 } from './chunk-IAOMC4C4.js';
7
- import { k } from './chunk-GLRLKFPS.js';
8
- import { useState, useEffect } from 'react';
9
- import { useDropzone } from 'react-dropzone';
10
- import I from '@mui/material/Box';
11
- import q from '@mui/material/CircularProgress';
12
- import G from '@mui/material/Typography';
13
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
- import H from '@mui/material/Dialog';
15
- import J from '@mui/material/Stack';
16
-
17
- process.env.NODE_ENV==="development"&&console.warn(`\u26A0\uFE0F DEPRECATED: UploadAvatar est\xE1 obsoleto. Use UploadAvatar do @zydon/common em seu lugar.
18
- Migra\xE7\xE3o: import { UploadAvatar } from "@zydon/common/components/FileUpload";
19
- O novo UploadAvatar oferece melhor gerenciamento de upload e integra\xE7\xE3o com APIs.`);function B({sx:i,error:n$1,file:e,disabled:m,uploading:u,helperText:s,...y}){let{getRootProps:C,getInputProps:b,isDragActive:f,isDragReject:g,fileRejections:w}=useDropzone({multiple:!1,disabled:m,accept:{"image/*":[]},...y}),r=!!e,p=g||!!n$1,[P,v]=useState();useEffect(()=>{typeof e=="string"?v(e):e instanceof File&&v(URL.createObjectURL(e));},[e]);let R=u&&jsx(q,{size:30,color:"primary"}),A=r&&jsx("img",{alt:"avatar",src:P,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}),U=jsxs(I,{className:"upload-placeholder",sx:{top:0,gap:1,left:0,width:1,height:1,zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:"text.disabled",flexDirection:"column",justifyContent:"center",bgcolor:o=>k(o.vars.palette.grey["500Channel"],.08),transition:o=>o.transitions.create(["opacity"],{duration:o.transitions.duration.shorter}),"&:hover":{opacity:.72},...p&&{color:"error.main",bgcolor:o=>k(o.vars.palette.error.mainChannel,.08)},...r&&{zIndex:9,opacity:0,color:"common.white",bgcolor:o=>k(o.vars.palette.grey["900Channel"],.64)}},children:[jsx(a,{icon:"ADD_IMAGE",width:32}),jsx(G,{variant:"caption",children:r?"Atualizar foto":"Enviar foto"})]}),x=jsxs(I,{sx:{width:1,height:1,overflow:"hidden",borderRadius:"50%",position:"relative"},children:[R,A,U]});return jsxs(Fragment,{children:[jsxs(I,{...C(),sx:{p:1,m:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:o=>`1px dashed ${o.palette.divider}`,...f&&{opacity:.72},...m&&{opacity:.48,pointerEvents:"none"},...p&&{borderColor:"error.main"},...r&&{...p&&{bgcolor:o=>k(o.vars.palette.error.mainChannel,.08)},"&:hover .upload-placeholder":{opacity:1}},...i},children:[jsx("input",{...b()}),x]}),s&&s,jsx(n,{files:w})]})}var K=({onFileCropped:i,onImageUploaded:n,onCancel:e$1,aspect:m,label:u,image:s="",uploading:y,file:C,tabIndex:b,maxSize:f,onDropRejected:g,...w})=>{let{id:r,setCropModalOpen:p,handleRemove:P,cropModalOpen:v,cancelChanges:R,saveChanges:A,previewImage:U,setCropper:x,preview:o,closePreviewImage:k,saving:N}=a$1({onFileCropped:i,onImageUploaded:n,onCancel:e$1}),{error:W}=a$2();return jsxs(Fragment,{children:[jsxs(J,{position:"relative",alignItems:"center",justifyContent:"center",children:[y&&jsx(d,{}),jsx(B,{...w,maxSize:f,id:r,file:C,onDrop:t=>{if(t.length>0){p(!0);let l=new FileReader;l.addEventListener("load",()=>{let D=l.result?.toString()||"";n(D),i(t[0]);}),l.readAsDataURL(t[0]);}},image:s,tabIndex:b,onDropRejected:(t,l)=>{let D=t[0]?.errors[0]?.code;n(void 0),i(void 0),W(D==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(f)}`:"Erro ao enviar imagem"),g&&g(t,l);}})]}),jsx(a$3,{id:r,open:v,onClose:R,label:u,aspectRatio:m,imageSrc:s,onRemove:P,onSave:A,onPreview:U,onInitialized:x,loading:N}),jsx(H,{open:!!o,onClose:k,scroll:"body",PaperProps:{sx:{p:2}},children:o&&jsx("img",{src:o,alt:"Preview"})})]})},uo=K;
20
-
21
- export { B as a, uo as b };
22
- //# sourceMappingURL=out.js.map
23
- //# sourceMappingURL=chunk-JFZOAS75.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/upload/upload-avatar.tsx","../src/components/upload/upload-avatar-with-crop.tsx"],"names":["useEffect","useState","useDropzone","Box","CircularProgress","Typography","Fragment","jsx","jsxs","UploadAvatar","sx","error","value","disabled","uploading","helperText","other","getRootProps","getInputProps","isDragActive","isDragReject","fileRejections","hasFile","hasError","preview","setPreview","renderLoading","renderPreview","renderPlaceholder","theme","varAlpha","Icon_default","renderContent","RejectionFiles","Dialog","Stack","UploadAvatarWithCrop","onFileCropped","onImageUploaded","onCancel","aspect","label","image","file","tabIndex","maxSize","onDropRejected","id","setCropModalOpen","handleRemove","cropModalOpen","cancelChanges","saveChanges","previewImage","setCropper","closePreviewImage","saving","useUploadImage_default","useSnackbar_default","AvatarLoading","acceptedFiles","reader","src","event","errorCode","fData","ImageCropModal_default","upload_avatar_with_crop_default"],"mappings":"+RACA,OAAS,aAAAA,EAAW,YAAAC,MAAgB,QACpC,OAAwB,eAAA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CAAO,IAC9C,uBACN,EAEIC,GAAgBA,EAAezB,EAAgB0C,CAAK,CAC1D,EACF,GACF,EAEAxD,EAAC2D,EAAA,CACC,GAAInB,EACJ,KAAMG,EACN,QAASC,EACT,MAAOV,EACP,YAAaD,EACb,SAAUE,EACV,SAAUO,EACV,OAAQG,EACR,UAAWC,EACX,cAAeC,EACf,QAASE,EACX,EAEAjD,EAAC2B,EAAA,CACC,KAAM,CAAC,CAACV,EACR,QAAS+B,EACT,OAAO,OACP,WAAY,CACV,GAAI,CACF,EAAG,CACL,CACF,EAEC,SAAA/B,GAAWjB,EAAC,OAAI,IAAKiB,EAAS,IAAI,UAAU,EAC/C,GACF,CAEJ,EAEO2C,GAAQ/B","sourcesContent":["/* eslint-disable react/function-component-definition */\nimport { useEffect, useState } from 'react';\nimport { FileRejection, useDropzone } from 'react-dropzone';\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Typography from '@mui/material/Typography';\n\nimport Icon from 'components/Icon';\nimport { varAlpha } from 'theme/styles';\nimport { UploadProps } from 'types/upload';\n\nimport { RejectionFiles } from './components/rejection-files';\n\nif (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '⚠️ DEPRECATED: UploadAvatar está obsoleto. Use UploadAvatar do @zydon/common em seu lugar.\\n' +\n 'Migração: import { UploadAvatar } from \"@zydon/common/components/FileUpload\";\\n' +\n 'O novo UploadAvatar oferece melhor gerenciamento de upload e integração com APIs.',\n );\n}\n\nexport function UploadAvatar({\n sx,\n error,\n file: value,\n disabled,\n uploading,\n helperText,\n ...other\n}: UploadProps) {\n const {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragReject,\n fileRejections,\n } = useDropzone({\n multiple: false,\n disabled,\n accept: { 'image/*': [] },\n ...other,\n });\n\n const hasFile = !!value;\n\n const hasError = isDragReject || !!error;\n\n const [preview, setPreview] = useState<string>();\n\n useEffect(() => {\n if (typeof value === 'string') {\n setPreview(value);\n } else if (value instanceof File) {\n setPreview(URL.createObjectURL(value));\n }\n }, [value]);\n\n const renderLoading = uploading && (\n <CircularProgress size={30} color=\"primary\" />\n );\n\n const renderPreview = hasFile && (\n <img\n alt=\"avatar\"\n src={preview}\n style={{\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n objectFit: 'cover',\n }}\n />\n );\n\n const renderPlaceholder = (\n <Box\n className=\"upload-placeholder\"\n sx={{\n top: 0,\n gap: 1,\n left: 0,\n width: 1,\n height: 1,\n zIndex: 9,\n display: 'flex',\n borderRadius: '50%',\n position: 'absolute',\n alignItems: 'center',\n color: 'text.disabled',\n flexDirection: 'column',\n justifyContent: 'center',\n bgcolor: theme => varAlpha(theme.vars.palette.grey['500Channel'], 0.08),\n transition: theme =>\n theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.shorter,\n }),\n '&:hover': { opacity: 0.72 },\n ...(hasError && {\n color: 'error.main',\n bgcolor: theme =>\n varAlpha(theme.vars.palette.error.mainChannel, 0.08),\n }),\n ...(hasFile && {\n zIndex: 9,\n opacity: 0,\n color: 'common.white',\n bgcolor: theme =>\n varAlpha(theme.vars.palette.grey['900Channel'], 0.64),\n }),\n }}\n >\n <Icon icon=\"ADD_IMAGE\" width={32} />\n\n <Typography variant=\"caption\">\n {hasFile ? 'Atualizar foto' : 'Enviar foto'}\n </Typography>\n </Box>\n );\n\n const renderContent = (\n <Box\n sx={{\n width: 1,\n height: 1,\n overflow: 'hidden',\n borderRadius: '50%',\n position: 'relative',\n }}\n >\n {renderLoading}\n {renderPreview}\n {renderPlaceholder}\n </Box>\n );\n\n return (\n <>\n <Box\n {...getRootProps()}\n sx={{\n p: 1,\n m: 'auto',\n width: 144,\n height: 144,\n cursor: 'pointer',\n overflow: 'hidden',\n borderRadius: '50%',\n border: theme => `1px dashed ${theme.palette.divider}`,\n ...(isDragActive && { opacity: 0.72 }),\n ...(disabled && { opacity: 0.48, pointerEvents: 'none' }),\n ...(hasError && { borderColor: 'error.main' }),\n ...(hasFile && {\n ...(hasError && {\n bgcolor: theme =>\n varAlpha(theme.vars.palette.error.mainChannel, 0.08),\n }),\n '&:hover .upload-placeholder': { opacity: 1 },\n }),\n ...sx,\n }}\n >\n <input {...getInputProps()} />\n\n {renderContent}\n </Box>\n\n {helperText && helperText}\n\n <RejectionFiles files={fileRejections as FileRejection[]} />\n </>\n );\n}\n","import Dialog from '@mui/material/Dialog';\nimport Stack from '@mui/material/Stack';\n\nimport useSnackbar from 'hooks/useSnackbar';\nimport useUploadImage from 'hooks/useUploadImage';\nimport { fData } from 'utils/formatNumber';\n\nimport ImageCropModal from '../ImageCropModal';\n\nimport { AvatarLoading } from './styles';\nimport { UploadWithCropProps } from './types';\nimport { UploadAvatar } from './upload-avatar';\n\nconst UploadAvatarWithCrop = ({\n onFileCropped,\n onImageUploaded,\n onCancel,\n aspect,\n label,\n image = '',\n uploading,\n file,\n tabIndex,\n maxSize,\n onDropRejected,\n ...other\n}: UploadWithCropProps) => {\n const {\n id,\n setCropModalOpen,\n handleRemove,\n cropModalOpen,\n cancelChanges,\n saveChanges,\n previewImage,\n setCropper,\n preview,\n closePreviewImage,\n saving,\n } = useUploadImage({ onFileCropped, onImageUploaded, onCancel });\n const { error } = useSnackbar();\n\n return (\n <>\n <Stack position=\"relative\" alignItems=\"center\" justifyContent=\"center\">\n {uploading && <AvatarLoading />}\n\n <UploadAvatar\n {...other}\n maxSize={maxSize}\n id={id}\n file={file}\n onDrop={acceptedFiles => {\n if (acceptedFiles.length > 0) {\n setCropModalOpen(true);\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n const src = reader.result?.toString() || '';\n\n onImageUploaded(src);\n onFileCropped(acceptedFiles[0]);\n });\n\n reader.readAsDataURL(acceptedFiles[0]);\n }\n }}\n image={image}\n tabIndex={tabIndex}\n onDropRejected={(fileRejections, event) => {\n const errorCode = fileRejections[0]?.errors[0]?.code;\n onImageUploaded(undefined);\n onFileCropped(undefined);\n\n error(\n errorCode === 'file-too-large'\n ? `Imagem não pode ser maior que ${fData(maxSize)}`\n : 'Erro ao enviar imagem',\n );\n\n if (onDropRejected) onDropRejected(fileRejections, event);\n }}\n />\n </Stack>\n\n <ImageCropModal\n id={id}\n open={cropModalOpen}\n onClose={cancelChanges}\n label={label}\n aspectRatio={aspect}\n imageSrc={image}\n onRemove={handleRemove}\n onSave={saveChanges}\n onPreview={previewImage}\n onInitialized={setCropper}\n loading={saving}\n />\n\n <Dialog\n open={!!preview}\n onClose={closePreviewImage}\n scroll=\"body\"\n PaperProps={{\n sx: {\n p: 2,\n },\n }}\n >\n {preview && <img src={preview} alt=\"Preview\" />}\n </Dialog>\n </>\n );\n};\n\nexport default UploadAvatarWithCrop;\n"]}
@@ -1,16 +0,0 @@
1
- import { a as a$2 } from './chunk-ESFOFEVL.js';
2
- import { a } from './chunk-RFRLNTFN.js';
3
- import { a as a$3 } from './chunk-NQNNMRLC.js';
4
- import { useState } from 'react';
5
- import M from '@mui/lab/LoadingButton';
6
- import r from '@mui/material/Button';
7
- import v from '@mui/material/Slider';
8
- import a$1 from '@mui/material/Stack';
9
- import B from '@mui/material/Typography';
10
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
-
12
- var y=({id:p,open:u,onClose:e,label:g,onSave:s,onRemove:f,onPreview:h,imageSrc:C,aspectRatio:I,onInitialized:S,loading:k})=>{let[l,m]=useState(.5);return jsx(a,{open:u,onClose:e,dialogTitle:g,actions:jsxs(Fragment,{children:[jsx(r,{variant:"outlined",size:"medium",onClick:e,color:"inherit",children:"Cancelar"}),jsx(M,{variant:"contained",size:"medium",onClick:s,loading:k,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:jsxs(a$1,{gap:2,children:[jsx(a$2,{imageSrc:C,aspectRatio:I,onInitialized:S,zoom:l,onZoomChange:m}),jsxs(a$1,{gap:1.5,children:[jsxs(a$1,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[jsx(B,{variant:"body1",children:"Zoom"}),jsx(v,{value:l,onChange:(E,n)=>m(Array.isArray(n)?n[0]:n),min:.1,max:2,size:"medium",step:.0125})]}),jsxs(a$1,{direction:"row",gap:2,children:[jsx(r,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:jsx(a$3,{icon:"DELETE_MARK_BUTTON_02"}),onClick:f,children:"Remover"}),jsx(r,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:jsx(a$3,{icon:"PLAY_SIMPLE"}),onClick:h,children:"Pr\xE9-visualizar"}),jsx(r,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:jsx(a$3,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:p,children:"Alterar"})]})]})]})})},Z=y;
13
-
14
- export { Z as a };
15
- //# sourceMappingURL=out.js.map
16
- //# sourceMappingURL=chunk-KR3DUHA6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/ImageCropModal/index.tsx"],"names":["useState","LoadingButton","Button","Slider","Stack","Typography","Fragment","jsx","jsxs","ImageCropModal","id","open","onClose","label","onSave","onRemove","onPreview","imageSrc","aspectRatio","onInitialized","loading","zoom","setZoom","Modal_default","ImageCrop_default","_","v","Icon_default","ImageCropModal_default"],"mappings":"wHAAA,OAAS,YAAAA,MAAgB,QACzB,OAAOC,MAAmB,yBAC1B,OAAOC,MAAY,uBACnB,OAAOC,MAAY,uBACnB,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,2BA6Bf,mBAAAC,EACE,OAAAC,EADF,QAAAC,MAAA,oBArBR,IAAMC,EAAiB,CAAC,CACtB,GAAAC,EACA,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,YAAAC,EACA,cAAAC,EACA,QAAAC,CACF,IAA0B,CACxB,GAAM,CAACC,EAAMC,CAAO,EAAItB,EAAiB,EAAG,EAE5C,OACEO,EAACgB,EAAA,CACC,KAAMZ,EACN,QAASC,EACT,YAAaC,EACb,QACEL,EAAAF,EAAA,CACE,UAAAC,EAACL,EAAA,CACC,QAAQ,WACR,KAAK,SACL,QAASU,EACT,MAAM,UACP,oBAED,EAEAL,EAACN,EAAA,CACC,QAAQ,YACR,KAAK,SACL,QAASa,EACT,QAASM,EACV,kBAED,GACF,EAEF,UAAS,GACT,SAAS,KACT,YAAW,GAEX,SAAAZ,EAACJ,EAAA,CAAM,IAAK,EACV,UAAAG,EAACiB,EAAA,CACC,SAAUP,EACV,YAAaC,EACb,cAAeC,EACf,KAAME,EACN,aAAcC,EAChB,EAEAd,EAACJ,EAAA,CAAM,IAAK,IACV,UAAAI,EAACJ,EAAA,CAAM,MAAO,EAAG,UAAU,MAAM,IAAK,EAAG,KAAM,EAAG,WAAW,SAC3D,UAAAG,EAACF,EAAA,CAAW,QAAQ,QAAQ,gBAAI,EAEhCE,EAACJ,EAAA,CACC,MAAOkB,EACP,SAAU,CAACI,EAAGC,IAAMJ,EAAQ,MAAM,QAAQI,CAAC,EAAIA,EAAE,CAAC,EAAIA,CAAC,EACvD,IAAK,GACL,IAAK,EACL,KAAK,SACL,KAAM,MACR,GACF,EAEAlB,EAACJ,EAAA,CAAM,UAAU,MAAM,IAAK,EAC1B,UAAAG,EAACL,EAAA,CACC,QAAQ,WACR,MAAM,UACN,KAAK,QACL,UAAS,GACT,UAAWK,EAACoB,EAAA,CAAK,KAAK,wBAAwB,EAC9C,QAASZ,EACV,mBAED,EAEAR,EAACL,EAAA,CACC,QAAQ,WACR,MAAM,UACN,KAAK,QACL,UAAS,GACT,UAAWK,EAACoB,EAAA,CAAK,KAAK,cAAc,EACpC,QAASX,EACV,6BAED,EAEAT,EAACL,EAAA,CACC,QAAQ,WACR,MAAM,UACN,KAAK,QACL,UAAS,GACT,UAAWK,EAACoB,EAAA,CAAK,KAAK,eAAe,EACrC,UAAU,QACV,QAASjB,EACV,mBAED,GACF,GACF,GACF,EACF,CAEJ,EAEOkB,EAAQnB","sourcesContent":["import { useState } from 'react';\nimport LoadingButton from '@mui/lab/LoadingButton';\nimport Button from '@mui/material/Button';\nimport Slider from '@mui/material/Slider';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport Icon from '../Icon';\nimport ImageCrop from '../ImageCrop';\nimport Modal from '../Modal';\n\nimport { ImageCropModalPros } from './props';\n\nconst ImageCropModal = ({\n id,\n open,\n onClose,\n label,\n onSave,\n onRemove,\n onPreview,\n imageSrc,\n aspectRatio,\n onInitialized,\n loading,\n}: ImageCropModalPros) => {\n const [zoom, setZoom] = useState<number>(0.5);\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n dialogTitle={label}\n actions={\n <>\n <Button\n variant=\"outlined\"\n size=\"medium\"\n onClick={onClose}\n color=\"inherit\"\n >\n Cancelar\n </Button>\n\n <LoadingButton\n variant=\"contained\"\n size=\"medium\"\n onClick={onSave}\n loading={loading}\n >\n Salvar\n </LoadingButton>\n </>\n }\n fullWidth\n maxWidth=\"sm\"\n keepMounted\n >\n <Stack gap={2}>\n <ImageCrop\n imageSrc={imageSrc}\n aspectRatio={aspectRatio}\n onInitialized={onInitialized}\n zoom={zoom}\n onZoomChange={setZoom}\n />\n\n <Stack gap={1.5}>\n <Stack width={1} direction=\"row\" gap={3} flex={1} alignItems=\"center\">\n <Typography variant=\"body1\">Zoom</Typography>\n\n <Slider\n value={zoom}\n onChange={(_, v) => setZoom(Array.isArray(v) ? v[0] : v)}\n min={0.1}\n max={2}\n size=\"medium\"\n step={0.0125}\n />\n </Stack>\n\n <Stack direction=\"row\" gap={2}>\n <Button\n variant=\"outlined\"\n color=\"inherit\"\n size=\"large\"\n fullWidth\n startIcon={<Icon icon=\"DELETE_MARK_BUTTON_02\" />}\n onClick={onRemove}\n >\n Remover\n </Button>\n\n <Button\n variant=\"outlined\"\n color=\"inherit\"\n size=\"large\"\n fullWidth\n startIcon={<Icon icon=\"PLAY_SIMPLE\" />}\n onClick={onPreview}\n >\n Pré-visualizar\n </Button>\n\n <Button\n variant=\"outlined\"\n color=\"inherit\"\n size=\"large\"\n fullWidth\n startIcon={<Icon icon=\"SEARCH_IMAGE\" />}\n component=\"label\"\n htmlFor={id}\n >\n Alterar\n </Button>\n </Stack>\n </Stack>\n </Stack>\n </Modal>\n );\n};\n\nexport default ImageCropModal;\n"]}
@@ -1,12 +0,0 @@
1
- import { a } from './chunk-NQNNMRLC.js';
2
- import { useRef } from 'react';
3
- import A from '@mui/material/IconButton';
4
- import l from '@mui/material/InputAdornment';
5
- import g from '@mui/material/TextField';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
-
8
- var h=({onSearch:n,onChange:i,trigger:d="click",iconPosition:r="end",tabIndex:f,InputProps:o,iconButtonAriaLabel:s="Buscar",...e})=>{let u=useRef(null),a$1=jsx(A,{color:"inherit",onClick:()=>{n(u.current?.value);},"aria-label":s,children:jsx(a,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20,color:"text.secondary"})});return jsx(g,{inputRef:u,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"background.paper","& input::placeholder":{color:"text.disabled",opacity:.7}}},InputProps:{...o,onKeyDown:t=>{t.key==="Enter"&&n(u.current?.value);},...r==="start"?{startAdornment:jsxs(l,{position:r,children:[a$1,o?.startAdornment]})}:{endAdornment:jsxs(l,{position:r,children:[a$1,o?.endAdornment]})}},inputProps:{tabIndex:f,name:e.name,...e.inputProps},onChange:t=>{if(d==="change"){n(t.target.value);return}t.target.value===""&&n(""),i&&i(t);},...e})},R=h;
9
-
10
- export { R as a };
11
- //# sourceMappingURL=out.js.map
12
- //# sourceMappingURL=chunk-OTVEMGF2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/SearchInput/index.tsx"],"names":["useRef","IconButton","InputAdornment","TextField","jsx","jsxs","SearchInput","onSearch","onChange","trigger","iconPosition","tabIndex","InputProps","iconButtonAriaLabel","other","inputRef","seachIcon","Icon_default","e","SearchInput_default"],"mappings":"wCAAA,OAAS,UAAAA,MAAc,QACvB,OAAOC,MAAgB,2BACvB,OAAOC,MAAoB,+BAC3B,OAAOC,MAAe,0BA0BhB,cAAAC,EA6BU,QAAAC,MA7BV,oBApBN,IAAMC,EAAc,CAAC,CACnB,SAAAC,EACA,SAAAC,EACA,QAAAC,EAAU,QACV,aAAAC,EAAe,MACf,SAAAC,EACA,WAAAC,EACA,oBAAAC,EAAsB,SACtB,GAAGC,CACL,IAAwB,CACtB,IAAMC,EAAWf,EAAyB,IAAI,EAExCgB,EACJZ,EAACH,EAAA,CACC,MAAM,UACN,QAAS,IAAM,CACbM,EAASQ,EAAS,SAAS,KAAK,CAClC,EACA,aAAYF,EAEZ,SAAAT,EAACa,EAAA,CACC,KAAK,0BACL,MAAO,GACP,OAAQ,GACR,MAAM,iBACR,EACF,EAGF,OACEb,EAACD,EAAA,CACC,SAAUY,EACV,GAAI,CACF,2BAA4B,CAC1B,gBAAiB,mBACjB,uBAAwB,CACtB,MAAO,gBACP,QAAS,EACX,CACF,CACF,EACA,WAAY,CACV,GAAGH,EACH,UAAWM,GAAK,CACVA,EAAE,MAAQ,SAASX,EAASQ,EAAS,SAAS,KAAK,CACzD,EACA,GAAIL,IAAiB,QACjB,CACE,eACEL,EAACH,EAAA,CAAe,SAAUQ,EACvB,UAAAM,EACAJ,GAAY,gBACf,CAEJ,EACA,CACE,aACEP,EAACH,EAAA,CAAe,SAAUQ,EACvB,UAAAM,EACAJ,GAAY,cACf,CAEJ,CACN,EACA,WAAY,CACV,SAAAD,EACA,KAAMG,EAAM,KACZ,GAAGA,EAAM,UACX,EACA,SAAUI,GAAK,CACb,GAAIT,IAAY,SAAU,CACxBF,EAASW,EAAE,OAAO,KAAK,EACvB,OAGEA,EAAE,OAAO,QAAU,IAAIX,EAAS,EAAE,EAElCC,GAAUA,EAASU,CAAC,CAC1B,EACC,GAAGJ,EACN,CAEJ,EAEOK,EAAQb","sourcesContent":["import { useRef } from 'react';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport TextField from '@mui/material/TextField';\n\nimport { SearchInputProps } from 'types/searchInputProps';\n\nimport Icon from '../Icon';\n\nconst SearchInput = ({\n onSearch,\n onChange,\n trigger = 'click',\n iconPosition = 'end',\n tabIndex,\n InputProps,\n iconButtonAriaLabel = 'Buscar',\n ...other\n}: SearchInputProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const seachIcon = (\n <IconButton\n color=\"inherit\"\n onClick={() => {\n onSearch(inputRef.current?.value);\n }}\n aria-label={iconButtonAriaLabel}\n >\n <Icon\n icon=\"SEARCH_MAGNIFYING_GLASS\"\n width={20}\n height={20}\n color=\"text.secondary\"\n />\n </IconButton>\n );\n\n return (\n <TextField\n inputRef={inputRef}\n sx={{\n '& .MuiOutlinedInput-root': {\n backgroundColor: 'background.paper',\n '& input::placeholder': {\n color: 'text.disabled',\n opacity: 0.7,\n },\n },\n }}\n InputProps={{\n ...InputProps,\n onKeyDown: e => {\n if (e.key === 'Enter') onSearch(inputRef.current?.value);\n },\n ...(iconPosition === 'start'\n ? {\n startAdornment: (\n <InputAdornment position={iconPosition}>\n {seachIcon}\n {InputProps?.startAdornment}\n </InputAdornment>\n ),\n }\n : {\n endAdornment: (\n <InputAdornment position={iconPosition}>\n {seachIcon}\n {InputProps?.endAdornment}\n </InputAdornment>\n ),\n }),\n }}\n inputProps={{\n tabIndex,\n name: other.name,\n ...other.inputProps,\n }}\n onChange={e => {\n if (trigger === 'change') {\n onSearch(e.target.value);\n return;\n }\n\n if (e.target.value === '') onSearch('');\n\n if (onChange) onChange(e);\n }}\n {...other}\n />\n );\n};\n\nexport default SearchInput;\n"]}
@@ -1,9 +0,0 @@
1
- import { a } from './chunk-E3R7W7GK.js';
2
- import { useId, useState } from 'react';
3
- import I from 'browser-image-compression';
4
-
5
- var h=5242880,y=({onFileCropped:n,onImageUploaded:d,onCancel:i})=>{let l=useId(),[e,m]=useState(),[f,o,a$1]=a(),[u,r]=useState(),[v,p]=useState(!1);return {id:l,setCropModalOpen:a$1,handleRemove:()=>{n(void 0),d(void 0),a$1(!1);},toggleCropModalOpen:o,cropModalOpen:f,cancelChanges:()=>{i&&i(),a$1(!1);},saveChanges:()=>{e!==void 0&&e.getCroppedCanvas().toBlob(async g=>{try{if(!g)return;p(!0);let s=new File([g],"imagem.png",{type:"image/png"});if(s.size>h){let C=await I(s,{maxSizeMB:5});n(C),o();return}n(s),o();}finally{p(!1);}},"image/png",1);},previewImage:()=>{e!==void 0&&r(e.getCroppedCanvas().toDataURL());},setCropper:m,preview:u,closePreviewImage:()=>r(void 0),saving:v}},x=y;
6
-
7
- export { x as a };
8
- //# sourceMappingURL=out.js.map
9
- //# sourceMappingURL=chunk-SBMEL2IJ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/hooks/useUploadImage.ts"],"names":["useId","useState","imageCompression","FIVE_MB","useUploadImage","onFileCropped","onImageUploaded","onCancel","id","cropper","setCropper","cropModalOpen","toggleCropModalOpen","setCropModalOpen","useToggle_default","preview","setPreview","saving","setSaving","blob","file","compressedFile","useUploadImage_default"],"mappings":"wCACA,OAAS,SAAAA,EAAO,YAAAC,MAAgB,QAChC,OAAOC,MAAsB,4BAU7B,IAAMC,EAAU,QAEVC,EAAiB,CAAC,CACtB,cAAAC,EACA,gBAAAC,EACA,SAAAC,CACF,IAAa,CACX,IAAMC,EAAKR,EAAM,EACX,CAACS,EAASC,CAAU,EAAIT,EAAc,EACtC,CAACU,EAAeC,EAAqBC,CAAgB,EAAIC,EAAU,EACnE,CAACC,EAASC,CAAU,EAAIf,EAAiB,EACzC,CAACgB,EAAQC,CAAS,EAAIjB,EAAS,EAAK,EAuD1C,MAAO,CACL,GAAAO,EACA,iBAAAK,EACA,aATmB,IAAM,CACzBR,EAAc,MAAS,EACvBC,EAAgB,MAAS,EACzBO,EAAiB,EAAK,CACxB,EAME,oBAAAD,EACA,cAAAD,EACA,cA3DoB,IAAM,CACtBJ,GAAUA,EAAS,EACvBM,EAAiB,EAAK,CACxB,EAyDE,YA/CkB,IAAM,CACpBJ,IAAY,QAEhBA,EAAQ,iBAAiB,EAAE,OACzB,MAAOU,GAAc,CACnB,GAAI,CACF,GAAI,CAACA,EAAM,OAEXD,EAAU,EAAI,EAEd,IAAME,EAAO,IAAI,KAAK,CAACD,CAAI,EAAG,aAAc,CAAE,KAAM,WAAY,CAAC,EAEjE,GAAIC,EAAK,KAAOjB,EAAS,CACvB,IAAMkB,EAAiB,MAAMnB,EAAiBkB,EAAM,CAClD,UAAW,CACb,CAAC,EAEDf,EAAcgB,CAAc,EAC5BT,EAAoB,EAEpB,OAGFP,EAAce,CAAI,EAClBR,EAAoB,CACtB,QAAE,CACAM,EAAU,EAAK,CACjB,CACF,EACA,YACA,CACF,CACF,EAgBE,aAxDmB,IAAM,CACrBT,IAAY,QAEhBO,EAAWP,EAAQ,iBAAiB,EAAE,UAAU,CAAC,CACnD,EAqDE,WAAAC,EACA,QAAAK,EACA,kBArDwB,IAAMC,EAAW,MAAS,EAsDlD,OAAAC,CACF,CACF,EAEOK,EAAQlB","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useId, useState } from 'react';\nimport imageCompression from 'browser-image-compression';\n\nimport useToggle from './useToggle';\n\ninterface Props {\n onFileCropped(file?: File): void;\n onImageUploaded(image?: string): void;\n onCancel?: VoidFunction;\n}\n\nconst FIVE_MB = 5242880;\n\nconst useUploadImage = ({\n onFileCropped,\n onImageUploaded,\n onCancel,\n}: Props) => {\n const id = useId();\n const [cropper, setCropper] = useState<any>();\n const [cropModalOpen, toggleCropModalOpen, setCropModalOpen] = useToggle();\n const [preview, setPreview] = useState<string>();\n const [saving, setSaving] = useState(false);\n\n const cancelChanges = () => {\n if (onCancel) onCancel();\n setCropModalOpen(false);\n };\n\n const previewImage = () => {\n if (cropper === undefined) return;\n\n setPreview(cropper.getCroppedCanvas().toDataURL());\n };\n\n const closePreviewImage = () => setPreview(undefined);\n\n const saveChanges = () => {\n if (cropper === undefined) return;\n\n cropper.getCroppedCanvas().toBlob(\n async (blob: any) => {\n try {\n if (!blob) return;\n\n setSaving(true);\n\n const file = new File([blob], 'imagem.png', { type: 'image/png' });\n\n if (file.size > FIVE_MB) {\n const compressedFile = await imageCompression(file, {\n maxSizeMB: 5,\n });\n\n onFileCropped(compressedFile);\n toggleCropModalOpen();\n\n return;\n }\n\n onFileCropped(file);\n toggleCropModalOpen();\n } finally {\n setSaving(false);\n }\n },\n 'image/png',\n 1,\n );\n };\n\n const handleRemove = () => {\n onFileCropped(undefined);\n onImageUploaded(undefined);\n setCropModalOpen(false);\n };\n\n return {\n id,\n setCropModalOpen,\n handleRemove,\n toggleCropModalOpen,\n cropModalOpen,\n cancelChanges,\n saveChanges,\n previewImage,\n setCropper,\n preview,\n closePreviewImage,\n saving,\n };\n};\n\nexport default useUploadImage;\n"]}