@edifice.io/react 2.6.0-develop.20260724115139 → 2.6.0-develop.20260727115119
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/ButtonBeta/ButtonBeta.d.ts +5 -0
- package/dist/components/ButtonBeta/ButtonBeta.js +5 -2
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +1 -1
- package/dist/modules/homepage/components/MessageFlashList/MessageFlash.js +2 -2
- package/dist/modules/homepage/components/Notifications/services/api/notificationService.js +1 -2
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +2 -2
- package/package.json +6 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type ButtonBetaRef = HTMLButtonElement;
|
|
3
3
|
export type ButtonBetaColor = 'default' | 'destructive' | 'secondary' | 'tertiary';
|
|
4
|
+
export type ButtonBetaSizes = 'sm' | 'md';
|
|
4
5
|
export type ButtonBetaVariant = 'filled' | 'outline' | 'ghost';
|
|
5
6
|
export interface ButtonBetaProps extends React.ComponentPropsWithRef<'button'> {
|
|
6
7
|
/**
|
|
@@ -15,6 +16,10 @@ export interface ButtonBetaProps extends React.ComponentPropsWithRef<'button'> {
|
|
|
15
16
|
* `filled`, `outline` or `ghost`
|
|
16
17
|
*/
|
|
17
18
|
variant?: ButtonBetaVariant;
|
|
19
|
+
/**
|
|
20
|
+
* `sm` or `md`
|
|
21
|
+
*/
|
|
22
|
+
size?: ButtonBetaSizes;
|
|
18
23
|
/**
|
|
19
24
|
* Does it has a text ?
|
|
20
25
|
*/
|
|
@@ -5,6 +5,7 @@ import Loading from "../Loading/Loading.js";
|
|
|
5
5
|
const ButtonBeta = /* @__PURE__ */ forwardRef(({
|
|
6
6
|
color = "default",
|
|
7
7
|
type = "button",
|
|
8
|
+
size = "md",
|
|
8
9
|
variant = "filled",
|
|
9
10
|
children,
|
|
10
11
|
isLoading,
|
|
@@ -13,11 +14,13 @@ const ButtonBeta = /* @__PURE__ */ forwardRef(({
|
|
|
13
14
|
className,
|
|
14
15
|
...restProps
|
|
15
16
|
}, ref) => {
|
|
16
|
-
const
|
|
17
|
+
const classes = clsx("btn-beta", `btn-beta-${color}`, {
|
|
17
18
|
"btn-beta--outline": variant === "outline",
|
|
18
19
|
"btn-beta--ghost": variant === "ghost",
|
|
20
|
+
"btn-beta--small": size === "sm",
|
|
19
21
|
"btn-beta--icon-only": !children,
|
|
20
|
-
"btn-beta--with-icon":
|
|
22
|
+
"btn-beta--with-left-icon": !!(leftIcon && children),
|
|
23
|
+
"btn-beta--with-right-icon": !!(rightIcon && children),
|
|
21
24
|
"btn-beta--loading": isLoading
|
|
22
25
|
}, className);
|
|
23
26
|
return /* @__PURE__ */ jsxs("button", { ref, "data-testid": "button-beta", className: classes, type, ...restProps, children: [
|
|
@@ -14,7 +14,7 @@ const HomeCardHeader = ({
|
|
|
14
14
|
const hasAction = !!actionLabel && !!onActionClick;
|
|
15
15
|
return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", gap: "8", className: clsx("home-card-header", className), ...rest, children: [
|
|
16
16
|
/* @__PURE__ */ jsx("h3", { className: "home-card-header-title", children: title }),
|
|
17
|
-
hasAction && /* @__PURE__ */ jsx(ButtonBeta, { color: "
|
|
17
|
+
hasAction && /* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", size: "sm", variant: "ghost", onClick: onActionClick, leftIcon: actionLeftIcon, rightIcon: actionRightIcon, "data-testid": "home-card-header-action", children: actionLabel })
|
|
18
18
|
] });
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
@@ -20,7 +20,7 @@ const MessageFlash = ({
|
|
|
20
20
|
} = useEdificeClient(), [isCollapsed, setIsCollapsed] = useState(!0), [hasOverflow, setHasOverflow] = useState(!1), contentRef = useRef(null), checkContentTimeoutRef = useRef(void 0), {
|
|
21
21
|
t
|
|
22
22
|
} = useTranslation(), {
|
|
23
|
-
|
|
23
|
+
lg
|
|
24
24
|
} = useBreakpoint();
|
|
25
25
|
let content = "";
|
|
26
26
|
message.contents && (currentLanguage && message.contents[currentLanguage] ? content = message.contents[currentLanguage] : message.contents.fr ? content = message.contents.fr : content = Object.keys(message.contents).map((key) => message.contents[key]).filter((cont) => cont !== null)[0]), useEffect(() => {
|
|
@@ -53,7 +53,7 @@ const MessageFlash = ({
|
|
|
53
53
|
/* @__PURE__ */ jsx("div", { ref: contentRef, className: classesContent, dangerouslySetInnerHTML: {
|
|
54
54
|
__html: content
|
|
55
55
|
} }),
|
|
56
|
-
/* @__PURE__ */ jsxs(Flex, { direction:
|
|
56
|
+
/* @__PURE__ */ jsxs(Flex, { direction: lg ? "row" : "column", justify: "between", className: "message-flash-footer", children: [
|
|
57
57
|
/* @__PURE__ */ jsx("div", { className: "fst-italic", children: message.signature || "" }),
|
|
58
58
|
hasOverflow && /* @__PURE__ */ jsx(ButtonBeta, { "data-testid": isCollapsed ? "message-flash-view-more-button" : "message-flash-view-less-button", color: "default", variant: "ghost", onClick: handleCollapse, "aria-controls": `message-flash-${message.id}-content`, "aria-expanded": !isCollapsed, className: "message-flash-collapse-button", children: t(isCollapsed ? "read.more" : "read.less") })
|
|
59
59
|
] })
|
|
@@ -6,8 +6,7 @@ const createNotificationService = (baseURL) => ({
|
|
|
6
6
|
*/
|
|
7
7
|
getNotifications(types, page) {
|
|
8
8
|
const searchParams = new URLSearchParams({
|
|
9
|
-
page: page.toString()
|
|
10
|
-
mine: "1"
|
|
9
|
+
page: page.toString()
|
|
11
10
|
});
|
|
12
11
|
return types.forEach((type) => {
|
|
13
12
|
searchParams.append("type", type);
|
|
@@ -13,13 +13,13 @@ function UserSpace({
|
|
|
13
13
|
t
|
|
14
14
|
} = useTranslation();
|
|
15
15
|
return /* @__PURE__ */ jsxs(HomeCard, { variant: "user", children: [
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ jsxs(Flex, { className: "user-space", direction: "row", gap: "8", children: [
|
|
17
17
|
/* @__PURE__ */ jsx(Avatar, { className: "user-space--avatar", size: "auto", alt: name, src: avatar, variant: "circle" }),
|
|
18
18
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
19
19
|
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-name", className: "user-space--name", children: name }),
|
|
20
20
|
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-profile", className: "user-space--profile", children: t(profile) })
|
|
21
21
|
] })
|
|
22
|
-
] })
|
|
22
|
+
] }),
|
|
23
23
|
children && /* @__PURE__ */ jsx(HomeCard.Content, { children })
|
|
24
24
|
] });
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.6.0-develop.
|
|
3
|
+
"version": "2.6.0-develop.20260727115119",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"swiper": "10.1.0",
|
|
141
141
|
"ua-parser-js": "1.0.36",
|
|
142
142
|
"zustand": "4.5.7",
|
|
143
|
-
"@edifice.io/bootstrap": "2.6.0-develop.
|
|
144
|
-
"@edifice.io/tiptap-extensions": "2.6.0-develop.
|
|
145
|
-
"@edifice.io/utilities": "2.6.0-develop.
|
|
143
|
+
"@edifice.io/bootstrap": "2.6.0-develop.20260727115119",
|
|
144
|
+
"@edifice.io/tiptap-extensions": "2.6.0-develop.20260727115119",
|
|
145
|
+
"@edifice.io/utilities": "2.6.0-develop.20260727115119"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
|
148
148
|
"@babel/plugin-transform-react-pure-annotations": "7.27.1",
|
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
"vite": "5.4.14",
|
|
174
174
|
"vite-plugin-dts": "4.5.4",
|
|
175
175
|
"vite-tsconfig-paths": "5.1.4",
|
|
176
|
-
"@edifice.io/client": "2.6.0-develop.
|
|
177
|
-
"@edifice.io/config": "2.6.0-develop.
|
|
176
|
+
"@edifice.io/client": "2.6.0-develop.20260727115119",
|
|
177
|
+
"@edifice.io/config": "2.6.0-develop.20260727115119"
|
|
178
178
|
},
|
|
179
179
|
"peerDependencies": {
|
|
180
180
|
"@react-spring/web": "9.7.5",
|