@cgi-learning-hub/ui 1.5.0-dev.1743522751 → 1.5.0-dev.1743528537

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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@mui/material"),i=t.styled(t.Card)(({theme:e,selected:o,size:r})=>({boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",borderRadius:"0.5rem",height:"auto",border:"2px solid transparent",transition:"border-color 0.2s ease-in-out",position:"relative",...r==="sm"&&{display:"flex",width:"100%"},...o&&{borderColor:e.palette.primary.light},"&:hover":{"& .MuiBox-root.selected-icon":{opacity:1,visibility:"visible"}}})),a=t.styled(t.Box)(({theme:e,selected:o})=>({position:"absolute",top:0,right:0,width:"2rem",height:"2rem",background:e.palette.common.white,display:"flex",justifyContent:"center",alignItems:"center",padding:".8rem",borderRadius:".5rem",visibility:"visible",opacity:0,cursor:"pointer",transition:"opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",...o&&{background:e.palette.primary.lighter,opacity:1,visibility:"visible"},"&:hover, &:focus":{background:e.palette.primary.lighter,opacity:1},"& .MuiSvgIcon-root":{color:e.palette.primary.main}})),s=t.styled(t.CardMedia)(({size:e,image:o,defaultImage:r})=>({height:e=="sm"?85:180,width:e=="sm"?85:"calc(100% - 2rem)",objectFit:"cover",margin:e=="sm"?"0 10px":"1rem",borderRadius:"0.5rem",...!o&&e==="md"&&{backgroundImage:`url(${r})`,backgroundRepeat:"repeat",backgroundSize:"20% 20%",backgroundPosition:"center",opacity:"0.7"}})),n=t.styled(t.CardContent)(({size:e})=>({padding:e=="sm"?".7rem 5px .7rem 0 !important":"0 16px 16px 16px !important",width:e==="sm"?"calc(100% - 110px)":"100%"})),p=t.styled(t.Box)(({size:e})=>({display:"flex",alignItems:"center",marginTop:"0.5rem",...e==="sm"&&{svg:{width:".8em",height:".8em"}}})),c=t.styled(t.Box)(({size:e,width:o,isLast:r})=>({marginLeft:e==="sm"?".3rem":".5rem",fontSize:e==="sm"?"12px":"15px","& .MuiTypography-root":{paddingTop:"2px",fontSize:e==="sm"?"12px":"15px"},...r&&!o&&{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:e==="sm"?"110px":"172px"}})),d=t.styled(t.Box)(({size:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",width:"fit-content",height:"fit-content",...e==="sm"&&{svg:{width:".8em",height:".8em"}}})),l=t.styled(t.Box)(({size:e})=>({position:"absolute",bottom:e==="sm"?".65rem":"16px",right:e==="sm"?"8px":"16px",display:"flex",gap:".2rem"}));exports.PublicIconWrapper=l;exports.ResourceCardBody=n;exports.ResourceCardImage=s;exports.ResourceIconItem=d;exports.ResourcePropertyItem=p;exports.ResourcePropertyText=c;exports.SelectedIcon=a;exports.StyledCard=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@mui/material"),a=t.styled(t.Card)(({theme:e,selected:o,size:r})=>({boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",borderRadius:"0.5rem",height:"auto",border:"2px solid transparent",transition:"border-color 0.2s ease-in-out",position:"relative",...r==="sm"&&{display:"flex",width:"100%"},...o&&{borderColor:e.palette.primary.light},"&:hover":{"& .MuiBox-root.selected-icon":{opacity:1,visibility:"visible"}}})),s=t.styled(t.Box)(({theme:e,selected:o})=>({position:"absolute",top:0,right:0,width:"2rem",height:"2rem",background:e.palette.common.white,display:"flex",justifyContent:"center",alignItems:"center",padding:".8rem",borderRadius:".5rem",visibility:"visible",opacity:0,cursor:"pointer",transition:"opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",...o&&{background:e.palette.primary.lighter,opacity:1,visibility:"visible"},"&:hover, &:focus":{background:e.palette.primary.lighter,opacity:1},"& .MuiSvgIcon-root":{color:e.palette.primary.main}})),n=t.styled(t.CardMedia,{shouldForwardProp:e=>e==="size"||e==="image"||e==="defaultImage"})(({size:e,image:o,defaultImage:r})=>({height:e==="sm"?85:180,width:e==="sm"?85:"calc(100% - 2rem)",objectFit:"cover",margin:e==="sm"?"0 10px":"1rem",borderRadius:"0.5rem",...(!o||o==="")&&e==="md"&&{backgroundImage:`url(${r})`,backgroundRepeat:"repeat",backgroundSize:"20% 20%",backgroundPosition:"center",opacity:.7}})),d=t.styled(t.CardContent)(({size:e})=>({padding:e=="sm"?".7rem 5px .7rem 0 !important":"0 16px 16px 16px !important",width:e==="sm"?"calc(100% - 110px)":"100%"})),c=t.styled(t.Box)(({size:e})=>({display:"flex",alignItems:"center",marginTop:"0.5rem",...e==="sm"&&{svg:{width:".8em",height:".8em"}}})),p=t.styled(t.Box,{shouldForwardProp:e=>e==="size"||e==="isLast"||e==="width"})(({theme:e,size:o,width:r,isLast:i})=>({marginLeft:o==="sm"?".3rem":".5rem",fontSize:o==="sm"?"12px":"15px","& .MuiTypography-root":{paddingTop:"2px",fontSize:o==="sm"?"12px":"15px"},...i&&!r&&{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:o==="sm"?"110px":"172px"}})),l=t.styled(t.Box)(({size:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",width:"fit-content",height:"fit-content",...e==="sm"&&{svg:{width:".8em",height:".8em"}}})),m=t.styled(t.Box)(({size:e})=>({position:"absolute",bottom:e==="sm"?".65rem":"16px",right:e==="sm"?"8px":"16px",display:"flex",gap:".2rem"}));exports.PublicIconWrapper=m;exports.ResourceCardBody=d;exports.ResourceCardImage=n;exports.ResourceIconItem=l;exports.ResourcePropertyItem=c;exports.ResourcePropertyText=p;exports.SelectedIcon=s;exports.StyledCard=a;
@@ -1,16 +1,16 @@
1
- import { styled as t, Card as a, Box as r, CardMedia as p, CardContent as n } from "@mui/material";
2
- const c = t(a)(({ theme: e, selected: o, size: i }) => ({
1
+ import { styled as i, Card as n, Box as r, CardMedia as s, CardContent as p } from "@mui/material";
2
+ const m = i(n)(({ theme: e, selected: t, size: o }) => ({
3
3
  boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",
4
4
  borderRadius: "0.5rem",
5
5
  height: "auto",
6
6
  border: "2px solid transparent",
7
7
  transition: "border-color 0.2s ease-in-out",
8
8
  position: "relative",
9
- ...i === "sm" && {
9
+ ...o === "sm" && {
10
10
  display: "flex",
11
11
  width: "100%"
12
12
  },
13
- ...o && {
13
+ ...t && {
14
14
  borderColor: e.palette.primary.light
15
15
  },
16
16
  "&:hover": {
@@ -19,8 +19,8 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
19
19
  visibility: "visible"
20
20
  }
21
21
  }
22
- })), m = t(r)(
23
- ({ theme: e, selected: o }) => ({
22
+ })), c = i(r)(
23
+ ({ theme: e, selected: t }) => ({
24
24
  position: "absolute",
25
25
  top: 0,
26
26
  right: 0,
@@ -36,7 +36,7 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
36
36
  opacity: 0,
37
37
  cursor: "pointer",
38
38
  transition: "opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",
39
- ...o && {
39
+ ...t && {
40
40
  background: e.palette.primary.lighter,
41
41
  opacity: 1,
42
42
  visibility: "visible"
@@ -49,23 +49,25 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
49
49
  color: e.palette.primary.main
50
50
  }
51
51
  })
52
- ), d = t(p)(({ size: e, image: o, defaultImage: i }) => ({
53
- height: e == "sm" ? 85 : 180,
54
- width: e == "sm" ? 85 : "calc(100% - 2rem)",
52
+ ), l = i(s, {
53
+ shouldForwardProp: (e) => e === "size" || e === "image" || e === "defaultImage"
54
+ })(({ size: e, image: t, defaultImage: o }) => ({
55
+ height: e === "sm" ? 85 : 180,
56
+ width: e === "sm" ? 85 : "calc(100% - 2rem)",
55
57
  objectFit: "cover",
56
- margin: e == "sm" ? "0 10px" : "1rem",
58
+ margin: e === "sm" ? "0 10px" : "1rem",
57
59
  borderRadius: "0.5rem",
58
- ...!o && e === "md" && {
59
- backgroundImage: `url(${i})`,
60
+ ...(!t || t === "") && e === "md" && {
61
+ backgroundImage: `url(${o})`,
60
62
  backgroundRepeat: "repeat",
61
63
  backgroundSize: "20% 20%",
62
64
  backgroundPosition: "center",
63
- opacity: "0.7"
65
+ opacity: 0.7
64
66
  }
65
- })), l = t(n)(({ size: e }) => ({
67
+ })), g = i(p)(({ size: e }) => ({
66
68
  padding: e == "sm" ? ".7rem 5px .7rem 0 !important" : "0 16px 16px 16px !important",
67
69
  width: e === "sm" ? "calc(100% - 110px)" : "100%"
68
- })), g = t(r)(
70
+ })), x = i(r)(
69
71
  ({ size: e }) => ({
70
72
  display: "flex",
71
73
  alignItems: "center",
@@ -77,20 +79,22 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
77
79
  }
78
80
  }
79
81
  })
80
- ), x = t(r)(({ size: e, width: o, isLast: i }) => ({
81
- marginLeft: e === "sm" ? ".3rem" : ".5rem",
82
- fontSize: e === "sm" ? "12px" : "15px",
82
+ ), h = i(r, {
83
+ shouldForwardProp: (e) => e === "size" || e === "isLast" || e === "width"
84
+ })(({ theme: e, size: t, width: o, isLast: a }) => ({
85
+ marginLeft: t === "sm" ? ".3rem" : ".5rem",
86
+ fontSize: t === "sm" ? "12px" : "15px",
83
87
  "& .MuiTypography-root": {
84
88
  paddingTop: "2px",
85
- fontSize: e === "sm" ? "12px" : "15px"
89
+ fontSize: t === "sm" ? "12px" : "15px"
86
90
  },
87
- ...i && !o && {
91
+ ...a && !o && {
88
92
  textOverflow: "ellipsis",
89
93
  whiteSpace: "nowrap",
90
94
  overflow: "hidden",
91
- maxWidth: e === "sm" ? "110px" : "172px"
95
+ maxWidth: t === "sm" ? "110px" : "172px"
92
96
  }
93
- })), u = t(r)(
97
+ })), u = i(r)(
94
98
  ({ size: e }) => ({
95
99
  display: "inline-flex",
96
100
  alignItems: "center",
@@ -104,7 +108,7 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
104
108
  }
105
109
  }
106
110
  })
107
- ), h = t(r)(
111
+ ), b = i(r)(
108
112
  ({ size: e }) => ({
109
113
  position: "absolute",
110
114
  bottom: e === "sm" ? ".65rem" : "16px",
@@ -114,12 +118,12 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
114
118
  })
115
119
  );
116
120
  export {
117
- h as PublicIconWrapper,
118
- l as ResourceCardBody,
119
- d as ResourceCardImage,
121
+ b as PublicIconWrapper,
122
+ g as ResourceCardBody,
123
+ l as ResourceCardImage,
120
124
  u as ResourceIconItem,
121
- g as ResourcePropertyItem,
122
- x as ResourcePropertyText,
123
- m as SelectedIcon,
124
- c as StyledCard
125
+ x as ResourcePropertyItem,
126
+ h as ResourcePropertyText,
127
+ c as SelectedIcon,
128
+ m as StyledCard
125
129
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.5.0-dev.1743522751",
3
+ "version": "1.5.0-dev.1743528537",
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",