@cgi-learning-hub/ui 1.3.5-dev.1739269838 → 1.3.5-dev.1739269980
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 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),r=require("@mui/material"),g=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),y=require("./FileIcon.cjs.js"),x=require("./FileInfosSeparator.cjs.js"),p=require("./utils.cjs.js"),s=require("../../Stack-B68ooSQ-.cjs"),d=require("../../Typography-Y-OGmT9M.cjs"),j=require("../../createSvgIcon-CWNQW6u6.cjs"),S=require("../../CloseRounded-Cu-sn6XC.cjs"),I=j.createSvgIcon(e.jsx("path",{d:"M16.59 9H15V4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v5H7.41c-.89 0-1.34 1.08-.71 1.71l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.63-.63.19-1.71-.7-1.71M5 19c0 .55.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1H6c-.55 0-1 .45-1 1"}),"DownloadRounded"),b=({file:n,onDelete:
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),r=require("@mui/material"),g=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),y=require("./FileIcon.cjs.js"),x=require("./FileInfosSeparator.cjs.js"),p=require("./utils.cjs.js"),s=require("../../Stack-B68ooSQ-.cjs"),d=require("../../Typography-Y-OGmT9M.cjs"),j=require("../../createSvgIcon-CWNQW6u6.cjs"),S=require("../../CloseRounded-Cu-sn6XC.cjs"),I=j.createSvgIcon(e.jsx("path",{d:"M16.59 9H15V4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v5H7.41c-.89 0-1.34 1.08-.71 1.71l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.63-.63.19-1.71-.7-1.71M5 19c0 .55.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1H6c-.55 0-1 .45-1 1"}),"DownloadRounded"),b=({file:n,onDelete:o,onClick:c,onDownload:a})=>{if(!n.name)return null;const i=p.displaySize(n.size),t=p.displayExtension(n.name),h=()=>c==null?void 0:c(n),m=l=>{l.stopPropagation(),o==null||o(n)},u=l=>{l.stopPropagation(),a==null||a(n)};return e.jsxs(s.Stack,{direction:"row",alignItems:"center",spacing:2,padding:"0.5rem 1rem",width:"100%",justifyContent:"space-between",onClick:h,boxSizing:"border-box",sx:{"&:hover":{boxShadow:"0 4px 8px rgba(192, 192, 192, 0.3)",borderRadius:"4px",cursor:"pointer"}},children:[e.jsxs(s.Stack,{direction:"row",alignItems:"center",spacing:2,minWidth:"0",children:[e.jsx(s.Stack,{borderRadius:"4px",minWidth:"40px",maxWidth:"40px",minHeight:"40px",maxHeight:"40px",display:"flex",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"grey.light"},children:e.jsx(r.Box,{color:"text.secondary",alignItems:"center",justifyContent:"center",display:"flex",children:e.jsx(y.FileIcon,{extension:t??""})})}),e.jsxs(s.Stack,{direction:"column",spacing:0,alignItems:"flex-start",minWidth:"0",children:[e.jsx(g,{children:n.name}),e.jsxs(s.Stack,{display:"flex",flexDirection:"row",alignItems:"center",gap:1,children:[i&&e.jsx(d.Typography,{fontSize:"0.8rem",color:"text.secondary",children:i}),i&&t&&e.jsx(x.FileInfosSeparator,{}),t&&e.jsx(d.Typography,{fontSize:"0.8rem",color:"text.secondary",children:t}),n.ownerName&&(i||t)&&e.jsx(x.FileInfosSeparator,{}),n.ownerName&&e.jsx(d.Typography,{fontSize:"0.8rem",color:"text.secondary",children:n.ownerName})]})]})]}),e.jsxs(r.Box,{alignItems:"center",display:"flex",gap:"1rem",children:[n.isLoading?e.jsx(r.Box,{marginRight:1,children:e.jsx(r.CircularProgress,{size:24,color:"primary"})}):n.isDownloadable?e.jsx(r.IconButton,{onClick:u,children:e.jsx(I,{color:"primary"})}):null,n.isDeletable&&e.jsx(r.IconButton,{onClick:m,children:e.jsx(S.CloseRounded,{})})]})]})};module.exports=b;
|
|
@@ -78,7 +78,7 @@ const C = w(/* @__PURE__ */ r("path", {
|
|
|
78
78
|
children: [
|
|
79
79
|
/* @__PURE__ */ r(f, { children: e.name }),
|
|
80
80
|
/* @__PURE__ */ i(n, { display: "flex", flexDirection: "row", alignItems: "center", gap: 1, children: [
|
|
81
|
-
t && /* @__PURE__ */ r(m, { fontSize: "0.8rem", color: "text.secondary", children: t
|
|
81
|
+
t && /* @__PURE__ */ r(m, { fontSize: "0.8rem", color: "text.secondary", children: t }),
|
|
82
82
|
t && o && /* @__PURE__ */ r(h, {}),
|
|
83
83
|
o && /* @__PURE__ */ r(m, { fontSize: "0.8rem", color: "text.secondary", children: o }),
|
|
84
84
|
e.ownerName && (t || o) && /* @__PURE__ */ r(h, {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgi-learning-hub/ui",
|
|
3
|
-
"version": "1.3.5-dev.
|
|
3
|
+
"version": "1.3.5-dev.1739269980",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "CGI Learning-hub Team",
|
|
6
6
|
"description": "@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features",
|