UNPKG

@cgi-learning-hub/ui

Version:

@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features

142 lines (141 loc) 4.54 kB
import { jsx as o } from "react/jsx-runtime"; import { c as e } from "../../createSvgIcon-B1E6Wo8z.js"; import { Typography as r } from "@mui/material"; import c from "../ResourceCard/ResourceCard.es.js"; const i = e(/* @__PURE__ */ o("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"), s = e(/* @__PURE__ */ o("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"), l = e(/* @__PURE__ */ o("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"), a = e(/* @__PURE__ */ o("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"), u = { title: "Components/ResourceCard", component: c, argTypes: { title: { description: "Titre de la carte.", control: "text", table: { type: { summary: "string" } }, required: !0 }, defaultImage: { description: "Image par défaut => Logo de l'application", control: "text", table: { type: { summary: "string" } }, required: !0 }, 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" } } }, propertyItems: { description: "Liste des propriétés affichées sous le titre.", control: "object", table: { type: { summary: "PropertyItem[{text: Typography, icon: MuiIcon}]" } } }, infoIcons: { description: "Liste des icônes d'information affichées dans la carte. (3 maximums)", control: "object", table: { type: { summary: "InfoItem[{text: string, icon: MuiIcon}]" } } }, 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: "320px" } } } } }, t = { args: { isSelected: !1, image: "https://dummyimage.com/600x400/000/fff.png&text=flashquizz", defaultImage: "https://flashquizz-dev.support-ent.fr/images/logo.svg", title: "Titre de la Ressource tres loooooooooooooooooooooooooooooooooooooooooooooooooooooong", propertyItems: [ { text: /* @__PURE__ */ o(r, { color: "text.primary", children: "0 questions" }), icon: /* @__PURE__ */ o(s, { color: "primary" }) }, { text: /* @__PURE__ */ o(r, { color: "text.primary", children: "27 septembre 2025" }), icon: /* @__PURE__ */ o(i, { color: "primary" }) } ], infoIcons: [ { text: "Information 1", icon: /* @__PURE__ */ o(l, { color: "primary" }) }, { text: "Information 2", icon: /* @__PURE__ */ o(a, { color: "primary" }) }, { text: "Information 3", icon: /* @__PURE__ */ o(a, { color: "primary" }) } ], size: "md", onSelect: () => { console.log("Carte sélectionnée !"); }, onClick: () => { console.log("Select all"); } } }, y = { args: { ...t.args, isSelected: !0, title: "Carte Sélectionnée" } }, g = { args: { ...t.args, size: "sm", title: "Petite Carte" } }, f = { args: { ...t.args, title: "Pas d'image", image: void 0 } }; export { t as Default, f as NoImage, y as Selected, g as Small, u as default };