@zydon/common 2.3.33 → 2.3.35

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.
@@ -1,4 +1,4 @@
1
- import { c, g, p, n, d, e as e$1, a as a$5, b, h, i as i$1, l, m as m$1, j as j$2, k } from './chunk-AOKGGMJB.js';
1
+ import { c, g, p, n, d, e as e$1, a as a$5, b, h, i as i$1, l, m as m$1, j as j$2, k } from './chunk-MJXO3AL4.js';
2
2
  import { a as a$4 } from './chunk-LIGXBDJV.js';
3
3
  import { e } from './chunk-ANAHA3L6.js';
4
4
  import { a as a$6 } from './chunk-ZPQUQ3ZX.js';
@@ -1,4 +1,4 @@
1
- import { p, f } from './chunk-AOKGGMJB.js';
1
+ import { p, f } from './chunk-MJXO3AL4.js';
2
2
  import { a as a$3 } from './chunk-LIGXBDJV.js';
3
3
  import { e } from './chunk-ANAHA3L6.js';
4
4
  import { i } from './chunk-D27ND54J.js';
@@ -0,0 +1,15 @@
1
+ import { e } from './chunk-ANAHA3L6.js';
2
+ import { i as i$1 } from './chunk-D27ND54J.js';
3
+ import x from '@mui/material/Box';
4
+ import D from '@mui/material/Paper';
5
+ import z from '@mui/material/Typography';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import E from '@mui/material/CircularProgress';
8
+ import i from '@mui/material/IconButton';
9
+ import d from '@mui/material/Stack';
10
+ import { styled, alpha } from '@mui/material/styles';
11
+ import { m } from 'framer-motion';
12
+
13
+ var y=["pdf"],f=["txt"],h=["psd"],I=["doc","docx"],k=["xls","xlsx"],v=["zip","rar","iso"],w=["ai","esp"],C=["ppt","pptx"],F=["wav","aif","mp3","aac"],R=["jpg","jpeg","gif","bmp","png","svg","webp"],T=["m4v","avi","mpg","mp4","webm"];function O(o){let e,t=p(o);switch(o.includes(t)){case f.includes(t):e="txt";break;case v.includes(t):e="zip";break;case F.includes(t):e="audio";break;case R.includes(t):e="image";break;case T.includes(t):e="video";break;case I.includes(t):e="word";break;case k.includes(t):e="excel";break;case C.includes(t):e="powerpoint";break;case y.includes(t):e="pdf";break;case h.includes(t):e="photoshop";break;case w.includes(t):e="illustrator";break;case o?.startsWith("http"):e="image";break;default:e=p(o);}return e}function B(o){let e;switch(O(o)){case"folder":e="IC_FOLDER";break;case"txt":e="IC_TXT";break;case"zip":e="IC_ZIP";break;case"audio":e="IC_AUDIO";break;case"video":e="IC_VIDEO";break;case"word":e="IC_WORD";break;case"excel":e="IC_EXCEL";break;case"powerpoint":e="IC_POWER_POINT";break;case"pdf":e="IC_PDF";break;case"photoshop":e="IC_PTS";break;case"illustrator":e="IC_AI";break;case"image":e="IC_IMG";break;default:e="IC_FILE";}return e}function p(o){return o&&o.split(".").pop()||""}function _(o){return o.split("/").pop()}function g(o){return typeof o=="string"?{key:o,preview:o,name:_(o),type:p(o),size:void 0,path:o,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${o.name}`,name:o.name,size:o.size,path:o.path,type:o.type,preview:o.preview,lastModified:o.lastModified,lastModifiedDate:o.lastModifiedDate}}function U({files:o}){return o.length?jsx(D,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:e=>i$1(e.vars.palette.error.mainChannel,.08)},children:o.map(({file:e$1,errors:t})=>{let{path:n,size:l}=g(e$1),m=l?e(l):"";return jsxs(x,{sx:{my:1},children:[jsxs(z,{variant:"subtitle2",noWrap:!0,children:[n," - ",m," "]}),t.map(c=>jsxs(x,{component:"span",sx:{typography:"caption"},children:["- ",c.message]},c.code))]},n)})}):null}var Y=styled(d)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),oo=styled(d)(({theme:o})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(o.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),eo=styled(E)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),to=styled(i)(({theme:o})=>({position:"relative",zIndex:999,pointerEvents:"auto",bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48)}})),ro=styled("div")({position:"relative",zIndex:1,"&:hover":{zIndex:2}}),ao=styled(d)(({theme:o,width:e})=>({width:e,height:80,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2,1,2,1),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:`0 0 0 2px ${o.palette.primary.main}, ${o.customShadows.z8}, inset 0 0 0 1000px ${alpha(o.palette.primary.main,.06)}`}})),io=styled(m.div)(({theme:o,width:e})=>({width:e,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:`0 0 0 2px ${o.palette.primary.main}, ${o.customShadows.z8}, inset 0 0 0 1000px ${alpha(o.palette.primary.main,.06)}`}})),no=styled(i)(({theme:o})=>({width:36,height:36,position:"absolute",top:10,right:10,borderRadius:12,zIndex:1,opacity:0,transition:"opacity 50ms ease-in-out",color:o.palette.common.white,backgroundColor:alpha(o.palette.grey[900],.48),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48),opacity:1}})),po=styled(i)(({theme:o})=>({width:24,height:24,position:"absolute",top:18,right:8,borderRadius:12,opacity:1,zIndex:1,transition:"opacity 50ms ease-in-out",color:o.palette.grey[500],backgroundColor:o.palette.common.white,"&:hover":{backgroundColor:o.palette.common.white}})),so=styled(i,{shouldForwardProp:o=>o!=="isMainImage"})(({theme:o,isMainImage:e})=>({color:e?o.palette.secondary.main:o.palette.action.disabled,backgroundColor:o.palette.common.white," &:hover":{backgroundColor:o.palette.common.white},top:4,left:8,padding:o.spacing(.5),border:"1px solid",borderColor:e?o.palette.secondary.main:o.palette.divider})),lo=styled(i)(({theme:o})=>({top:16,right:16,zIndex:9,position:"absolute",color:alpha(o.palette.common.white,.8),bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{bgcolor:alpha(o.palette.grey[900],.48)}})),co=styled(x,{shouldForwardProp:o=>o!=="isDragActive"&&o!=="disabled"&&o!=="hasError"})(({theme:o,isDragActive:e,disabled:t,hasError:n})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:o.palette.text.disabled,justifyContent:"center",bgcolor:alpha(o.palette.grey[500],.08),border:`dashed 1px ${alpha(o.palette.grey[500],.16)}`,...e&&{opacity:.72},...t&&{opacity:.48,pointerEvents:"none"},...n&&{color:o.palette.error.main,borderColor:o.palette.error.main,bgcolor:alpha(o.palette.error.main,.08)},"&:hover":{opacity:.72}}));
14
+
15
+ export { O as a, B as b, g as c, Y as d, oo as e, eo as f, to as g, ro as h, ao as i, io as j, no as k, po as l, so as m, lo as n, co as o, U as p };
@@ -8,7 +8,7 @@ import { BoxProps } from '@mui/material/Box';
8
8
 
9
9
  interface SortableStyleProps extends BoxProps {
10
10
  transform: Transform | null;
11
- transition: string;
11
+ transition?: string;
12
12
  isDragging: boolean;
13
13
  tabIndex?: number;
14
14
  role?: string;
@@ -2,6 +2,6 @@ import { x } from '../../chunk-2P4CXK3O.js';
2
2
  import n from '@mui/material/Box';
3
3
  import { styled, alpha } from '@mui/material/styles';
4
4
 
5
- var a=styled(n,{shouldForwardProp:r=>r!=="transform"&&r!=="transition"&&r!=="isDragging"})(({theme:r,transform:e=null,transition:i,isDragging:t=!1})=>({transform:x.Transform.toString(e),transition:i,boxShadow:t?`0 0 0 2px ${r.palette.primary.main}, 0 4px 16px rgba(25, 118, 210, 0.10)`:void 0,background:t?alpha(r.palette.primary.main,.06):void 0,borderRadius:8,zIndex:t?1200:0}));var u=a;
5
+ var a=styled(n,{shouldForwardProp:r=>r!=="transform"&&r!=="transition"&&r!=="isDragging"})(({theme:r,transform:e=null,transition:i="",isDragging:o=!1})=>({transform:x.Transform.toString(e),transition:i,boxShadow:o?`0 0 0 2px ${r.palette.primary.main}, ${r.customShadows.z8}, inset 0 0 0 1000px ${alpha(r.palette.primary.main,.06)}`:void 0,background:r.palette.background.paper,borderRadius:8,zIndex:o?1200:0}));var u=a;
6
6
 
7
7
  export { u as default };
@@ -1,5 +1,5 @@
1
- import { b } from '../../../chunk-JFCKSA6O.js';
2
- import '../../../chunk-AOKGGMJB.js';
1
+ import { b } from '../../../chunk-CQGKE2UY.js';
2
+ import '../../../chunk-MJXO3AL4.js';
3
3
  import '../../../chunk-LIGXBDJV.js';
4
4
  import '../../../chunk-XHCJ67Q6.js';
5
5
  import '../../../chunk-T7I256S6.js';
@@ -1,5 +1,5 @@
1
- import { e } from '../../../chunk-5KTBSMOB.js';
2
- import '../../../chunk-AOKGGMJB.js';
1
+ import { e } from '../../../chunk-2NKGDNX2.js';
2
+ import '../../../chunk-MJXO3AL4.js';
3
3
  import '../../../chunk-LIGXBDJV.js';
4
4
  import '../../../chunk-XHCJ67Q6.js';
5
5
  import '../../../chunk-T7I256S6.js';
@@ -1,7 +1,7 @@
1
- export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-JFCKSA6O.js';
2
- export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-5KTBSMOB.js';
3
- import { o } from '../../chunk-AOKGGMJB.js';
4
- export { p as RejectionFiles } from '../../chunk-AOKGGMJB.js';
1
+ export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-CQGKE2UY.js';
2
+ export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-2NKGDNX2.js';
3
+ import { o } from '../../chunk-MJXO3AL4.js';
4
+ export { p as RejectionFiles } from '../../chunk-MJXO3AL4.js';
5
5
  import '../../chunk-LIGXBDJV.js';
6
6
  import '../../chunk-XHCJ67Q6.js';
7
7
  import '../../chunk-T7I256S6.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.3.33",
3
+ "version": "2.3.35",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,15 +0,0 @@
1
- import { e } from './chunk-ANAHA3L6.js';
2
- import { i as i$1 } from './chunk-D27ND54J.js';
3
- import x from '@mui/material/Box';
4
- import D from '@mui/material/Paper';
5
- import z from '@mui/material/Typography';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
- import E from '@mui/material/CircularProgress';
8
- import i from '@mui/material/IconButton';
9
- import d from '@mui/material/Stack';
10
- import { styled, alpha } from '@mui/material/styles';
11
- import { m } from 'framer-motion';
12
-
13
- var y=["pdf"],h=["txt"],f=["psd"],I=["doc","docx"],k=["xls","xlsx"],v=["zip","rar","iso"],w=["ai","esp"],C=["ppt","pptx"],F=["wav","aif","mp3","aac"],R=["jpg","jpeg","gif","bmp","png","svg","webp"],T=["m4v","avi","mpg","mp4","webm"];function O(o){let e,t=s(o);switch(o.includes(t)){case h.includes(t):e="txt";break;case v.includes(t):e="zip";break;case F.includes(t):e="audio";break;case R.includes(t):e="image";break;case T.includes(t):e="video";break;case I.includes(t):e="word";break;case k.includes(t):e="excel";break;case C.includes(t):e="powerpoint";break;case y.includes(t):e="pdf";break;case f.includes(t):e="photoshop";break;case w.includes(t):e="illustrator";break;case o?.startsWith("http"):e="image";break;default:e=s(o);}return e}function B(o){let e;switch(O(o)){case"folder":e="IC_FOLDER";break;case"txt":e="IC_TXT";break;case"zip":e="IC_ZIP";break;case"audio":e="IC_AUDIO";break;case"video":e="IC_VIDEO";break;case"word":e="IC_WORD";break;case"excel":e="IC_EXCEL";break;case"powerpoint":e="IC_POWER_POINT";break;case"pdf":e="IC_PDF";break;case"photoshop":e="IC_PTS";break;case"illustrator":e="IC_AI";break;case"image":e="IC_IMG";break;default:e="IC_FILE";}return e}function s(o){return o&&o.split(".").pop()||""}function _(o){return o.split("/").pop()}function g(o){return typeof o=="string"?{key:o,preview:o,name:_(o),type:s(o),size:void 0,path:o,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${o.name}`,name:o.name,size:o.size,path:o.path,type:o.type,preview:o.preview,lastModified:o.lastModified,lastModifiedDate:o.lastModifiedDate}}function U({files:o}){return o.length?jsx(D,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:e=>i$1(e.vars.palette.error.mainChannel,.08)},children:o.map(({file:e$1,errors:t})=>{let{path:n,size:c}=g(e$1),m=c?e(c):"";return jsxs(x,{sx:{my:1},children:[jsxs(z,{variant:"subtitle2",noWrap:!0,children:[n," - ",m," "]}),t.map(l=>jsxs(x,{component:"span",sx:{typography:"caption"},children:["- ",l.message]},l.code))]},n)})}):null}var Y=styled(d)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),oo=styled(d)(({theme:o})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(o.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),eo=styled(E)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),to=styled(i)(({theme:o})=>({position:"relative",zIndex:999,pointerEvents:"auto",bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48)}})),ro=styled("div")({position:"relative",zIndex:1,"&:hover":{zIndex:2}}),ao=styled(d)(({theme:o,width:e})=>({width:e,height:80,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2,1,2,1),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:o.customShadows.z8}})),io=styled(m.div)(({theme:o,width:e})=>({width:e,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:o.customShadows.z8}})),no=styled(i)(({theme:o})=>({width:36,height:36,position:"absolute",top:10,right:10,borderRadius:12,zIndex:1,opacity:0,transition:"opacity 50ms ease-in-out",color:o.palette.common.white,backgroundColor:alpha(o.palette.grey[900],.48),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48),opacity:1}})),so=styled(i)(({theme:o})=>({width:24,height:24,position:"absolute",top:18,right:8,borderRadius:12,opacity:1,zIndex:1,transition:"opacity 50ms ease-in-out",color:o.palette.grey[500],backgroundColor:o.palette.common.white,"&:hover":{backgroundColor:o.palette.common.white}})),po=styled(i,{shouldForwardProp:o=>o!=="isMainImage"})(({theme:o,isMainImage:e})=>({color:e?o.palette.secondary.main:o.palette.action.disabled,backgroundColor:o.palette.common.white," &:hover":{backgroundColor:o.palette.common.white},top:4,left:8,padding:o.spacing(.5),border:"1px solid",borderColor:e?o.palette.secondary.main:o.palette.divider})),co=styled(i)(({theme:o})=>({top:16,right:16,zIndex:9,position:"absolute",color:alpha(o.palette.common.white,.8),bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{bgcolor:alpha(o.palette.grey[900],.48)}})),lo=styled(x,{shouldForwardProp:o=>o!=="isDragActive"&&o!=="disabled"&&o!=="hasError"})(({theme:o,isDragActive:e,disabled:t,hasError:n})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:o.palette.text.disabled,justifyContent:"center",bgcolor:alpha(o.palette.grey[500],.08),border:`dashed 1px ${alpha(o.palette.grey[500],.16)}`,...e&&{opacity:.72},...t&&{opacity:.48,pointerEvents:"none"},...n&&{color:o.palette.error.main,borderColor:o.palette.error.main,bgcolor:alpha(o.palette.error.main,.08)},"&:hover":{opacity:.72}}));
14
-
15
- export { O as a, B as b, g as c, Y as d, oo as e, eo as f, to as g, ro as h, ao as i, io as j, no as k, so as l, po as m, co as n, lo as o, U as p };