@cgi-learning-hub/ui 1.5.0-dev.1743522751 → 1.5.0-dev.1743583979
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.
- package/dist/components/FolderCard/styles.cjs.js +1 -1
- package/dist/components/FolderCard/styles.d.ts +4 -0
- package/dist/components/FolderCard/styles.es.js +9 -5
- package/dist/components/ResourceCard/style.cjs.js +1 -1
- package/dist/components/ResourceCard/style.es.js +35 -31
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={display:"flex",padding:"16px !important",width:"100%",alignItems:"center"},t={marginRight:".8rem",fontSize:"inherit"},n={flex:15,alignItems:"center",display:"flex",justifyContent:"center"},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={display:"flex",padding:"16px !important",width:"100%",alignItems:"center"},t={marginRight:".8rem",fontSize:"inherit"},n={flex:15,alignItems:"center",display:"flex",justifyContent:"center"},i={display:"flex",flexDirection:"column",flex:85,minWidth:0,minHeight:"48px",justifyContent:"center"};exports.FolderBodyStyle=e;exports.FolderIconStyle=t;exports.IconContainerStyle=n;exports.TextContainerStyle=i;
|
|
@@ -15,6 +15,10 @@ export declare const IconContainerStyle: {
|
|
|
15
15
|
justifyContent: string;
|
|
16
16
|
};
|
|
17
17
|
export declare const TextContainerStyle: {
|
|
18
|
+
display: string;
|
|
19
|
+
flexDirection: string;
|
|
18
20
|
flex: number;
|
|
19
21
|
minWidth: number;
|
|
22
|
+
minHeight: string;
|
|
23
|
+
justifyContent: string;
|
|
20
24
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
display: "flex",
|
|
3
3
|
padding: "16px !important",
|
|
4
4
|
width: "100%",
|
|
5
5
|
alignItems: "center"
|
|
6
|
-
},
|
|
6
|
+
}, t = {
|
|
7
7
|
marginRight: ".8rem",
|
|
8
8
|
fontSize: "inherit"
|
|
9
9
|
}, n = {
|
|
@@ -12,12 +12,16 @@ const t = {
|
|
|
12
12
|
display: "flex",
|
|
13
13
|
justifyContent: "center"
|
|
14
14
|
}, i = {
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
15
17
|
flex: 85,
|
|
16
|
-
minWidth: 0
|
|
18
|
+
minWidth: 0,
|
|
19
|
+
minHeight: "48px",
|
|
20
|
+
justifyContent: "center"
|
|
17
21
|
};
|
|
18
22
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
e as FolderBodyStyle,
|
|
24
|
+
t as FolderIconStyle,
|
|
21
25
|
n as IconContainerStyle,
|
|
22
26
|
i as TextContainerStyle
|
|
23
27
|
};
|
|
@@ -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"),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
|
|
2
|
-
const
|
|
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
|
-
...
|
|
9
|
+
...o === "sm" && {
|
|
10
10
|
display: "flex",
|
|
11
11
|
width: "100%"
|
|
12
12
|
},
|
|
13
|
-
...
|
|
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
|
-
})),
|
|
23
|
-
({ theme: e, selected:
|
|
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
|
-
...
|
|
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
|
-
),
|
|
53
|
-
|
|
54
|
-
|
|
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
|
|
58
|
+
margin: e === "sm" ? "0 10px" : "1rem",
|
|
57
59
|
borderRadius: "0.5rem",
|
|
58
|
-
|
|
59
|
-
backgroundImage: `url(${
|
|
60
|
+
...(!t || t === "") && e === "md" && {
|
|
61
|
+
backgroundImage: `url(${o})`,
|
|
60
62
|
backgroundRepeat: "repeat",
|
|
61
63
|
backgroundSize: "20% 20%",
|
|
62
64
|
backgroundPosition: "center",
|
|
63
|
-
opacity:
|
|
65
|
+
opacity: 0.7
|
|
64
66
|
}
|
|
65
|
-
})),
|
|
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
|
-
})),
|
|
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
|
-
),
|
|
81
|
-
|
|
82
|
-
|
|
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:
|
|
89
|
+
fontSize: t === "sm" ? "12px" : "15px"
|
|
86
90
|
},
|
|
87
|
-
...
|
|
91
|
+
...a && !o && {
|
|
88
92
|
textOverflow: "ellipsis",
|
|
89
93
|
whiteSpace: "nowrap",
|
|
90
94
|
overflow: "hidden",
|
|
91
|
-
maxWidth:
|
|
95
|
+
maxWidth: t === "sm" ? "110px" : "172px"
|
|
92
96
|
}
|
|
93
|
-
})), u =
|
|
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
|
-
),
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
b as PublicIconWrapper,
|
|
122
|
+
g as ResourceCardBody,
|
|
123
|
+
l as ResourceCardImage,
|
|
120
124
|
u as ResourceIconItem,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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.
|
|
3
|
+
"version": "1.5.0-dev.1743583979",
|
|
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",
|