@edifice.io/react 2.2.3-develop-b2school.20250414171310 → 2.2.3-develop-b2school.20250415155504
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/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/DropdownItem.d.ts +5 -1
- package/dist/components/Dropdown/DropdownItem.js +1 -0
- package/dist/components/Dropdown/DropdownTrigger.js +1 -0
- package/dist/modules/editor/components/Editor/Editor.js +1 -1
- package/dist/modules/editor/hooks/useTipTapEditor.js +1 -1
- package/dist/modules/modals/ConfirmModal/ConfirmModal.d.ts +6 -1
- package/dist/modules/modals/ConfirmModal/ConfirmModal.js +2 -1
- package/package.json +6 -6
|
@@ -71,7 +71,7 @@ declare const Dropdown: {
|
|
|
71
71
|
Trigger: import('react').ForwardRefExoticComponent<Omit<import('./DropdownTrigger').DropdownTriggerProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
72
72
|
Menu: import('react').ForwardRefExoticComponent<Omit<import('./DropdownMenu').DropdownMenuProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
73
73
|
Item: {
|
|
74
|
-
({ type, icon, onClick, children, className, minWidth, ...restProps }: import('./DropdownItem').DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
({ type, icon, onClick, children, className, minWidth, disabled, ...restProps }: import('./DropdownItem').DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
75
75
|
displayName: string;
|
|
76
76
|
};
|
|
77
77
|
Separator: {
|
|
@@ -25,9 +25,13 @@ export interface DropdownItemProps {
|
|
|
25
25
|
* Set minimum width in pixels
|
|
26
26
|
*/
|
|
27
27
|
minWidth?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Disabled status
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
28
32
|
}
|
|
29
33
|
declare const DropdownItem: {
|
|
30
|
-
({ type, icon, onClick, children, className, minWidth, ...restProps }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
({ type, icon, onClick, children, className, minWidth, disabled, ...restProps }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
31
35
|
displayName: string;
|
|
32
36
|
};
|
|
33
37
|
export default DropdownItem;
|
|
@@ -3,6 +3,7 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import SvgIconRafterUp from "../../modules/icons/components/IconRafterUp.js";
|
|
5
5
|
import { useDropdownContext } from "./DropdownContext.js";
|
|
6
|
+
import Badge from "../Badge/Badge.js";
|
|
6
7
|
const DropdownTrigger = /* @__PURE__ */ forwardRef(({
|
|
7
8
|
label,
|
|
8
9
|
icon,
|
|
@@ -36,7 +36,7 @@ const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/
|
|
|
36
36
|
} = useEdificeClient(), {
|
|
37
37
|
editor,
|
|
38
38
|
editable
|
|
39
|
-
} = useTipTapEditor(mode === "edit", content, focus, placeholder, onContentChange, visibility), {
|
|
39
|
+
} = useTipTapEditor(mode === "edit", content, focus, placeholder, onContentChange, visibility, extensions), {
|
|
40
40
|
ref: mediaLibraryModalRef,
|
|
41
41
|
...mediaLibraryModalHandlers
|
|
42
42
|
} = useMediaLibraryEditor(editor), {
|
|
@@ -65,7 +65,7 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
|
|
|
65
65
|
levels: [1, 2]
|
|
66
66
|
}), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
|
|
67
67
|
lang: (currentLanguage == null ? void 0 : currentLanguage.length) === 2 ? `${currentLanguage}-${currentLanguage.toUpperCase()}` : "fr-FR"
|
|
68
|
-
}), Iframe, Hyperlink, FontFamily, Mathematics, Alert, VideoNodeView(MediaRenderer), AudioNodeView(AudioRenderer), LinkerNodeView(LinkerRenderer), ImageNodeView(MediaRenderer, uploadFile), AttachmentNodeView(AttachmentRenderer), InformationPaneNodeView(InformationPaneRenderer)],
|
|
68
|
+
}), Iframe, Hyperlink, FontFamily, Mathematics, Alert, VideoNodeView(MediaRenderer), AudioNodeView(AudioRenderer), LinkerNodeView(LinkerRenderer), ImageNodeView(MediaRenderer, uploadFile), AttachmentNodeView(AttachmentRenderer), InformationPaneNodeView(InformationPaneRenderer), ...extensions || []],
|
|
69
69
|
content,
|
|
70
70
|
// If the onContentChange callback is provided, we call it on every content change.
|
|
71
71
|
...onContentChange ? {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ModalSize } from '../../../components';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
export type ConfirmModalVariant = 'yes/no' | 'ok/cancel';
|
|
3
4
|
interface ConfirmModalProps {
|
|
@@ -29,6 +30,10 @@ interface ConfirmModalProps {
|
|
|
29
30
|
* Key text translation of cancel button (useTranslation('common'))
|
|
30
31
|
*/
|
|
31
32
|
koText?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the modal (width)
|
|
35
|
+
*/
|
|
36
|
+
size?: ModalSize;
|
|
32
37
|
/**
|
|
33
38
|
* Function to call when success button proceed
|
|
34
39
|
*/
|
|
@@ -38,5 +43,5 @@ interface ConfirmModalProps {
|
|
|
38
43
|
*/
|
|
39
44
|
onCancel?: () => void;
|
|
40
45
|
}
|
|
41
|
-
export default function ConfirmModal({ variant, id, isOpen, header, body, okText, koText, onSuccess, onCancel, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export default function ConfirmModal({ variant, id, isOpen, header, body, okText, koText, size, onSuccess, onCancel, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
42
47
|
export {};
|
|
@@ -10,6 +10,7 @@ function ConfirmModal({
|
|
|
10
10
|
body,
|
|
11
11
|
okText,
|
|
12
12
|
koText,
|
|
13
|
+
size = "md",
|
|
13
14
|
onSuccess = () => ({}),
|
|
14
15
|
onCancel = () => ({})
|
|
15
16
|
}) {
|
|
@@ -22,7 +23,7 @@ function ConfirmModal({
|
|
|
22
23
|
"yes/no": t("no"),
|
|
23
24
|
"ok/cancel": t("cancel")
|
|
24
25
|
};
|
|
25
|
-
return /* @__PURE__ */ jsxs(Modal, { isOpen, onModalClose: onCancel, id, children: [
|
|
26
|
+
return console.log("size:", size), /* @__PURE__ */ jsxs(Modal, { isOpen, onModalClose: onCancel, id, size, children: [
|
|
26
27
|
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: header }),
|
|
27
28
|
/* @__PURE__ */ jsx(Modal.Body, { children: body }),
|
|
28
29
|
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.2.3-develop-b2school.
|
|
3
|
+
"version": "2.2.3-develop-b2school.20250415155504",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"react-slugify": "^3.0.3",
|
|
119
119
|
"swiper": "^10.1.0",
|
|
120
120
|
"ua-parser-js": "^1.0.36",
|
|
121
|
-
"@edifice.io/bootstrap": "2.2.3-develop-b2school.
|
|
122
|
-
"@edifice.io/tiptap-extensions": "2.2.3-develop-b2school.
|
|
123
|
-
"@edifice.io/utilities": "2.2.3-develop-b2school.
|
|
121
|
+
"@edifice.io/bootstrap": "2.2.3-develop-b2school.20250415155504",
|
|
122
|
+
"@edifice.io/tiptap-extensions": "2.2.3-develop-b2school.20250415155504",
|
|
123
|
+
"@edifice.io/utilities": "2.2.3-develop-b2school.20250415155504"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"vite": "^5.4.11",
|
|
152
152
|
"vite-plugin-dts": "^4.1.0",
|
|
153
153
|
"vite-tsconfig-paths": "^5.0.1",
|
|
154
|
-
"@edifice.io/client": "2.2.3-develop-b2school.
|
|
155
|
-
"@edifice.io/config": "2.2.3-develop-b2school.
|
|
154
|
+
"@edifice.io/client": "2.2.3-develop-b2school.20250415155504",
|
|
155
|
+
"@edifice.io/config": "2.2.3-develop-b2school.20250415155504"
|
|
156
156
|
},
|
|
157
157
|
"peerDependencies": {
|
|
158
158
|
"@react-spring/web": "^9.7.5",
|