@cgi-learning-hub/ui 1.3.5-dev.1738156506 → 1.3.5-dev.1738158711
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 r=require("react/jsx-runtime"),u=require("@mui/material"),b=require("react"),g=require("../../createSvgIcon-DestgQu_.cjs"),o=require("./style.cjs.js"),j=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),y=g.createSvgIcon(r.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),R=b.forwardRef(({isSelected:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("@mui/material"),b=require("react"),g=require("../../createSvgIcon-DestgQu_.cjs"),o=require("./style.cjs.js"),j=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),y=g.createSvgIcon(r.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),R=b.forwardRef(({isSelected:c=!1,onSelect:p=()=>{},image:x,title:s,logo:h,propertyItems:i=[],infoIcons:l=[],size:t="md",width:d,onClick:n=()=>{}},m)=>(l=l.slice(0,3),r.jsx(u.Box,{ref:m,sx:{position:"relative",width:d&&t==="md"?d:"320px",height:"auto"},children:r.jsxs(o.StyledCard,{selected:c,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 ${s}`,children:[r.jsx(o.SelectedIcon,{onClick:e=>{e.preventDefault(),e.stopPropagation(),p()},onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),p())},className:"selected-icon",selected:c,role:"button",tabIndex:0,"aria-label":c?"Unselect card":"Select card",children:r.jsx(y,{})}),r.jsx(u.Box,{sx:{width:t=="sm"?110:"100%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:r.jsx(o.ResourceCardImage,{image:x,logo:h,size:t,role:"img","aria-label":`Image for ${s}`})}),r.jsxs(o.ResourceCardBody,{size:t,children:[r.jsx(j,{typographyProps:{fontWeight:"700",fontSize:"1.1rem"},tooltipProps:{placement:"bottom",arrow:!0},children:s}),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:d,children:e.text})]},`property-${a}`)),r.jsx(o.PublicIconWrapper,{size:t,children:l.length>0&&l.map((e,a)=>r.jsx(u.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}`))})]})]})})));exports.ResourceCard=R;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { Box as s, Tooltip as f } from "@mui/material";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c as
|
|
5
|
-
import { StyledCard as y, SelectedIcon as
|
|
3
|
+
import { forwardRef as g } from "react";
|
|
4
|
+
import { c as x } from "../../createSvgIcon-C9kh-71a.js";
|
|
5
|
+
import { StyledCard as y, SelectedIcon as P, ResourceCardImage as R, ResourceCardBody as I, ResourcePropertyItem as v, ResourcePropertyText as w, PublicIconWrapper as D, ResourceIconItem as $ } from "./style.es.js";
|
|
6
6
|
import j from "../EllipsisWithTooltip/EllipsisWithTooltip.es.js";
|
|
7
|
-
const E =
|
|
7
|
+
const E = x(/* @__PURE__ */ r("path", {
|
|
8
8
|
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
|
|
9
|
-
}), "MoreVert"), V =
|
|
10
|
-
isSelected:
|
|
9
|
+
}), "MoreVert"), V = g(({
|
|
10
|
+
isSelected: n = !1,
|
|
11
11
|
onSelect: m = () => {
|
|
12
12
|
},
|
|
13
13
|
image: h,
|
|
14
|
-
title:
|
|
14
|
+
title: c,
|
|
15
15
|
logo: u,
|
|
16
16
|
propertyItems: p = [],
|
|
17
17
|
infoIcons: a = [],
|
|
@@ -26,7 +26,7 @@ const E = g(/* @__PURE__ */ r("path", {
|
|
|
26
26
|
}, children: /* @__PURE__ */ i(
|
|
27
27
|
y,
|
|
28
28
|
{
|
|
29
|
-
selected:
|
|
29
|
+
selected: n,
|
|
30
30
|
size: t,
|
|
31
31
|
onClick: l,
|
|
32
32
|
onKeyDown: (e) => {
|
|
@@ -34,22 +34,22 @@ const E = g(/* @__PURE__ */ r("path", {
|
|
|
34
34
|
},
|
|
35
35
|
role: "button",
|
|
36
36
|
tabIndex: 0,
|
|
37
|
-
"aria-label": `Resource card for ${
|
|
37
|
+
"aria-label": `Resource card for ${c}`,
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ r(
|
|
40
|
-
|
|
40
|
+
P,
|
|
41
41
|
{
|
|
42
42
|
onClick: (e) => {
|
|
43
|
-
e.stopPropagation(), m();
|
|
43
|
+
e.preventDefault(), e.stopPropagation(), m();
|
|
44
44
|
},
|
|
45
45
|
onKeyDown: (e) => {
|
|
46
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), m());
|
|
46
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), m());
|
|
47
47
|
},
|
|
48
48
|
className: "selected-icon",
|
|
49
|
-
selected:
|
|
49
|
+
selected: n,
|
|
50
50
|
role: "button",
|
|
51
51
|
tabIndex: 0,
|
|
52
|
-
"aria-label":
|
|
52
|
+
"aria-label": n ? "Unselect card" : "Select card",
|
|
53
53
|
children: /* @__PURE__ */ r(E, {})
|
|
54
54
|
}
|
|
55
55
|
),
|
|
@@ -60,13 +60,13 @@ const E = g(/* @__PURE__ */ r("path", {
|
|
|
60
60
|
justifyContent: "center",
|
|
61
61
|
boxSizing: "border-box"
|
|
62
62
|
}, children: /* @__PURE__ */ r(
|
|
63
|
-
|
|
63
|
+
R,
|
|
64
64
|
{
|
|
65
65
|
image: h,
|
|
66
66
|
logo: u,
|
|
67
67
|
size: t,
|
|
68
68
|
role: "img",
|
|
69
|
-
"aria-label": `Image for ${
|
|
69
|
+
"aria-label": `Image for ${c}`
|
|
70
70
|
}
|
|
71
71
|
) }),
|
|
72
72
|
/* @__PURE__ */ i(
|
|
@@ -79,11 +79,11 @@ const E = g(/* @__PURE__ */ r("path", {
|
|
|
79
79
|
{
|
|
80
80
|
typographyProps: { fontWeight: "700", fontSize: "1.1rem" },
|
|
81
81
|
tooltipProps: { placement: "bottom", arrow: !0 },
|
|
82
|
-
children:
|
|
82
|
+
children: c
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
85
|
p.length > 0 && p.map((e, o) => /* @__PURE__ */ i(
|
|
86
|
-
|
|
86
|
+
v,
|
|
87
87
|
{
|
|
88
88
|
size: t,
|
|
89
89
|
role: "group",
|
|
@@ -91,7 +91,7 @@ const E = g(/* @__PURE__ */ r("path", {
|
|
|
91
91
|
children: [
|
|
92
92
|
e.icon,
|
|
93
93
|
/* @__PURE__ */ r(
|
|
94
|
-
|
|
94
|
+
w,
|
|
95
95
|
{
|
|
96
96
|
isLast: o === p.length - 1,
|
|
97
97
|
size: t,
|
|
@@ -104,7 +104,7 @@ const E = g(/* @__PURE__ */ r("path", {
|
|
|
104
104
|
`property-${o}`
|
|
105
105
|
)),
|
|
106
106
|
/* @__PURE__ */ r(
|
|
107
|
-
|
|
107
|
+
D,
|
|
108
108
|
{
|
|
109
109
|
size: t,
|
|
110
110
|
children: a.length > 0 && a.map((e, o) => /* @__PURE__ */ r(
|
|
@@ -114,7 +114,7 @@ const E = g(/* @__PURE__ */ r("path", {
|
|
|
114
114
|
placement: "top",
|
|
115
115
|
arrow: !0,
|
|
116
116
|
children: /* @__PURE__ */ r(
|
|
117
|
-
|
|
117
|
+
$,
|
|
118
118
|
{
|
|
119
119
|
size: t,
|
|
120
120
|
role: "button",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgi-learning-hub/ui",
|
|
3
|
-
"version": "1.3.5-dev.
|
|
3
|
+
"version": "1.3.5-dev.1738158711",
|
|
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",
|