@cgi-learning-hub/ui 1.4.0-dev.1742476956 → 1.4.0-dev.1742478014

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";const r=require("react/jsx-runtime"),b=require("../../MoreVert-B_Gz5Gfx.cjs"),d=require("@mui/material"),m=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),o=require("./style.cjs.js"),j=({isSelected:s=!1,onSelect:u=()=>{},image:x,title:c,defaultImage:h,propertyItems:i=[],infoIcons:l=[],size:t="md",width:p,onClick:n=()=>{}})=>(l=l.slice(0,3),r.jsx(d.Box,{sx:{width:p&&t==="md"?p:"320px"},children:r.jsxs(o.StyledCard,{selected:s,size:t,onClick:n,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),n==null||n())},role:"button",tabIndex:0,"aria-label":`Resource card for ${c}`,children:[r.jsx(o.SelectedIcon,{onClick:e=>{e.preventDefault(),e.stopPropagation(),u()},onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),u())},className:"selected-icon",selected:s,role:"button",tabIndex:0,"aria-label":s?"Unselect card":"Select card",children:r.jsx(b.MoreVertIcon,{})}),r.jsx(d.Stack,{sx:{width:t=="sm"?110:"100%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:r.jsx(o.ResourceCardImage,{image:x,defaultImage:h,size:t,role:"img","aria-label":`Image for ${c}`})}),r.jsxs(o.ResourceCardBody,{size:t,children:[r.jsx(m,{typographyProps:{fontWeight:"700",fontSize:"1.1rem"},tooltipProps:{placement:"bottom",arrow:!0},children:c}),i.length>0&&i.map((e,a)=>r.jsxs(o.ResourcePropertyItem,{size:t,role:"group","aria-label":`Property ${a}`,children:[e.icon,r.jsx(o.ResourcePropertyText,{isLast:a===i.length-1,size:t,width:p,children:e.text})]},`property-${a}`)),r.jsx(o.PublicIconWrapper,{size:t,children:l.length>0&&l.map((e,a)=>r.jsx(d.Tooltip,{title:e.text,placement:"top",arrow:!0,children:r.jsx(o.ResourceIconItem,{size:t,role:"button",tabIndex:0,"aria-label":e.text,children:e.icon})},`info-${a}`))})]})]})}));module.exports=j;
1
+ "use strict";const r=require("react/jsx-runtime"),b=require("../../MoreVert-B_Gz5Gfx.cjs"),d=require("@mui/material"),m=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),o=require("./style.cjs.js"),j=({isSelected:s=!1,onSelect:u=()=>{},image:x,title:c,defaultImage:h,propertyItems:p=[],infoIcons:l=[],size:t="md",width:i,onClick:n=()=>{}})=>(l=l.slice(0,3),r.jsx(d.Box,{sx:{width:i&&t==="md"?i:"320px"},children:r.jsxs(o.StyledCard,{selected:s,size:t,onClick:n,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),n==null||n())},role:"button",tabIndex:0,"aria-label":`Resource card for ${c}`,children:[r.jsx(o.SelectedIcon,{onClick:e=>{e.preventDefault(),e.stopPropagation(),u()},onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),u())},className:"selected-icon",selected:s,role:"button",tabIndex:0,"aria-label":s?"Unselect card":"Select card",children:r.jsx(b.MoreVertIcon,{})}),r.jsx(d.Stack,{sx:{width:t=="sm"?110:"100%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:r.jsx(o.ResourceCardImage,{image:x,defaultImage:h,size:t,role:"img","aria-label":`Image for ${c}`})}),r.jsxs(o.ResourceCardBody,{size:t,children:[r.jsx(m,{typographyProps:{variant:"h4",component:"p"},tooltipProps:{placement:"bottom",arrow:!0},children:c}),p.length>0&&p.map((e,a)=>r.jsxs(o.ResourcePropertyItem,{size:t,role:"group","aria-label":`Property ${a}`,children:[e.icon,r.jsx(o.ResourcePropertyText,{isLast:a===p.length-1,size:t,width:i,children:e.text})]},`property-${a}`)),r.jsx(o.PublicIconWrapper,{size:t,children:l.length>0&&l.map((e,a)=>r.jsx(d.Tooltip,{title:e.text,placement:"top",arrow:!0,children:r.jsx(o.ResourceIconItem,{size:t,role:"button",tabIndex:0,"aria-label":e.text,children:e.icon})},`info-${a}`))})]})]})}));module.exports=j;
@@ -1,9 +1,9 @@
1
1
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
2
  import { M as h } from "../../MoreVert-Dq8BqKg4.js";
3
- import { Box as b, Stack as x, Tooltip as f } from "@mui/material";
4
- import g from "../EllipsisWithTooltip/EllipsisWithTooltip.es.js";
5
- import { StyledCard as y, SelectedIcon as P, ResourceCardImage as R, ResourceCardBody as D, ResourcePropertyItem as I, ResourcePropertyText as $, PublicIconWrapper as w, ResourceIconItem as j } from "./style.es.js";
6
- const B = ({
3
+ import { Box as b, Stack as x, Tooltip as y } from "@mui/material";
4
+ import f from "../EllipsisWithTooltip/EllipsisWithTooltip.es.js";
5
+ import { StyledCard as g, SelectedIcon as P, ResourceCardImage as R, ResourceCardBody as D, ResourcePropertyItem as I, ResourcePropertyText as $, PublicIconWrapper as v, ResourceIconItem as w } from "./style.es.js";
6
+ const M = ({
7
7
  isSelected: n = !1,
8
8
  onSelect: m = () => {
9
9
  },
@@ -17,7 +17,7 @@ const B = ({
17
17
  onClick: l = () => {
18
18
  }
19
19
  }) => (a = a.slice(0, 3), /* @__PURE__ */ r(b, { sx: { width: d && t === "md" ? d : "320px" }, children: /* @__PURE__ */ i(
20
- y,
20
+ g,
21
21
  {
22
22
  selected: n,
23
23
  size: t,
@@ -70,9 +70,9 @@ const B = ({
70
70
  ),
71
71
  /* @__PURE__ */ i(D, { size: t, children: [
72
72
  /* @__PURE__ */ r(
73
- g,
73
+ f,
74
74
  {
75
- typographyProps: { fontWeight: "700", fontSize: "1.1rem" },
75
+ typographyProps: { variant: "h4", component: "p" },
76
76
  tooltipProps: { placement: "bottom", arrow: !0 },
77
77
  children: c
78
78
  }
@@ -98,14 +98,14 @@ const B = ({
98
98
  },
99
99
  `property-${o}`
100
100
  )),
101
- /* @__PURE__ */ r(w, { size: t, children: a.length > 0 && a.map((e, o) => /* @__PURE__ */ r(
102
- f,
101
+ /* @__PURE__ */ r(v, { size: t, children: a.length > 0 && a.map((e, o) => /* @__PURE__ */ r(
102
+ y,
103
103
  {
104
104
  title: e.text,
105
105
  placement: "top",
106
106
  arrow: !0,
107
107
  children: /* @__PURE__ */ r(
108
- j,
108
+ w,
109
109
  {
110
110
  size: t,
111
111
  role: "button",
@@ -122,5 +122,5 @@ const B = ({
122
122
  }
123
123
  ) }));
124
124
  export {
125
- B as default
125
+ M as default
126
126
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.4.0-dev.1742476956",
3
+ "version": "1.4.0-dev.1742478014",
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",