@edifice.io/react 2.6.0-develop.20260722215627 → 2.6.0-develop.20260724115139

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.
@@ -8,6 +8,13 @@ export interface PopoverProps {
8
8
  * When Popover is visible
9
9
  */
10
10
  isVisible?: boolean;
11
+ /**
12
+ * Horizontal alignment relative to the trigger.
13
+ * `center` (default) centers the popover under the trigger.
14
+ * `end` aligns the popover's right edge with the trigger's right edge,
15
+ * which prevents overflow when the trigger sits near the viewport's right edge.
16
+ */
17
+ align?: 'center' | 'end';
11
18
  /**
12
19
  * React Node
13
20
  */
@@ -21,13 +21,14 @@ const PopoverHeader = ({
21
21
  const classes = clsx("popover-footer p-8", className);
22
22
  return /* @__PURE__ */ jsx("div", { className: classes, children });
23
23
  }, Popover = /* @__PURE__ */ forwardRef(({
24
+ align = "center",
24
25
  children,
25
26
  className,
26
27
  id,
27
28
  isVisible,
28
29
  ...restProps
29
30
  }, ref) => {
30
- const classes = clsx("popover d-block position-absolute top-100 start-50 translate-middle-x", className);
31
+ const classes = clsx("popover d-block position-absolute top-100", align === "end" ? "end-0 popover-align-end" : "start-50 translate-middle-x", className);
31
32
  return useTransition(isVisible, {
32
33
  from: {
33
34
  opacity: 0
@@ -68,7 +68,7 @@ const Header = ({
68
68
  /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(ButtonBeta, { leftIcon: /* @__PURE__ */ jsx(SvgIconNotificationBeta, {}), variant: "ghost", onClick: handleNotificationsClick }) }),
69
69
  /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", ref: userRef, id: popoverUserId, "aria-haspopup": "true", "aria-expanded": isUserHovered, "data-testid": "header-user-menu-button", children: [
70
70
  /* @__PURE__ */ jsx(NavLink, { link: "/userbook/mon-compte", translate: t("navbar.myaccount"), "data-testid": "header-user-profile-button", children: /* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }) }),
71
- /* @__PURE__ */ jsx(Popover, { className: "top-100 widget", id: popoverUserId, isVisible: isUserHovered, children: /* @__PURE__ */ jsx(PopoverBody, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? ""), className: "nav-link d-flex align-items-center gap-8", "data-testid": "header-logout-button", children: [
71
+ /* @__PURE__ */ jsx(Popover, { align: "end", className: "widget", id: popoverUserId, isVisible: isUserHovered, children: /* @__PURE__ */ jsx(PopoverBody, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? ""), className: "nav-link logout d-flex align-items-center gap-8", "data-testid": "header-logout-button", children: [
72
72
  /* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
73
73
  /* @__PURE__ */ jsx("span", { id: "logout-label", className: "nav-text", children: t("navbar.disconnect") })
74
74
  ] }) }) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.6.0-develop.20260722215627",
3
+ "version": "2.6.0-develop.20260724115139",
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.20260722215627",
144
- "@edifice.io/tiptap-extensions": "2.6.0-develop.20260722215627",
145
- "@edifice.io/utilities": "2.6.0-develop.20260722215627"
143
+ "@edifice.io/bootstrap": "2.6.0-develop.20260724115139",
144
+ "@edifice.io/tiptap-extensions": "2.6.0-develop.20260724115139",
145
+ "@edifice.io/utilities": "2.6.0-develop.20260724115139"
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.20260722215627",
177
- "@edifice.io/config": "2.6.0-develop.20260722215627"
176
+ "@edifice.io/client": "2.6.0-develop.20260724115139",
177
+ "@edifice.io/config": "2.6.0-develop.20260724115139"
178
178
  },
179
179
  "peerDependencies": {
180
180
  "@react-spring/web": "9.7.5",