@cgi-learning-hub/ui 1.5.1-dev.1744649478 → 1.5.1-dev.1744800169
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)(({selected:e,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%"},...e&&{
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@mui/material"),i=t.styled(t.Card)(({selected:e,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%"},...e&&{borderColor:"primary.light"},"&:hover":{"& .MuiBox-root.selected-icon":{opacity:1,visibility:"visible"}}})),a=t.styled(t.Box)(({selected:e,hasNoButtonOnFocus:r})=>({position:"absolute",top:0,right:0,width:"2rem",height:"2rem",background:"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",...e&&{background:"primary.lighter",opacity:1,visibility:"visible"},...r?{"&:hover":{background:"primary.lighter",opacity:1}}:{"&:hover, &:focus":{background:"primary.lighter",opacity:1}},"& .MuiSvgIcon-root":{color:"primary.main"}})),s=t.styled(t.CardMedia)(({size:e,image:r,defaultImage:o})=>({height:e=="sm"?85:180,width:e=="sm"?85:"calc(100% - 2rem)",objectFit:"cover",margin:e=="sm"?"0 10px":"1rem",borderRadius:"0.5rem",...!r&&e==="md"&&{backgroundImage:`url(${o})`,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:r,isLast:o})=>({marginLeft:e==="sm"?".3rem":".5rem",fontSize:e==="sm"?"12px":"15px","& .MuiTypography-root":{paddingTop:"2px",fontSize:e==="sm"?"12px":"15px"},...o&&!r&&{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"}}})),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=n;exports.ResourceCardImage=s;exports.ResourceIconItem=d;exports.ResourcePropertyItem=p;exports.ResourcePropertyText=c;exports.SelectedIcon=a;exports.StyledCard=i;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { styled as t, Card as a, Box as
|
|
2
|
-
const m = t(a)(({ selected: e, size:
|
|
1
|
+
import { styled as t, Card as a, Box as r, CardMedia as n, CardContent as p } from "@mui/material";
|
|
2
|
+
const m = t(a)(({ selected: e, 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
|
-
...
|
|
9
|
+
...o === "sm" && {
|
|
10
10
|
display: "flex",
|
|
11
11
|
width: "100%"
|
|
12
12
|
},
|
|
13
13
|
...e && {
|
|
14
|
-
|
|
14
|
+
borderColor: "primary.light"
|
|
15
15
|
},
|
|
16
16
|
"&:hover": {
|
|
17
17
|
"& .MuiBox-root.selected-icon": {
|
|
@@ -19,7 +19,7 @@ const m = t(a)(({ selected: e, size: i }) => ({
|
|
|
19
19
|
visibility: "visible"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
})), c = t(
|
|
22
|
+
})), c = t(r)(({ selected: e, hasNoButtonOnFocus: o }) => ({
|
|
23
23
|
position: "absolute",
|
|
24
24
|
top: 0,
|
|
25
25
|
right: 0,
|
|
@@ -40,7 +40,7 @@ const m = t(a)(({ selected: e, size: i }) => ({
|
|
|
40
40
|
opacity: 1,
|
|
41
41
|
visibility: "visible"
|
|
42
42
|
},
|
|
43
|
-
...
|
|
43
|
+
...o ? {
|
|
44
44
|
"&:hover": {
|
|
45
45
|
background: "primary.lighter",
|
|
46
46
|
opacity: 1
|
|
@@ -54,14 +54,14 @@ const m = t(a)(({ selected: e, size: i }) => ({
|
|
|
54
54
|
"& .MuiSvgIcon-root": {
|
|
55
55
|
color: "primary.main"
|
|
56
56
|
}
|
|
57
|
-
})), d = t(n)(({ size: e, image:
|
|
57
|
+
})), d = t(n)(({ size: e, image: o, defaultImage: i }) => ({
|
|
58
58
|
height: e == "sm" ? 85 : 180,
|
|
59
59
|
width: e == "sm" ? 85 : "calc(100% - 2rem)",
|
|
60
60
|
objectFit: "cover",
|
|
61
61
|
margin: e == "sm" ? "0 10px" : "1rem",
|
|
62
62
|
borderRadius: "0.5rem",
|
|
63
|
-
...!
|
|
64
|
-
backgroundImage: `url(${
|
|
63
|
+
...!o && e === "md" && {
|
|
64
|
+
backgroundImage: `url(${i})`,
|
|
65
65
|
backgroundRepeat: "repeat",
|
|
66
66
|
backgroundSize: "20% 20%",
|
|
67
67
|
backgroundPosition: "center",
|
|
@@ -70,7 +70,7 @@ const m = t(a)(({ selected: e, size: i }) => ({
|
|
|
70
70
|
})), l = t(p)(({ size: e }) => ({
|
|
71
71
|
padding: e == "sm" ? ".7rem 5px .7rem 0 !important" : "0 16px 16px 16px !important",
|
|
72
72
|
width: e === "sm" ? "calc(100% - 110px)" : "100%"
|
|
73
|
-
})), g = t(
|
|
73
|
+
})), g = t(r)(
|
|
74
74
|
({ size: e }) => ({
|
|
75
75
|
display: "flex",
|
|
76
76
|
alignItems: "center",
|
|
@@ -82,20 +82,20 @@ const m = t(a)(({ selected: e, size: i }) => ({
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
})
|
|
85
|
-
), x = t(
|
|
85
|
+
), x = t(r)(({ size: e, width: o, isLast: i }) => ({
|
|
86
86
|
marginLeft: e === "sm" ? ".3rem" : ".5rem",
|
|
87
87
|
fontSize: e === "sm" ? "12px" : "15px",
|
|
88
88
|
"& .MuiTypography-root": {
|
|
89
89
|
paddingTop: "2px",
|
|
90
90
|
fontSize: e === "sm" ? "12px" : "15px"
|
|
91
91
|
},
|
|
92
|
-
...
|
|
92
|
+
...i && !o && {
|
|
93
93
|
textOverflow: "ellipsis",
|
|
94
94
|
whiteSpace: "nowrap",
|
|
95
95
|
overflow: "hidden",
|
|
96
96
|
maxWidth: e === "sm" ? "110px" : "172px"
|
|
97
97
|
}
|
|
98
|
-
})), h = t(
|
|
98
|
+
})), h = t(r)(
|
|
99
99
|
({ size: e }) => ({
|
|
100
100
|
display: "inline-flex",
|
|
101
101
|
alignItems: "center",
|
|
@@ -109,7 +109,7 @@ const m = t(a)(({ selected: e, size: i }) => ({
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
})
|
|
112
|
-
), u = t(
|
|
112
|
+
), u = t(r)(
|
|
113
113
|
({ size: e }) => ({
|
|
114
114
|
position: "absolute",
|
|
115
115
|
bottom: e === "sm" ? ".65rem" : "16px",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgi-learning-hub/ui",
|
|
3
|
-
"version": "1.5.1-dev.
|
|
3
|
+
"version": "1.5.1-dev.1744800169",
|
|
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",
|