@edifice.io/react 2.5.5-develop-b2school.20260116160825 → 2.5.5-develop-pedago.20260121100338

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 (39) hide show
  1. package/dist/components/Badge/Badge.d.ts +7 -4
  2. package/dist/components/Badge/Badge.js +14 -11
  3. package/dist/components/DatePicker/DatePicker.js +3 -6
  4. package/dist/components/MediaViewer/MediaViewer.d.ts +17 -0
  5. package/dist/components/MediaViewer/MediaViewer.js +36 -0
  6. package/dist/components/MediaViewer/MediaWrapper.d.ts +7 -0
  7. package/dist/components/MediaViewer/MediaWrapper.js +72 -0
  8. package/dist/components/MediaViewer/PdfViewer.d.ts +4 -0
  9. package/dist/components/MediaViewer/PdfViewer.js +26 -0
  10. package/dist/components/MediaViewer/ToolbarViewer.d.ts +7 -0
  11. package/dist/components/MediaViewer/ToolbarViewer.js +41 -0
  12. package/dist/components/MediaViewer/ToolbarZoom.d.ts +4 -0
  13. package/dist/components/MediaViewer/ToolbarZoom.js +19 -0
  14. package/dist/components/MediaViewer/index.d.ts +2 -0
  15. package/dist/components/Modal/Modal.d.ts +0 -4
  16. package/dist/components/Modal/Modal.js +12 -13
  17. package/dist/components/SmartEllipsis/SmartEllipsis.d.ts +5 -0
  18. package/dist/components/SmartEllipsis/SmartEllipsis.js +21 -0
  19. package/dist/components/SmartEllipsis/index.d.ts +2 -0
  20. package/dist/components/index.d.ts +1 -0
  21. package/dist/hooks/useEdificeIcons/useEdificeIcons.d.ts +1 -0
  22. package/dist/hooks/useEdificeIcons/useEdificeIcons.js +5 -0
  23. package/dist/hooks/useZoom/index.d.ts +1 -0
  24. package/dist/hooks/useZoom/useZoom.d.ts +7 -0
  25. package/dist/hooks/useZoom/useZoom.js +14 -0
  26. package/dist/index.js +156 -154
  27. package/dist/modules/comments/components/Comment.js +4 -4
  28. package/dist/modules/comments/components/CommentDate.js +10 -7
  29. package/dist/modules/comments/components/CommentDeleted.js +1 -1
  30. package/dist/modules/comments/components/CommentForm.d.ts +1 -1
  31. package/dist/modules/comments/components/CommentForm.js +6 -6
  32. package/dist/modules/comments/components/CommentHeader.d.ts +3 -0
  33. package/dist/modules/comments/components/CommentHeader.js +8 -0
  34. package/dist/modules/comments/components/CommentTitle.js +1 -1
  35. package/dist/modules/comments/provider/CommentProvider.js +3 -3
  36. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +5 -5
  37. package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
  38. package/package.json +7 -6
  39. package/dist/components/DatePicker/DatePicker.d.ts +0 -57
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { UserProfile } from '@edifice.io/client';
2
+ import { IWebApp, UserProfile } from '@edifice.io/client';
3
3
  export type BadgeRef = HTMLSpanElement;
4
4
  /** Badge variant : notification */
5
5
  export type NotificationBadgeVariant = {
@@ -29,12 +29,15 @@ export type LinkBadgeVariant = {
29
29
  /**
30
30
  * Badge variant : beta.
31
31
  * Beta Badge is used to indicate that a feature is in beta phase.
32
- * The color prop allows to customize the badge color to match the app color.
33
- * Defaults to black if not provided.
32
+ * Beta Badge has a fixed text 'BÊTA' unless children is provided.
33
+ * If app is provided, the color of the Beta Badge is derived from the application colors.
34
+ * Example:
35
+ * <Badge variant={{ type: 'beta', app: myApp }} />
36
+ * where myApp is of type IWebApp.
34
37
  */
35
38
  export type BetaBadgeVariant = {
36
39
  type: 'beta';
37
- color?: string;
40
+ app?: IWebApp;
38
41
  };
39
42
  export type BadgeVariants = NotificationBadgeVariant | ContentBadgeVariant | ProfileBadgeVariant | ChipBadgeVariant | LinkBadgeVariant | BetaBadgeVariant;
40
43
  export interface BadgeProps extends React.ComponentPropsWithRef<'span'> {
@@ -1,6 +1,7 @@
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";
4
5
  const Badge = /* @__PURE__ */ forwardRef(({
5
6
  className,
6
7
  variant = {
@@ -10,17 +11,19 @@ const Badge = /* @__PURE__ */ forwardRef(({
10
11
  children,
11
12
  ...restProps
12
13
  }, ref) => {
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);
14
- return /* @__PURE__ */ jsxs("span", { ref, className: classes, style: (() => {
15
- if (variant.type !== "beta") return;
16
- const color = variant.color ?? "#000000";
17
- return {
18
- borderColor: color,
19
- color,
20
- backgroundColor: `${color}10`
21
- // the 2 last hexadecimal numbers are for opacity
22
- };
23
- })(), ...restProps, children: [
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);
26
+ return /* @__PURE__ */ jsxs("span", { ref, className: classes, ...restProps, children: [
24
27
  variant.type === "chip" && /* @__PURE__ */ jsx("div", { className: "d-flex fw-800 align-items-center", children }),
25
28
  variant.type === "beta" && (children ?? "BÊTA"),
26
29
  variant.type !== "chip" && variant.type !== "beta" && children
@@ -16,8 +16,7 @@ const DatePicker = /* @__PURE__ */ forwardRef(({
16
16
  onChange,
17
17
  dateFormat = "DD / MM / YYYY",
18
18
  minDate,
19
- maxDate,
20
- ...htmlProps
19
+ maxDate
21
20
  }, ref) => {
22
21
  const handleChange = (date) => {
23
22
  onChange == null || onChange(date ? date.toDate() : void 0);
@@ -27,11 +26,9 @@ const DatePicker = /* @__PURE__ */ forwardRef(({
27
26
  format: dateFormat,
28
27
  minDate: minDate ? dayjs(minDate) : void 0,
29
28
  maxDate: maxDate ? dayjs(maxDate) : void 0,
30
- ref,
31
- // Cast necessary because AntDatePicker expects a specific type, but our API exposes only HTMLElement to avoid dependency on Ant Design-specific features.
32
- ...htmlProps
29
+ ref
33
30
  };
34
- return /* @__PURE__ */ jsx(DatePicker$1, { ...antProps, getPopupContainer: (triggerNode) => triggerNode.parentElement || document.body });
31
+ return /* @__PURE__ */ jsx(DatePicker$1, { ...antProps });
35
32
  });
36
33
  export {
37
34
  DatePicker as default
@@ -0,0 +1,17 @@
1
+ import { MediaLibraryType } from 'src/modules/multimedia';
2
+ export interface MediaProps {
3
+ name: string;
4
+ url: string;
5
+ type: MediaLibraryType;
6
+ mimeType?: string;
7
+ }
8
+ interface MediaViewerProps {
9
+ onClose: () => void;
10
+ media: MediaProps[];
11
+ indexMedia?: number;
12
+ }
13
+ declare const MediaViewer: {
14
+ ({ onClose, media, indexMedia }: MediaViewerProps): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export default MediaViewer;
@@ -0,0 +1,36 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Carousel } from "antd";
3
+ import ToolbarZoom from "./ToolbarZoom.js";
4
+ import useZoom from "../../hooks/useZoom/useZoom.js";
5
+ import ToolbarViewer from "./ToolbarViewer.js";
6
+ import { useState, useEffect } from "react";
7
+ import { MediaWrapper } from "./MediaWrapper.js";
8
+ import Flex from "../Flex/Flex.js";
9
+ const MediaViewer = ({
10
+ onClose,
11
+ media,
12
+ indexMedia = 0
13
+ }) => {
14
+ const {
15
+ zoomIn,
16
+ zoomOut,
17
+ setScale,
18
+ scale
19
+ } = useZoom(1), [currentIndex, setCurrentIndex] = useState(indexMedia);
20
+ return useEffect(() => {
21
+ setCurrentIndex(indexMedia);
22
+ }, [indexMedia]), /* @__PURE__ */ jsxs("div", { className: "media-viewer", children: [
23
+ /* @__PURE__ */ jsx(ToolbarViewer, { onClose, mediaUrl: media[currentIndex].url, mediaName: media[currentIndex].name, nbMedia: media.length, currentIndex }),
24
+ /* @__PURE__ */ jsx(Flex, { className: "media-viewer-inner-overlay", onClick: onClose, children: /* @__PURE__ */ jsxs("div", { className: "media-viewer-inner", onClick: (e) => e.stopPropagation(), children: [
25
+ /* @__PURE__ */ jsx(Carousel, { initialSlide: indexMedia, dots: !1, arrows: !0, draggable: !0, infinite: !1, afterChange: (current) => {
26
+ setCurrentIndex(current);
27
+ }, beforeChange: () => {
28
+ setScale(1);
29
+ }, children: media.map((item, index) => /* @__PURE__ */ jsx("div", { className: "viewer-slide", children: /* @__PURE__ */ jsx(MediaWrapper, { mediaUrl: item.url, mediaType: item.type, mimeType: item.mimeType, scale: index === currentIndex ? scale : 1 }) }, index)) }),
30
+ /* @__PURE__ */ jsx(ToolbarZoom, { zoomIn, zoomOut })
31
+ ] }) })
32
+ ] });
33
+ };
34
+ export {
35
+ MediaViewer as default
36
+ };
@@ -0,0 +1,7 @@
1
+ import { MediaLibraryType } from 'src/modules/multimedia';
2
+ export declare const MediaWrapper: ({ mediaUrl, mediaType, mimeType, scale, }: {
3
+ mediaUrl: string;
4
+ mediaType: MediaLibraryType;
5
+ mimeType?: string;
6
+ scale?: number;
7
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,72 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import SvgIconTextPage from "../../modules/icons/components/IconTextPage.js";
3
+ import SvgIconLink from "../../modules/icons/components/IconLink.js";
4
+ import SvgIconHeadphone from "../../modules/icons/components/IconHeadphone.js";
5
+ import SvgIconDownload from "../../modules/icons/components/IconDownload.js";
6
+ import SvgIconExternalLink from "../../modules/icons/components/IconExternalLink.js";
7
+ import { useTranslation } from "react-i18next";
8
+ import PdfViewer from "./PdfViewer.js";
9
+ import Flex from "../Flex/Flex.js";
10
+ import Button from "../Button/Button.js";
11
+ import Image from "../Image/Image.js";
12
+ const MediaWrapper = ({
13
+ mediaUrl,
14
+ mediaType,
15
+ mimeType,
16
+ scale
17
+ }) => {
18
+ const {
19
+ t
20
+ } = useTranslation(), imageMediaStyle = {
21
+ flex: "none",
22
+ height: "100%",
23
+ transform: `scale(${scale})`,
24
+ maxHeight: "70vh"
25
+ }, audioStyle = {
26
+ width: "100%",
27
+ maxWidth: "500px"
28
+ }, videoMediaStyle = {
29
+ height: "100%",
30
+ objectFit: "cover",
31
+ transform: `scale(${scale})`
32
+ }, iframeMediaStyle = {
33
+ width: "100%",
34
+ height: "600px",
35
+ maxWidth: "900px",
36
+ transform: `scale(${scale})`
37
+ };
38
+ switch (mediaType) {
39
+ case "image":
40
+ return /* @__PURE__ */ jsx(Image, { className: "rounded-2", src: mediaUrl, alt: mediaType, width: "100%", objectFit: "contain", style: imageMediaStyle });
41
+ case "audio":
42
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", align: "center", style: {
43
+ height: "200px"
44
+ }, children: [
45
+ /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", className: "bg-gray-300 h-100 w-100 rounded-2 mb-8", style: {
46
+ maxWidth: "500px"
47
+ }, children: /* @__PURE__ */ jsx(SvgIconHeadphone, { width: 40, height: 40, color: "#B0B0B0" }) }),
48
+ /* @__PURE__ */ jsx("audio", { src: mediaUrl, className: "media-audio", controls: !0, style: audioStyle })
49
+ ] });
50
+ case "video":
51
+ return /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", children: /* @__PURE__ */ jsx("video", { src: mediaUrl, controls: !0, className: "media-video", style: videoMediaStyle }) });
52
+ case "embedder":
53
+ return /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", children: /* @__PURE__ */ jsx("iframe", { title: "Embedded media content", src: mediaUrl, className: "media-video", style: iframeMediaStyle }) });
54
+ case "hyperlink":
55
+ case "attachment":
56
+ return mimeType && mimeType === "application/pdf" ? /* @__PURE__ */ jsx(PdfViewer, { mediaUrl, scale }) : /* @__PURE__ */ jsxs(Flex, { direction: "column", align: "center", children: [
57
+ /* @__PURE__ */ jsx(Flex, { justify: "center", align: "center", className: "bg-gray-300 w-100 rounded-2 mb-8", style: {
58
+ maxWidth: "500px",
59
+ height: "200px"
60
+ }, children: mediaType === "hyperlink" ? /* @__PURE__ */ jsx(SvgIconLink, { width: 40, height: 40, color: "#B0B0B0" }) : /* @__PURE__ */ jsx(SvgIconTextPage, { width: 40, height: 40, color: "#B0B0B0" }) }),
61
+ /* @__PURE__ */ jsx("a", { className: "w-100 d-flex justify-content-center", href: mediaUrl, download: mediaType !== "hyperlink", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx(Button, { className: "w-100", style: {
62
+ height: "40px",
63
+ maxWidth: "500px"
64
+ }, leftIcon: mediaType === "hyperlink" ? /* @__PURE__ */ jsx(SvgIconExternalLink, {}) : /* @__PURE__ */ jsx(SvgIconDownload, {}), color: "tertiary", children: t(mediaType === "hyperlink" ? "mediaWrapper.attachment.open" : "mediaWrapper.attachment.download") }) })
65
+ ] });
66
+ default:
67
+ return null;
68
+ }
69
+ };
70
+ export {
71
+ MediaWrapper
72
+ };
@@ -0,0 +1,4 @@
1
+ export default function PdfViewer({ mediaUrl, scale, }: {
2
+ mediaUrl: string;
3
+ scale?: number;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useState, useRef } from "react";
3
+ import { Document, Page } from "react-pdf";
4
+ import LoadingScreen from "../LoadingScreen/LoadingScreen.js";
5
+ function PdfViewer({
6
+ mediaUrl,
7
+ scale
8
+ }) {
9
+ const [numPages, setNumPages] = useState(null), pagesRef = useRef([]), onDocumentLoadSuccess = ({
10
+ numPages: numPages2
11
+ }) => {
12
+ setNumPages(numPages2);
13
+ };
14
+ return /* @__PURE__ */ jsx("div", { style: {
15
+ width: `calc(600px * ${scale})`,
16
+ height: "calc(100vh - 52px)",
17
+ overflowY: "auto",
18
+ marginTop: "20px"
19
+ }, children: /* @__PURE__ */ jsx(Document, { file: mediaUrl, onLoadSuccess: onDocumentLoadSuccess, loading: /* @__PURE__ */ jsx(LoadingScreen, {}), children: Array.from(new Array(numPages), (_, index) => /* @__PURE__ */ jsx("div", { ref: (el) => pagesRef.current[index] = el, style: {
20
+ marginBottom: 32,
21
+ transformOrigin: "top center"
22
+ }, children: /* @__PURE__ */ jsx(Page, { className: "pdf-page", pageNumber: index + 1, renderTextLayer: !1, renderAnnotationLayer: !1, width: 600 * (scale ?? 1), loading: /* @__PURE__ */ jsx(LoadingScreen, {}) }) }, index)) }) });
23
+ }
24
+ export {
25
+ PdfViewer as default
26
+ };
@@ -0,0 +1,7 @@
1
+ export default function ToolbarViewer({ onClose, mediaName, mediaUrl, nbMedia, currentIndex, }: {
2
+ onClose: () => void;
3
+ mediaName: string;
4
+ nbMedia?: number;
5
+ mediaUrl?: string;
6
+ currentIndex: number;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
3
+ import SvgIconClose from "../../modules/icons/components/IconClose.js";
4
+ import SvgIconDownload from "../../modules/icons/components/IconDownload.js";
5
+ import SvgIconExternalLink from "../../modules/icons/components/IconExternalLink.js";
6
+ import Flex from "../Flex/Flex.js";
7
+ import IconButton from "../Button/IconButton.js";
8
+ import SmartEllipsis from "../SmartEllipsis/SmartEllipsis.js";
9
+ function ToolbarViewer({
10
+ onClose,
11
+ mediaName,
12
+ mediaUrl,
13
+ nbMedia,
14
+ currentIndex
15
+ }) {
16
+ return useEffect(() => {
17
+ const handleKeyDown = (e) => {
18
+ e.key === "Escape" && onClose();
19
+ };
20
+ return window.addEventListener("keydown", handleKeyDown), () => {
21
+ window.removeEventListener("keydown", handleKeyDown);
22
+ };
23
+ }, [onClose]), /* @__PURE__ */ jsxs(Flex, { className: "media-viewer-toolbar p-8", align: "center", children: [
24
+ /* @__PURE__ */ jsxs(Flex, { gap: "8", align: "center", style: {
25
+ minWidth: "50%"
26
+ }, children: [
27
+ /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(SvgIconClose, { color: "#fff" }), onClick: onClose, variant: "ghost" }),
28
+ /* @__PURE__ */ jsx(SmartEllipsis, { text: mediaName })
29
+ ] }),
30
+ /* @__PURE__ */ jsxs(Flex, { gap: "8", align: "center", justify: "between", className: "w-100", children: [
31
+ nbMedia ? /* @__PURE__ */ jsx("p", { children: `${currentIndex + 1}/${nbMedia} ` }) : /* @__PURE__ */ jsx("p", { children: `${currentIndex + 1}` }),
32
+ mediaUrl && /* @__PURE__ */ jsxs(Flex, { className: "ms-8", gap: "8", align: "center", children: [
33
+ /* @__PURE__ */ jsx("a", { href: mediaUrl, download: !0, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(SvgIconDownload, { color: "#fff" }), variant: "ghost" }) }),
34
+ /* @__PURE__ */ jsx("a", { href: mediaUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(SvgIconExternalLink, { color: "#fff" }), variant: "ghost" }) })
35
+ ] })
36
+ ] })
37
+ ] });
38
+ }
39
+ export {
40
+ ToolbarViewer as default
41
+ };
@@ -0,0 +1,4 @@
1
+ export default function ToolbarZoom({ zoomIn, zoomOut, }: {
2
+ zoomIn: () => void;
3
+ zoomOut: () => void;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import SvgIconMinus from "../../modules/icons/components/IconMinus.js";
3
+ import SvgIconPlus from "../../modules/icons/components/IconPlus.js";
4
+ import SvgIconZoomIn from "../../modules/icons/components/IconZoomIn.js";
5
+ import Flex from "../Flex/Flex.js";
6
+ import IconButton from "../Button/IconButton.js";
7
+ function ToolbarZoom({
8
+ zoomIn,
9
+ zoomOut
10
+ }) {
11
+ return /* @__PURE__ */ jsx(Flex, { justify: "center", className: "media-viewer-toolbar-zoom-container", children: /* @__PURE__ */ jsxs(Flex, { gap: "4", className: "p-12 media-viewer-toolbar-zoom", align: "center", children: [
12
+ /* @__PURE__ */ jsx(IconButton, { variant: "ghost", icon: /* @__PURE__ */ jsx(SvgIconMinus, { color: "#fff" }), onClick: zoomOut }),
13
+ /* @__PURE__ */ jsx(SvgIconZoomIn, { color: "#fff", className: "m-4" }),
14
+ /* @__PURE__ */ jsx(IconButton, { variant: "ghost", icon: /* @__PURE__ */ jsx(SvgIconPlus, { color: "#fff" }), onClick: zoomIn })
15
+ ] }) });
16
+ }
17
+ export {
18
+ ToolbarZoom as default
19
+ };
@@ -0,0 +1,2 @@
1
+ export * from './MediaViewer';
2
+ export { default as MediaViewer } from './MediaViewer';
@@ -5,10 +5,6 @@ export interface ModalProps {
5
5
  * Modal id (useful when multiple modal on the same page)
6
6
  */
7
7
  id: string;
8
- /**
9
- * Modal testid
10
- */
11
- ['data-testid']?: string;
12
8
  /**
13
9
  * Is Modal Open
14
10
  */
@@ -10,18 +10,17 @@ import ModalSubtitle from "./ModalSubtitle.js";
10
10
  import useClickOutside from "../../hooks/useClickOutside/useClickOutside.js";
11
11
  import useTrapFocus from "../../hooks/useTrapFocus/useTrapFocus.js";
12
12
  import useKeyPress from "../../hooks/useKeyPress/useKeyPress.js";
13
- const Root = /* @__PURE__ */ forwardRef(({
14
- id,
15
- isOpen,
16
- onModalClose,
17
- size = "md",
18
- viewport = !1,
19
- scrollable = !1,
20
- focusId,
21
- children,
22
- ...otherDivProps
23
- }, ref) => {
24
- const ariaLabelId = `aria_label_${id}`, ariaDescriptionId = `aria_desc_${id}`, modalRef = useClickOutside(onModalClose), trapRef = useTrapFocus(isOpen);
13
+ const Root = /* @__PURE__ */ forwardRef((props, ref) => {
14
+ const {
15
+ id,
16
+ isOpen,
17
+ onModalClose,
18
+ size = "md",
19
+ viewport = !1,
20
+ scrollable = !1,
21
+ focusId,
22
+ children
23
+ } = props, ariaLabelId = `aria_label_${id}`, ariaDescriptionId = `aria_desc_${id}`, modalRef = useClickOutside(onModalClose), trapRef = useTrapFocus(isOpen);
25
24
  useKeyPress(onModalClose, ["Escape"]), useEffect(() => {
26
25
  if (isOpen && (document.body.style.overflow = "hidden", focusId)) {
27
26
  const elem = document.getElementById(focusId);
@@ -55,7 +54,7 @@ const Root = /* @__PURE__ */ forwardRef(({
55
54
  }
56
55
  });
57
56
  return /* @__PURE__ */ jsx(ModalContext.Provider, { value: modalContextValue, children: transition((style, isOpen2) => /* @__PURE__ */ jsxs(Fragment, { children: [
58
- isOpen2 && /* @__PURE__ */ jsx(animated.div, { id, ref, role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelId, "aria-describedby": ariaDescriptionId, className: modalClasses, style, tabIndex: -1, ...otherDivProps, children: /* @__PURE__ */ jsx("div", { id: `${id}_ref`, ref: (node) => {
57
+ isOpen2 && /* @__PURE__ */ jsx(animated.div, { id, ref, role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelId, "aria-describedby": ariaDescriptionId, className: modalClasses, style, tabIndex: -1, children: /* @__PURE__ */ jsx("div", { id: `${id}_ref`, ref: (node) => {
59
58
  modalRef.current = node, isOpen2 && (trapRef.current = node);
60
59
  }, className: dialogClasses, children: /* @__PURE__ */ jsx("div", { className: "modal-content", children }) }) }),
61
60
  isOpen2 && /* @__PURE__ */ jsx(animated.div, { className: "modal-backdrop fade show", style: {
@@ -0,0 +1,5 @@
1
+ interface SmartEllipsisProps {
2
+ text: string;
3
+ }
4
+ export default function SmartEllipsis({ text }: SmartEllipsisProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useRef, useState, useEffect } from "react";
3
+ function SmartEllipsis({
4
+ text
5
+ }) {
6
+ const ref = useRef(null), [displayText, setDisplayText] = useState(text), updateText = () => {
7
+ const el = ref.current;
8
+ if (el)
9
+ if (el.textContent = text, el.scrollWidth > el.clientWidth) {
10
+ let startText = text.slice(0, Math.ceil(text.length / 2)), endText = text.slice(Math.ceil(text.length / 2));
11
+ for (; startText.length > 1 && endText.length > 1 && el.scrollWidth > el.clientWidth; )
12
+ startText = startText.slice(0, -1), endText = endText.slice(1), el.textContent = `${startText}…${endText}`;
13
+ setDisplayText(el.textContent);
14
+ } else
15
+ setDisplayText(text);
16
+ };
17
+ return useEffect(() => (updateText(), window.addEventListener("resize", updateText), () => window.removeEventListener("resize", updateText)), [text]), /* @__PURE__ */ jsx("span", { ref, className: "smart-ellipsis", children: displayText });
18
+ }
19
+ export {
20
+ SmartEllipsis as default
21
+ };
@@ -0,0 +1,2 @@
1
+ export * from './SmartEllipsis';
2
+ export { default as SmartEllipsis } from './SmartEllipsis';
@@ -29,6 +29,7 @@ export * from './List';
29
29
  export * from './Loading';
30
30
  export * from './LoadingScreen';
31
31
  export * from './Logo';
32
+ export * from './MediaViewer';
32
33
  export * from './Menu';
33
34
  export * from './Modal';
34
35
  export * from './Popover';
@@ -3,6 +3,7 @@ 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;
6
7
  getIconCode: (app: IWebApp | string | undefined) => string;
7
8
  getWidgetIconClass: (widget: IWidget) => string;
8
9
  isIconUrl: (icon: string) => string | boolean;
@@ -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
+ };
package/dist/index.js CHANGED
@@ -30,85 +30,86 @@ import { default as default30 } from "./components/Label/Label.js";
30
30
  import { default as default31 } from "./components/Loading/Loading.js";
31
31
  import { default as default32 } from "./components/LoadingScreen/LoadingScreen.js";
32
32
  import { default as default33 } from "./components/Logo/Logo.js";
33
- import { default as default34 } from "./components/Modal/Modal.js";
34
- import { default as default35 } from "./components/PreventPropagation/PreventPropagation.js";
35
- import { default as default36 } from "./components/Radio/Radio.js";
36
- import { default as default37 } from "./components/RadioCard/RadioCard.js";
37
- import { default as default38 } from "./components/SearchBar/SearchBar.js";
38
- import { default as default39 } from "./components/SegmentedControl/SegmentedControl.js";
39
- import { default as default40 } from "./components/Select/Select.js";
40
- import { default as default41 } from "./components/Skeleton/ButtonSkeleton.js";
41
- import { default as default42 } from "./components/Skeleton/TextSkeleton.js";
42
- import { default as default43 } from "./components/StackedGroup/StackedGroup.js";
43
- import { default as default44 } from "./components/Stepper/Stepper.js";
44
- import { default as default45 } from "./components/Switch/Switch.js";
45
- import { default as default46 } from "./components/Table/components/Table.js";
46
- import { default as default47 } from "./components/TextArea/TextArea.js";
47
- import { default as default48 } from "./components/Tooltip/Tooltip.js";
33
+ import { default as default34 } from "./components/MediaViewer/MediaViewer.js";
34
+ import { default as default35 } from "./components/Modal/Modal.js";
35
+ import { default as default36 } from "./components/PreventPropagation/PreventPropagation.js";
36
+ import { default as default37 } from "./components/Radio/Radio.js";
37
+ import { default as default38 } from "./components/RadioCard/RadioCard.js";
38
+ import { default as default39 } from "./components/SearchBar/SearchBar.js";
39
+ import { default as default40 } from "./components/SegmentedControl/SegmentedControl.js";
40
+ import { default as default41 } from "./components/Select/Select.js";
41
+ import { default as default42 } from "./components/Skeleton/ButtonSkeleton.js";
42
+ import { default as default43 } from "./components/Skeleton/TextSkeleton.js";
43
+ import { default as default44 } from "./components/StackedGroup/StackedGroup.js";
44
+ import { default as default45 } from "./components/Stepper/Stepper.js";
45
+ import { default as default46 } from "./components/Switch/Switch.js";
46
+ import { default as default47 } from "./components/Table/components/Table.js";
47
+ import { default as default48 } from "./components/TextArea/TextArea.js";
48
+ import { default as default49 } from "./components/Tooltip/Tooltip.js";
48
49
  import { DndTree } from "./components/Tree/components/DndTree.js";
49
- import { default as default49 } from "./components/Tree/components/SortableTree.js";
50
- import { default as default50 } from "./components/Tree/components/Tree.js";
51
- import { default as default51 } from "./components/TreeView/TreeView.js";
52
- import { default as default52 } from "./components/VisuallyHidden/VisuallyHidden.js";
53
- import { default as default53 } from "./hooks/useBookmark/useBookmark.js";
54
- import { default as default54 } from "./hooks/useBreakpoint/useBreakpoint.js";
55
- import { default as default55 } from "./hooks/useBrowserInfo/useBrowserInfo.js";
56
- import { default as default56 } from "./hooks/useCantoo/useCantoo.js";
57
- import { default as default57 } from "./hooks/useClickOutside/useClickOutside.js";
58
- import { default as default58 } from "./hooks/useConversation/useConversation.js";
59
- import { default as default59 } from "./hooks/useDate/useDate.js";
60
- import { default as default60 } from "./hooks/useDebounce/useDebounce.js";
61
- import { default as default61 } from "./hooks/useDirectory/useDirectory.js";
62
- import { default as default62 } from "./hooks/useDropdown/useDropdown.js";
63
- import { default as default63 } from "./hooks/useDropzone/useDropzone.js";
64
- import { default as default64 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
65
- import { default as default65 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
66
- import { default as default66 } from "./hooks/useHover/useHover.js";
50
+ import { default as default50 } from "./components/Tree/components/SortableTree.js";
51
+ import { default as default51 } from "./components/Tree/components/Tree.js";
52
+ import { default as default52 } from "./components/TreeView/TreeView.js";
53
+ import { default as default53 } from "./components/VisuallyHidden/VisuallyHidden.js";
54
+ import { default as default54 } from "./hooks/useBookmark/useBookmark.js";
55
+ import { default as default55 } from "./hooks/useBreakpoint/useBreakpoint.js";
56
+ import { default as default56 } from "./hooks/useBrowserInfo/useBrowserInfo.js";
57
+ import { default as default57 } from "./hooks/useCantoo/useCantoo.js";
58
+ import { default as default58 } from "./hooks/useClickOutside/useClickOutside.js";
59
+ import { default as default59 } from "./hooks/useConversation/useConversation.js";
60
+ import { default as default60 } from "./hooks/useDate/useDate.js";
61
+ import { default as default61 } from "./hooks/useDebounce/useDebounce.js";
62
+ import { default as default62 } from "./hooks/useDirectory/useDirectory.js";
63
+ import { default as default63 } from "./hooks/useDropdown/useDropdown.js";
64
+ import { default as default64 } from "./hooks/useDropzone/useDropzone.js";
65
+ import { default as default65 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
66
+ import { default as default66 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
67
+ import { default as default67 } from "./hooks/useHover/useHover.js";
67
68
  import { useHttpErrorToast } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
68
- import { default as default67 } from "./hooks/useImage/useImage.js";
69
- import { default as default68 } from "./hooks/useInfiniteScroll/useInfiniteScroll.js";
70
- import { default as default69 } from "./hooks/useIsAdml/useIsAdml.js";
71
- import { default as default70 } from "./hooks/useIsAdmc/useIsAdmc.js";
72
- import { default as default71 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
73
- import { default as default72 } from "./hooks/useKeyPress/useKeyPress.js";
74
- import { default as default73 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
75
- import { default as default74 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
76
- import { default as default75 } from "./hooks/useScrollToTop/useScrollToTop.js";
77
- import { default as default76 } from "./hooks/useTitle/useTitle.js";
78
- import { default as default77 } from "./hooks/useToast/useToast.js";
79
- import { default as default78 } from "./hooks/useToggle/useToggle.js";
80
- import { default as default79 } from "./hooks/useTrapFocus/useTrapFocus.js";
81
- import { default as default80 } from "./hooks/useTrashedResource/useTrashedResource.js";
82
- import { default as default81 } from "./hooks/useUpload/useUpload.js";
83
- import { default as default82 } from "./hooks/useUploadFiles/useUploadFiles.js";
84
- import { default as default83 } from "./hooks/useUser/useUser.js";
85
- import { default as default84 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
86
- import { default as default85 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
87
- import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default86 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
88
- import { default as default87 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
89
- import { default as default88 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
90
- import { default as default89 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
91
- import { default as default90 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
92
- import { default as default91 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
93
- import { default as default92 } from "./modules/modals/PublishModal/PublishModal.js";
94
- import { default as default93 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
95
- import { default as default94 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
96
- import { default as default95 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
97
- import { default as default96 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
98
- import { default as default97 } from "./modules/modals/ShareModal/ShareModal.js";
99
- import { default as default98 } from "./modules/modals/ShareModal/ShareResources.js";
100
- import { default as default99 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
101
- import { default as default100 } from "./modules/multimedia/Embed/Embed.js";
102
- import { default as default101 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
103
- import { default as default102 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
104
- import { default as default103 } from "./modules/multimedia/FileCard/FileCard.js";
105
- import { default as default104 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
106
- import { default as default105 } from "./modules/multimedia/UploadFiles/UploadFiles.js";
107
- import { default as default106 } from "./modules/multimedia/UploadCard/UploadCard.js";
108
- import { default as default107 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
109
- import { default as default108 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
110
- import { default as default109 } from "./modules/multimedia/Workspace/Workspace.js";
111
- import { default as default110 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
69
+ import { default as default68 } from "./hooks/useImage/useImage.js";
70
+ import { default as default69 } from "./hooks/useInfiniteScroll/useInfiniteScroll.js";
71
+ import { default as default70 } from "./hooks/useIsAdml/useIsAdml.js";
72
+ import { default as default71 } from "./hooks/useIsAdmc/useIsAdmc.js";
73
+ import { default as default72 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
74
+ import { default as default73 } from "./hooks/useKeyPress/useKeyPress.js";
75
+ import { default as default74 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
76
+ import { default as default75 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
77
+ import { default as default76 } from "./hooks/useScrollToTop/useScrollToTop.js";
78
+ import { default as default77 } from "./hooks/useTitle/useTitle.js";
79
+ import { default as default78 } from "./hooks/useToast/useToast.js";
80
+ import { default as default79 } from "./hooks/useToggle/useToggle.js";
81
+ import { default as default80 } from "./hooks/useTrapFocus/useTrapFocus.js";
82
+ import { default as default81 } from "./hooks/useTrashedResource/useTrashedResource.js";
83
+ import { default as default82 } from "./hooks/useUpload/useUpload.js";
84
+ import { default as default83 } from "./hooks/useUploadFiles/useUploadFiles.js";
85
+ import { default as default84 } from "./hooks/useUser/useUser.js";
86
+ import { default as default85 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
87
+ import { default as default86 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
88
+ import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default87 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
89
+ import { default as default88 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
90
+ import { default as default89 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
91
+ import { default as default90 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
92
+ import { default as default91 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
93
+ import { default as default92 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
94
+ import { default as default93 } from "./modules/modals/PublishModal/PublishModal.js";
95
+ import { default as default94 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
96
+ import { default as default95 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
97
+ import { default as default96 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
98
+ import { default as default97 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
99
+ import { default as default98 } from "./modules/modals/ShareModal/ShareModal.js";
100
+ import { default as default99 } from "./modules/modals/ShareModal/ShareResources.js";
101
+ import { default as default100 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
102
+ import { default as default101 } from "./modules/multimedia/Embed/Embed.js";
103
+ import { default as default102 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
104
+ import { default as default103 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
105
+ import { default as default104 } from "./modules/multimedia/FileCard/FileCard.js";
106
+ import { default as default105 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
107
+ import { default as default106 } from "./modules/multimedia/UploadFiles/UploadFiles.js";
108
+ import { default as default107 } from "./modules/multimedia/UploadCard/UploadCard.js";
109
+ import { default as default108 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
110
+ import { default as default109 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
111
+ import { default as default110 } from "./modules/multimedia/Workspace/Workspace.js";
112
+ import { default as default111 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
112
113
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
113
114
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
114
115
  import { Column, Grid } from "./components/Grid/Grid.js";
@@ -148,21 +149,21 @@ export {
148
149
  default4 as AppHeader,
149
150
  default5 as AppIcon,
150
151
  default6 as Attachment,
151
- default99 as AudioRecorder,
152
+ default100 as AudioRecorder,
152
153
  default7 as Avatar,
153
154
  default8 as AvatarGroup,
154
155
  default9 as Badge,
155
- default93 as BlogPublic,
156
+ default94 as BlogPublic,
156
157
  default10 as Breadcrumb,
157
158
  default11 as Button,
158
- default41 as ButtonSkeleton,
159
+ default42 as ButtonSkeleton,
159
160
  default14 as Card,
160
161
  default15 as Checkbox,
161
162
  default16 as ColorPicker,
162
163
  default17 as ColorPickerItem,
163
164
  Column,
164
165
  default18 as Combobox,
165
- default90 as ConfirmModal,
166
+ default91 as ConfirmModal,
166
167
  default19 as DatePicker,
167
168
  DefaultPalette,
168
169
  default20 as Divider,
@@ -174,10 +175,10 @@ export {
174
175
  EdificeClientProvider,
175
176
  EdificeThemeContext,
176
177
  EdificeThemeProvider,
177
- default100 as Embed,
178
+ default101 as Embed,
178
179
  default23 as EmptyScreen,
179
180
  ExternalLinker,
180
- default103 as FileCard,
181
+ default104 as FileCard,
181
182
  default24 as Flex,
182
183
  default26 as FormControl,
183
184
  default25 as FormText,
@@ -185,8 +186,8 @@ export {
185
186
  default27 as Heading,
186
187
  default12 as IconButton,
187
188
  default28 as Image,
188
- default101 as ImageEditor,
189
- default102 as ImagePicker,
189
+ default102 as ImageEditor,
190
+ default103 as ImagePicker,
190
191
  default29 as Input,
191
192
  InternalLinker,
192
193
  default30 as Label,
@@ -195,51 +196,52 @@ export {
195
196
  default31 as Loading,
196
197
  default32 as LoadingScreen,
197
198
  default33 as Logo,
198
- default104 as MediaLibrary,
199
+ default105 as MediaLibrary,
200
+ default34 as MediaViewer,
199
201
  Menu,
200
202
  MockedProvider,
201
- default34 as Modal,
202
- default91 as OnboardingModal,
203
+ default35 as Modal,
204
+ default92 as OnboardingModal,
203
205
  Popover,
204
206
  PopoverBody,
205
207
  PopoverFooter,
206
208
  PopoverHeader,
207
- default35 as PreventPropagation,
208
- default92 as PublishModal,
209
- default36 as Radio,
210
- default37 as RadioCard,
209
+ default36 as PreventPropagation,
210
+ default93 as PublishModal,
211
+ default37 as Radio,
212
+ default38 as RadioCard,
211
213
  ResourceModal,
212
- default38 as SearchBar,
214
+ default39 as SearchBar,
213
215
  default13 as SearchButton,
214
- default39 as SegmentedControl,
215
- default40 as Select,
216
- default95 as ShareBlog,
217
- default97 as ShareModal,
218
- default98 as ShareResources,
219
- default49 as SortableTree,
220
- default43 as StackedGroup,
221
- default44 as Stepper,
222
- default45 as Switch,
223
- default46 as Table,
216
+ default40 as SegmentedControl,
217
+ default41 as Select,
218
+ default96 as ShareBlog,
219
+ default98 as ShareModal,
220
+ default99 as ShareResources,
221
+ default50 as SortableTree,
222
+ default44 as StackedGroup,
223
+ default45 as Stepper,
224
+ default46 as Switch,
225
+ default47 as Table,
224
226
  Tabs,
225
- default47 as TextArea,
226
- default42 as TextSkeleton,
227
+ default48 as TextArea,
228
+ default43 as TextSkeleton,
227
229
  Toolbar,
228
- default48 as Tooltip,
229
- default50 as Tree,
230
+ default49 as Tooltip,
231
+ default51 as Tree,
230
232
  TreeNode,
231
233
  TreeNodeFolderWrapper,
232
- default51 as TreeView,
234
+ default52 as TreeView,
233
235
  Upload,
234
- default106 as UploadCard,
235
- default105 as UploadFiles,
236
- default107 as VideoEmbed,
237
- default108 as VideoRecorder,
238
- default52 as VisuallyHidden,
236
+ default107 as UploadCard,
237
+ default106 as UploadFiles,
238
+ default108 as VideoEmbed,
239
+ default109 as VideoRecorder,
240
+ default53 as VisuallyHidden,
239
241
  WORKSPACE_SHARED_FOLDER_ID,
240
242
  WORKSPACE_USER_FOLDER_ID,
241
- default109 as Workspace,
242
- default110 as WorkspaceFolders,
243
+ default110 as Workspace,
244
+ default111 as WorkspaceFolders,
243
245
  addNode,
244
246
  arrayUnique,
245
247
  buildTree,
@@ -268,51 +270,51 @@ export {
268
270
  setRef,
269
271
  updateNode,
270
272
  updateParentIds,
271
- default53 as useBookmark,
272
- default54 as useBreakpoint,
273
- default55 as useBrowserInfo,
274
- default56 as useCantoo,
273
+ default54 as useBookmark,
274
+ default55 as useBreakpoint,
275
+ default56 as useBrowserInfo,
276
+ default57 as useCantoo,
275
277
  useCheckable,
276
- default57 as useClickOutside,
277
- default58 as useConversation,
278
- default59 as useDate,
279
- default60 as useDebounce,
280
- default61 as useDirectory,
281
- default62 as useDropdown,
282
- default63 as useDropzone,
278
+ default58 as useClickOutside,
279
+ default59 as useConversation,
280
+ default60 as useDate,
281
+ default61 as useDebounce,
282
+ default62 as useDirectory,
283
+ default63 as useDropdown,
284
+ default64 as useDropzone,
283
285
  useDropzoneContext,
284
286
  useEdificeClient,
285
- default64 as useEdificeIcons,
287
+ default65 as useEdificeIcons,
286
288
  useEdificeTheme,
287
- default65 as useHasWorkflow,
288
- default66 as useHover,
289
+ default66 as useHasWorkflow,
290
+ default67 as useHover,
289
291
  useHttpErrorToast,
290
- default67 as useImage,
291
- default68 as useInfiniteScroll,
292
- default70 as useIsAdmc,
293
- default69 as useIsAdml,
294
- default71 as useIsAdmlcOrAdmc,
295
- default72 as useKeyPress,
296
- default73 as useLibraryUrl,
297
- default74 as useMediaLibrary,
298
- default75 as useScrollToTop,
299
- default96 as useShareMutation,
300
- default76 as useTitle,
301
- default77 as useToast,
302
- default78 as useToggle,
303
- default79 as useTrapFocus,
304
- default80 as useTrashedResource,
292
+ default68 as useImage,
293
+ default69 as useInfiniteScroll,
294
+ default71 as useIsAdmc,
295
+ default70 as useIsAdml,
296
+ default72 as useIsAdmlcOrAdmc,
297
+ default73 as useKeyPress,
298
+ default74 as useLibraryUrl,
299
+ default75 as useMediaLibrary,
300
+ default76 as useScrollToTop,
301
+ default97 as useShareMutation,
302
+ default77 as useTitle,
303
+ default78 as useToast,
304
+ default79 as useToggle,
305
+ default80 as useTrapFocus,
306
+ default81 as useTrashedResource,
305
307
  useTreeSortable,
306
308
  useTreeView,
307
- default94 as useUpdateMutation,
308
- default81 as useUpload,
309
- default82 as useUploadFiles,
310
- default83 as useUser,
311
- default84 as useWorkspaceFile,
312
- default85 as useWorkspaceFolders,
313
- default86 as useWorkspaceFoldersTree,
314
- default87 as useWorkspaceSearch,
315
- default88 as useXitiTrackPageLoad,
316
- default89 as useZendeskGuide,
309
+ default95 as useUpdateMutation,
310
+ default82 as useUpload,
311
+ default83 as useUploadFiles,
312
+ default84 as useUser,
313
+ default85 as useWorkspaceFile,
314
+ default86 as useWorkspaceFolders,
315
+ default87 as useWorkspaceFoldersTree,
316
+ default88 as useWorkspaceSearch,
317
+ default89 as useXitiTrackPageLoad,
318
+ default90 as useZendeskGuide,
317
319
  wrapTreeNode
318
320
  };
@@ -50,7 +50,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
50
50
  /* @__PURE__ */ jsx(CommentReplies, { parentComment: comment })
51
51
  ] }),
52
52
  !comment.deleted && /* @__PURE__ */ jsxs(Fragment, { children: [
53
- /* @__PURE__ */ jsxs("div", { "data-testid": "div-comment-read", className: `${isEditing ? "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16" : "border rounded-3 p-12 pb-8 d-flex gap-12 mt-16"}`, children: [
53
+ /* @__PURE__ */ jsxs("div", { className: `${isEditing ? "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16" : "border rounded-3 p-12 pb-8 d-flex gap-12 mt-16"}`, children: [
54
54
  /* @__PURE__ */ jsx(CommentAvatar, { id: authorId }),
55
55
  /* @__PURE__ */ jsxs("div", { className: "flex flex-fill", children: [
56
56
  /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-12", children: [
@@ -67,7 +67,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
67
67
  /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: handleReset, children: t("comment.cancel") }),
68
68
  /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end align-items-center gap-4", children: [
69
69
  /* @__PURE__ */ jsx(TextCounter, { content: value, maxLength: options.maxCommentLength }),
70
- /* @__PURE__ */ jsx(Button, { "data-testid": "comment-save", type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSave, {}), disabled: !(content != null && content.length), onClick: () => handleUpdateComment(value), children: t("comment.save") })
70
+ /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSave, {}), disabled: !(content != null && content.length), onClick: () => handleUpdateComment(value), children: t("comment.save") })
71
71
  ] })
72
72
  ] })
73
73
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -76,10 +76,10 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
76
76
  }, children: content }),
77
77
  type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
78
78
  !replyTo && options.allowReplies && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
79
- userId === authorId && /* @__PURE__ */ jsx(Button, { "data-testid": "comment-edit", variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
79
+ userId === authorId && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
80
80
  handleModifyComment(comment.id), setValue(content);
81
81
  }, children: t("comment.edit") }),
82
- (userId === authorId || (userRights == null ? void 0 : userRights.manager)) && /* @__PURE__ */ jsx(Button, { "data-testid": "comment-delete", variant: "ghost", color: "tertiary", size: "sm", onClick: () => setIsDeleteModalOpen(!0), children: t("comment.remove") })
82
+ (userId === authorId || (userRights == null ? void 0 : userRights.manager)) && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => setIsDeleteModalOpen(!0), children: t("comment.remove") })
83
83
  ] })
84
84
  ] })
85
85
  ] })
@@ -9,14 +9,17 @@ const CommentDate = ({
9
9
  fromNow
10
10
  } = useDate(), {
11
11
  t
12
- } = useTranslation();
13
- return updatedAt || createdAt ? /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ } = useTranslation(), getPublishedDate = (date) => t("comment.publish.date", {
13
+ date: fromNow(date)
14
+ }), getUpdatedDate = (date) => t("comment.update.date", {
15
+ date: fromNow(date)
16
+ });
17
+ return updatedAt ? /* @__PURE__ */ jsxs(Fragment, { children: [
14
18
  /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: "|" }),
15
- /* @__PURE__ */ jsx("span", { "data-testid": "comment-info-date", className: "small text-gray-700", children: updatedAt ? ((date) => t("comment.update.date", {
16
- date: fromNow(date)
17
- }))(updatedAt) : ((date) => t("comment.publish.date", {
18
- date: fromNow(date)
19
- }))(createdAt) })
19
+ /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: getUpdatedDate(updatedAt) })
20
+ ] }) : createdAt ? /* @__PURE__ */ jsxs(Fragment, { children: [
21
+ /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: "|" }),
22
+ /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: getPublishedDate(createdAt) })
20
23
  ] }) : null;
21
24
  };
22
25
  export {
@@ -4,7 +4,7 @@ const CommentDeleted = () => {
4
4
  const {
5
5
  t
6
6
  } = useTranslation();
7
- return /* @__PURE__ */ jsx("div", { "data-testid": "div-comment-deleted", className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16", children: t("comment.deleted") });
7
+ return /* @__PURE__ */ jsx("div", { className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16", children: t("comment.deleted") });
8
8
  };
9
9
  export {
10
10
  CommentDeleted
@@ -1,4 +1,4 @@
1
1
  export declare const CommentForm: ({ userId, replyTo, }: {
2
2
  userId: string;
3
3
  replyTo?: string;
4
- }) => false | import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,11 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
1
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
3
2
  import { useTranslation } from "react-i18next";
4
3
  import SvgIconSend from "../../icons/components/IconSend.js";
5
4
  import { useAutosizeTextarea } from "../hooks/useAutosizeTextarea.js";
6
5
  import { useCommentsContext } from "../hooks/useCommentsContext.js";
7
6
  import { CommentAvatar } from "./CommentAvatar.js";
8
7
  import { TextCounter } from "./TextCounter.js";
8
+ import { useState } from "react";
9
9
  import Button from "../../../components/Button/Button.js";
10
10
  const CommentForm = ({
11
11
  userId,
@@ -22,19 +22,19 @@ const CommentForm = ({
22
22
  }, handleSubmit = () => {
23
23
  handleCreateComment(content, replyTo), setContent("");
24
24
  };
25
- return type === "edit" && /* @__PURE__ */ jsxs("div", { "data-testid": "div-comment-create", className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200", children: [
25
+ return /* @__PURE__ */ jsx(Fragment, { children: type === "edit" && /* @__PURE__ */ jsxs("div", { className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200", children: [
26
26
  /* @__PURE__ */ jsx(CommentAvatar, { id: userId }),
27
27
  /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column flex-fill gap-4", children: [
28
- /* @__PURE__ */ jsx("textarea", { id: "add-comment", "data-testid": "comment-form", ref, value: content, className: "form-control", placeholder: t("comment.placeholder.textarea"), maxLength: options.maxCommentLength, onChange: handleChangeContent, onFocus, rows: 1, style: {
28
+ /* @__PURE__ */ jsx("textarea", { id: "add-comment", ref, value: content, className: "form-control", placeholder: t("comment.placeholder.textarea"), maxLength: options.maxCommentLength, onChange: handleChangeContent, onFocus, rows: 1, style: {
29
29
  resize: "none",
30
30
  overflow: "hidden"
31
31
  } }),
32
32
  /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end align-items-center gap-4", children: [
33
33
  /* @__PURE__ */ jsx(TextCounter, { content, maxLength: options.maxCommentLength }),
34
- /* @__PURE__ */ jsx(Button, { "data-testid": "comment-publish", type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSend, {}), disabled: !(content != null && content.length), onClick: handleSubmit, children: t("comment.post") })
34
+ /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSend, {}), disabled: !(content != null && content.length), onClick: handleSubmit, children: t("comment.post") })
35
35
  ] })
36
36
  ] })
37
- ] });
37
+ ] }) });
38
38
  };
39
39
  export {
40
40
  CommentForm
@@ -0,0 +1,3 @@
1
+ export declare const CommentHeader: ({ title }: {
2
+ title: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Heading from "../../../components/Heading/Heading.js";
3
+ const CommentHeader = ({
4
+ title
5
+ }) => /* @__PURE__ */ jsx(Heading, { level: "h3", headingStyle: "h3", children: title });
6
+ export {
7
+ CommentHeader
8
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  const CommentTitle = ({
3
3
  children
4
- }) => /* @__PURE__ */ jsx("span", { "data-testid": "comment-info-author", className: "small text-gray-800", children });
4
+ }) => /* @__PURE__ */ jsx("span", { className: "small text-gray-800", children });
5
5
  export {
6
6
  CommentTitle
7
7
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { CommentForm } from "../components/CommentForm.js";
4
+ import { CommentHeader } from "../components/CommentHeader.js";
4
5
  import { CommentList } from "../components/CommentList.js";
5
6
  import { DEFAULT_ALLOW_REPLIES, DEFAULT_ADD_REPLIES, DEFAULT_MAX_REPLIES, DEFAULT_ADD_COMMENTS, DEFAULT_MAX_COMMENTS, DEFAULT_MAX_REPLY_LENGTH, DEFAULT_MAX_COMMENT_LENGTH } from "../constants.js";
6
7
  import { CommentContext } from "../context/Context.js";
7
8
  import { useComments } from "../hooks/useComments.js";
8
- import Heading from "../../../components/Heading/Heading.js";
9
9
  import Button from "../../../components/Button/Button.js";
10
10
  import EmptyScreen from "../../../components/EmptyScreen/EmptyScreen.js";
11
11
  const CommentProvider = ({
@@ -71,10 +71,10 @@ const CommentProvider = ({
71
71
  [displayedComments, editCommentId, profilesQueries, options]
72
72
  );
73
73
  return /* @__PURE__ */ jsx(CommentContext.Provider, { value: values, children: /* @__PURE__ */ jsxs("div", { className: "my-24", children: [
74
- /* @__PURE__ */ jsx(Heading, { "data-testid": "comments-info-count-text", level: "h3", headingStyle: "h3", children: title }),
74
+ /* @__PURE__ */ jsx(CommentHeader, { title }),
75
75
  /* @__PURE__ */ jsxs("div", { className: "my-24", children: [
76
76
  user && /* @__PURE__ */ jsx(CommentForm, { userId: user.userId }),
77
- !profilesQueries.isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ profilesQueries.isLoading ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
78
78
  /* @__PURE__ */ jsx(CommentList, {}),
79
79
  showMoreComments && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", onClick: handleMoreComments, className: "my-16", children: t("comment.more") })
80
80
  ] })
@@ -44,7 +44,7 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
44
44
  }, handleCloseWithoutPreference = () => {
45
45
  setIsOpen(!1), setSwiperprogress(0);
46
46
  };
47
- return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", "data-testid": "modal-onboarding", size: "md", isOpen, focusId: "nextButtonId", onModalClose: handleCloseWithoutPreference, children: [
47
+ return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", size: "md", isOpen, focusId: "nextButtonId", onModalClose: handleCloseWithoutPreference, children: [
48
48
  /* @__PURE__ */ jsx(Modal.Header, { onModalClose: handleCloseWithoutPreference, centered: !0, children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
49
49
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Swiper, { modules: [Pagination], onSwiper: (swiper) => {
50
50
  setSwiperInstance(swiper);
@@ -59,10 +59,10 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
59
59
  } })
60
60
  ] }, index)) }) }),
61
61
  /* @__PURE__ */ jsxs(Modal.Footer, { children: [
62
- /* @__PURE__ */ jsx(Button, { "data-testid": "modal-onboarding-later", type: "button", color: "tertiary", variant: "ghost", onClick: handleCloseWithoutPreference, children: t("explorer.modal.onboarding.trash.later") }),
63
- swiperProgress > 0 && /* @__PURE__ */ jsx(Button, { "data-testid": "modal-onboarding-previous", type: "button", color: "primary", variant: "outline", onClick: () => swiperInstance.slidePrev(), children: t(prevText || "explorer.modal.onboarding.trash.prev") }),
64
- swiperProgress < 1 && /* @__PURE__ */ jsx(Button, { id: "nextButtonId", "data-testid": "modal-onboarding-next", type: "button", color: "primary", variant: "filled", onClick: () => swiperInstance.slideNext(), children: t(nextText || "explorer.modal.onboarding.trash.next") }),
65
- swiperProgress === 1 && /* @__PURE__ */ jsx(Button, { "data-testid": "modal-onboarding-close", type: "button", color: "primary", variant: "filled", onClick: () => {
62
+ /* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: handleCloseWithoutPreference, children: t("explorer.modal.onboarding.trash.later") }),
63
+ swiperProgress > 0 && /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "outline", onClick: () => swiperInstance.slidePrev(), children: t(prevText || "explorer.modal.onboarding.trash.prev") }),
64
+ swiperProgress < 1 && /* @__PURE__ */ jsx(Button, { id: "nextButtonId", type: "button", color: "primary", variant: "filled", onClick: () => swiperInstance.slideNext(), children: t(nextText || "explorer.modal.onboarding.trash.next") }),
65
+ swiperProgress === 1 && /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "filled", onClick: () => {
66
66
  isOnboarding ? handleCloseWithPreference() : handleCloseWithoutPreference();
67
67
  }, children: t(closeText || "explorer.modal.onboarding.trash.close") })
68
68
  ] })
@@ -57,7 +57,7 @@ const FileCard = ({
57
57
  },
58
58
  ppt: {
59
59
  icon: ".PPT",
60
- color: "bg-yellow-200"
60
+ color: "bg-red-200"
61
61
  },
62
62
  img: {
63
63
  icon: /* @__PURE__ */ jsx(SvgIconLandscape, { width: 22, height: 22 }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.5.5-develop-b2school.20260116160825",
3
+ "version": "2.5.5-develop-pedago.20260121100338",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -134,9 +134,10 @@
134
134
  "react-slugify": "^3.0.3",
135
135
  "swiper": "^10.1.0",
136
136
  "ua-parser-js": "^1.0.36",
137
- "@edifice.io/bootstrap": "2.5.5-develop-b2school.20260116160825",
138
- "@edifice.io/utilities": "2.5.5-develop-b2school.20260116160825",
139
- "@edifice.io/tiptap-extensions": "2.5.5-develop-b2school.20260116160825"
137
+ "react-pdf": "10.2.0",
138
+ "@edifice.io/tiptap-extensions": "2.5.5-develop-pedago.20260121100338",
139
+ "@edifice.io/utilities": "2.5.5-develop-pedago.20260121100338",
140
+ "@edifice.io/bootstrap": "2.5.5-develop-pedago.20260121100338"
140
141
  },
141
142
  "devDependencies": {
142
143
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -167,8 +168,8 @@
167
168
  "vite": "^5.4.11",
168
169
  "vite-plugin-dts": "^4.1.0",
169
170
  "vite-tsconfig-paths": "^5.0.1",
170
- "@edifice.io/client": "2.5.5-develop-b2school.20260116160825",
171
- "@edifice.io/config": "2.5.5-develop-b2school.20260116160825"
171
+ "@edifice.io/client": "2.5.5-develop-pedago.20260121100338",
172
+ "@edifice.io/config": "2.5.5-develop-pedago.20260121100338"
172
173
  },
173
174
  "peerDependencies": {
174
175
  "@react-spring/web": "^9.7.5",
@@ -1,57 +0,0 @@
1
- /**
2
- * DatePicker component props
3
- *
4
- * Minimal interface that only exposes what is necessary.
5
- * Ant Design implementation is hidden and no Ant Design-specific props are exposed.
6
- * Standard HTML div attributes are supported (passed through to the underlying DOM element).
7
- */
8
- export interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'value' | 'defaultValue'> {
9
- /**
10
- * Selected date values
11
- * @default today's date is setted by ant design if no value is provided
12
- */
13
- value?: Date;
14
- /**
15
- * Callback called when date changes
16
- */
17
- onChange?: (date?: Date) => void;
18
- /**
19
- * Date format to display in the picker
20
- * @default 'DD / MM / YYYY'
21
- */
22
- dateFormat?: string;
23
- /**
24
- * Minimum selectable date
25
- */
26
- minDate?: Date;
27
- /**
28
- * Maximum selectable date
29
- */
30
- maxDate?: Date;
31
- }
32
- /**
33
- * Type for DatePicker ref
34
- */
35
- /**
36
- * DatePicker component
37
- *
38
- * Date picker component for selecting a date.
39
- *
40
- * **Note:** This component uses Ant Design's DatePicker component internally.
41
- * Only the props defined in DatePickerProps are allowed to prevent
42
- * dependency on Ant Design-specific features. To replace the implementation,
43
- * modify the component body below.
44
- *
45
- * @example
46
- * ```tsx
47
- * <DatePicker
48
- * value={date}
49
- * onChange={(date) => setDate(date)}
50
- * dateFormat="YYYY-MM-DD"
51
- * minDate={new Date(today.setDate(today.getDate() - 2))}
52
- * maxDate={new Date(today.setDate(today.getDate() + 3))}
53
- * />
54
- * ```
55
- */
56
- declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLElement>>;
57
- export default DatePicker;