@edifice.io/react 2.5.18 → 2.5.19-epic-homepage.20260511095703

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 (138) hide show
  1. package/dist/components/BetaSwitch/BetaSwitch.d.ts +13 -0
  2. package/dist/components/BetaSwitch/BetaSwitch.js +27 -0
  3. package/dist/components/BetaSwitch/index.d.ts +1 -0
  4. package/dist/components/ButtonBeta/ButtonBeta.d.ts +47 -0
  5. package/dist/components/ButtonBeta/ButtonBeta.js +34 -0
  6. package/dist/components/ButtonBeta/index.d.ts +2 -0
  7. package/dist/components/Card/Card.js +1 -1
  8. package/dist/components/Combobox/Combobox.js +1 -1
  9. package/dist/components/Dropdown/Dropdown.js +1 -1
  10. package/dist/components/Form/FormControl.js +1 -1
  11. package/dist/components/Layout/components/WidgetApps.js +1 -1
  12. package/dist/components/Logo/index.d.ts +1 -1
  13. package/dist/components/LogoBeta/LogoBeta.d.ts +7 -0
  14. package/dist/components/LogoBeta/LogoBeta.js +14 -0
  15. package/dist/components/LogoBeta/index.d.ts +2 -0
  16. package/dist/components/Modal/Modal.js +1 -1
  17. package/dist/components/PageLayout/PageLayout.d.ts +45 -0
  18. package/dist/components/PageLayout/PageLayout.js +94 -0
  19. package/dist/components/PageLayout/PageLayoutContext.d.ts +14 -0
  20. package/dist/components/PageLayout/PageLayoutContext.js +8 -0
  21. package/dist/components/PageLayout/components/PageLayoutBreadcrumb.d.ts +9 -0
  22. package/dist/components/PageLayout/components/PageLayoutBreadcrumb.js +10 -0
  23. package/dist/components/PageLayout/components/PageLayoutContent.d.ts +9 -0
  24. package/dist/components/PageLayout/components/PageLayoutContent.js +18 -0
  25. package/dist/components/PageLayout/components/PageLayoutHeader.d.ts +9 -0
  26. package/dist/components/PageLayout/components/PageLayoutHeader.js +17 -0
  27. package/dist/components/PageLayout/components/PageLayoutOverlay.d.ts +15 -0
  28. package/dist/components/PageLayout/components/PageLayoutOverlay.js +34 -0
  29. package/dist/components/PageLayout/components/PageLayoutSidebarLeft.d.ts +9 -0
  30. package/dist/components/PageLayout/components/PageLayoutSidebarLeft.js +18 -0
  31. package/dist/components/PageLayout/components/PageLayoutSidebarRight.d.ts +9 -0
  32. package/dist/components/PageLayout/components/PageLayoutSidebarRight.js +18 -0
  33. package/dist/components/PageLayout/index.d.ts +3 -0
  34. package/dist/components/PreventPropagation/PreventPropagation.js +1 -1
  35. package/dist/components/PromotionCard/PromotionCard.js +1 -1
  36. package/dist/components/SearchBar/SearchBar.d.ts +2 -2
  37. package/dist/components/Table/components/Table.js +1 -1
  38. package/dist/components/index.d.ts +4 -0
  39. package/dist/homepage.js +18 -0
  40. package/dist/hooks/index.d.ts +1 -1
  41. package/dist/hooks/useConf/useConf.d.ts +1 -1
  42. package/dist/hooks/useDropdown/useDropdown.js +2 -0
  43. package/dist/hooks/useSession/useSession.d.ts +1 -1
  44. package/dist/hooks/useThumbnail/useThumbnail.d.ts +1 -1
  45. package/dist/hooks/useThumbnail/useThumbnail.js +5 -1
  46. package/dist/hooks/useUpload/useUpload.js +2 -5
  47. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +12 -0
  48. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +1 -1
  49. package/dist/icons-nav.js +38 -28
  50. package/dist/index.js +211 -200
  51. package/dist/modules/editor/components/Editor/EditorPreview.js +1 -1
  52. package/dist/modules/homepage/components/Header/Header.d.ts +8 -0
  53. package/dist/modules/homepage/components/Header/Header.js +74 -0
  54. package/dist/modules/homepage/components/Header/index.d.ts +2 -0
  55. package/dist/modules/homepage/components/LastInfos/LastInfos.d.ts +33 -0
  56. package/dist/modules/homepage/components/LastInfos/LastInfos.js +7 -0
  57. package/dist/modules/homepage/components/LastInfos/LastInfosContainer.d.ts +4 -0
  58. package/dist/modules/homepage/components/LastInfos/LastInfosContainer.js +32 -0
  59. package/dist/modules/homepage/components/LastInfos/LastInfosList.d.ts +8 -0
  60. package/dist/modules/homepage/components/LastInfos/LastInfosList.js +27 -0
  61. package/dist/modules/homepage/components/LastInfos/index.d.ts +4 -0
  62. package/dist/modules/homepage/components/LastInfos/useLastInfos.d.ts +17 -0
  63. package/dist/modules/homepage/components/LastInfos/useLastInfos.js +25 -0
  64. package/dist/modules/homepage/components/MessageFlashList/MessageFlash.d.ts +12 -0
  65. package/dist/modules/homepage/components/MessageFlashList/MessageFlash.js +60 -0
  66. package/dist/modules/homepage/components/MessageFlashList/MessageFlashList.d.ts +12 -0
  67. package/dist/modules/homepage/components/MessageFlashList/MessageFlashList.js +10 -0
  68. package/dist/modules/homepage/components/MessageFlashList/MessageFlashListContainer.d.ts +5 -0
  69. package/dist/modules/homepage/components/MessageFlashList/MessageFlashListContainer.js +14 -0
  70. package/dist/modules/homepage/components/MessageFlashList/hooks/useMessageFlashList.d.ts +16 -0
  71. package/dist/modules/homepage/components/MessageFlashList/hooks/useMessageFlashList.js +19 -0
  72. package/dist/modules/homepage/components/MessageFlashList/index.d.ts +4 -0
  73. package/dist/modules/homepage/components/MessageFlashList/services/api/index.d.ts +4 -0
  74. package/dist/modules/homepage/components/MessageFlashList/services/api/index.js +5 -0
  75. package/dist/modules/homepage/components/MessageFlashList/services/api/messagesFlashService.d.ts +20 -0
  76. package/dist/modules/homepage/components/MessageFlashList/services/api/messagesFlashService.js +21 -0
  77. package/dist/modules/homepage/components/MessageFlashList/services/queries/messagesFlash.d.ts +13 -0
  78. package/dist/modules/homepage/components/MessageFlashList/services/queries/messagesFlash.js +31 -0
  79. package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.d.ts +15 -0
  80. package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.js +35 -0
  81. package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.d.ts +4 -0
  82. package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +10 -0
  83. package/dist/modules/homepage/components/SchoolSpace/index.d.ts +3 -0
  84. package/dist/modules/homepage/components/SchoolSpace/useUserSchools.d.ts +6 -0
  85. package/dist/modules/homepage/components/SchoolSpace/useUserSchools.js +34 -0
  86. package/dist/modules/homepage/components/index.d.ts +4 -0
  87. package/dist/modules/homepage/hooks/useWidgetPreferences.d.ts +5 -0
  88. package/dist/modules/homepage/hooks/useWidgetPreferences.js +19 -0
  89. package/dist/modules/homepage/index.d.ts +1 -0
  90. package/dist/modules/icons/components/nav/IconCommunitiesBeta.d.ts +7 -0
  91. package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +18 -0
  92. package/dist/modules/icons/components/nav/IconHomeBeta.d.ts +7 -0
  93. package/dist/modules/icons/components/nav/IconHomeBeta.js +13 -0
  94. package/dist/modules/icons/components/nav/IconMessagesBeta.d.ts +7 -0
  95. package/dist/modules/icons/components/nav/IconMessagesBeta.js +18 -0
  96. package/dist/modules/icons/components/nav/IconMyAppsBeta.d.ts +7 -0
  97. package/dist/modules/icons/components/nav/IconMyAppsBeta.js +13 -0
  98. package/dist/modules/icons/components/nav/IconNotificationBeta.d.ts +7 -0
  99. package/dist/modules/icons/components/nav/IconNotificationBeta.js +14 -0
  100. package/dist/modules/icons/components/nav/IconNotificationsBeta.d.ts +7 -0
  101. package/dist/modules/icons/components/nav/index.d.ts +5 -0
  102. package/dist/modules/modals/OnboardingModal/index.d.ts +1 -1
  103. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  104. package/dist/modules/modals/ResourceModal/ResourceModal.js +1 -1
  105. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  106. package/dist/modules/modals/ShareModal/ShareResources.d.ts +4 -53
  107. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  108. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +2 -1
  109. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  110. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +24 -10
  111. package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +7 -5
  112. package/dist/modules/multimedia/ImageEditor/effects/blur.js +26 -18
  113. package/dist/modules/multimedia/ImageEditor/effects/constants.d.ts +2 -0
  114. package/dist/modules/multimedia/ImageEditor/effects/constants.js +4 -0
  115. package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +4 -5
  116. package/dist/modules/multimedia/ImageEditor/effects/crop.js +42 -26
  117. package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +10 -16
  118. package/dist/modules/multimedia/ImageEditor/effects/misc.js +27 -12
  119. package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +3 -7
  120. package/dist/modules/multimedia/ImageEditor/effects/resize.js +31 -22
  121. package/dist/modules/multimedia/ImageEditor/effects/rotate.js +2 -3
  122. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +40 -41
  123. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +1 -1
  124. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +9 -3
  125. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +4 -1
  126. package/dist/modules/multimedia/LinkerCard/LinkerCard._.d.ts +1 -1
  127. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -0
  128. package/dist/modules/multimedia/UploadCard/UploadCard._.d.ts +1 -1
  129. package/dist/modules/multimedia/UploadFiles/UploadFiles.js +4 -4
  130. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +1 -1
  131. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isToday.js +1 -1
  132. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/localeData.js +1 -1
  133. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/weekday.js +1 -1
  134. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
  135. package/dist/providers/EdificeClientProvider/EdificeClientProvider.d.ts +0 -7
  136. package/dist/utilities/react-query/react-query-utils.d.ts +1 -1
  137. package/package.json +56 -53
  138. package/dist/modules/multimedia/FileCard/FileCard._.d.ts +0 -17
@@ -0,0 +1,13 @@
1
+ /**
2
+ * BetaSwitch component displays a banner allowing the user to opt-out
3
+ * from the beta version of the homepage and switch back to the legacy one.
4
+ */
5
+ export interface BetaSwitchProps {
6
+ isSwitching?: boolean;
7
+ onSwitchClick?: () => void;
8
+ }
9
+ export declare const BetaSwitch: {
10
+ ({ isSwitching, onSwitchClick, }: BetaSwitchProps): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ export default BetaSwitch;
@@ -0,0 +1,27 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useTranslation } from "react-i18next";
3
+ import useBreakpoint from "../../hooks/useBreakpoint/useBreakpoint.js";
4
+ import Flex from "../Flex/Flex.js";
5
+ import ButtonBeta from "../ButtonBeta/ButtonBeta.js";
6
+ const BetaSwitch = ({
7
+ isSwitching = !1,
8
+ onSwitchClick
9
+ }) => {
10
+ const {
11
+ t
12
+ } = useTranslation(), {
13
+ md,
14
+ sm
15
+ } = useBreakpoint();
16
+ return /* @__PURE__ */ jsx("div", { className: "beta-switch", children: /* @__PURE__ */ jsxs(Flex, { direction: sm ? "row" : "column", gap: "8", children: [
17
+ /* @__PURE__ */ jsxs("p", { children: [
18
+ /* @__PURE__ */ jsx("strong", { children: t("betaSwitch.title") }),
19
+ " ",
20
+ md && /* @__PURE__ */ jsx("span", { children: t("betaSwitch.description") })
21
+ ] }),
22
+ /* @__PURE__ */ jsx(ButtonBeta, { "data-testid": "beta-switch-button", isLoading: isSwitching, disabled: isSwitching, onClick: onSwitchClick, children: t("betaSwitch.button") })
23
+ ] }) });
24
+ };
25
+ export {
26
+ BetaSwitch
27
+ };
@@ -0,0 +1 @@
1
+ export { BetaSwitch } from './BetaSwitch';
@@ -0,0 +1,47 @@
1
+ import { ReactNode } from 'react';
2
+ export type ButtonBetaRef = HTMLButtonElement;
3
+ export type ButtonBetaColor = 'default' | 'destructive' | 'secondary' | 'tertiary';
4
+ export type ButtonBetaVariant = 'filled' | 'outline' | 'ghost';
5
+ export interface ButtonBetaProps extends React.ComponentPropsWithRef<'button'> {
6
+ /**
7
+ * `button`, `submit` or `reset`
8
+ */
9
+ type?: 'button' | 'submit' | 'reset';
10
+ /**
11
+ * `default`, `destructive`, `secondary` or `tertiary`
12
+ */
13
+ color?: ButtonBetaColor;
14
+ /**
15
+ * `filled`, `outline` or `ghost`
16
+ */
17
+ variant?: ButtonBetaVariant;
18
+ /**
19
+ * Does it has a text ?
20
+ */
21
+ children?: ReactNode;
22
+ /**
23
+ * Display Icon Component to the left
24
+ */
25
+ leftIcon?: ReactNode;
26
+ /**
27
+ * Display Icon Component to the right
28
+ */
29
+ rightIcon?: ReactNode;
30
+ /**
31
+ * Is it loading ?
32
+ */
33
+ isLoading?: boolean;
34
+ /**
35
+ * Disabled status
36
+ */
37
+ disabled?: boolean;
38
+ /**
39
+ * Optional class for styling purpose
40
+ */
41
+ className?: string;
42
+ }
43
+ /**
44
+ * Primary UI component for user interaction (edifice2d design system)
45
+ */
46
+ declare const ButtonBeta: import('react').ForwardRefExoticComponent<Omit<ButtonBetaProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
47
+ export default ButtonBeta;
@@ -0,0 +1,34 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import clsx from "clsx";
4
+ import Loading from "../Loading/Loading.js";
5
+ const ButtonBeta = /* @__PURE__ */ forwardRef(({
6
+ color = "default",
7
+ type = "button",
8
+ variant = "filled",
9
+ children,
10
+ isLoading,
11
+ leftIcon,
12
+ rightIcon,
13
+ className,
14
+ ...restProps
15
+ }, ref) => {
16
+ const hasIcon = !!(leftIcon || rightIcon), classes = clsx("btn-beta", `btn-beta-${color}`, {
17
+ "btn-beta--outline": variant === "outline",
18
+ "btn-beta--ghost": variant === "ghost",
19
+ "btn-beta--icon-only": !children,
20
+ "btn-beta--with-icon": hasIcon && !!children,
21
+ "btn-beta--loading": isLoading
22
+ }, className);
23
+ return /* @__PURE__ */ jsxs("button", { ref, "data-testid": "button-beta", className: classes, type, ...restProps, children: [
24
+ isLoading && /* @__PURE__ */ jsx(Loading, { isLoading: !0 }),
25
+ /* @__PURE__ */ jsxs("span", { children: [
26
+ leftIcon,
27
+ children,
28
+ rightIcon
29
+ ] })
30
+ ] });
31
+ });
32
+ export {
33
+ ButtonBeta as default
34
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ButtonBeta } from './ButtonBeta';
2
+ export * from './ButtonBeta';
@@ -39,7 +39,7 @@ const Root = /* @__PURE__ */ forwardRef(({
39
39
  /* @__PURE__ */ jsx(Card.Header, {}),
40
40
  typeof children == "function" ? children(appCode) : children
41
41
  ] }) });
42
- }), Card = /* @__PURE__ */ Object.assign(Root, {
42
+ }), Card = Object.assign(Root, {
43
43
  Title: CardTitle,
44
44
  Text: CardText,
45
45
  Image: CardImage,
@@ -53,7 +53,7 @@ const ComboboxComponent = /* @__PURE__ */ forwardRef(({
53
53
  }, value, variant, renderInputGroup, renderSelectedItems, hasDefault: !!options.length, onFocus, onBlur, inputRef }),
54
54
  /* @__PURE__ */ jsx(Dropdown.Menu, { "data-testid": "combobox-search-menu", children: renderContent() })
55
55
  ] });
56
- }), Combobox = /* @__PURE__ */ Object.assign(ComboboxComponent, {
56
+ }), Combobox = Object.assign(ComboboxComponent, {
57
57
  Trigger: ComboboxTrigger
58
58
  });
59
59
  export {
@@ -81,7 +81,7 @@ const Root = /* @__PURE__ */ forwardRef(({
81
81
  return useEffect(() => {
82
82
  onToggle == null || onToggle(visible), visible || setSearchQuery("");
83
83
  }, [visible]), /* @__PURE__ */ jsx(DropdownContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: dropdown, children: typeof children == "function" ? children(triggerProps, itemRefs, setVisible) : children }) });
84
- }), Dropdown = /* @__PURE__ */ Object.assign(Root, {
84
+ }), Dropdown = Object.assign(Root, {
85
85
  Trigger: DropdownTrigger,
86
86
  Menu: DropdownMenu,
87
87
  Item: DropdownItem,
@@ -22,7 +22,7 @@ const Root = /* @__PURE__ */ forwardRef(({
22
22
  status
23
23
  }), [id, isOptional, isReadOnly, isRequired, status]);
24
24
  return /* @__PURE__ */ jsx(Context.Provider, { value: values, children: /* @__PURE__ */ jsx("div", { ref, className, ...restProps, children }) });
25
- }), FormControl = /* @__PURE__ */ Object.assign(Root, {
25
+ }), FormControl = Object.assign(Root, {
26
26
  Label,
27
27
  Input,
28
28
  Text: FormText
@@ -14,7 +14,7 @@ const WidgetAppsFooter = () => {
14
14
  } = useTranslation(), getAppName = (data) => data.prefix && data.prefix.length > 1 ? t(data.prefix.substring(1)) : t(data.displayName) || "";
15
15
  return /* @__PURE__ */ jsxs("div", { className: "widget-body d-flex flex-wrap", children: [
16
16
  !bookmarkedApps.length && /* @__PURE__ */ jsx("div", { className: "text-dark", children: t("navbar.myapps.more") }),
17
- bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, title: getAppName(app), className: "bookmarked-app", target: appToOpenOnBlank.includes(app.name) || app.isExternal || app.category === "connector" ? "_blank" : void 0, rel: appToOpenOnBlank.includes(app.name) || app.isExternal || app.category === "connector" ? "noopener noreferrer" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
17
+ bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, title: getAppName(app), className: "bookmarked-app", target: appToOpenOnBlank.includes(app.name) || app.isExternal || app.target === "_blank" ? "_blank" : void 0, rel: appToOpenOnBlank.includes(app.name) || app.isExternal || app.target === "_blank" ? "noopener noreferrer" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
18
18
  ] });
19
19
  };
20
20
  export {
@@ -1,2 +1,2 @@
1
- export { default as Logo } from './Logo';
2
1
  export * from './Logo';
2
+ export { default as Logo } from './Logo';
@@ -0,0 +1,7 @@
1
+ export interface LogoBetaProps {
2
+ src: string;
3
+ is1d?: boolean;
4
+ translate?: string;
5
+ }
6
+ declare const LogoBeta: import('react').ForwardRefExoticComponent<LogoBetaProps & import('react').RefAttributes<HTMLAnchorElement>>;
7
+ export default LogoBeta;
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import clsx from "clsx";
4
+ const LogoBeta = /* @__PURE__ */ forwardRef(({
5
+ src,
6
+ is1d,
7
+ translate = "Retour accueil"
8
+ }, ref) => {
9
+ const classes = clsx("navbar-brand");
10
+ return /* @__PURE__ */ jsx("a", { ref, className: classes, href: "/timeline/timeline", "aria-label": translate, children: /* @__PURE__ */ jsx("img", { className: "logo", src, alt: `logo ${is1d ? "ONE" : "NEO"}`, width: "300", height: "52" }) });
11
+ });
12
+ export {
13
+ LogoBeta as default
14
+ };
@@ -0,0 +1,2 @@
1
+ export * from './LogoBeta';
2
+ export { default as LogoBeta } from './LogoBeta';
@@ -62,7 +62,7 @@ const Root = /* @__PURE__ */ forwardRef(({
62
62
  opacity: 0.65
63
63
  } })
64
64
  ] })) });
65
- }), Modal = /* @__PURE__ */ Object.assign(Root, {
65
+ }), Modal = Object.assign(Root, {
66
66
  Header: ModalHeader,
67
67
  Subtitle: ModalSubtitle,
68
68
  Body: ModalBody,
@@ -0,0 +1,45 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { NoPaddingConfig, PageLayoutScrollMode, PageLayoutVariant } from './PageLayoutContext';
3
+ export interface PageLayoutProps extends ComponentPropsWithoutRef<'div'> {
4
+ children: ReactNode;
5
+ /** Layout variant: "centered" (default) centers everything in a max-width container,
6
+ * "fullpage" extends sidebars to screen edges with centered content */
7
+ variant?: PageLayoutVariant;
8
+ /** Add a gap between sidebars and content */
9
+ withGap?: boolean;
10
+ /** Scroll mode: "columns" — each column scrolls independently (header not fixed),
11
+ * "page" — normal page scroll with sticky breadcrumb (header not fixed) */
12
+ scrollMode?: PageLayoutScrollMode;
13
+ /** Disable padding on specific columns */
14
+ noPadding?: NoPaddingConfig;
15
+ }
16
+ declare const PageLayout: {
17
+ ({ children, variant, withGap, scrollMode, noPadding, className, ...props }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
18
+ displayName: string;
19
+ } & {
20
+ Header: {
21
+ ({ children, className, ...props }: import('./components/PageLayoutHeader').PageLayoutHeaderProps): import("react/jsx-runtime").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ Breadcrumb: {
25
+ ({ children, className, ...props }: import('./components/PageLayoutBreadcrumb').PageLayoutBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
26
+ displayName: string;
27
+ };
28
+ SidebarLeft: {
29
+ ({ children, className, ...props }: import('./components/PageLayoutSidebarLeft').PageLayoutSidebarLeftProps): import("react/jsx-runtime").JSX.Element;
30
+ displayName: string;
31
+ };
32
+ Content: {
33
+ ({ children, className, ...props }: import('./components/PageLayoutContent').PageLayoutContentProps): import("react/jsx-runtime").JSX.Element;
34
+ displayName: string;
35
+ };
36
+ SidebarRight: {
37
+ ({ children, className, ...props }: import('./components/PageLayoutSidebarRight').PageLayoutSidebarRightProps): import("react/jsx-runtime").JSX.Element;
38
+ displayName: string;
39
+ };
40
+ Overlay: {
41
+ ({ children, open, onClose, backdrop, className, ...props }: import('./components/PageLayoutOverlay').PageLayoutOverlayProps): import("react/jsx-runtime").JSX.Element;
42
+ displayName: string;
43
+ };
44
+ };
45
+ export default PageLayout;
@@ -0,0 +1,94 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useMemo, Children, isValidElement } from "react";
3
+ import clsx from "clsx";
4
+ import PageLayoutBreadcrumb from "./components/PageLayoutBreadcrumb.js";
5
+ import PageLayoutContent from "./components/PageLayoutContent.js";
6
+ import PageLayoutHeader from "./components/PageLayoutHeader.js";
7
+ import PageLayoutOverlay from "./components/PageLayoutOverlay.js";
8
+ import PageLayoutSidebarLeft from "./components/PageLayoutSidebarLeft.js";
9
+ import PageLayoutSidebarRight from "./components/PageLayoutSidebarRight.js";
10
+ import { PageLayoutContext } from "./PageLayoutContext.js";
11
+ function analyzeChildren(children) {
12
+ let hasLeftSidebar = !1, hasRightSidebar = !1, breadcrumb = null, overlay = null;
13
+ const headerChildren = [], mainChildren = [];
14
+ return Children.toArray(children).forEach((child) => {
15
+ if (/* @__PURE__ */ isValidElement(child))
16
+ switch (child.type) {
17
+ case PageLayoutHeader:
18
+ headerChildren.push(child);
19
+ break;
20
+ case PageLayoutBreadcrumb:
21
+ breadcrumb = child;
22
+ break;
23
+ case PageLayoutOverlay:
24
+ overlay = child;
25
+ break;
26
+ case PageLayoutSidebarLeft:
27
+ hasLeftSidebar = !0, mainChildren.push(child);
28
+ break;
29
+ case PageLayoutSidebarRight:
30
+ hasRightSidebar = !0, mainChildren.push(child);
31
+ break;
32
+ case PageLayoutContent:
33
+ mainChildren.push(child);
34
+ break;
35
+ default:
36
+ mainChildren.push(child);
37
+ break;
38
+ }
39
+ }), {
40
+ hasLeftSidebar,
41
+ hasRightSidebar,
42
+ breadcrumb,
43
+ overlay,
44
+ headerChildren,
45
+ mainChildren
46
+ };
47
+ }
48
+ const Root = ({
49
+ children,
50
+ variant = "centered",
51
+ withGap = !1,
52
+ scrollMode,
53
+ noPadding,
54
+ className,
55
+ ...props
56
+ }) => {
57
+ const contextValue = useMemo(() => ({
58
+ variant,
59
+ scrollMode,
60
+ noPadding
61
+ }), [variant, scrollMode, noPadding]), {
62
+ hasLeftSidebar,
63
+ hasRightSidebar,
64
+ breadcrumb,
65
+ overlay,
66
+ headerChildren,
67
+ mainChildren
68
+ } = analyzeChildren(children), mainAreaClasses = clsx("pagelayout-mainarea", {
69
+ "has-both-sidebars": hasLeftSidebar && hasRightSidebar,
70
+ "has-left-sidebar-only": hasLeftSidebar && !hasRightSidebar,
71
+ "has-right-sidebar-only": !hasLeftSidebar && hasRightSidebar,
72
+ "has-gap": withGap
73
+ }), isFullpage = variant === "fullpage";
74
+ return /* @__PURE__ */ jsx(PageLayoutContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs("div", { className: clsx("pagelayout", `pagelayout-${variant}`, scrollMode && `pagelayout-scroll-${scrollMode}`, className), ...props, children: [
75
+ headerChildren,
76
+ headerChildren.length > 0 && /* @__PURE__ */ jsx("div", { className: "pagelayout-headerspacer" }),
77
+ !isFullpage && breadcrumb,
78
+ /* @__PURE__ */ jsxs("div", { className: mainAreaClasses, children: [
79
+ isFullpage && breadcrumb,
80
+ mainChildren
81
+ ] }),
82
+ overlay
83
+ ] }) });
84
+ }, PageLayout = Object.assign(Root, {
85
+ Header: PageLayoutHeader,
86
+ Breadcrumb: PageLayoutBreadcrumb,
87
+ SidebarLeft: PageLayoutSidebarLeft,
88
+ Content: PageLayoutContent,
89
+ SidebarRight: PageLayoutSidebarRight,
90
+ Overlay: PageLayoutOverlay
91
+ });
92
+ export {
93
+ PageLayout as default
94
+ };
@@ -0,0 +1,14 @@
1
+ export type PageLayoutVariant = 'centered' | 'fullpage';
2
+ export type PageLayoutScrollMode = 'columns' | 'page';
3
+ export interface NoPaddingConfig {
4
+ sidebarLeft?: boolean;
5
+ content?: boolean;
6
+ sidebarRight?: boolean;
7
+ }
8
+ export interface PageLayoutContextValue {
9
+ variant: PageLayoutVariant;
10
+ scrollMode?: PageLayoutScrollMode;
11
+ noPadding?: NoPaddingConfig;
12
+ }
13
+ export declare const PageLayoutContext: import('react').Context<PageLayoutContextValue>;
14
+ export declare const usePageLayout: () => PageLayoutContextValue;
@@ -0,0 +1,8 @@
1
+ import { createContext, useContext } from "react";
2
+ const PageLayoutContext = /* @__PURE__ */ createContext({
3
+ variant: "centered"
4
+ }), usePageLayout = () => useContext(PageLayoutContext);
5
+ export {
6
+ PageLayoutContext,
7
+ usePageLayout
8
+ };
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface PageLayoutBreadcrumbProps extends ComponentPropsWithoutRef<'div'> {
3
+ children: ReactNode;
4
+ }
5
+ declare const PageLayoutBreadcrumb: {
6
+ ({ children, className, ...props }: PageLayoutBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export default PageLayoutBreadcrumb;
@@ -0,0 +1,10 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ const PageLayoutBreadcrumb = ({
4
+ children,
5
+ className,
6
+ ...props
7
+ }) => /* @__PURE__ */ jsx("div", { className: clsx("pagelayout-breadcrumb", className), ...props, children });
8
+ export {
9
+ PageLayoutBreadcrumb as default
10
+ };
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface PageLayoutContentProps extends ComponentPropsWithoutRef<'main'> {
3
+ children: ReactNode;
4
+ }
5
+ declare const PageLayoutContent: {
6
+ ({ children, className, ...props }: PageLayoutContentProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export default PageLayoutContent;
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { usePageLayout } from "../PageLayoutContext.js";
4
+ const PageLayoutContent = ({
5
+ children,
6
+ className,
7
+ ...props
8
+ }) => {
9
+ const {
10
+ noPadding
11
+ } = usePageLayout();
12
+ return /* @__PURE__ */ jsx("main", { className: clsx("pagelayout-content", {
13
+ "pagelayout-content--no-padding": noPadding == null ? void 0 : noPadding.content
14
+ }, className), ...props, children });
15
+ };
16
+ export {
17
+ PageLayoutContent as default
18
+ };
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface PageLayoutHeaderProps extends ComponentPropsWithoutRef<'header'> {
3
+ children?: ReactNode;
4
+ }
5
+ declare const PageLayoutHeader: {
6
+ ({ children, className, ...props }: PageLayoutHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export default PageLayoutHeader;
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import Header from "../../../modules/homepage/components/Header/Header.js";
4
+ import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
5
+ const PageLayoutHeader = ({
6
+ children,
7
+ className,
8
+ ...props
9
+ }) => {
10
+ const {
11
+ theme
12
+ } = useEdificeTheme();
13
+ return /* @__PURE__ */ jsx("header", { className: clsx("pagelayout-header", className), ...props, children: children ?? /* @__PURE__ */ jsx(Header, { src: theme == null ? void 0 : theme.basePath }) });
14
+ };
15
+ export {
16
+ PageLayoutHeader as default
17
+ };
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface PageLayoutOverlayProps extends ComponentPropsWithoutRef<'aside'> {
3
+ children: ReactNode;
4
+ /** Whether the overlay panel is open */
5
+ open: boolean;
6
+ /** Called when the overlay requests to be closed (e.g. clicking the backdrop) */
7
+ onClose?: () => void;
8
+ /** Show a backdrop behind the overlay. Defaults to false. */
9
+ backdrop?: boolean;
10
+ }
11
+ declare const PageLayoutOverlay: {
12
+ ({ children, open, onClose, backdrop, className, ...props }: PageLayoutOverlayProps): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ export default PageLayoutOverlay;
@@ -0,0 +1,34 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
3
+ import clsx from "clsx";
4
+ const PageLayoutOverlay = ({
5
+ children,
6
+ open,
7
+ onClose,
8
+ backdrop = !1,
9
+ className,
10
+ ...props
11
+ }) => (useEffect(() => {
12
+ if (!open) return;
13
+ const handleKeyDown = (e) => {
14
+ e.key === "Escape" && (onClose == null || onClose());
15
+ };
16
+ return document.addEventListener("keydown", handleKeyDown), () => document.removeEventListener("keydown", handleKeyDown);
17
+ }, [open, onClose]), /* @__PURE__ */ jsxs(Fragment, { children: [
18
+ open && backdrop && /* @__PURE__ */ jsx("div", { className: "pagelayout-overlaybackdrop", "aria-hidden": "true", onClick: onClose }),
19
+ /* @__PURE__ */ jsx(
20
+ "aside",
21
+ {
22
+ className: clsx("pagelayout-overlay", {
23
+ "pagelayout-overlay-open": open
24
+ }, className),
25
+ "aria-hidden": !open,
26
+ inert: open ? void 0 : "",
27
+ ...props,
28
+ children
29
+ }
30
+ )
31
+ ] }));
32
+ export {
33
+ PageLayoutOverlay as default
34
+ };
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface PageLayoutSidebarLeftProps extends ComponentPropsWithoutRef<'aside'> {
3
+ children: ReactNode;
4
+ }
5
+ declare const PageLayoutSidebarLeft: {
6
+ ({ children, className, ...props }: PageLayoutSidebarLeftProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export default PageLayoutSidebarLeft;
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { usePageLayout } from "../PageLayoutContext.js";
4
+ const PageLayoutSidebarLeft = ({
5
+ children,
6
+ className,
7
+ ...props
8
+ }) => {
9
+ const {
10
+ noPadding
11
+ } = usePageLayout();
12
+ return /* @__PURE__ */ jsx("aside", { className: clsx("pagelayout-sidebarleft", {
13
+ "pagelayout-sidebarleft--no-padding": noPadding == null ? void 0 : noPadding.sidebarLeft
14
+ }, className), ...props, children });
15
+ };
16
+ export {
17
+ PageLayoutSidebarLeft as default
18
+ };
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface PageLayoutSidebarRightProps extends ComponentPropsWithoutRef<'aside'> {
3
+ children: ReactNode;
4
+ }
5
+ declare const PageLayoutSidebarRight: {
6
+ ({ children, className, ...props }: PageLayoutSidebarRightProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export default PageLayoutSidebarRight;
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { usePageLayout } from "../PageLayoutContext.js";
4
+ const PageLayoutSidebarRight = ({
5
+ children,
6
+ className,
7
+ ...props
8
+ }) => {
9
+ const {
10
+ noPadding
11
+ } = usePageLayout();
12
+ return /* @__PURE__ */ jsx("aside", { className: clsx("pagelayout-sidebarright", {
13
+ "pagelayout-sidebarright--no-padding": noPadding == null ? void 0 : noPadding.sidebarRight
14
+ }, className), ...props, children: /* @__PURE__ */ jsx("div", { className: "pagelayout-sidebarright-inner", children }) });
15
+ };
16
+ export {
17
+ PageLayoutSidebarRight as default
18
+ };
@@ -0,0 +1,3 @@
1
+ export { default as PageLayout } from './PageLayout';
2
+ export * from './PageLayout';
3
+ export * from './PageLayoutContext';
@@ -3,7 +3,7 @@ const Root = ({
3
3
  children
4
4
  }) => /* @__PURE__ */ jsx("div", { onClick: (e) => {
5
5
  e.stopPropagation();
6
- }, children }), PreventPropagation = /* @__PURE__ */ Object.assign(Root, {});
6
+ }, children }), PreventPropagation = Object.assign(Root, {});
7
7
  export {
8
8
  PreventPropagation as default
9
9
  };
@@ -17,7 +17,7 @@ const Root = ({
17
17
  borderColor,
18
18
  backgroundColor
19
19
  }, children });
20
- }, PromotionCard = /* @__PURE__ */ Object.assign(Root, {
20
+ }, PromotionCard = Object.assign(Root, {
21
21
  Header: PromotionCardHeader,
22
22
  Body: PromotionCardBody,
23
23
  Icon: PromotionCardIcon,
@@ -3,7 +3,7 @@ import { Size } from '../../types';
3
3
  /**
4
4
  * Base props shared by both SearchBar variants
5
5
  */
6
- export interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
6
+ interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
7
7
  /**
8
8
  * String or template literal key for i18next translation
9
9
  */
@@ -67,7 +67,7 @@ type DynamicSearchBar = {
67
67
  /**
68
68
  * Props for the SearchBar component
69
69
  */
70
- export type Props = DefaultSearchBar | DynamicSearchBar;
70
+ type Props = DefaultSearchBar | DynamicSearchBar;
71
71
  export type SearchBarProps = BaseProps & Props;
72
72
  /**
73
73
  * SearchBar component to handle dynamic or static search input
@@ -13,7 +13,7 @@ const Root = /* @__PURE__ */ forwardRef(({
13
13
  overflowY: "auto"
14
14
  } : {}, children: /* @__PURE__ */ jsx("table", { ref, className: "table align-middle mb-0", style: {
15
15
  overflow: maxHeight ? "visible" : "hidden"
16
- }, children }) })), Table = /* @__PURE__ */ Object.assign(Root, {
16
+ }, children }) })), Table = Object.assign(Root, {
17
17
  Thead: TableThead,
18
18
  Th: TableTh,
19
19
  Tbody: TableTbody,