@cgi-learning-hub/ui 1.5.1-dev.1744649478 → 1.5.1-dev.1744819733

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&&{background:"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%"})),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)(({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=c;exports.ResourcePropertyText=p;exports.SelectedIcon=a;exports.StyledCard=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@mui/material"),i=t.styled(t.Card)(({selected:e,size:o,theme: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",...o==="sm"&&{display:"flex",width:"100%"},...e&&{borderColor:r.palette.primary.light},"&:hover":{"& .MuiBox-root.selected-icon":{opacity:1,visibility:"visible"}}})),a=t.styled(t.Box)(({selected:e,hasNoButtonOnFocus:o,theme: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:r.palette.primary.lighter,opacity:1,visibility:"visible"},...o?{"&:hover":{background:r.palette.primary.lighter,opacity:1}}:{"&:hover, &:focus":{background:r.palette.primary.lighter,opacity:1}},"& .MuiSvgIcon-root":{color:r.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,17 +1,17 @@
1
- import { styled as t, Card as a, Box as o, CardMedia as n, CardContent as p } from "@mui/material";
2
- const m = t(a)(({ selected: e, size: i }) => ({
1
+ import { styled as o, Card as a, Box as i, CardMedia as p, CardContent as n } from "@mui/material";
2
+ const c = o(a)(({ selected: e, size: r, theme: t }) => ({
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
+ ...r === "sm" && {
10
10
  display: "flex",
11
11
  width: "100%"
12
12
  },
13
13
  ...e && {
14
- background: "primary.light"
14
+ borderColor: t.palette.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(o)(({ selected: e, hasNoButtonOnFocus: i }) => ({
22
+ })), m = o(i)(({ selected: e, hasNoButtonOnFocus: r, theme: t }) => ({
23
23
  position: "absolute",
24
24
  top: 0,
25
25
  right: 0,
@@ -36,41 +36,41 @@ const m = t(a)(({ selected: e, size: i }) => ({
36
36
  cursor: "pointer",
37
37
  transition: "opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",
38
38
  ...e && {
39
- background: "primary.lighter",
39
+ background: t.palette.primary.lighter,
40
40
  opacity: 1,
41
41
  visibility: "visible"
42
42
  },
43
- ...i ? {
43
+ ...r ? {
44
44
  "&:hover": {
45
- background: "primary.lighter",
45
+ background: t.palette.primary.lighter,
46
46
  opacity: 1
47
47
  }
48
48
  } : {
49
49
  "&:hover, &:focus": {
50
- background: "primary.lighter",
50
+ background: t.palette.primary.lighter,
51
51
  opacity: 1
52
52
  }
53
53
  },
54
54
  "& .MuiSvgIcon-root": {
55
- color: "primary.main"
55
+ color: t.palette.primary.main
56
56
  }
57
- })), d = t(n)(({ size: e, image: i, defaultImage: r }) => ({
57
+ })), d = o(p)(({ size: e, image: r, defaultImage: t }) => ({
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
- ...!i && e === "md" && {
64
- backgroundImage: `url(${r})`,
63
+ ...!r && e === "md" && {
64
+ backgroundImage: `url(${t})`,
65
65
  backgroundRepeat: "repeat",
66
66
  backgroundSize: "20% 20%",
67
67
  backgroundPosition: "center",
68
68
  opacity: "0.7"
69
69
  }
70
- })), l = t(p)(({ size: e }) => ({
70
+ })), l = o(n)(({ 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(o)(
73
+ })), g = o(i)(
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(o)(({ size: e, width: i, isLast: r }) => ({
85
+ ), x = o(i)(({ size: e, width: r, isLast: t }) => ({
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
- ...r && !i && {
92
+ ...t && !r && {
93
93
  textOverflow: "ellipsis",
94
94
  whiteSpace: "nowrap",
95
95
  overflow: "hidden",
96
96
  maxWidth: e === "sm" ? "110px" : "172px"
97
97
  }
98
- })), h = t(o)(
98
+ })), h = o(i)(
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(o)(
112
+ ), u = o(i)(
113
113
  ({ size: e }) => ({
114
114
  position: "absolute",
115
115
  bottom: e === "sm" ? ".65rem" : "16px",
@@ -125,6 +125,6 @@ export {
125
125
  h as ResourceIconItem,
126
126
  g as ResourcePropertyItem,
127
127
  x as ResourcePropertyText,
128
- c as SelectedIcon,
129
- m as StyledCard
128
+ m as SelectedIcon,
129
+ c as StyledCard
130
130
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.5.1-dev.1744649478",
3
+ "version": "1.5.1-dev.1744819733",
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",