@edifice.io/react 2.6.7-develop-b2school.20260929181638 → 2.6.7-develop-pedago.20260930173910

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 (104) hide show
  1. package/dist/components/Alert/Alert.js +23 -47
  2. package/dist/components/Form/FormText.js +6 -11
  3. package/dist/components/Input/Input.d.ts +2 -11
  4. package/dist/components/Input/Input.js +21 -43
  5. package/dist/components/Label/Label.js +4 -4
  6. package/dist/components/Layout/Layout.js +15 -30
  7. package/dist/components/PageLayout/PageLayout.d.ts +0 -4
  8. package/dist/components/PageLayout/PageLayout.js +14 -37
  9. package/dist/components/PageLayout/components/PageLayoutContent.js +1 -5
  10. package/dist/components/Table/components/Table.d.ts +2 -2
  11. package/dist/components/Table/components/TableTd.d.ts +1 -1
  12. package/dist/components/Table/components/TableTh.d.ts +1 -1
  13. package/dist/components/index.d.ts +0 -2
  14. package/dist/homepage.js +3 -17
  15. package/dist/hooks/index.d.ts +0 -2
  16. package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
  17. package/dist/hooks/useClickOutside/useClickOutside.js +2 -3
  18. package/dist/hooks/useToast/useToast.d.ts +0 -1
  19. package/dist/hooks/useToast/useToast.js +9 -12
  20. package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +2 -16
  21. package/dist/hooks/useZendeskGuide/useZendeskGuide.js +24 -58
  22. package/dist/icons.js +402 -404
  23. package/dist/index.js +160 -168
  24. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +3 -3
  25. package/dist/modules/homepage/components/Communities/Communities.d.ts +2 -1
  26. package/dist/modules/homepage/components/Communities/Communities.js +14 -13
  27. package/dist/modules/homepage/components/Communities/CommunitiesContainer.d.ts +1 -1
  28. package/dist/modules/homepage/components/Communities/CommunitiesContainer.js +9 -5
  29. package/dist/modules/homepage/components/Communities/CommunitiesSkeleton.js +4 -7
  30. package/dist/modules/homepage/components/Communities/useCommunities.d.ts +4 -1
  31. package/dist/modules/homepage/components/Communities/useCommunities.js +8 -3
  32. package/dist/modules/homepage/components/Favorites/Favorites.js +2 -2
  33. package/dist/modules/homepage/components/Header/Header.js +4 -11
  34. package/dist/modules/homepage/components/HomeCard/HomeCard.d.ts +1 -1
  35. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -15
  36. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +2 -3
  37. package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +26 -36
  38. package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +1 -1
  39. package/dist/modules/homepage/components/Notifications/services/queries/notification.js +2 -9
  40. package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +1 -3
  41. package/dist/modules/homepage/components/UserSpace/UserSpace.js +7 -13
  42. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +2 -4
  43. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +2 -3
  44. package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.js +8 -18
  45. package/dist/modules/homepage/components/index.d.ts +1 -3
  46. package/dist/modules/icons/components/index.d.ts +0 -1
  47. package/dist/modules/widgets/index.d.ts +1 -1
  48. package/package.json +6 -6
  49. package/dist/components/LinkPill/LinkPill.d.ts +0 -41
  50. package/dist/components/LinkPill/LinkPill.js +0 -28
  51. package/dist/components/LinkPill/index.d.ts +0 -2
  52. package/dist/components/ModalBeta/ModalBeta.d.ts +0 -47
  53. package/dist/components/ModalBeta/ModalBeta.js +0 -62
  54. package/dist/components/ModalBeta/ModalBetaBody.d.ts +0 -19
  55. package/dist/components/ModalBeta/ModalBetaBody.js +0 -15
  56. package/dist/components/ModalBeta/ModalBetaContext.d.ts +0 -7
  57. package/dist/components/ModalBeta/ModalBetaContext.js +0 -15
  58. package/dist/components/ModalBeta/ModalBetaFooter.d.ts +0 -13
  59. package/dist/components/ModalBeta/ModalBetaFooter.js +0 -7
  60. package/dist/components/ModalBeta/ModalBetaHeader.d.ts +0 -23
  61. package/dist/components/ModalBeta/ModalBetaHeader.js +0 -31
  62. package/dist/components/ModalBeta/index.d.ts +0 -2
  63. package/dist/components/PageLayout/components/PageLayoutHelpZone.d.ts +0 -12
  64. package/dist/components/PageLayout/components/PageLayoutHelpZone.js +0 -6
  65. package/dist/hooks/useBackground/index.d.ts +0 -1
  66. package/dist/hooks/useBackground/useBackground.d.ts +0 -7
  67. package/dist/hooks/useBackground/useBackground.js +0 -16
  68. package/dist/hooks/useUserPreferences/index.d.ts +0 -1
  69. package/dist/hooks/useUserPreferences/useUserPreferences.d.ts +0 -9
  70. package/dist/hooks/useUserPreferences/useUserPreferences.js +0 -40
  71. package/dist/modules/HelpZone/HelpZone.d.ts +0 -13
  72. package/dist/modules/HelpZone/HelpZone.js +0 -52
  73. package/dist/modules/HelpZone/HelpZoneContainer.d.ts +0 -4
  74. package/dist/modules/HelpZone/HelpZoneContainer.js +0 -18
  75. package/dist/modules/HelpZone/index.d.ts +0 -3
  76. package/dist/modules/homepage/components/UsefulLinks/LinkForm.d.ts +0 -13
  77. package/dist/modules/homepage/components/UsefulLinks/LinkForm.js +0 -67
  78. package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.d.ts +0 -6
  79. package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +0 -31
  80. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.d.ts +0 -1
  81. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.js +0 -40
  82. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.d.ts +0 -11
  83. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +0 -65
  84. package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.d.ts +0 -19
  85. package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.js +0 -26
  86. package/dist/modules/homepage/components/UsefulLinks/index.d.ts +0 -5
  87. package/dist/modules/homepage/components/UsefulLinks/services/api/index.d.ts +0 -6
  88. package/dist/modules/homepage/components/UsefulLinks/services/api/index.js +0 -5
  89. package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.d.ts +0 -31
  90. package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.js +0 -50
  91. package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.d.ts +0 -20
  92. package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.js +0 -65
  93. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +0 -16
  94. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +0 -15
  95. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +0 -21
  96. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +0 -47
  97. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +0 -2
  98. package/dist/modules/icons/components/IconAddWidget.d.ts +0 -7
  99. package/dist/modules/icons/components/IconAddWidget.js +0 -12
  100. package/dist/modules/icons/components/logo/IconLogoEdificeFull.d.ts +0 -7
  101. package/dist/modules/icons/components/logo/IconLogoEdificeFull.js +0 -26
  102. package/dist/modules/icons/components/logo/IconLogoEdificeSmall.d.ts +0 -7
  103. package/dist/modules/icons/components/logo/IconLogoEdificeSmall.js +0 -17
  104. package/dist/modules/icons/components/logo/index.d.ts +0 -2
@@ -1,14 +1,13 @@
1
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useState, useRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect } from "react";
2
+ import { forwardRef, useState, useRef, useCallback, useImperativeHandle, useLayoutEffect, useEffect } from "react";
3
3
  import clsx from "clsx";
4
4
  import { useTranslation } from "react-i18next";
5
- import SvgIconAlertTriangle from "../../modules/icons/components/IconAlertTriangle.js";
6
- import SvgIconClose from "../../modules/icons/components/IconClose.js";
5
+ import SvgIconAlertCircle from "../../modules/icons/components/IconAlertCircle.js";
7
6
  import SvgIconError from "../../modules/icons/components/IconError.js";
8
7
  import SvgIconInfoCircle from "../../modules/icons/components/IconInfoCircle.js";
9
8
  import SvgIconSuccessOutline from "../../modules/icons/components/IconSuccessOutline.js";
10
- import ButtonBeta from "../ButtonBeta/ButtonBeta.js";
11
- const TOAST_EXIT_ANIMATION_DURATION = 240, getToastAnimationClass = (position, isClosing) => position === "top-left" || position === "bottom-left" ? isClosing ? "alert-slide-out-left" : "alert-slide-in-left" : position === "top-right" || position === "bottom-right" ? isClosing ? "alert-slide-out-right" : "alert-slide-in-right" : isClosing ? "alert-fade-out" : "alert-fade-in", Alert = /* @__PURE__ */ forwardRef(({
9
+ import Button from "../Button/Button.js";
10
+ const Alert = /* @__PURE__ */ forwardRef(({
12
11
  type = "success",
13
12
  className = "",
14
13
  children,
@@ -22,53 +21,31 @@ const TOAST_EXIT_ANIMATION_DURATION = 240, getToastAnimationClass = (position, i
22
21
  onClose,
23
22
  onVisibilityChange
24
23
  }, ref) => {
25
- const [isVisible, setVisibleStatus] = useState(!0), [isClosing, setIsClosing] = useState(!1), refAlert = useRef(null), {
24
+ const [isVisible, setVisibleStatus] = useState(!0), refAlert = useRef(null), {
26
25
  t
27
26
  } = useTranslation(), hide = useCallback(() => {
28
- if (isToast) {
29
- setIsClosing(!0);
30
- return;
31
- }
32
27
  setVisibleStatus(!1), onClose == null || onClose();
33
- }, [isToast, onClose]);
34
- useEffect(() => {
35
- if (!isClosing)
36
- return;
37
- const timeoutId = setTimeout(() => {
38
- setVisibleStatus(!1), onClose == null || onClose();
39
- }, TOAST_EXIT_ANIMATION_DURATION);
40
- return () => clearTimeout(timeoutId);
41
- }, [isClosing, onClose]);
42
- const handleToastClick = () => {
43
- isToast && !isConfirm && hide();
44
- };
28
+ }, [onClose]);
45
29
  useImperativeHandle(ref, () => ({
46
30
  show,
47
31
  hide,
48
32
  ...refAlert.current
49
33
  })), useLayoutEffect(() => {
50
34
  onVisibilityChange == null || onVisibilityChange(isVisible);
51
- }, [isVisible, onVisibilityChange]);
52
- const shouldAutoClose = autoClose && isVisible && !isClosing, showProgress = autoClose && isToast && !isDismissible && !isClosing, remainingRef = useRef(autoCloseDelay), timeoutRef = useRef(), startedAtRef = useRef(0), [isPaused, setIsPaused] = useState(!1), clearAutoCloseTimeout = useCallback(() => {
53
- timeoutRef.current && (clearTimeout(timeoutRef.current), timeoutRef.current = void 0);
54
- }, []);
55
- useEffect(() => {
56
- if (shouldAutoClose)
57
- return remainingRef.current = autoCloseDelay, startedAtRef.current = Date.now(), timeoutRef.current = setTimeout(hide, autoCloseDelay), clearAutoCloseTimeout;
58
- }, [shouldAutoClose, autoCloseDelay, hide, clearAutoCloseTimeout]);
59
- const handleMouseEnter = () => {
60
- !shouldAutoClose || isPaused || (clearAutoCloseTimeout(), remainingRef.current = Math.max(remainingRef.current - (Date.now() - startedAtRef.current), 0), setIsPaused(!0));
61
- }, handleMouseLeave = () => {
62
- !shouldAutoClose || !isPaused || (startedAtRef.current = Date.now(), timeoutRef.current = setTimeout(hide, remainingRef.current), setIsPaused(!1));
63
- }, show = () => {
64
- setIsClosing(!1), setVisibleStatus(!0);
35
+ }, [isVisible, onVisibilityChange]), useEffect(() => {
36
+ autoClose && isVisible && setTimeout(() => {
37
+ hide();
38
+ }, autoCloseDelay);
39
+ }, [autoClose, autoCloseDelay, hide, isVisible]);
40
+ const show = () => {
41
+ setVisibleStatus(!0);
65
42
  }, mapping = {
66
43
  success: {
67
44
  icon: /* @__PURE__ */ jsx(SvgIconSuccessOutline, {}),
68
45
  classModifier: "alert-success"
69
46
  },
70
47
  warning: {
71
- icon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}),
48
+ icon: /* @__PURE__ */ jsx(SvgIconAlertCircle, {}),
72
49
  classModifier: "alert-warning"
73
50
  },
74
51
  info: {
@@ -81,22 +58,21 @@ const TOAST_EXIT_ANIMATION_DURATION = 240, getToastAnimationClass = (position, i
81
58
  }
82
59
  }, toastClasses = {
83
60
  "is-dismissible": isDismissible,
84
- "is-toast": isToast
61
+ "is-toast ": isToast
85
62
  }, confirmClasses = {
86
63
  "is-confirm": isConfirm
87
- }, divContainerClasses = clsx("alert gap-12", mapping[type].classModifier, toastClasses, confirmClasses, position, isToast && getToastAnimationClass(position, isClosing), className);
88
- return /* @__PURE__ */ jsx(Fragment, { children: isVisible ? /* @__PURE__ */ jsxs("div", { ref: refAlert, className: divContainerClasses, role: "alert", onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: handleToastClick, children: [
64
+ }, divContainerClasses = clsx("alert gap-12", mapping[type].classModifier, toastClasses, confirmClasses, position, className);
65
+ return /* @__PURE__ */ jsx(Fragment, { children: isVisible ? /* @__PURE__ */ jsxs("div", { ref: refAlert, className: divContainerClasses, role: "alert", children: [
89
66
  !isConfirm && mapping[type].icon,
90
67
  /* @__PURE__ */ jsx("div", { className: "alert-content small flex-grow-1", children }),
91
- button && /* @__PURE__ */ jsxs("div", { className: "alert-actions", onClick: (e) => e.stopPropagation(), children: [
68
+ button && /* @__PURE__ */ jsxs("div", { className: "ms-12", children: [
92
69
  button,
93
- isConfirm && /* @__PURE__ */ jsx(ButtonBeta, { onClick: hide, children: t("close") })
70
+ " ",
71
+ isConfirm && /* @__PURE__ */ jsx(Button, { onClick: hide, children: t("close") })
94
72
  ] }),
95
- (isDismissible || isConfirm) && /* @__PURE__ */ jsx("div", { className: "btn-close-container", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(ButtonBeta, { type: "button", leftIcon: /* @__PURE__ */ jsx(SvgIconClose, {}), variant: "ghost", color: "tertiary", "aria-label": t("close"), title: t("close"), onClick: hide }) }),
96
- showProgress && /* @__PURE__ */ jsx("div", { className: clsx("alert-progress", {
97
- "is-paused": isPaused
98
- }), style: {
99
- "--alert-progress-duration": `${autoCloseDelay}ms`
73
+ (isDismissible || isConfirm) && /* @__PURE__ */ jsx("div", { className: "btn-close-container", children: /* @__PURE__ */ jsx("button", { type: "button", className: "btn-close", "data-bs-dismiss": "alert", "aria-label": t("close"), onClick: hide }) }),
74
+ autoClose && /* @__PURE__ */ jsx("div", { className: "alert-progress", style: {
75
+ transform: "scaleX(0)"
100
76
  } })
101
77
  ] }) : null });
102
78
  });
@@ -1,21 +1,16 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import SvgIconError from "../../modules/icons/components/IconError.js";
4
- import SvgIconSuccessOutline from "../../modules/icons/components/IconSuccessOutline.js";
5
3
  import { useFormControl } from "./FormContext.js";
6
4
  const FormText = ({
7
5
  children
8
6
  }) => {
9
7
  const {
10
8
  status
11
- } = useFormControl(), classes = clsx("input-message", {
12
- "input-message--invalid": status === "invalid",
13
- "input-message--valid": status === "valid"
14
- }), Icon = status === "invalid" ? SvgIconError : status === "valid" ? SvgIconSuccessOutline : null;
15
- return /* @__PURE__ */ jsxs("p", { className: classes, children: [
16
- Icon && /* @__PURE__ */ jsx(Icon, { className: "input-message__icon", "aria-hidden": "true" }),
17
- children
18
- ] });
9
+ } = useFormControl(), classes = clsx("form-text", {
10
+ "is-invalid": status === "invalid",
11
+ valid: status === "valid"
12
+ });
13
+ return /* @__PURE__ */ jsx("p", { className: classes, children: /* @__PURE__ */ jsx("em", { children }) });
19
14
  };
20
15
  export {
21
16
  FormText as default
@@ -2,8 +2,7 @@ import { Size } from '../../types';
2
2
  export type OmitInputProps = 'disabled' | 'required' | 'size' | 'id' | 'readOnly';
3
3
  export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, OmitInputProps> {
4
4
  /**
5
- * Control size of input. `sm` and `md` share the same visual size
6
- * ("Medium" in the design system); only `lg` ("Big") differs.
5
+ * Control size of input
7
6
  */
8
7
  size: Size;
9
8
  /**
@@ -19,8 +18,7 @@ export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, O
19
18
  */
20
19
  disabled?: boolean;
21
20
  /**
22
- * @deprecated Validation icons no longer render inside the field —
23
- * this prop has no effect and will be removed in a future major version.
21
+ * Remove validation icon
24
22
  */
25
23
  noValidationIcon?: boolean;
26
24
  /**
@@ -35,13 +33,6 @@ export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, O
35
33
  * Browser autocomplete feature
36
34
  */
37
35
  autoComplete?: string;
38
- /**
39
- * Show a built-in clear (×) button while the field is focused. Opt-in:
40
- * several consumers render their own clear affordance already (e.g.
41
- * `SearchBar`), and a broad audit of every `Input` usage hasn't been done
42
- * yet — see INPUT-MIGRATION-PLAN.md §07.
43
- */
44
- clearable?: boolean;
45
36
  }
46
37
  /**
47
38
  * Input Form Component
@@ -1,62 +1,40 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef, useRef, useState, useLayoutEffect } from "react";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useState } from "react";
3
3
  import clsx from "clsx";
4
- import { useTranslation } from "react-i18next";
5
- import SvgIconClose from "../../modules/icons/components/IconClose.js";
6
4
  import { useFormControl } from "../Form/FormContext.js";
5
+ import Textcounter from "../TextCounter/TextCounter.js";
7
6
  const Input = /* @__PURE__ */ forwardRef(({
7
+ noValidationIcon,
8
8
  placeholder,
9
9
  size = "md",
10
10
  type = "text",
11
11
  className,
12
12
  showCounter = !1,
13
13
  autoComplete = "off",
14
- clearable = !1,
15
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
- noValidationIcon,
17
14
  ...restProps
18
- }, forwardedRef) => {
15
+ }, ref) => {
19
16
  var _a;
20
17
  const {
21
18
  id,
22
19
  isRequired,
23
20
  isReadOnly,
24
21
  status
25
- } = useFormControl(), {
26
- t
27
- } = useTranslation(), inputRef = useRef(null), [currentLength, setCurrentLength] = useState(((_a = restProps.defaultValue) == null ? void 0 : _a.toString().length) || 0);
28
- useLayoutEffect(() => {
29
- inputRef.current && setCurrentLength(inputRef.current.value.length);
30
- }, []);
31
- const setRefs = (node) => {
32
- inputRef.current = node, typeof forwardedRef == "function" ? forwardedRef(node) : forwardedRef && (forwardedRef.current = node);
33
- }, wrapperClasses = clsx("input", {
34
- "input--lg": size === "lg",
35
- "input--invalid": status === "invalid",
36
- "input--valid": status === "valid",
37
- "input--plaintext": isReadOnly
38
- }, className), handleChange = (e) => {
39
- var _a2;
40
- setCurrentLength(e.target.value.length), (_a2 = restProps.onChange) == null || _a2.call(restProps, e);
41
- }, handleClear = () => {
42
- var _a2;
43
- const node = inputRef.current;
44
- if (!node) return;
45
- const nativeSetter = (_a2 = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")) == null ? void 0 : _a2.set;
46
- nativeSetter == null || nativeSetter.call(node, ""), node.dispatchEvent(new Event("input", {
47
- bubbles: !0
48
- })), node.focus();
49
- }, maxLength = restProps.maxLength ?? 0;
50
- return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, children: [
51
- /* @__PURE__ */ jsx("input", { ref: setRefs, id, className: "input__field", type, placeholder, required: isRequired, readOnly: isReadOnly, ...restProps, onChange: handleChange, autoComplete }),
52
- clearable && !isReadOnly && /* @__PURE__ */ jsx("button", { type: "button", className: "input__clear", onClick: handleClear, "aria-label": t("clear"), children: /* @__PURE__ */ jsx(SvgIconClose, {}) }),
53
- showCounter && /* @__PURE__ */ jsxs("span", { className: clsx("input__counter", {
54
- "input__counter--max": currentLength === maxLength
55
- }), children: [
56
- currentLength,
57
- " / ",
58
- maxLength
59
- ] })
22
+ } = useFormControl(), [currentLength, setCurrentLength] = useState(((_a = restProps.defaultValue) == null ? void 0 : _a.toString().length) || 0), classes = clsx({
23
+ "form-control": !isReadOnly,
24
+ "form-control-lg": size === "lg",
25
+ "form-control-sm": size === "sm",
26
+ "is-invalid": status === "invalid",
27
+ "is-valid": status === "valid",
28
+ "form-control-plaintext": isReadOnly,
29
+ "no-validation-icon": noValidationIcon,
30
+ "pe-64": showCounter && !status
31
+ }, className);
32
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
33
+ /* @__PURE__ */ jsx("input", { ref, id, className: classes, type, placeholder, required: isRequired, readOnly: isReadOnly, ...restProps, onChange: (e) => {
34
+ var _a2;
35
+ setCurrentLength(e.target.value.length), (_a2 = restProps.onChange) == null || _a2.call(restProps, e);
36
+ }, autoComplete }),
37
+ showCounter && !status && /* @__PURE__ */ jsx(Textcounter, { currentLength, maxLength: restProps.maxLength ?? 0 })
60
38
  ] });
61
39
  });
62
40
  export {
@@ -16,8 +16,8 @@ const Label = /* @__PURE__ */ forwardRef(({
16
16
  isRequired
17
17
  } = useFormControl(), {
18
18
  t
19
- } = useTranslation(), classes = clsx("input-label", {
20
- "input-label--has-icon": leftIcon
19
+ } = useTranslation(), classes = clsx("form-label", {
20
+ "has-icon": leftIcon
21
21
  }, className), optionalState = isOptional && !isRequired, requiredState = isRequired && !isOptional;
22
22
  return useEffect(() => {
23
23
  if (isOptional && isRequired)
@@ -25,11 +25,11 @@ const Label = /* @__PURE__ */ forwardRef(({
25
25
  }, [isOptional, isRequired]), /* @__PURE__ */ jsxs("label", { ref, htmlFor: id, className: classes, children: [
26
26
  leftIcon,
27
27
  children,
28
- optionalState && /* @__PURE__ */ jsxs("em", { className: "input-label__optional", children: [
28
+ optionalState && /* @__PURE__ */ jsxs("em", { className: "optional", children: [
29
29
  "- ",
30
30
  optionalText ?? t("explorer.optional")
31
31
  ] }),
32
- requiredState && /* @__PURE__ */ jsx("em", { className: "input-label__required", children: requiredText })
32
+ requiredState && /* @__PURE__ */ jsx("em", { className: "required", children: requiredText })
33
33
  ] });
34
34
  });
35
35
  export {
@@ -1,68 +1,53 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Suspense, lazy } from "react";
3
3
  import clsx from "clsx";
4
+ import { Toaster } from "react-hot-toast";
4
5
  import { useTranslation } from "react-i18next";
5
6
  import { useEdificeTheme } from "../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
6
- import { useOverlay } from "../PageLayout/hook/useOverlay.js";
7
7
  import Header from "./components/Header.js";
8
8
  import HeaderNotificationsOverlay from "./components/HeaderNotificationsOverlay.js";
9
+ import { useOverlay } from "../PageLayout/hook/useOverlay.js";
9
10
  import useUiOverride from "../../hooks/useUiOverride/useUiOverride.js";
10
- import useBackground from "../../hooks/useBackground/useBackground.js";
11
- import useToast from "../../hooks/useToast/useToast.js";
12
11
  import useCookiesConsent from "../../hooks/useCookiesConsent/useCookiesConsent.js";
13
12
  import useZendeskGuide from "../../hooks/useZendeskGuide/useZendeskGuide.js";
14
13
  import useCantoo from "../../hooks/useCantoo/useCantoo.js";
15
14
  import Alert from "../Alert/Alert.js";
16
- import ButtonBeta from "../ButtonBeta/ButtonBeta.js";
17
- import HelpZone from "../../modules/HelpZone/HelpZone.js";
18
- const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/components/Header/Header.js"));
19
- function getHeaderColor() {
20
- return getComputedStyle(document.documentElement).getPropertyValue("--primitive-blue-400").trim();
21
- }
22
- const Layout = ({
15
+ import Button from "../Button/Button.js";
16
+ const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/components/Header/Header.js")), Layout = ({
23
17
  children,
24
18
  headless = !1,
25
19
  whiteBg = !0,
26
20
  className,
27
21
  ...restProps
28
22
  }) => {
29
- var _a;
30
23
  const {
31
24
  theme
32
- } = useEdificeTheme(), override = useUiOverride("layout.header"), isHeaderV2 = (override == null ? void 0 : override.variant) === "v2", isEdificeInProductHelp = ((_a = useUiOverride("layout.helpzone")) == null ? void 0 : _a.variant) === "edifice-in-product", {
33
- productOverride,
34
- background,
35
- isBackgroundImageOverridden
36
- } = useBackground(), {
25
+ } = useEdificeTheme(), override = useUiOverride("layout.header"), isHeaderV2 = (override == null ? void 0 : override.variant) === "v2", backgroundOverride = useUiOverride("layout.background"), hasBackgroundImage = (backgroundOverride == null ? void 0 : backgroundOverride.variant) === "image", {
37
26
  toggleOverlay
38
- } = useOverlay(), toast = useToast(), {
27
+ } = useOverlay(), {
39
28
  t
40
29
  } = useTranslation(), {
41
30
  showCookiesConsent,
42
31
  handleConsultCookies,
43
32
  handleCloseCookiesConsent
44
- } = useCookiesConsent(), {
45
- isReady: isHelpZoneReady,
46
- isOpen: isHelpZoneOpen,
47
- open: openHelpZone,
48
- close: closeHelpZone
49
- } = useZendeskGuide(isEdificeInProductHelp ? getHeaderColor() : void 0);
50
- useCantoo();
33
+ } = useCookiesConsent();
34
+ useZendeskGuide(), useCantoo();
51
35
  const classes = clsx("d-flex flex-column", {
52
36
  "bg-white": whiteBg,
53
37
  "container-fluid": !headless,
54
38
  "rounded-4 border": (theme == null ? void 0 : theme.is1d) && !headless,
55
39
  "mt-24": (theme == null ? void 0 : theme.is1d) && !headless
56
- }, className), renderHeader = headless ? null : isHeaderV2 ? /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(HeaderV2, { src: theme == null ? void 0 : theme.basePath, dataProduct: override == null ? void 0 : override.theme, onNotificationsClick: toggleOverlay }) }) : /* @__PURE__ */ jsx(Header, { is1d: theme == null ? void 0 : theme.is1d, src: theme == null ? void 0 : theme.basePath }), renderNotificationsOverlay = !headless && isHeaderV2 && /* @__PURE__ */ jsx(HeaderNotificationsOverlay, {}), renderCookies = showCookiesConsent && /* @__PURE__ */ jsx(Alert, { type: "info", className: "m-12 rgpd", isConfirm: !0, position: "bottom-right", button: /* @__PURE__ */ jsx(ButtonBeta, { variant: "outline", onClick: handleConsultCookies, children: t("rgpd.cookies.banner.button.consult") }), onClose: handleCloseCookiesConsent, children: t("rgpd.cookies.banner.text1") }), renderToaster = toast.renderToaster();
57
- return /* @__PURE__ */ jsxs("div", { "data-product": productOverride, "data-background": theme != null && theme.is1d ? void 0 : background, className: clsx("layout", {
58
- "layout-has-background-image": isBackgroundImageOverridden
59
- }), children: [
40
+ }, className), renderHeader = headless ? null : isHeaderV2 ? /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(HeaderV2, { src: theme == null ? void 0 : theme.basePath, dataProduct: override == null ? void 0 : override.theme, onNotificationsClick: toggleOverlay }) }) : /* @__PURE__ */ jsx(Header, { is1d: theme == null ? void 0 : theme.is1d, src: theme == null ? void 0 : theme.basePath }), renderNotificationsOverlay = !headless && isHeaderV2 && /* @__PURE__ */ jsx(HeaderNotificationsOverlay, {}), renderCookies = showCookiesConsent && /* @__PURE__ */ jsx(Alert, { type: "info", className: "m-12 rgpd", isConfirm: !0, position: "bottom-right", button: /* @__PURE__ */ jsx(Button, { color: "tertiary", variant: "ghost", onClick: handleConsultCookies, children: t("rgpd.cookies.banner.button.consult") }), onClose: handleCloseCookiesConsent, children: t("rgpd.cookies.banner.text1") }), renderToaster = /* @__PURE__ */ jsx(Toaster, { containerClassName: "toaster-container", toastOptions: {
41
+ position: "top-right"
42
+ } });
43
+ return /* @__PURE__ */ jsxs("div", { className: clsx("layout", {
44
+ "layout-has-background-image": hasBackgroundImage
45
+ }), "data-product": hasBackgroundImage ? backgroundOverride == null ? void 0 : backgroundOverride.theme : void 0, children: [
60
46
  renderHeader,
61
47
  renderNotificationsOverlay,
62
48
  /* @__PURE__ */ jsx("main", { className: classes, ...restProps, children }),
63
49
  renderToaster,
64
- renderCookies,
65
- isEdificeInProductHelp && /* @__PURE__ */ jsx(HelpZone, { isReady: isHelpZoneReady, isOpen: isHelpZoneOpen, onOpen: openHelpZone, onClose: closeHelpZone })
50
+ renderCookies
66
51
  ] });
67
52
  };
68
53
  export {
@@ -41,9 +41,5 @@ declare const PageLayout: {
41
41
  ({ children, onClose, closeButton, backdrop, className, ...props }: import('./components/PageLayoutOverlay').PageLayoutOverlayProps): import("react/jsx-runtime").JSX.Element;
42
42
  displayName: string;
43
43
  };
44
- HelpZone: {
45
- (): import("react/jsx-runtime").JSX.Element;
46
- displayName: string;
47
- };
48
44
  };
49
45
  export default PageLayout;
@@ -1,21 +1,15 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, Children, isValidElement } from "react";
3
3
  import clsx from "clsx";
4
- import { useTranslation } from "react-i18next";
5
4
  import PageLayoutBreadcrumb from "./components/PageLayoutBreadcrumb.js";
6
5
  import PageLayoutContent from "./components/PageLayoutContent.js";
7
6
  import PageLayoutHeader from "./components/PageLayoutHeader.js";
8
- import PageLayoutHelpZone from "./components/PageLayoutHelpZone.js";
9
7
  import PageLayoutOverlay from "./components/PageLayoutOverlay.js";
10
8
  import PageLayoutSidebarLeft from "./components/PageLayoutSidebarLeft.js";
11
9
  import PageLayoutSidebarRight from "./components/PageLayoutSidebarRight.js";
12
10
  import { PageLayoutContext } from "./PageLayoutContext.js";
13
- import useCookiesConsent from "../../hooks/useCookiesConsent/useCookiesConsent.js";
14
- import useToast from "../../hooks/useToast/useToast.js";
15
- import Alert from "../Alert/Alert.js";
16
- import ButtonBeta from "../ButtonBeta/ButtonBeta.js";
17
11
  function analyzeChildren(children) {
18
- let hasLeftSidebar = !1, hasRightSidebar = !1, breadcrumb = null, overlay = null, helpZone = null;
12
+ let hasLeftSidebar = !1, hasRightSidebar = !1, breadcrumb = null, overlay = null;
19
13
  const headerChildren = [], mainChildren = [];
20
14
  return Children.toArray(children).forEach((child) => {
21
15
  if (/* @__PURE__ */ isValidElement(child))
@@ -29,9 +23,6 @@ function analyzeChildren(children) {
29
23
  case PageLayoutOverlay:
30
24
  overlay = child;
31
25
  break;
32
- case PageLayoutHelpZone:
33
- helpZone = child;
34
- break;
35
26
  case PageLayoutSidebarLeft:
36
27
  hasLeftSidebar = !0, mainChildren.push(child);
37
28
  break;
@@ -50,7 +41,6 @@ function analyzeChildren(children) {
50
41
  hasRightSidebar,
51
42
  breadcrumb,
52
43
  overlay,
53
- helpZone,
54
44
  headerChildren,
55
45
  mainChildren
56
46
  };
@@ -64,22 +54,15 @@ const Root = ({
64
54
  className,
65
55
  ...props
66
56
  }) => {
67
- const {
68
- t
69
- } = useTranslation(), {
70
- showCookiesConsent,
71
- handleConsultCookies,
72
- handleCloseCookiesConsent
73
- } = useCookiesConsent(), contextValue = useMemo(() => ({
57
+ const contextValue = useMemo(() => ({
74
58
  variant,
75
59
  scrollMode,
76
60
  noPadding
77
- }), [variant, scrollMode, noPadding]), renderToaster = useToast().renderToaster(), {
61
+ }), [variant, scrollMode, noPadding]), {
78
62
  hasLeftSidebar,
79
63
  hasRightSidebar,
80
64
  breadcrumb,
81
65
  overlay,
82
- helpZone,
83
66
  headerChildren,
84
67
  mainChildren
85
68
  } = analyzeChildren(children), mainAreaClasses = clsx("pagelayout-mainarea", {
@@ -88,29 +71,23 @@ const Root = ({
88
71
  "has-right-sidebar-only": !hasLeftSidebar && hasRightSidebar,
89
72
  "has-gap": withGap
90
73
  }), isFullpage = variant === "fullpage";
91
- return /* @__PURE__ */ jsxs(PageLayoutContext.Provider, { value: contextValue, children: [
92
- /* @__PURE__ */ jsxs("div", { className: clsx("pagelayout", `pagelayout-${variant}`, scrollMode && `pagelayout-scroll-${scrollMode}`, className), ...props, children: [
93
- headerChildren,
94
- headerChildren.length > 0 && /* @__PURE__ */ jsx("div", { className: "pagelayout-headerspacer" }),
95
- !isFullpage && breadcrumb,
96
- /* @__PURE__ */ jsxs("div", { className: mainAreaClasses, children: [
97
- isFullpage && breadcrumb,
98
- mainChildren
99
- ] }),
100
- overlay,
101
- showCookiesConsent && /* @__PURE__ */ jsx(Alert, { type: "info", isConfirm: !0, position: "bottom-right", button: /* @__PURE__ */ jsx(ButtonBeta, { variant: "outline", onClick: handleConsultCookies, children: t("rgpd.cookies.banner.button.consult") }), onClose: handleCloseCookiesConsent, children: t("rgpd.cookies.banner.text1") })
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
102
81
  ] }),
103
- helpZone,
104
- renderToaster
105
- ] });
82
+ overlay
83
+ ] }) });
106
84
  }, PageLayout = Object.assign(Root, {
107
85
  Header: PageLayoutHeader,
108
86
  Breadcrumb: PageLayoutBreadcrumb,
109
87
  SidebarLeft: PageLayoutSidebarLeft,
110
88
  Content: PageLayoutContent,
111
89
  SidebarRight: PageLayoutSidebarRight,
112
- Overlay: PageLayoutOverlay,
113
- HelpZone: PageLayoutHelpZone
90
+ Overlay: PageLayoutOverlay
114
91
  });
115
92
  export {
116
93
  PageLayout as default
@@ -1,19 +1,15 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import { usePageLayout } from "../PageLayoutContext.js";
4
- import useBackground from "../../../hooks/useBackground/useBackground.js";
5
4
  const PageLayoutContent = ({
6
5
  children,
7
6
  className,
8
7
  ...props
9
8
  }) => {
10
9
  const {
11
- productOverride,
12
- background
13
- } = useBackground(), {
14
10
  noPadding
15
11
  } = usePageLayout();
16
- return /* @__PURE__ */ jsx("main", { "data-product": productOverride, "data-background": background, className: clsx("pagelayout-content", {
12
+ return /* @__PURE__ */ jsx("main", { className: clsx("pagelayout-content", {
17
13
  "pagelayout-content--no-padding": noPadding == null ? void 0 : noPadding.content
18
14
  }, className), ...props, children });
19
15
  };
@@ -13,7 +13,7 @@ declare const Table: import('react').ForwardRefExoticComponent<{
13
13
  displayName: string;
14
14
  };
15
15
  Th: {
16
- (props: React.ThHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
16
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
17
17
  displayName: string;
18
18
  };
19
19
  Tbody: {
@@ -25,7 +25,7 @@ declare const Table: import('react').ForwardRefExoticComponent<{
25
25
  displayName: string;
26
26
  };
27
27
  Td: {
28
- (props: React.TdHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
28
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
29
29
  displayName: string;
30
30
  };
31
31
  };
@@ -1,4 +1,4 @@
1
1
  export declare const TableTd: {
2
- (props: React.TdHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
2
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
3
3
  displayName: string;
4
4
  };
@@ -1,4 +1,4 @@
1
1
  export declare const TableTh: {
2
- (props: React.ThHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
2
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
3
3
  displayName: string;
4
4
  };
@@ -28,7 +28,6 @@ export * from './Image';
28
28
  export * from './Input';
29
29
  export * from './Label';
30
30
  export * from './Layout';
31
- export * from './LinkPill';
32
31
  export * from './List';
33
32
  export * from './Loading';
34
33
  export * from './LoadingScreen';
@@ -37,7 +36,6 @@ export * from './LogoBeta';
37
36
  export * from './MediaViewer';
38
37
  export * from './Menu';
39
38
  export * from './Modal';
40
- export * from './ModalBeta';
41
39
  export * from './PageLayout';
42
40
  export * from './Pagination';
43
41
  export * from './Popover';
package/dist/homepage.js CHANGED
@@ -11,23 +11,17 @@ import { default as default11 } from "./modules/homepage/components/Notification
11
11
  import { NotificationListContainer } from "./modules/homepage/components/Notifications/NotificationListContainer.js";
12
12
  import { default as default12 } from "./modules/homepage/components/SchoolSpace/SchoolSpace.js";
13
13
  import { default as default13 } from "./modules/homepage/components/UserSpace/UserSpace.js";
14
+ import { COMMUNITIES_PREVIEW_SIZE, useCommunities } from "./modules/homepage/components/Communities/useCommunities.js";
14
15
  import { CommunitiesContainer } from "./modules/homepage/components/Communities/CommunitiesContainer.js";
15
16
  import { Favorites } from "./modules/homepage/components/Favorites/Favorites.js";
16
17
  import { FavoritesContainer } from "./modules/homepage/components/Favorites/FavoritesContainer.js";
17
18
  import { LastInfosContainer } from "./modules/homepage/components/LastInfos/LastInfosContainer.js";
18
19
  import { LastInfosList } from "./modules/homepage/components/LastInfos/LastInfosList.js";
19
- import { LinkForm } from "./modules/homepage/components/UsefulLinks/LinkForm.js";
20
- import { MAX_USEFUL_LINKS, useUsefulLinksContainer } from "./modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.js";
21
20
  import { MessageFlashListContainer } from "./modules/homepage/components/MessageFlashList/MessageFlashListContainer.js";
22
21
  import { SchoolSpaceContainer } from "./modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js";
23
- import { UsefulLinks } from "./modules/homepage/components/UsefulLinks/UsefulLinks.js";
24
- import { UsefulLinksContainer } from "./modules/homepage/components/UsefulLinks/UsefulLinksContainer.js";
25
- import { UsefulLinksModal } from "./modules/homepage/components/UsefulLinks/UsefulLinksModal.js";
26
22
  import { UserSpaceContainer } from "./modules/homepage/components/UserSpace/UserSpaceContainer.js";
27
- import { WidgetToggle } from "./modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js";
28
- import { WidgetsPersonalizationPanel } from "./modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js";
29
- import { useCommunities } from "./modules/homepage/components/Communities/useCommunities.js";
30
23
  export {
24
+ COMMUNITIES_PREVIEW_SIZE,
31
25
  default2 as Communities,
32
26
  CommunitiesContainer,
33
27
  default3 as CommunitiesItem,
@@ -39,8 +33,6 @@ export {
39
33
  default7 as LastInfos,
40
34
  LastInfosContainer,
41
35
  LastInfosList,
42
- LinkForm,
43
- MAX_USEFUL_LINKS,
44
36
  default8 as MessageFlash,
45
37
  default9 as MessageFlashList,
46
38
  MessageFlashListContainer,
@@ -49,13 +41,7 @@ export {
49
41
  NotificationListContainer,
50
42
  default12 as SchoolSpace,
51
43
  SchoolSpaceContainer,
52
- UsefulLinks,
53
- UsefulLinksContainer,
54
- UsefulLinksModal,
55
44
  default13 as UserSpace,
56
45
  UserSpaceContainer,
57
- WidgetToggle,
58
- WidgetsPersonalizationPanel,
59
- useCommunities,
60
- useUsefulLinksContainer
46
+ useCommunities
61
47
  };
@@ -1,4 +1,3 @@
1
- export * from './useBackground';
2
1
  export * from './useBookmark';
3
2
  export * from './useBreakpoint';
4
3
  export * from './useBrowserInfo';
@@ -35,7 +34,6 @@ export * from './useUiOverride';
35
34
  export * from './useUpload';
36
35
  export * from './useUploadFiles';
37
36
  export * from './useUser';
38
- export * from './useUserPreferences';
39
37
  export * from './useWorkspaceFile';
40
38
  export * from './useWorkspaceFolders';
41
39
  export * from './useWorkspaceSearch';
@@ -1 +1 @@
1
- export default function useClickOutside<T extends HTMLElement = any>(handler: () => void, events?: string[] | null, nodes?: Array<HTMLElement | null>, enabled?: boolean): import('react').MutableRefObject<T | null>;
1
+ export default function useClickOutside<T extends HTMLElement = any>(handler: () => void, events?: string[] | null, nodes?: Array<HTMLElement | null>): import('react').MutableRefObject<T | null>;