@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.
- package/dist/components/Badge/Badge.d.ts +7 -1
- package/dist/components/Badge/Badge.js +13 -1
- package/dist/components/MediaViewer/MediaViewer.d.ts +17 -0
- package/dist/components/MediaViewer/MediaViewer.js +36 -0
- package/dist/components/MediaViewer/MediaWrapper.d.ts +7 -0
- package/dist/components/MediaViewer/MediaWrapper.js +72 -0
- package/dist/components/MediaViewer/PdfViewer.d.ts +4 -0
- package/dist/components/MediaViewer/PdfViewer.js +26 -0
- package/dist/components/MediaViewer/ToolbarViewer.d.ts +7 -0
- package/dist/components/MediaViewer/ToolbarViewer.js +41 -0
- package/dist/components/MediaViewer/ToolbarZoom.d.ts +4 -0
- package/dist/components/MediaViewer/ToolbarZoom.js +19 -0
- package/dist/components/MediaViewer/index.d.ts +2 -0
- package/dist/components/PromotionCard/PromotionCard.d.ts +74 -0
- package/dist/components/PromotionCard/PromotionCard.js +31 -0
- package/dist/components/PromotionCard/PromotionCardBody.d.ts +10 -0
- package/dist/components/PromotionCard/PromotionCardBody.js +15 -0
- package/dist/components/PromotionCard/PromotionCardDescription.d.ts +9 -0
- package/dist/components/PromotionCard/PromotionCardDescription.js +12 -0
- package/dist/components/PromotionCard/PromotionCardFooter.d.ts +9 -0
- package/dist/components/PromotionCard/PromotionCardFooter.js +12 -0
- package/dist/components/PromotionCard/PromotionCardHeader.d.ts +11 -0
- package/dist/components/PromotionCard/PromotionCardHeader.js +17 -0
- package/dist/components/PromotionCard/PromotionCardIcon.d.ts +10 -0
- package/dist/components/PromotionCard/PromotionCardIcon.js +15 -0
- package/dist/components/PromotionCard/PromotionCardTitle.d.ts +9 -0
- package/dist/components/PromotionCard/PromotionCardTitle.js +12 -0
- package/dist/components/PromotionCard/index.d.ts +2 -0
- package/dist/components/SmartEllipsis/SmartEllipsis.d.ts +5 -0
- package/dist/components/SmartEllipsis/SmartEllipsis.js +21 -0
- package/dist/components/SmartEllipsis/index.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks/useEdificeIcons/useEdificeIcons.d.ts +1 -0
- package/dist/hooks/useEdificeIcons/useEdificeIcons.js +5 -0
- package/dist/hooks/useZoom/index.d.ts +1 -0
- package/dist/hooks/useZoom/useZoom.d.ts +7 -0
- package/dist/hooks/useZoom/useZoom.js +14 -0
- package/dist/icons.js +360 -354
- package/dist/index.js +145 -140
- package/dist/modules/icons/components/IconAiFill.d.ts +7 -0
- package/dist/modules/icons/components/IconAiFill.js +12 -0
- package/dist/modules/icons/components/IconExercizerAi.d.ts +7 -0
- package/dist/modules/icons/components/IconExercizerAi.js +14 -0
- package/dist/modules/icons/components/IconTeacher.d.ts +7 -0
- package/dist/modules/icons/components/IconTeacher.js +12 -0
- package/dist/modules/icons/components/index.d.ts +3 -0
- package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
- 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
|
+
};
|