@edifice.io/react 2.5.8-develop-pedago.20260129172409 → 2.5.8-develop.20260130110418

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.
Files changed (50) hide show
  1. package/dist/components/Badge/Badge.d.ts +1 -7
  2. package/dist/components/Badge/Badge.js +1 -13
  3. package/dist/components/index.d.ts +0 -2
  4. package/dist/hooks/useEdificeIcons/useEdificeIcons.d.ts +0 -1
  5. package/dist/hooks/useEdificeIcons/useEdificeIcons.js +0 -5
  6. package/dist/icons.js +354 -358
  7. package/dist/index.js +140 -145
  8. package/dist/modules/icons/components/IconLabel.d.ts +7 -0
  9. package/dist/modules/icons/components/IconLabel.js +12 -0
  10. package/dist/modules/icons/components/index.d.ts +1 -3
  11. package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
  12. package/package.json +6 -7
  13. package/dist/components/MediaViewer/MediaViewer.d.ts +0 -17
  14. package/dist/components/MediaViewer/MediaViewer.js +0 -36
  15. package/dist/components/MediaViewer/MediaWrapper.d.ts +0 -7
  16. package/dist/components/MediaViewer/MediaWrapper.js +0 -72
  17. package/dist/components/MediaViewer/PdfViewer.d.ts +0 -4
  18. package/dist/components/MediaViewer/PdfViewer.js +0 -26
  19. package/dist/components/MediaViewer/ToolbarViewer.d.ts +0 -7
  20. package/dist/components/MediaViewer/ToolbarViewer.js +0 -41
  21. package/dist/components/MediaViewer/ToolbarZoom.d.ts +0 -4
  22. package/dist/components/MediaViewer/ToolbarZoom.js +0 -19
  23. package/dist/components/MediaViewer/index.d.ts +0 -2
  24. package/dist/components/PromotionCard/PromotionCard.d.ts +0 -74
  25. package/dist/components/PromotionCard/PromotionCard.js +0 -31
  26. package/dist/components/PromotionCard/PromotionCardBody.d.ts +0 -10
  27. package/dist/components/PromotionCard/PromotionCardBody.js +0 -15
  28. package/dist/components/PromotionCard/PromotionCardDescription.d.ts +0 -9
  29. package/dist/components/PromotionCard/PromotionCardDescription.js +0 -12
  30. package/dist/components/PromotionCard/PromotionCardFooter.d.ts +0 -9
  31. package/dist/components/PromotionCard/PromotionCardFooter.js +0 -12
  32. package/dist/components/PromotionCard/PromotionCardHeader.d.ts +0 -11
  33. package/dist/components/PromotionCard/PromotionCardHeader.js +0 -17
  34. package/dist/components/PromotionCard/PromotionCardIcon.d.ts +0 -10
  35. package/dist/components/PromotionCard/PromotionCardIcon.js +0 -15
  36. package/dist/components/PromotionCard/PromotionCardTitle.d.ts +0 -9
  37. package/dist/components/PromotionCard/PromotionCardTitle.js +0 -12
  38. package/dist/components/PromotionCard/index.d.ts +0 -2
  39. package/dist/components/SmartEllipsis/SmartEllipsis.d.ts +0 -5
  40. package/dist/components/SmartEllipsis/SmartEllipsis.js +0 -21
  41. package/dist/components/SmartEllipsis/index.d.ts +0 -2
  42. package/dist/hooks/useZoom/index.d.ts +0 -1
  43. package/dist/hooks/useZoom/useZoom.d.ts +0 -7
  44. package/dist/hooks/useZoom/useZoom.js +0 -14
  45. package/dist/modules/icons/components/IconAiFill.d.ts +0 -7
  46. package/dist/modules/icons/components/IconAiFill.js +0 -12
  47. package/dist/modules/icons/components/IconExercizerAi.d.ts +0 -7
  48. package/dist/modules/icons/components/IconExercizerAi.js +0 -14
  49. package/dist/modules/icons/components/IconTeacher.d.ts +0 -7
  50. package/dist/modules/icons/components/IconTeacher.js +0 -12
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { IWebApp, UserProfile } from '@edifice.io/client';
2
+ import { UserProfile } from '@edifice.io/client';
3
3
  export type BadgeRef = HTMLSpanElement;
4
4
  /** Badge variant : notification */
5
5
  export type NotificationBadgeVariant = {
@@ -31,16 +31,10 @@ export type LinkBadgeVariant = {
31
31
  * Beta Badge is used to indicate that a feature is in beta phase.
32
32
  * The color prop allows to customize the badge color to match the app color.
33
33
  * Defaults to black if not provided.
34
- * Beta Badge has a fixed text 'BÊTA' unless children is provided.
35
- * If app is provided, the color of the Beta Badge is derived from the application colors.
36
- * Example:
37
- * <Badge variant={{ type: 'beta', color: '#823AA1', app: myApp }} />
38
- * where myApp is of type IWebApp.
39
34
  */
40
35
  export type BetaBadgeVariant = {
41
36
  type: 'beta';
42
37
  color?: string;
43
- app?: IWebApp;
44
38
  };
45
39
  export type BadgeVariants = NotificationBadgeVariant | ContentBadgeVariant | ProfileBadgeVariant | ChipBadgeVariant | LinkBadgeVariant | BetaBadgeVariant;
46
40
  export interface BadgeProps extends React.ComponentPropsWithRef<'span'> {
@@ -1,7 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import clsx from "clsx";
4
- import useEdificeIcons from "../../hooks/useEdificeIcons/useEdificeIcons.js";
5
4
  const Badge = /* @__PURE__ */ forwardRef(({
6
5
  className,
7
6
  variant = {
@@ -11,18 +10,7 @@ const Badge = /* @__PURE__ */ forwardRef(({
11
10
  children,
12
11
  ...restProps
13
12
  }, ref) => {
14
- const {
15
- getIconClass,
16
- getBackgroundLightIconClass,
17
- getBorderIconClass
18
- } = useEdificeIcons();
19
- let badgeColorClassName = "";
20
- if (variant.type === "beta" && variant.app) {
21
- const colorAppClassName = getIconClass(variant.app), backgroundLightAppClassName = getBackgroundLightIconClass(variant.app), borderAppClassName = getBorderIconClass(variant.app);
22
- badgeColorClassName = `${colorAppClassName} ${backgroundLightAppClassName} ${borderAppClassName}`;
23
- }
24
- console.log(badgeColorClassName);
25
- const classes = clsx("badge rounded-pill", (variant.type === "content" || variant.type === "user") && "background" in variant ? "bg-gray-200" : (variant.type === "content" || variant.type === "user") && !("background" in variant) ? "border border-0" : "", variant.type === "content" && `text-${variant.level}`, variant.type === "notification" && `badge-notification bg-${variant.level} text-light border border-0`, variant.type === "user" && `badge-profile-${variant.profile.toLowerCase()}`, variant.type === "link" && "badge-link border border-0", variant.type === "chip" && "bg-gray-200", variant.type === "beta" && badgeColorClassName, className);
13
+ const classes = clsx("badge rounded-pill", (variant.type === "content" || variant.type === "user") && "background" in variant ? "bg-gray-200" : (variant.type === "content" || variant.type === "user") && !("background" in variant) ? "border border-0" : "", variant.type === "content" && `text-${variant.level}`, variant.type === "notification" && `badge-notification bg-${variant.level} text-light border border-0`, variant.type === "user" && `badge-profile-${variant.profile.toLowerCase()}`, variant.type === "link" && "badge-link border border-0", variant.type === "chip" && "bg-gray-200", className);
26
14
  return /* @__PURE__ */ jsxs("span", { ref, className: classes, style: (() => {
27
15
  if (variant.type !== "beta") return;
28
16
  const color = variant.color ?? "#000000";
@@ -29,12 +29,10 @@ export * from './List';
29
29
  export * from './Loading';
30
30
  export * from './LoadingScreen';
31
31
  export * from './Logo';
32
- export * from './MediaViewer';
33
32
  export * from './Menu';
34
33
  export * from './Modal';
35
34
  export * from './Popover';
36
35
  export * from './PreventPropagation';
37
- export * from './PromotionCard';
38
36
  export * from './Radio';
39
37
  export * from './RadioCard';
40
38
  export * from './SearchBar';
@@ -3,7 +3,6 @@ export default function useEdificeIcons(): {
3
3
  getIconClass: (app: IWebApp | string) => string;
4
4
  getBackgroundIconClass: (app: IWebApp | string) => string;
5
5
  getBackgroundLightIconClass: (app: IWebApp | string) => string;
6
- getBorderIconClass: (app: IWebApp | string) => string;
7
6
  getIconCode: (app: IWebApp | string | undefined) => string;
8
7
  getWidgetIconClass: (widget: IWidget) => string;
9
8
  isIconUrl: (icon: string) => string | boolean;
@@ -78,10 +78,6 @@ function useEdificeIcons() {
78
78
  const appCode = getIconCode(app);
79
79
  return appCode ? `bg-light-${appCode}` : "bg-light-placeholder";
80
80
  }
81
- function getBorderIconClass(app) {
82
- const appCode = getIconCode(app);
83
- return appCode ? `border-app-${appCode}` : "border-app-placeholder";
84
- }
85
81
  function getWidgetIconClass(widget) {
86
82
  return iconOfWidget[widget.platformConf.name];
87
83
  }
@@ -89,7 +85,6 @@ function useEdificeIcons() {
89
85
  getIconClass,
90
86
  getBackgroundIconClass,
91
87
  getBackgroundLightIconClass,
92
- getBorderIconClass,
93
88
  getIconCode,
94
89
  getWidgetIconClass,
95
90
  isIconUrl