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