@edifice.io/react 2.5.9-develop.20260130161524 → 2.5.9-develop.20260202140207

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 (48) hide show
  1. package/dist/components/Badge/Badge.d.ts +7 -1
  2. package/dist/components/Badge/Badge.js +13 -1
  3. package/dist/components/MediaViewer/MediaViewer.d.ts +17 -0
  4. package/dist/components/MediaViewer/MediaViewer.js +36 -0
  5. package/dist/components/MediaViewer/MediaWrapper.d.ts +7 -0
  6. package/dist/components/MediaViewer/MediaWrapper.js +72 -0
  7. package/dist/components/MediaViewer/PdfViewer.d.ts +4 -0
  8. package/dist/components/MediaViewer/PdfViewer.js +26 -0
  9. package/dist/components/MediaViewer/ToolbarViewer.d.ts +7 -0
  10. package/dist/components/MediaViewer/ToolbarViewer.js +41 -0
  11. package/dist/components/MediaViewer/ToolbarZoom.d.ts +4 -0
  12. package/dist/components/MediaViewer/ToolbarZoom.js +19 -0
  13. package/dist/components/MediaViewer/index.d.ts +2 -0
  14. package/dist/components/PromotionCard/PromotionCard.d.ts +74 -0
  15. package/dist/components/PromotionCard/PromotionCard.js +31 -0
  16. package/dist/components/PromotionCard/PromotionCardBody.d.ts +10 -0
  17. package/dist/components/PromotionCard/PromotionCardBody.js +15 -0
  18. package/dist/components/PromotionCard/PromotionCardDescription.d.ts +9 -0
  19. package/dist/components/PromotionCard/PromotionCardDescription.js +12 -0
  20. package/dist/components/PromotionCard/PromotionCardFooter.d.ts +9 -0
  21. package/dist/components/PromotionCard/PromotionCardFooter.js +12 -0
  22. package/dist/components/PromotionCard/PromotionCardHeader.d.ts +11 -0
  23. package/dist/components/PromotionCard/PromotionCardHeader.js +17 -0
  24. package/dist/components/PromotionCard/PromotionCardIcon.d.ts +10 -0
  25. package/dist/components/PromotionCard/PromotionCardIcon.js +15 -0
  26. package/dist/components/PromotionCard/PromotionCardTitle.d.ts +9 -0
  27. package/dist/components/PromotionCard/PromotionCardTitle.js +12 -0
  28. package/dist/components/PromotionCard/index.d.ts +2 -0
  29. package/dist/components/SmartEllipsis/SmartEllipsis.d.ts +5 -0
  30. package/dist/components/SmartEllipsis/SmartEllipsis.js +21 -0
  31. package/dist/components/SmartEllipsis/index.d.ts +2 -0
  32. package/dist/components/index.d.ts +2 -0
  33. package/dist/hooks/useEdificeIcons/useEdificeIcons.d.ts +1 -0
  34. package/dist/hooks/useEdificeIcons/useEdificeIcons.js +5 -0
  35. package/dist/hooks/useZoom/index.d.ts +1 -0
  36. package/dist/hooks/useZoom/useZoom.d.ts +7 -0
  37. package/dist/hooks/useZoom/useZoom.js +14 -0
  38. package/dist/icons.js +360 -354
  39. package/dist/index.js +145 -140
  40. package/dist/modules/icons/components/IconAiFill.d.ts +7 -0
  41. package/dist/modules/icons/components/IconAiFill.js +12 -0
  42. package/dist/modules/icons/components/IconExercizerAi.d.ts +7 -0
  43. package/dist/modules/icons/components/IconExercizerAi.js +14 -0
  44. package/dist/modules/icons/components/IconTeacher.d.ts +7 -0
  45. package/dist/modules/icons/components/IconTeacher.js +12 -0
  46. package/dist/modules/icons/components/index.d.ts +3 -0
  47. package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
  48. package/package.json +7 -6
@@ -78,6 +78,10 @@ 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
+ }
81
85
  function getWidgetIconClass(widget) {
82
86
  return iconOfWidget[widget.platformConf.name];
83
87
  }
@@ -85,6 +89,7 @@ function useEdificeIcons() {
85
89
  getIconClass,
86
90
  getBackgroundIconClass,
87
91
  getBackgroundLightIconClass,
92
+ getBorderIconClass,
88
93
  getIconCode,
89
94
  getWidgetIconClass,
90
95
  isIconUrl
@@ -0,0 +1 @@
1
+ export { default as useZoom } from './useZoom';
@@ -0,0 +1,7 @@
1
+ export default function useZoom(initialScale?: number, maxScale?: number, minScale?: number, step?: number): {
2
+ scale: number;
3
+ zoomIn: () => void;
4
+ zoomOut: () => void;
5
+ resetZoom: () => void;
6
+ setScale: import('react').Dispatch<import('react').SetStateAction<number>>;
7
+ };
@@ -0,0 +1,14 @@
1
+ import { useState } from "react";
2
+ function useZoom(initialScale = 1, maxScale = 2, minScale = 0.5, step = 0.5) {
3
+ const [scale, setScale] = useState(initialScale);
4
+ return {
5
+ scale,
6
+ zoomIn: () => setScale((prev) => Math.min(prev + step, maxScale)),
7
+ zoomOut: () => setScale((prev) => Math.max(prev - step, minScale)),
8
+ resetZoom: () => setScale(initialScale),
9
+ setScale
10
+ };
11
+ }
12
+ export {
13
+ useZoom as default
14
+ };