@cgi-learning-hub/ui 1.3.5-dev.1737994728 → 1.3.5-dev.1738080904
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/ResourceCard/ResourceCard.cjs.js +1 -1
- package/dist/components/ResourceCard/ResourceCard.d.ts +3 -4
- package/dist/components/ResourceCard/ResourceCard.es.js +124 -57
- package/dist/components/ResourceCard/style.cjs.js +1 -1
- package/dist/components/ResourceCard/style.es.js +17 -20
- package/dist/components/stories/ResourceCard.stories.cjs.js +1 -1
- package/dist/components/stories/ResourceCard.stories.es.js +27 -34
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("@mui/material"),u=require("react"),g=require("../../createSvgIcon-DestgQu_.cjs"),l=require("./style.cjs.js"),b=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),j=g.createSvgIcon(t.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"),y=u.forwardRef(({isSelected:c=!1,onSelect:x=()=>{},image:m,title:i,propertyItems:d=[],infoIcons:a=[],size:o="md",width:p,onClick:n=()=>{}},h)=>(a=a.slice(0,3),t.jsx(r.Box,{ref:h,sx:{position:"relative",width:p&&o==="md"?p:"360px",height:"auto"},children:t.jsxs(l.StyledCard,{selected:c,size:o,onClick:n,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),n==null||n())},role:"button",tabIndex:0,"aria-label":`Resource card for ${i}`,children:[t.jsx(l.SelectedIcon,{onClick:e=>{e.stopPropagation(),x()},onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),x())},className:"selected-icon",selected:c,role:"button",tabIndex:0,"aria-label":c?"Unselect card":"Select card",children:t.jsx(j,{})}),t.jsx(r.Box,{sx:{width:o=="sm"?110:"100%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:t.jsx(r.CardMedia,{image:m,sx:{height:o=="sm"?"calc(100% - 32px)":180,width:o=="sm"?"calc(100% - 32px)":"calc(100% - 2rem)",objectFit:"cover",margin:o=="sm"?0:"1rem",borderRadius:"0.5rem"},role:"img","aria-label":`Image for ${i}`})}),t.jsxs(r.CardContent,{sx:{padding:o=="sm"?"1rem 0 !important":"0 16px 16px 16px !important",width:o==="sm"?"calc(100% - 110px)":"100%"},children:[t.jsx(b,{typographyProps:{fontWeight:"700",fontSize:"1.1rem"},tooltipProps:{placement:"bottom",arrow:!0},children:i}),d.length>0&&d.map((e,s)=>t.jsxs(r.Box,{sx:l.ItemCard,role:"group","aria-label":`Property ${s}`,children:[e.icon,t.jsx(r.Box,{sx:{marginLeft:"0.5rem",display:"flex"},children:e.text})]},`property-${s}`)),t.jsx(r.Box,{sx:l.PublicIconWrapper,children:a.length>0&&a.map((e,s)=>t.jsx(r.Tooltip,{title:e.text,placement:"top",arrow:!0,children:t.jsx(r.Box,{role:"button",tabIndex:0,"aria-label":e.text,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"fit-content",height:"fit-content"},children:e.icon})},`info-${s}`))})]})]})})));exports.ResourceCard=y;
|
|
@@ -7,7 +7,7 @@ export type InfoItem = {
|
|
|
7
7
|
text: string;
|
|
8
8
|
icon: ReactNode;
|
|
9
9
|
};
|
|
10
|
-
type
|
|
10
|
+
export type ResourceCardSize = "md" | "sm";
|
|
11
11
|
export interface ResourceCardProps {
|
|
12
12
|
isSelected?: boolean;
|
|
13
13
|
onSelect?: () => void;
|
|
@@ -15,9 +15,8 @@ export interface ResourceCardProps {
|
|
|
15
15
|
title: string;
|
|
16
16
|
propertyItems?: PropertyItem[];
|
|
17
17
|
infoIcons?: InfoItem[];
|
|
18
|
-
size?:
|
|
18
|
+
size?: ResourceCardSize;
|
|
19
19
|
width?: string;
|
|
20
|
-
|
|
20
|
+
onClick?: () => void;
|
|
21
21
|
}
|
|
22
22
|
export declare const ResourceCard: import('react').ForwardRefExoticComponent<ResourceCardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export {};
|
|
@@ -1,62 +1,129 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c as
|
|
5
|
-
import { StyledCard as
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { Box as o, CardMedia as f, CardContent as b, Tooltip as g } from "@mui/material";
|
|
3
|
+
import { forwardRef as u } from "react";
|
|
4
|
+
import { c as y } from "../../createSvgIcon-C9kh-71a.js";
|
|
5
|
+
import { StyledCard as w, SelectedIcon as j, ItemCard as v, PublicIconWrapper as I } from "./style.es.js";
|
|
6
6
|
import P from "../EllipsisWithTooltip/EllipsisWithTooltip.es.js";
|
|
7
|
-
const
|
|
7
|
+
const $ = y(/* @__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"),
|
|
10
|
-
|
|
9
|
+
}), "MoreVert"), W = u(({
|
|
10
|
+
isSelected: i = !1,
|
|
11
|
+
onSelect: p = () => {
|
|
12
|
+
},
|
|
13
|
+
image: x,
|
|
14
|
+
title: c,
|
|
15
|
+
propertyItems: m = [],
|
|
16
|
+
infoIcons: a = [],
|
|
17
|
+
size: t = "md",
|
|
18
|
+
width: s,
|
|
19
|
+
onClick: n = () => {
|
|
20
|
+
}
|
|
21
|
+
}, h) => (a = a.slice(0, 3), /* @__PURE__ */ r(o, { ref: h, sx: {
|
|
11
22
|
position: "relative",
|
|
12
|
-
width:
|
|
13
|
-
height:
|
|
14
|
-
}, children: /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
23
|
+
width: s && t === "md" ? s : "360px",
|
|
24
|
+
height: "auto"
|
|
25
|
+
}, children: /* @__PURE__ */ d(
|
|
26
|
+
w,
|
|
27
|
+
{
|
|
28
|
+
selected: i,
|
|
29
|
+
size: t,
|
|
30
|
+
onClick: n,
|
|
31
|
+
onKeyDown: (e) => {
|
|
32
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n == null || n());
|
|
33
|
+
},
|
|
34
|
+
role: "button",
|
|
35
|
+
tabIndex: 0,
|
|
36
|
+
"aria-label": `Resource card for ${c}`,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ r(
|
|
39
|
+
j,
|
|
40
|
+
{
|
|
41
|
+
onClick: (e) => {
|
|
42
|
+
e.stopPropagation(), p();
|
|
43
|
+
},
|
|
44
|
+
onKeyDown: (e) => {
|
|
45
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), p());
|
|
46
|
+
},
|
|
47
|
+
className: "selected-icon",
|
|
48
|
+
selected: i,
|
|
49
|
+
role: "button",
|
|
50
|
+
tabIndex: 0,
|
|
51
|
+
"aria-label": i ? "Unselect card" : "Select card",
|
|
52
|
+
children: /* @__PURE__ */ r($, {})
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ r(o, { sx: {
|
|
56
|
+
width: t == "sm" ? 110 : "100%",
|
|
57
|
+
display: "flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
justifyContent: "center",
|
|
60
|
+
boxSizing: "border-box"
|
|
61
|
+
}, children: /* @__PURE__ */ r(
|
|
62
|
+
f,
|
|
63
|
+
{
|
|
64
|
+
image: x,
|
|
65
|
+
sx: {
|
|
66
|
+
height: t == "sm" ? "calc(100% - 32px)" : 180,
|
|
67
|
+
width: t == "sm" ? "calc(100% - 32px)" : "calc(100% - 2rem)",
|
|
68
|
+
objectFit: "cover",
|
|
69
|
+
margin: t == "sm" ? 0 : "1rem",
|
|
70
|
+
borderRadius: "0.5rem"
|
|
71
|
+
},
|
|
72
|
+
role: "img",
|
|
73
|
+
"aria-label": `Image for ${c}`
|
|
74
|
+
}
|
|
75
|
+
) }),
|
|
76
|
+
/* @__PURE__ */ d(b, { sx: { padding: t == "sm" ? "1rem 0 !important" : "0 16px 16px 16px !important", width: t === "sm" ? "calc(100% - 110px)" : "100%" }, children: [
|
|
77
|
+
/* @__PURE__ */ r(
|
|
78
|
+
P,
|
|
79
|
+
{
|
|
80
|
+
typographyProps: { fontWeight: "700", fontSize: "1.1rem" },
|
|
81
|
+
tooltipProps: { placement: "bottom", arrow: !0 },
|
|
82
|
+
children: c
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
m.length > 0 && m.map((e, l) => /* @__PURE__ */ d(
|
|
86
|
+
o,
|
|
87
|
+
{
|
|
88
|
+
sx: v,
|
|
89
|
+
role: "group",
|
|
90
|
+
"aria-label": `Property ${l}`,
|
|
91
|
+
children: [
|
|
92
|
+
e.icon,
|
|
93
|
+
/* @__PURE__ */ r(o, { sx: { marginLeft: "0.5rem", display: "flex" }, children: e.text })
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
`property-${l}`
|
|
97
|
+
)),
|
|
98
|
+
/* @__PURE__ */ r(o, { sx: I, children: a.length > 0 && a.map((e, l) => /* @__PURE__ */ r(
|
|
99
|
+
g,
|
|
100
|
+
{
|
|
101
|
+
title: e.text,
|
|
102
|
+
placement: "top",
|
|
103
|
+
arrow: !0,
|
|
104
|
+
children: /* @__PURE__ */ r(
|
|
105
|
+
o,
|
|
106
|
+
{
|
|
107
|
+
role: "button",
|
|
108
|
+
tabIndex: 0,
|
|
109
|
+
"aria-label": e.text,
|
|
110
|
+
sx: {
|
|
111
|
+
display: "inline-flex",
|
|
112
|
+
alignItems: "center",
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
width: "fit-content",
|
|
115
|
+
height: "fit-content"
|
|
116
|
+
},
|
|
117
|
+
children: e.icon
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
},
|
|
121
|
+
`info-${l}`
|
|
122
|
+
)) })
|
|
123
|
+
] })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
) })));
|
|
60
127
|
export {
|
|
61
|
-
|
|
128
|
+
W as ResourceCard
|
|
62
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@mui/material"),r={display:"flex",marginTop:"0.5rem"},a=e.styled(e.Card)(({theme:i,selected:t,size:o})=>({boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",borderRadius:"0.5rem",border:"2px solid transparent",transition:"border-color 0.2s ease-in-out",position:"relative",...o==="sm"&&{display:"flex",width:"100%"},...t&&{borderColor:i.palette.primary.light},"&:hover":{"& .MuiBox-root.selected-icon":{opacity:1,visibility:"visible"}}})),l=e.styled(e.Box)(({theme:i,selected:t})=>({position:"absolute",top:0,right:0,width:"2rem",height:"2rem",background:i.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",...t&&{background:i.palette.primary.lighter,opacity:1,visibility:"visible"},"&:hover, &:focus":{background:i.palette.primary.lighter,opacity:1},"& .MuiSvgIcon-root":{color:i.palette.primary.main}})),s={position:"absolute",bottom:"16px",right:"16px",display:"flex",gap:".2rem"};exports.ItemCard=r;exports.PublicIconWrapper=s;exports.SelectedIcon=l;exports.StyledCard=a;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { styled as
|
|
1
|
+
import { styled as t, Card as e, Box as a } from "@mui/material";
|
|
2
2
|
const s = {
|
|
3
3
|
display: "flex",
|
|
4
4
|
marginTop: "0.5rem"
|
|
5
|
-
},
|
|
5
|
+
}, l = t(e)(({ theme: i, selected: o, size: r }) => ({
|
|
6
6
|
boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",
|
|
7
7
|
borderRadius: "0.5rem",
|
|
8
8
|
border: "2px solid transparent",
|
|
9
9
|
transition: "border-color 0.2s ease-in-out",
|
|
10
10
|
position: "relative",
|
|
11
|
-
...r && {
|
|
11
|
+
...r === "sm" && {
|
|
12
|
+
display: "flex",
|
|
13
|
+
width: "100%"
|
|
14
|
+
},
|
|
15
|
+
...o && {
|
|
12
16
|
borderColor: i.palette.primary.light
|
|
13
17
|
},
|
|
14
18
|
"&:hover": {
|
|
@@ -17,14 +21,7 @@ const s = {
|
|
|
17
21
|
visibility: "visible"
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
|
-
})),
|
|
21
|
-
height: 180,
|
|
22
|
-
width: "calc(100% - 2rem)",
|
|
23
|
-
maxWidth: 300,
|
|
24
|
-
objectFit: "cover",
|
|
25
|
-
margin: "1rem",
|
|
26
|
-
borderRadius: "0.5rem"
|
|
27
|
-
}, l = e(o)(({ theme: i, selected: r }) => ({
|
|
24
|
+
})), n = t(a)(({ theme: i, selected: o }) => ({
|
|
28
25
|
position: "absolute",
|
|
29
26
|
top: 0,
|
|
30
27
|
right: 0,
|
|
@@ -36,32 +33,32 @@ const s = {
|
|
|
36
33
|
alignItems: "center",
|
|
37
34
|
padding: ".8rem",
|
|
38
35
|
borderRadius: ".5rem",
|
|
39
|
-
visibility: "
|
|
36
|
+
visibility: "visible",
|
|
40
37
|
opacity: 0,
|
|
41
38
|
cursor: "pointer",
|
|
42
39
|
transition: "opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",
|
|
43
|
-
...
|
|
40
|
+
...o && {
|
|
44
41
|
background: i.palette.primary.lighter,
|
|
45
42
|
opacity: 1,
|
|
46
43
|
visibility: "visible"
|
|
47
44
|
},
|
|
48
|
-
"&:hover": {
|
|
49
|
-
background: i.palette.primary.lighter
|
|
45
|
+
"&:hover, &:focus": {
|
|
46
|
+
background: i.palette.primary.lighter,
|
|
47
|
+
opacity: 1
|
|
50
48
|
},
|
|
51
49
|
"& .MuiSvgIcon-root": {
|
|
52
50
|
color: i.palette.primary.main
|
|
53
51
|
}
|
|
54
52
|
})), d = {
|
|
55
53
|
position: "absolute",
|
|
56
|
-
bottom: "
|
|
57
|
-
right: "
|
|
54
|
+
bottom: "16px",
|
|
55
|
+
right: "16px",
|
|
58
56
|
display: "flex",
|
|
59
57
|
gap: ".2rem"
|
|
60
58
|
};
|
|
61
59
|
export {
|
|
62
|
-
p as ImageStyle,
|
|
63
60
|
s as ItemCard,
|
|
64
61
|
d as PublicIconWrapper,
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
n as SelectedIcon,
|
|
63
|
+
l as StyledCard
|
|
67
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("../ResourceCard/ResourceCard.cjs.js"),t=require("../../createSvgIcon-DestgQu_.cjs"),c=require("@mui/material"),a=t.createSvgIcon(e.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),i=t.createSvgIcon(e.jsx("path",{d:"M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-6 16h-2v-2h2zm2.07-7.75-.9.92C13.45 11.9 13 12.5 13 14h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}),"LiveHelp"),n=t.createSvgIcon(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public"),r=t.createSvgIcon(e.jsx("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),l={title:"Components/ResourceCard",component:s.ResourceCard,argTypes:{isSelected:{description:"Indique si la carte est sélectionnée.",control:"boolean",table:{type:{summary:"boolean"},defaultValue:{summary:"false"}}},onSelect:{description:"Callback déclenché lorsque l'utilisateur sélectionne la carte.",action:"card-selected",table:{type:{summary:"() => void"}}},image:{description:"URL de l'image affichée sur la carte.",control:"text",table:{type:{summary:"string"}}},title:{description:"Titre de la carte.",control:"text",table:{type:{summary:"string"}}},propertyItems:{description:"Liste des propriétés affichées sous le titre.",control:"object",table:{type:{summary:"PropertyItem[]"}}},infoIcons:{description:"Liste des icônes d'information affichées dans la carte. (3 maximums)",control:"object",table:{type:{summary:"InfoItem[]"}}},size:{description:"Taille de la carte (petite ou moyenne).",control:"radio",options:["sm","md"],table:{type:{summary:'"sm" | "md"'},defaultValue:{summary:"md"}}},width:{description:"Largeur de la carte.",control:"text",table:{type:{summary:"string"},defaultValue:{summary:"300px"}}}}},o={args:{isSelected:!1,image:"https://dummyimage.com/600x400/000/fff&text=flashquizz",title:"Titre de la Ressource tres loooooooooooooooooooooooooooooooooooooooooooooooooooooong",propertyItems:[{text:e.jsx(c.Typography,{color:"text.primary",children:"0 questions"}),icon:e.jsx(i,{color:"primary"})},{text:"27 janvier 2025",icon:e.jsx(a,{color:"primary"})}],infoIcons:[{text:"Information 1",icon:e.jsx(n,{color:"primary"})},{text:"Information 2",icon:e.jsx(r,{color:"primary"})},{text:"Information 3",icon:e.jsx(r,{color:"primary"})},{text:"Information 3",icon:e.jsx(r,{color:"primary"})}],size:"sm",onSelect:()=>{console.log("Carte sélectionnée !")},onClick:()=>{console.log("Select all")}}},m={args:{...o.args,isSelected:!0,title:"Carte Sélectionnée"}},u={args:{...o.args,size:"sm",title:"Petite Carte"}},d={args:{...o.args,propertyItems:[],infoIcons:[],title:"Carte sans Icônes"}},p={args:{...o.args,width:"400px",title:"Carte avec taille personnalisée"}};exports.CustomSize=p;exports.Default=o;exports.NoIcons=d;exports.Selected=m;exports.Small=u;exports.default=l;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { ResourceCard as a } from "../ResourceCard/ResourceCard.es.js";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as e } from "../../createSvgIcon-C9kh-71a.js";
|
|
4
4
|
import { Typography as c } from "@mui/material";
|
|
5
|
-
const s =
|
|
5
|
+
const s = e(/* @__PURE__ */ o("path", {
|
|
6
6
|
d: "M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"
|
|
7
|
-
}), "CalendarToday"), i =
|
|
7
|
+
}), "CalendarToday"), i = e(/* @__PURE__ */ o("path", {
|
|
8
8
|
d: "M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-6 16h-2v-2h2zm2.07-7.75-.9.92C13.45 11.9 13 12.5 13 14h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"
|
|
9
|
-
}), "LiveHelp"), l =
|
|
9
|
+
}), "LiveHelp"), l = e(/* @__PURE__ */ o("path", {
|
|
10
10
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"
|
|
11
|
-
}), "Public"), r =
|
|
11
|
+
}), "Public"), r = e(/* @__PURE__ */ o("path", {
|
|
12
12
|
d: "M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
|
|
13
13
|
}), "Star"), u = {
|
|
14
14
|
title: "Components/ResourceCard",
|
|
@@ -73,69 +73,62 @@ const s = t(/* @__PURE__ */ e("path", {
|
|
|
73
73
|
type: { summary: "string" },
|
|
74
74
|
defaultValue: { summary: "300px" }
|
|
75
75
|
}
|
|
76
|
-
},
|
|
77
|
-
height: {
|
|
78
|
-
description: "Hauteur de la carte.",
|
|
79
|
-
control: "text",
|
|
80
|
-
table: {
|
|
81
|
-
type: { summary: "string" },
|
|
82
|
-
defaultValue: { summary: "auto" }
|
|
83
|
-
}
|
|
84
76
|
}
|
|
85
77
|
}
|
|
86
|
-
},
|
|
78
|
+
}, t = {
|
|
87
79
|
args: {
|
|
88
80
|
isSelected: !1,
|
|
89
81
|
image: "https://dummyimage.com/600x400/000/fff&text=flashquizz",
|
|
90
|
-
title: "Titre de la Ressource",
|
|
82
|
+
title: "Titre de la Ressource tres loooooooooooooooooooooooooooooooooooooooooooooooooooooong",
|
|
91
83
|
propertyItems: [
|
|
92
|
-
{ text: /* @__PURE__ */
|
|
93
|
-
{ text: "27 janvier 2025", icon: /* @__PURE__ */
|
|
84
|
+
{ text: /* @__PURE__ */ o(c, { color: "text.primary", children: "0 questions" }), icon: /* @__PURE__ */ o(i, { color: "primary" }) },
|
|
85
|
+
{ text: "27 janvier 2025", icon: /* @__PURE__ */ o(s, { color: "primary" }) }
|
|
94
86
|
],
|
|
95
87
|
infoIcons: [
|
|
96
|
-
{ text: "Information 1", icon: /* @__PURE__ */
|
|
97
|
-
{ text: "Information 2", icon: /* @__PURE__ */
|
|
98
|
-
{ text: "Information 3", icon: /* @__PURE__ */
|
|
88
|
+
{ text: "Information 1", icon: /* @__PURE__ */ o(l, { color: "primary" }) },
|
|
89
|
+
{ text: "Information 2", icon: /* @__PURE__ */ o(r, { color: "primary" }) },
|
|
90
|
+
{ text: "Information 3", icon: /* @__PURE__ */ o(r, { color: "primary" }) },
|
|
91
|
+
{ text: "Information 3", icon: /* @__PURE__ */ o(r, { color: "primary" }) }
|
|
99
92
|
],
|
|
100
|
-
size: "
|
|
101
|
-
width: "300px",
|
|
102
|
-
height: "auto",
|
|
93
|
+
size: "sm",
|
|
103
94
|
onSelect: () => {
|
|
104
95
|
console.log("Carte sélectionnée !");
|
|
96
|
+
},
|
|
97
|
+
onClick: () => {
|
|
98
|
+
console.log("Select all");
|
|
105
99
|
}
|
|
106
100
|
}
|
|
107
101
|
}, y = {
|
|
108
102
|
args: {
|
|
109
|
-
...
|
|
103
|
+
...t.args,
|
|
110
104
|
isSelected: !0,
|
|
111
105
|
title: "Carte Sélectionnée"
|
|
112
106
|
}
|
|
113
|
-
},
|
|
107
|
+
}, f = {
|
|
114
108
|
args: {
|
|
115
|
-
...
|
|
109
|
+
...t.args,
|
|
116
110
|
size: "sm",
|
|
117
111
|
title: "Petite Carte"
|
|
118
112
|
}
|
|
119
|
-
},
|
|
113
|
+
}, h = {
|
|
120
114
|
args: {
|
|
121
|
-
...
|
|
115
|
+
...t.args,
|
|
122
116
|
propertyItems: [],
|
|
123
117
|
infoIcons: [],
|
|
124
118
|
title: "Carte sans Icônes"
|
|
125
119
|
}
|
|
126
120
|
}, g = {
|
|
127
121
|
args: {
|
|
128
|
-
...
|
|
122
|
+
...t.args,
|
|
129
123
|
width: "400px",
|
|
130
|
-
height: "200px",
|
|
131
124
|
title: "Carte avec taille personnalisée"
|
|
132
125
|
}
|
|
133
126
|
};
|
|
134
127
|
export {
|
|
135
128
|
g as CustomSize,
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
t as Default,
|
|
130
|
+
h as NoIcons,
|
|
138
131
|
y as Selected,
|
|
139
|
-
|
|
132
|
+
f as Small,
|
|
140
133
|
u as default
|
|
141
134
|
};
|
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.1738080904",
|
|
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",
|