@edifice.io/react 2.3.2-develop-b2school-actualites.20251022111214 → 2.3.2-develop-b2school-actualites.20251027110554
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from '../../Button';
|
|
2
2
|
export type MenuButtonProps = Pick<ButtonProps, 'children' | 'leftIcon' | 'rightIcon' | 'onClick'> & {
|
|
3
3
|
selected: boolean;
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: 'md' | 'lg';
|
|
4
6
|
};
|
|
5
7
|
export declare const MenuButton: (props: Partial<MenuButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,13 +8,22 @@ const MenuButton = (props) => {
|
|
|
8
8
|
leftIcon,
|
|
9
9
|
rightIcon,
|
|
10
10
|
onClick,
|
|
11
|
-
children
|
|
11
|
+
children,
|
|
12
|
+
className,
|
|
13
|
+
size
|
|
12
14
|
} = props, {
|
|
13
15
|
childProps
|
|
14
16
|
} = useMenuContext();
|
|
15
|
-
return /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", className: clsx("stack w-100", {
|
|
16
|
-
selected
|
|
17
|
-
|
|
17
|
+
return /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", className: clsx("stack w-100 overflow-hidden", {
|
|
18
|
+
selected,
|
|
19
|
+
"menu-button-lg": size === "lg"
|
|
20
|
+
}, className), leftIcon, rightIcon, onClick, ...childProps, style: size === "lg" ? {
|
|
21
|
+
height: "auto"
|
|
22
|
+
} : void 0, children: /* @__PURE__ */ jsx("span", { className: clsx("text-truncate", {
|
|
23
|
+
"text-truncate-2 text-start ms-0": size === "lg"
|
|
24
|
+
}), style: {
|
|
25
|
+
overflowWrap: "break-word"
|
|
26
|
+
}, children }) });
|
|
18
27
|
};
|
|
19
28
|
export {
|
|
20
29
|
MenuButton
|
|
@@ -35,12 +35,12 @@ const EditorPreview = ({
|
|
|
35
35
|
}), setSummaryContent(doc.body.textContent || "");
|
|
36
36
|
}
|
|
37
37
|
}, [content]), /* @__PURE__ */ jsxs("div", { className: borderClass, "data-testid": "editor-preview", onClick: onDetailClick, tabIndex: onDetailClick ? -1 : void 0, role: onDetailClick ? "button" : void 0, children: [
|
|
38
|
-
/* @__PURE__ */ jsx("div", { className: "flex-fill text-truncate text-truncate-2 post-preview-content overflow-hidden",
|
|
38
|
+
/* @__PURE__ */ jsx("div", { className: "flex-fill text-truncate text-truncate-2 post-preview-content overflow-hidden", style: {
|
|
39
|
+
overflowWrap: "anywhere"
|
|
40
|
+
}, children: summaryContent }),
|
|
39
41
|
/* @__PURE__ */ jsx("div", { onClick: handleMediaClick, tabIndex: hasMediaCallback ? -1 : void 0, role: hasMediaCallback ? "button" : void 0, className: "d-flex align-items-center justify-content-center gap-24 px-32 pt-16", children: medias.slice(0, maxMediaDisplayed).map((media, index) => /* @__PURE__ */ jsxs("div", { className: clsx("position-relative col-12 col-md-4 ", {
|
|
40
42
|
"d-none d-md-block": index >= 1
|
|
41
|
-
}),
|
|
42
|
-
maxHeight: "150px"
|
|
43
|
-
}, children: [
|
|
43
|
+
}), children: [
|
|
44
44
|
/* @__PURE__ */ jsx(Image, { alt: media.alt, objectFit: "cover", ratio: "16", className: "rounded", src: media.url, sizes: "" }),
|
|
45
45
|
(index === 0 || index === 2) && medias.length - (index + 1) > 0 && /* @__PURE__ */ jsx("div", { className: clsx("position-absolute top-0 bottom-0 start-0 end-0 d-flex justify-content-center align-items-center rounded text-light bg-dark bg-opacity-50", {
|
|
46
46
|
"d-flex d-md-none": index === 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.3.2-develop-b2school-actualites.
|
|
3
|
+
"version": "2.3.2-develop-b2school-actualites.20251027110554",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"react-slugify": "^3.0.3",
|
|
132
132
|
"swiper": "^10.1.0",
|
|
133
133
|
"ua-parser-js": "^1.0.36",
|
|
134
|
-
"@edifice.io/bootstrap": "2.3.2-develop-b2school-actualites.
|
|
135
|
-
"@edifice.io/
|
|
136
|
-
"@edifice.io/
|
|
134
|
+
"@edifice.io/bootstrap": "2.3.2-develop-b2school-actualites.20251027110554",
|
|
135
|
+
"@edifice.io/utilities": "2.3.2-develop-b2school-actualites.20251027110554",
|
|
136
|
+
"@edifice.io/tiptap-extensions": "2.3.2-develop-b2school-actualites.20251027110554"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
139
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
"vite": "^5.4.11",
|
|
165
165
|
"vite-plugin-dts": "^4.1.0",
|
|
166
166
|
"vite-tsconfig-paths": "^5.0.1",
|
|
167
|
-
"@edifice.io/
|
|
168
|
-
"@edifice.io/
|
|
167
|
+
"@edifice.io/config": "2.3.2-develop-b2school-actualites.20251027110554",
|
|
168
|
+
"@edifice.io/client": "2.3.2-develop-b2school-actualites.20251027110554"
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|
|
171
171
|
"@react-spring/web": "^9.7.5",
|