@axa-fr/canopee-react 1.7.1-alpha.3 → 1.7.1-alpha.31

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 (46) hide show
  1. package/dist/client.d.ts +10 -8
  2. package/dist/client.js +9 -7
  3. package/dist/distributeur/HelpButton/index.d.ts +3 -2
  4. package/dist/distributeur/HelpButton/index.js +9 -4
  5. package/dist/distributeur/Popover/AnimatedPopover.js +1 -1
  6. package/dist/distributeur/Timeline/Timeline.d.ts +26 -0
  7. package/dist/distributeur/Timeline/Timeline.helpers.d.ts +4 -0
  8. package/dist/distributeur/Timeline/Timeline.helpers.js +21 -0
  9. package/dist/distributeur/Timeline/Timeline.js +13 -0
  10. package/dist/distributeur/Timeline/TimelineCircle.d.ts +5 -0
  11. package/dist/distributeur/Timeline/TimelineCircle.js +8 -0
  12. package/dist/distributeur/Timeline/TimelineDetails.d.ts +2 -0
  13. package/dist/distributeur/Timeline/TimelineDetails.js +10 -0
  14. package/dist/distributeur/Title/Title.d.ts +1 -0
  15. package/dist/distributeur/Title/Title.js +6 -2
  16. package/dist/distributeur.d.ts +1 -0
  17. package/dist/distributeur.js +1 -0
  18. package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +2 -1
  19. package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileApollo.d.ts +1 -0
  20. package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileApollo.js +1 -0
  21. package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileCommon.js +4 -2
  22. package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileLF.d.ts +1 -0
  23. package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileLF.js +1 -0
  24. package/dist/prospect-client/Form/Radio/RadioText/RadioTextApollo.d.ts +4 -0
  25. package/dist/prospect-client/Form/Radio/RadioText/RadioTextApollo.js +8 -0
  26. package/dist/prospect-client/Form/Radio/RadioText/RadioTextCommon.d.ts +12 -0
  27. package/dist/prospect-client/Form/Radio/RadioText/RadioTextCommon.js +5 -0
  28. package/dist/prospect-client/Form/Radio/RadioText/RadioTextLF.d.ts +4 -0
  29. package/dist/prospect-client/Form/Radio/RadioText/RadioTextLF.js +8 -0
  30. package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +7 -1
  31. package/dist/prospect-client/MultiMessage/MultiMessage.helpers.d.ts +1 -0
  32. package/dist/prospect-client/MultiMessage/MultiMessage.helpers.js +7 -0
  33. package/dist/prospect-client/MultiMessage/MultiMessageApollo.d.ts +6 -0
  34. package/dist/prospect-client/MultiMessage/MultiMessageApollo.js +7 -0
  35. package/dist/prospect-client/MultiMessage/MultiMessageCommon.d.ts +33 -0
  36. package/dist/prospect-client/MultiMessage/MultiMessageCommon.js +28 -0
  37. package/dist/prospect-client/MultiMessage/MultiMessageFooter.d.ts +17 -0
  38. package/dist/prospect-client/MultiMessage/MultiMessageFooter.js +13 -0
  39. package/dist/prospect-client/MultiMessage/MultiMessageLF.d.ts +6 -0
  40. package/dist/prospect-client/MultiMessage/MultiMessageLF.js +7 -0
  41. package/dist/prospect-client/MultiMessage/types.d.ts +14 -0
  42. package/dist/prospect-client/MultiMessage/types.js +1 -0
  43. package/dist/prospect-client/Pagination/PaginationCommon.d.ts +2 -2
  44. package/dist/prospect.d.ts +10 -8
  45. package/dist/prospect.js +9 -7
  46. package/package.json +3 -3
package/dist/client.d.ts CHANGED
@@ -41,19 +41,26 @@ export {
41
41
  CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
42
42
  export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF";
43
43
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioLF";
44
+ export { RadioText, type RadioTextProps, } from "./prospect-client/Form/Radio/RadioText/RadioTextLF";
44
45
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaLF";
45
46
  export { DebugGrid } from "./prospect-client/Grid/DebugGridLF";
46
47
  export { Heading, type HeadingLevel, type HeadingProps, } from "./prospect-client/Heading/HeadingLF";
47
48
  export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./prospect-client/Icon/IconLF";
48
49
  export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
50
+ export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
49
51
  export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterLF";
52
+ export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
50
53
  export { LevelSelector, type LevelSelectorProps, } from "./prospect-client/LevelSelector/LevelSelectorLF";
51
- export { Link, linkVariants, type LinkVariants, type LinkProps, } from "./prospect-client/Link/LinkLF";
54
+ export { Link, linkVariants, type LinkProps, type LinkVariants, } from "./prospect-client/Link/LinkLF";
52
55
  export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./prospect-client/List/ClickItem/ClickItemLF";
53
56
  export { ContentItemDuo } from "./prospect-client/List/ContentItemDuo/ContentItemDuoLF";
54
57
  export { List, type ListProps } from "./prospect-client/List/List/ListLF";
58
+ export { Loader, type LoaderProps } from "./prospect-client/Loader/LoaderLF";
55
59
  export { Message, messageVariants, type MessageVariants, } from "./prospect-client/Message/MessageLF";
60
+ export { MultiMessage, type MultiMessageItem, type MultiMessageProps, } from "./prospect-client/MultiMessage/MultiMessageLF";
56
61
  export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./prospect-client/Modal/ModalLF";
62
+ export { ErrorPage, type ErrorPageProps, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
63
+ export { ValidPage, type ValidPageProps, } from "./prospect-client/pages/ValidPage/ValidPageLF";
57
64
  export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationLF";
58
65
  export { Pagination } from "./prospect-client/Pagination/PaginationLF";
59
66
  export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarLF";
@@ -64,14 +71,9 @@ export { Spinner, spinnerVariants, type SpinnerVariants, } from "./prospect-clie
64
71
  export { Stepper } from "./prospect-client/Stepper/StepperLF";
65
72
  export { Svg } from "./prospect-client/Svg/Svg";
66
73
  export { TabBar, tabBarDirection, type TabBarDirection, type TabBarProps, } from "./prospect-client/TabBar/TabBarLF";
74
+ export { Table, type BodyColorVariants, type HeadColorVariants, type RowSizeVariants, type TableProps, } from "./prospect-client/Table/TableLF";
75
+ export { TableMobileCard, type TableMobileCardProps, } from "./prospect-client/TableMobileCard/TableMobileCard";
67
76
  export { Tag, tagVariants, type TagVariants, } from "./prospect-client/Tag/TagLF";
68
77
  export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalLF";
69
78
  export { Toggle } from "./prospect-client/Toggle/ToggleLF";
70
- export { Table, type TableProps, type HeadColorVariants, type BodyColorVariants, type RowSizeVariants, } from "./prospect-client/Table/TableLF";
71
- export { TableMobileCard, type TableMobileCardProps, } from "./prospect-client/TableMobileCard/TableMobileCard";
72
- export { ExitLayout, type ExitLayoutWithSubComponents, type ExitLayoutProps, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
73
- export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
74
- export { ValidPage, type ValidPageProps, } from "./prospect-client/pages/ValidPage/ValidPageLF";
75
- export { ErrorPage, type ErrorPageProps, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
76
79
  export type { GridContainerProps } from "./prospect-client/utilities/types/GridContainerProps";
77
- export { Loader, type LoaderProps } from "./prospect-client/Loader/LoaderLF";
package/dist/client.js CHANGED
@@ -41,19 +41,26 @@ export {
41
41
  CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
42
42
  export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF";
43
43
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioLF";
44
+ export { RadioText, } from "./prospect-client/Form/Radio/RadioText/RadioTextLF";
44
45
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaLF";
45
46
  export { DebugGrid } from "./prospect-client/Grid/DebugGridLF";
46
47
  export { Heading, } from "./prospect-client/Heading/HeadingLF";
47
48
  export { Icon, iconSizeVariants, iconVariants, } from "./prospect-client/Icon/IconLF";
48
49
  export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
50
+ export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
49
51
  export { Footer, } from "./prospect-client/Layout/Footer/FooterLF";
52
+ export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
50
53
  export { LevelSelector, } from "./prospect-client/LevelSelector/LevelSelectorLF";
51
54
  export { Link, linkVariants, } from "./prospect-client/Link/LinkLF";
52
55
  export { ClickItem, clickItemStates, clickItemVariants, } from "./prospect-client/List/ClickItem/ClickItemLF";
53
56
  export { ContentItemDuo } from "./prospect-client/List/ContentItemDuo/ContentItemDuoLF";
54
57
  export { List } from "./prospect-client/List/List/ListLF";
58
+ export { Loader } from "./prospect-client/Loader/LoaderLF";
55
59
  export { Message, messageVariants, } from "./prospect-client/Message/MessageLF";
60
+ export { MultiMessage, } from "./prospect-client/MultiMessage/MultiMessageLF";
56
61
  export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./prospect-client/Modal/ModalLF";
62
+ export { ErrorPage, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
63
+ export { ValidPage, } from "./prospect-client/pages/ValidPage/ValidPageLF";
57
64
  export { ItemPagination, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationLF";
58
65
  export { Pagination } from "./prospect-client/Pagination/PaginationLF";
59
66
  export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarLF";
@@ -64,13 +71,8 @@ export { Spinner, spinnerVariants, } from "./prospect-client/Spinner/SpinnerLF";
64
71
  export { Stepper } from "./prospect-client/Stepper/StepperLF";
65
72
  export { Svg } from "./prospect-client/Svg/Svg";
66
73
  export { TabBar, tabBarDirection, } from "./prospect-client/TabBar/TabBarLF";
74
+ export { Table, } from "./prospect-client/Table/TableLF";
75
+ export { TableMobileCard, } from "./prospect-client/TableMobileCard/TableMobileCard";
67
76
  export { Tag, tagVariants, } from "./prospect-client/Tag/TagLF";
68
77
  export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalLF";
69
78
  export { Toggle } from "./prospect-client/Toggle/ToggleLF";
70
- export { Table, } from "./prospect-client/Table/TableLF";
71
- export { TableMobileCard, } from "./prospect-client/TableMobileCard/TableMobileCard";
72
- export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
73
- export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
74
- export { ValidPage, } from "./prospect-client/pages/ValidPage/ValidPageLF";
75
- export { ErrorPage, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
76
- export { Loader } from "./prospect-client/Loader/LoaderLF";
@@ -1,8 +1,9 @@
1
- import "@axa-fr/canopee-css/distributeur/Action/Action.css";
1
+ import "@axa-fr/canopee-css/distributeur/HelpButton/HelpButton.css";
2
2
  import type { ComponentPropsWithoutRef, ReactNode } from "react";
3
3
  import { Popover } from "../Popover";
4
4
  type HelpProps = Omit<ComponentPropsWithoutRef<typeof Popover>, "popoverElement"> & {
5
5
  helpButtonContent?: ReactNode;
6
+ variant?: "default" | "inverse";
6
7
  };
7
- export declare const HelpButton: ({ className, classModifier, children, mode, placement, helpButtonContent, }: HelpProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const HelpButton: ({ className, classModifier, children, mode, placement, variant, helpButtonContent, }: HelpProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -1,12 +1,17 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import "@axa-fr/canopee-css/distributeur/Action/Action.css";
2
+ import "@axa-fr/canopee-css/distributeur/HelpButton/HelpButton.css";
3
3
  import classNames from "classnames";
4
+ import info from "@material-symbols/svg-400/rounded/info_i-fill.svg";
4
5
  import { Popover } from "../Popover";
5
6
  import { getClassName } from "../utilities/helpers/getClassName";
6
- export const HelpButton = ({ className, classModifier, children, mode = "click", placement = "right", helpButtonContent = _jsx("span", { className: "af-more-help", children: "i" }), }) => {
7
+ import { Svg } from "../Svg";
8
+ export const HelpButton = ({ className, classModifier, children, mode = "click", placement = "right", variant = "default", helpButtonContent = _jsx(Svg, { src: info, alt: "Help" }), }) => {
7
9
  const buttonClassName = classNames("btn", getClassName({
8
10
  baseClassName: "af-btn--circle",
9
- modifiers: classModifier?.split(" "),
11
+ modifiers: [
12
+ ...(classModifier?.split(" ") ?? []),
13
+ ...(variant === "inverse" ? ["inverse"] : []),
14
+ ],
10
15
  }));
11
- return (_jsx(Popover, { className: className, classModifier: classModifier, placement: placement, mode: mode, popoverElement: children, children: _jsx("div", { className: buttonClassName, children: helpButtonContent }) }));
16
+ return (_jsx(Popover, { className: classNames("af-help-button", className), classModifier: classModifier, placement: placement, mode: mode, popoverElement: children, children: _jsx("div", { className: buttonClassName, children: helpButtonContent }) }));
12
17
  };
@@ -18,5 +18,5 @@ export const AnimatedPopover = ({ placement, children, isOpen, target, className
18
18
  elements: { reference: referenceElement, floating: popperElement },
19
19
  middleware: [offset(12), arrow({ element: arrowRef })],
20
20
  });
21
- return (_jsxs("div", { className: componentClassName, children: [_jsx("div", { ref: setReferenceElement, className: "af-popover__container-over", role: "presentation", children: target }), isOpen ? (_jsxs("div", { ref: setPopperElement, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, style: floatingStyles, "data-popper-placement": placement, className: "af-popover__container-pop", children: [_jsx("div", { children: children }), _jsx(FloatingArrow, { ref: arrowRef, context: context, fill: "white" })] })) : null] }));
21
+ return (_jsxs("div", { className: componentClassName, children: [_jsx("div", { ref: setReferenceElement, className: "af-popover__container-over", role: "presentation", children: target }), isOpen ? (_jsxs("div", { ref: setPopperElement, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, style: floatingStyles, "data-popper-placement": placement, className: "af-popover__container-pop", children: [_jsx("div", { children: children }), _jsx(FloatingArrow, { ref: arrowRef, context: context, fill: "white", width: 16, height: 10 })] })) : null] }));
22
22
  };
@@ -0,0 +1,26 @@
1
+ import "@axa-fr/canopee-css/distributeur/Timeline/Timeline.css";
2
+ import type { ComponentPropsWithoutRef, ReactNode } from "react";
3
+ type TimelineBaseItem = {
4
+ header: ReactNode;
5
+ date?: Date;
6
+ };
7
+ export type TimelineItem = TimelineBaseItem & {
8
+ details: ReactNode;
9
+ };
10
+ export type TimelineItemWithoutDetails = TimelineBaseItem & {
11
+ details?: ReactNode;
12
+ };
13
+ export type TimelineListItem = TimelineItem | TimelineItemWithoutDetails;
14
+ export type TimelineVariants = "default" | "withoutDetails";
15
+ type TimelineBaseProps = Omit<ComponentPropsWithoutRef<"ol">, "children">;
16
+ type TimelineDefaultProps = TimelineBaseProps & {
17
+ items: TimelineItem[];
18
+ variant?: "default";
19
+ };
20
+ type TimelineWithoutDetailsProps = TimelineBaseProps & {
21
+ items: TimelineItemWithoutDetails[];
22
+ variant: "withoutDetails";
23
+ };
24
+ export type TimelineProps = TimelineDefaultProps | TimelineWithoutDetailsProps;
25
+ export declare const Timeline: ({ items, variant, className, ...otherProps }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { TimelineListItem } from "./Timeline";
2
+ export declare const formatDate: (date?: Date) => string;
3
+ export declare const isDateInFuture: (date?: Date) => boolean;
4
+ export declare const getTimelineItemKey: (item: TimelineListItem) => string;
@@ -0,0 +1,21 @@
1
+ export const formatDate = (date) => {
2
+ if (!date) {
3
+ return "";
4
+ }
5
+ const day = String(date.getUTCDate()).padStart(2, "0");
6
+ const month = String(date.getUTCMonth() + 1).padStart(2, "0");
7
+ const year = date.getUTCFullYear();
8
+ return `${day}/${month}/${year}`;
9
+ };
10
+ export const isDateInFuture = (date) => {
11
+ if (!date) {
12
+ return true;
13
+ }
14
+ return date > new Date();
15
+ };
16
+ export const getTimelineItemKey = (item) => {
17
+ const dateKey = item.date ? item.date.toISOString() : "without-date";
18
+ const headerKey = typeof item.header === "string" ? item.header : "header";
19
+ const detailsKey = typeof item.details === "string" ? item.details : "details";
20
+ return `timeline-item-${dateKey}-${headerKey}-${detailsKey}`;
21
+ };
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import "@axa-fr/canopee-css/distributeur/Timeline/Timeline.css";
4
+ import { getTimelineItemKey } from "./Timeline.helpers";
5
+ import { TimelineDetails } from "./TimelineDetails";
6
+ import { TimelineCircle } from "./TimelineCircle";
7
+ export const Timeline = ({ items, variant = "default", className, ...otherProps }) => {
8
+ const isWithoutDetails = variant === "withoutDetails";
9
+ return (_jsx("ol", { className: classNames("af-timeline", {
10
+ "af-timeline--single-item": items.length === 1,
11
+ "af-timeline--without-details": isWithoutDetails,
12
+ }, className), ...otherProps, children: items.map((item) => (_jsx("li", { className: "af-timeline__item", children: isWithoutDetails ? (_jsxs("div", { className: "af-timeline__without-details", children: [_jsx(TimelineCircle, { date: item.date }), _jsx("div", { className: "af-timeline__without-details-content", children: item.header })] })) : (_jsx(TimelineDetails, { date: item.date, details: item.details, header: item.header })) }, getTimelineItemKey(item)))) }));
13
+ };
@@ -0,0 +1,5 @@
1
+ type TimelineCircleProps = {
2
+ date?: Date;
3
+ };
4
+ export declare const TimelineCircle: ({ date }: TimelineCircleProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import { isDateInFuture } from "./Timeline.helpers";
4
+ export const TimelineCircle = ({ date }) => {
5
+ return (_jsx("span", { className: classNames("af-timeline__circle", {
6
+ "af-timeline__circle--half": isDateInFuture(date),
7
+ }), role: "presentation" }));
8
+ };
@@ -0,0 +1,2 @@
1
+ import type { TimelineItem } from "./Timeline";
2
+ export declare const TimelineDetails: ({ header, details, date }: TimelineItem) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import keyboardArrowDownIcon from "@material-symbols/svg-400/outlined/keyboard_arrow_down.svg";
3
+ import { useState } from "react";
4
+ import { Svg } from "../Svg";
5
+ import { formatDate } from "./Timeline.helpers";
6
+ import { TimelineCircle } from "./TimelineCircle";
7
+ export const TimelineDetails = ({ header, details, date }) => {
8
+ const [detailOpen, setDetailOpen] = useState(false);
9
+ return (_jsxs("details", { className: "af-timeline__details", onToggle: (event) => setDetailOpen(event.currentTarget.open), children: [_jsxs("summary", { className: "af-timeline__summary", children: [_jsx(TimelineCircle, { date: date }), header, _jsx(Svg, { src: keyboardArrowDownIcon, width: 20, height: 20, className: "af-timeline__show-and-hide-icon", "aria-label": `${detailOpen ? "Masquer" : "Devoiler"} le detail de la date ${formatDate(date)}`, role: "img" })] }), _jsxs("div", { className: "af-timeline__results", children: [_jsx("span", { className: "af-timeline__vertical-line" }), _jsx("div", { className: "af-timeline__content", children: details })] })] }));
10
+ };
@@ -7,6 +7,7 @@ type TitleProps = ComponentPropsWithRef<"h2"> & {
7
7
  heading?: Headings;
8
8
  contentLeft?: ReactElement;
9
9
  contentRight?: ReactNode;
10
+ withDivider?: boolean;
10
11
  };
11
12
  export declare const Title: import("react").ForwardRefExoticComponent<Omit<PropsWithChildren<TitleProps>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
12
13
  export {};
@@ -3,10 +3,14 @@ import "@axa-fr/canopee-css/distributeur/Title/Title.css";
3
3
  import { forwardRef, } from "react";
4
4
  import { getClassName } from "../utilities/helpers/getClassName";
5
5
  const baseClass = "af-title";
6
- export const Title = forwardRef(({ className, classModifier, children, heading: Heading = "h2", contentLeft, contentRight, ...otherProps }, ref) => {
6
+ export const Title = forwardRef(({ className, classModifier, children, heading: Heading = "h2", contentLeft, contentRight, withDivider = true, ...otherProps }, ref) => {
7
+ const modifiers = classModifier?.split(" ") ?? [];
8
+ if (!withDivider) {
9
+ modifiers.push("without-divider");
10
+ }
7
11
  const componentClassName = getClassName({
8
12
  baseClassName: baseClass,
9
- modifiers: classModifier?.split(" "),
13
+ modifiers,
10
14
  className,
11
15
  });
12
16
  return (_jsxs("div", { className: `${baseClass}--container`, children: [_jsxs(Heading, { ref: ref, className: componentClassName, ...otherProps, children: [children, contentLeft] }), contentRight ? (_jsx("div", { className: "content-right", children: contentRight })) : null] }));
@@ -63,3 +63,4 @@ export { Loader } from "./distributeur/Loader/Loader";
63
63
  export { CardData } from "./distributeur/CardData/CardData";
64
64
  export type { CardDataVariant } from "./distributeur/CardData/CardData";
65
65
  export { EditorialMessage, type EditorialMessageProps, type EditorialMessageType, } from "./distributeur/EditorialMessage/EditorialMessage";
66
+ export { Timeline, type TimelineProps, type TimelineVariants, } from "./distributeur/Timeline/Timeline";
@@ -55,3 +55,4 @@ export { HelpButton } from "./distributeur/HelpButton";
55
55
  export { Loader } from "./distributeur/Loader/Loader";
56
56
  export { CardData } from "./distributeur/CardData/CardData";
57
57
  export { EditorialMessage, } from "./distributeur/EditorialMessage/EditorialMessage";
58
+ export { Timeline, } from "./distributeur/Timeline/Timeline";
@@ -8,7 +8,8 @@ const DropdownCommon = forwardRef(({ id, required, label, error, placeholder, ch
8
8
  let inputId = useId();
9
9
  inputId = id || inputId;
10
10
  const hasError = (Boolean(message) && messageType === "error") || Boolean(error);
11
- const classname = classNames("af-form__dropdown-input", hasError && "af-form__dropdown-input--error");
11
+ const hasWarning = !hasError && Boolean(message) && messageType === "warning";
12
+ const classname = classNames("af-form__dropdown-input", hasError && "af-form__dropdown-input--error", hasWarning && "af-form__dropdown-input--warning");
12
13
  return (_jsxs("div", { className: "af-form__dropdown-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsxs("select", { className: classname, ...otherProps, ref: inputRef, id: inputId, children: [Boolean(placeholder) && _jsx("option", { value: "", children: placeholder }), children] }), helper ? (_jsx("span", { className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: message || error || success, messageType: messageType || (error ? "error" : "success") })] }));
13
14
  });
14
15
  DropdownCommon.displayName = "Dropdown";
@@ -1,3 +1,4 @@
1
1
  import { type ItemFileProps } from "./ItemFileCommon";
2
+ import "@axa-fr/canopee-css/prospect/ContentItemMono/ContentItemMonoApollo.css";
2
3
  import "@axa-fr/canopee-css/prospect/Form/FileUpload/ItemFile/ItemFileApollo.css";
3
4
  export declare const ItemFile: (props: ItemFileProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,5 +6,6 @@ import { Icon } from "../../../Icon/IconApollo";
6
6
  import { Spinner } from "../../../Spinner/SpinnerApollo";
7
7
  import { ItemMessage } from "../../ItemMessage/ItemMessageApollo";
8
8
  import { ItemFileCommon } from "./ItemFileCommon";
9
+ import "@axa-fr/canopee-css/prospect/ContentItemMono/ContentItemMonoApollo.css";
9
10
  import "@axa-fr/canopee-css/prospect/Form/FileUpload/ItemFile/ItemFileApollo.css";
10
11
  export const ItemFile = (props) => (_jsx(ItemFileCommon, { ItemMessageComponent: ItemMessage, ItemIconComponent: Icon, ItemSpinnerComponent: Spinner, ClickIconComponent: ClickIcon, removeIcon: deleteIcon, previewIcon: visibilityIcon, ...props }));
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import validationIcon from "@material-symbols/svg-400/outlined/check_circle-fill.svg";
3
3
  import errorIcon from "@material-symbols/svg-400/outlined/error-fill.svg";
4
- import {} from "react";
4
+ import { useMemo, } from "react";
5
+ import { ContentItemMonoCore } from "../../../ContentItemMono/ContentItemMonoCore";
5
6
  import { getClassName } from "../../../utilities/getClassName";
6
7
  const BASE_UNIT = 1000;
7
8
  const BYTE_UNITS = ["Ko", "Mo", "Go"];
@@ -19,9 +20,10 @@ export const ItemFileCommon = ({ file, isLoading, errorMessage, className, onRem
19
20
  const handleClick = (callback) => (e) => {
20
21
  callback(file, e);
21
22
  };
23
+ const statusIndicator = useMemo(() => isLoading && !hasError ? (_jsx(ItemSpinnerComponent, { size: 24 })) : (_jsx(ItemIconComponent, { size: "S", src: hasError ? errorIcon : validationIcon })), [ItemIconComponent, ItemSpinnerComponent, hasError, isLoading]);
22
24
  return (_jsxs("section", { className: getClassName({
23
25
  baseClassName: "af-item-file",
24
26
  modifiers: [hasError && "error"],
25
27
  className,
26
- }), "aria-busy": isLoading ? true : undefined, "aria-live": "polite", ...props, children: [_jsxs("div", { className: "af-item-file__body", children: [isLoading && !hasError ? (_jsx(ItemSpinnerComponent, { size: 24 })) : (_jsx(ItemIconComponent, { size: "S", src: hasError ? errorIcon : validationIcon })), _jsx("p", { className: "af-item-file__file-name", children: file.name }), _jsx("p", { className: "af-item-file__file-size", children: getReadableFileSizeString(file.size) }), _jsxs("div", { className: "af-item-file__actions", children: [!isLoading && !hasError && (_jsx(ClickIconComponent, { src: previewIcon, onClick: handleClick(onPreview), "aria-label": `Previsualiser le fichier ${file.name}`, ...previewProps })), _jsx(ClickIconComponent, { src: removeIcon, onClick: handleClick(onRemove), "aria-label": `Suppression du fichier ${file.name}`, ...removeProps })] })] }), _jsx(ItemMessageComponent, { message: errorMessage })] }));
28
+ }), "aria-busy": isLoading ? true : undefined, "aria-live": "polite", ...props, children: [_jsxs("div", { className: "af-item-file__body", children: [_jsx(ContentItemMonoCore, { leftComponent: statusIndicator, primarySubtitle: file.name, subtitle: getReadableFileSizeString(file.size) }), _jsxs("div", { className: "af-item-file__actions", children: [!isLoading && !hasError && (_jsx(ClickIconComponent, { src: previewIcon, onClick: handleClick(onPreview), "aria-label": `Previsualiser le fichier ${file.name}`, ...previewProps })), _jsx(ClickIconComponent, { src: removeIcon, onClick: handleClick(onRemove), "aria-label": `Suppression du fichier ${file.name}`, ...removeProps })] })] }), _jsx(ItemMessageComponent, { message: errorMessage })] }));
27
29
  };
@@ -1,3 +1,4 @@
1
1
  import { type ItemFileProps } from "./ItemFileCommon";
2
+ import "@axa-fr/canopee-css/client/ContentItemMono/ContentItemMonoLF.css";
2
3
  import "@axa-fr/canopee-css/client/Form/FileUpload/ItemFile/ItemFileLF.css";
3
4
  export declare const ItemFile: (props: ItemFileProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,5 +6,6 @@ import { Icon } from "../../../Icon/IconLF";
6
6
  import { Spinner } from "../../../Spinner/SpinnerLF";
7
7
  import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
8
8
  import { ItemFileCommon } from "./ItemFileCommon";
9
+ import "@axa-fr/canopee-css/client/ContentItemMono/ContentItemMonoLF.css";
9
10
  import "@axa-fr/canopee-css/client/Form/FileUpload/ItemFile/ItemFileLF.css";
10
11
  export const ItemFile = (props) => (_jsx(ItemFileCommon, { ItemMessageComponent: ItemMessage, ItemIconComponent: Icon, ItemSpinnerComponent: Spinner, ClickIconComponent: ClickIcon, removeIcon: deleteIconFilled, previewIcon: visibilityIcon, ...props }));
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/canopee-css/prospect/Form/Radio/RadioText/RadioTextAll.css";
2
+ import { type RadioTextProps } from "./RadioTextCommon";
3
+ export { type RadioTextProps } from "./RadioTextCommon";
4
+ export declare const RadioText: import("react").ForwardRefExoticComponent<Omit<RadioTextProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/prospect/Form/Radio/RadioText/RadioTextAll.css";
3
+ import { forwardRef } from "react";
4
+ import { Radio } from "../Radio/RadioApollo";
5
+ import { RadioTextCommon } from "./RadioTextCommon";
6
+ export {} from "./RadioTextCommon";
7
+ export const RadioText = forwardRef((props, ref) => (_jsx(RadioTextCommon, { ...props, ref: ref, RadioComponent: Radio })));
8
+ RadioText.displayName = "RadioText";
@@ -0,0 +1,12 @@
1
+ import { type ComponentType, type ReactNode } from "react";
2
+ import type { GridContainerProps } from "../../../utilities/types/GridContainerProps";
3
+ import type { RadioProps } from "../Radio/RadioCommon";
4
+ export type RadioTextProps = {
5
+ label: string | ReactNode;
6
+ labelProps?: GridContainerProps<"label">;
7
+ } & RadioProps;
8
+ export type RadioTextCommonProps = RadioTextProps & {
9
+ RadioComponent: ComponentType<RadioProps>;
10
+ };
11
+ declare const RadioTextCommon: import("react").ForwardRefExoticComponent<Omit<RadioTextCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
12
+ export { RadioTextCommon };
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ const RadioTextCommon = forwardRef(({ label, labelProps, RadioComponent, ...inputProps }, ref) => (_jsxs("label", { className: "af-radio-text", ...labelProps, children: [_jsx(RadioComponent, { ...inputProps, ref: ref }), _jsx("span", { className: "af-radio-text__label-content", children: label })] })));
4
+ RadioTextCommon.displayName = "RadioTextCommon";
5
+ export { RadioTextCommon };
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/canopee-css/client/Form/Radio/RadioText/RadioTextAll.css";
2
+ import { type RadioTextProps } from "./RadioTextCommon";
3
+ export { type RadioTextProps } from "./RadioTextCommon";
4
+ export declare const RadioText: import("react").ForwardRefExoticComponent<Omit<RadioTextProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/client/Form/Radio/RadioText/RadioTextAll.css";
3
+ import { forwardRef } from "react";
4
+ import { Radio } from "../Radio/RadioLF";
5
+ import { RadioTextCommon } from "./RadioTextCommon";
6
+ export {} from "./RadioTextCommon";
7
+ export const RadioText = forwardRef((props, ref) => (_jsx(RadioTextCommon, { ...props, ref: ref, RadioComponent: Radio })));
8
+ RadioText.displayName = "RadioText";
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useId, } from "react";
3
+ import { getClassName } from "../../utilities/getClassName";
3
4
  import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
4
5
  import { ItemMessage, } from "../ItemMessage/ItemMessageCommon";
5
6
  const TextAreaCommon = forwardRef(({ id, className, label, description, helper, error, message, messageType, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder = " ", containerProps, ...inputProps }, inputRef) => {
@@ -8,9 +9,14 @@ const TextAreaCommon = forwardRef(({ id, className, label, description, helper,
8
9
  const helperId = `${inputId}-helper`;
9
10
  const messageId = `${inputId}-error`;
10
11
  const hasError = (Boolean(message) && messageType === "error") || Boolean(error);
12
+ const hasWarning = Boolean(message) && messageType === "warning" && !hasError;
13
+ const textareaClassName = getClassName({
14
+ baseClassName: "af-form__textarea",
15
+ modifiers: [hasWarning && "warning"],
16
+ });
11
17
  return (_jsxs("div", { className: ["af-form__input-container", className]
12
18
  .filter(Boolean)
13
- .join(" "), ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsx("textarea", { id: inputId, className: "af-form__textarea", ref: inputRef, "aria-errormessage": hasError ? messageId : undefined, "aria-describedby": helper ? helperId : undefined, required: required, "aria-invalid": hasError || undefined, placeholder: placeholder, ...inputProps }), helper ? (_jsx("span", { id: helperId, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: messageId, message: message || error, messageType: messageType })] }));
19
+ .join(" "), ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsx("textarea", { id: inputId, className: textareaClassName, ref: inputRef, "aria-errormessage": hasError ? messageId : undefined, "aria-describedby": helper ? helperId : undefined, required: required, "aria-invalid": hasError || undefined, placeholder: placeholder, ...inputProps }), helper ? (_jsx("span", { id: helperId, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: messageId, message: message || error, messageType: messageType })] }));
14
20
  });
15
21
  TextAreaCommon.displayName = "TextArea";
16
22
  export { TextAreaCommon };
@@ -0,0 +1 @@
1
+ export declare const clampIndex: (index: number, total: number) => number;
@@ -0,0 +1,7 @@
1
+ export const clampIndex = (index, total) => {
2
+ if (total <= 0 || index < 0)
3
+ return 0;
4
+ if (index >= total)
5
+ return total - 1;
6
+ return index;
7
+ };
@@ -0,0 +1,6 @@
1
+ import "@axa-fr/canopee-css/prospect/MultiMessage/MultiMessageApollo.css";
2
+ import { type MultiMessageProps } from "./MultiMessageCommon";
3
+ export { messageVariants, type MessageVariants, } from "../Message/MessageApollo";
4
+ export type { MultiMessageProps } from "./MultiMessageCommon";
5
+ export type { MultiMessageItem } from "./types";
6
+ export declare const MultiMessage: (props: MultiMessageProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/prospect/MultiMessage/MultiMessageApollo.css";
3
+ import { Message } from "../Message/MessageApollo";
4
+ import { Pagination } from "../Pagination/PaginationApollo";
5
+ import { MultiMessageCommon, } from "./MultiMessageCommon";
6
+ export { messageVariants, } from "../Message/MessageApollo";
7
+ export const MultiMessage = (props) => (_jsx(MultiMessageCommon, { ...props, MessageComponent: Message, PaginationComponent: Pagination }));
@@ -0,0 +1,33 @@
1
+ import { type ComponentType } from "react";
2
+ import type { MessageProps } from "../Message/MessageCommon";
3
+ import type { PaginationProps } from "../Pagination/PaginationCommon";
4
+ import type { MultiMessageItem } from "./types";
5
+ type Headings = "h2" | "h3" | "h4" | "h5" | "h6";
6
+ export type MultiMessageProps = {
7
+ /** Messages displayed inside the carousel */
8
+ items: MultiMessageItem[];
9
+ /** Controlled active index (zero-based) */
10
+ activeIndex?: number;
11
+ /** Default active index (zero-based) when uncontrolled */
12
+ defaultActiveIndex?: number;
13
+ /** Called when the user navigates between messages */
14
+ onChangeActive?: (index: number) => void;
15
+ /** Icon size in pixels */
16
+ iconSize?: number;
17
+ /** HTML heading level used for each message title */
18
+ heading?: Headings;
19
+ /** ARIA label for the previous button */
20
+ prevLabel?: string;
21
+ /** ARIA label for the next button */
22
+ nextLabel?: string;
23
+ /** Optional override for the previous button props */
24
+ prevButtonProps?: PaginationProps["prevButtonProps"];
25
+ /** Optional override for the next button props */
26
+ nextButtonProps?: PaginationProps["nextButtonProps"];
27
+ } & Omit<MessageProps, "action" | "children" | "heading" | "iconSize" | "title" | "variant">;
28
+ type MultiMessageCommonProps = MultiMessageProps & {
29
+ MessageComponent: ComponentType<MessageProps>;
30
+ PaginationComponent: ComponentType<PaginationProps>;
31
+ };
32
+ export declare const MultiMessageCommon: ({ items, activeIndex, defaultActiveIndex, onChangeActive, iconSize, heading: Heading, prevLabel, nextLabel, prevButtonProps, nextButtonProps, className, MessageComponent, PaginationComponent, ...sectionProps }: MultiMessageCommonProps) => import("react/jsx-runtime").JSX.Element | null;
33
+ export {};
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { getClassName } from "../utilities/getClassName";
4
+ import { MultiMessageFooter } from "./MultiMessageFooter";
5
+ import { clampIndex } from "./MultiMessage.helpers";
6
+ const baseClassName = "af-multi-message";
7
+ export const MultiMessageCommon = ({ items, activeIndex, defaultActiveIndex = 0, onChangeActive, iconSize = 24, heading: Heading = "h4", prevLabel = "Message précédent", nextLabel = "Message suivant", prevButtonProps, nextButtonProps, className, MessageComponent, PaginationComponent, ...sectionProps }) => {
8
+ const total = items.length;
9
+ const isControlled = activeIndex !== undefined;
10
+ const [internalIndex, setInternalIndex] = useState(clampIndex(defaultActiveIndex, total));
11
+ const currentIndex = clampIndex(isControlled ? activeIndex : internalIndex, total);
12
+ if (total === 0)
13
+ return null;
14
+ const item = items[currentIndex];
15
+ const hasMultiple = total > 1;
16
+ const goTo = (next) => {
17
+ const clamped = clampIndex(next, total);
18
+ if (clamped === currentIndex)
19
+ return;
20
+ if (!isControlled)
21
+ setInternalIndex(clamped);
22
+ onChangeActive?.(clamped);
23
+ };
24
+ return (_jsxs(MessageComponent, { className: getClassName({
25
+ baseClassName,
26
+ className,
27
+ }), variant: item.variant, title: item.title, iconSize: iconSize, heading: Heading, ...sectionProps, children: [item.children, _jsx(MultiMessageFooter, { action: item.action, currentIndex: currentIndex, hasMultiple: hasMultiple, nextButtonProps: nextButtonProps, nextLabel: nextLabel, onChangePage: goTo, PaginationComponent: PaginationComponent, prevButtonProps: prevButtonProps, prevLabel: prevLabel, total: total })] }));
28
+ };
@@ -0,0 +1,17 @@
1
+ import type { ComponentType } from "react";
2
+ import type { PaginationProps } from "../Pagination/PaginationCommon";
3
+ import type { MultiMessageItem } from "./types";
4
+ type MultiMessageFooterProps = {
5
+ action: MultiMessageItem["action"];
6
+ currentIndex: number;
7
+ hasMultiple: boolean;
8
+ nextButtonProps: PaginationProps["nextButtonProps"];
9
+ nextLabel: string;
10
+ onChangePage: (page: number) => void;
11
+ PaginationComponent: ComponentType<PaginationProps>;
12
+ prevButtonProps: PaginationProps["prevButtonProps"];
13
+ prevLabel: string;
14
+ total: number;
15
+ };
16
+ export declare const MultiMessageFooter: ({ action, currentIndex, hasMultiple, nextButtonProps, nextLabel, onChangePage, PaginationComponent, prevButtonProps, prevLabel, total, }: MultiMessageFooterProps) => import("react/jsx-runtime").JSX.Element | null;
17
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ const baseClassName = "af-multi-message";
3
+ export const MultiMessageFooter = ({ action, currentIndex, hasMultiple, nextButtonProps, nextLabel, onChangePage, PaginationComponent, prevButtonProps, prevLabel, total, }) => {
4
+ if (!hasMultiple && !action)
5
+ return null;
6
+ return (_jsxs("div", { className: `${baseClassName}__footer`, children: [hasMultiple ? (_jsx(PaginationComponent, { className: `${baseClassName}__pagination`, numberPages: total, currentPage: currentIndex + 1, onChangePage: (page) => onChangePage(page - 1), asItem: "button", "aria-label": "Pagination des messages", prevButtonProps: {
7
+ "aria-label": prevLabel,
8
+ ...prevButtonProps,
9
+ }, nextButtonProps: {
10
+ "aria-label": nextLabel,
11
+ ...nextButtonProps,
12
+ } })) : null, action ? (_jsx("div", { className: `${baseClassName}__action`, children: action })) : null] }));
13
+ };
@@ -0,0 +1,6 @@
1
+ import "@axa-fr/canopee-css/client/MultiMessage/MultiMessageLF.css";
2
+ import { type MultiMessageProps } from "./MultiMessageCommon";
3
+ export { messageVariants, type MessageVariants } from "../Message/MessageLF";
4
+ export type { MultiMessageProps } from "./MultiMessageCommon";
5
+ export type { MultiMessageItem } from "./types";
6
+ export declare const MultiMessage: (props: MultiMessageProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/client/MultiMessage/MultiMessageLF.css";
3
+ import { Message } from "../Message/MessageLF";
4
+ import { Pagination } from "../Pagination/PaginationLF";
5
+ import { MultiMessageCommon, } from "./MultiMessageCommon";
6
+ export { messageVariants } from "../Message/MessageLF";
7
+ export const MultiMessage = (props) => (_jsx(MultiMessageCommon, { ...props, MessageComponent: Message, PaginationComponent: Pagination }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement, ReactNode, ComponentType } from "react";
2
+ import type { ButtonProps } from "../Button/ButtonCommon";
3
+ import type { Link } from "../Link/LinkCommon";
4
+ import type { MessageVariants } from "../Message/types";
5
+ export type MultiMessageItem = {
6
+ /** Variant of the individual message */
7
+ variant: MessageVariants;
8
+ /** Title of the message */
9
+ title?: string;
10
+ /** Body content of the message */
11
+ children?: ReactNode;
12
+ /** Action (link or button) shown alongside the message body */
13
+ action?: ReactElement<typeof Link | ComponentType<ButtonProps>>;
14
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -4,8 +4,8 @@ import { ItemPaginationCommon } from "./ItemPagination/ItemPaginationCommon";
4
4
  import { type getItemsProps } from "./Pagination.helper";
5
5
  export type PaginationProps = getItemsProps & ComponentPropsWithoutRef<"nav"> & {
6
6
  hidePrevNext?: boolean;
7
- prevButtonProps?: ComponentProps<typeof ClickIcon>;
8
- nextButtonProps?: ComponentProps<typeof ClickIcon>;
7
+ prevButtonProps?: Partial<ComponentProps<typeof ClickIcon>>;
8
+ nextButtonProps?: Partial<ComponentProps<typeof ClickIcon>>;
9
9
  };
10
10
  type PaginationCommonProps = PaginationProps & {
11
11
  ItemPaginationComponent: ComponentType<ComponentProps<typeof ItemPaginationCommon>>;
@@ -37,19 +37,26 @@ export {
37
37
  CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo";
38
38
  export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo";
39
39
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioApollo";
40
+ export { RadioText, type RadioTextProps, } from "./prospect-client/Form/Radio/RadioText/RadioTextApollo";
40
41
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaApollo";
41
42
  export { DebugGrid } from "./prospect-client/Grid/DebugGridApollo";
42
43
  export { Heading, type HeadingLevel, type HeadingProps, } from "./prospect-client/Heading/HeadingApollo";
43
44
  export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./prospect-client/Icon/IconApollo";
44
45
  export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/ItemTabBarApollo";
46
+ export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
45
47
  export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterApollo";
48
+ export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
46
49
  export { LevelSelector, type LevelSelectorProps, } from "./prospect-client/LevelSelector/LevelSelectorApollo";
47
- export { Link, linkVariants, type LinkVariants, type LinkProps, } from "./prospect-client/Link/LinkApollo";
50
+ export { Link, linkVariants, type LinkProps, type LinkVariants, } from "./prospect-client/Link/LinkApollo";
48
51
  export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./prospect-client/List/ClickItem/ClickItemApollo";
49
52
  export { ContentItemDuo } from "./prospect-client/List/ContentItemDuo/ContentItemDuoApollo";
50
53
  export { List, type ListProps } from "./prospect-client/List/List/ListApollo";
54
+ export { Loader, type LoaderProps, } from "./prospect-client/Loader/LoaderApollo";
51
55
  export { Message, messageVariants, type MessageVariants, } from "./prospect-client/Message/MessageApollo";
56
+ export { MultiMessage, type MultiMessageItem, type MultiMessageProps, } from "./prospect-client/MultiMessage/MultiMessageApollo";
52
57
  export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./prospect-client/Modal/ModalApollo";
58
+ export { ErrorPage, type ErrorPageProps, } from "./prospect-client/pages/ErrorPage/ErrorPageApollo";
59
+ export { ValidPage, type ValidPageProps, } from "./prospect-client/pages/ValidPage/ValidPageApollo";
53
60
  export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationApollo";
54
61
  export { Pagination } from "./prospect-client/Pagination/PaginationApollo";
55
62
  export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarApollo";
@@ -60,14 +67,9 @@ export { Spinner, spinnerVariants, type SpinnerVariants, } from "./prospect-clie
60
67
  export { Stepper } from "./prospect-client/Stepper/StepperApollo";
61
68
  export { Svg } from "./prospect-client/Svg/Svg";
62
69
  export { TabBar, tabBarDirection, type TabBarDirection, type TabBarProps, } from "./prospect-client/TabBar/TabBarApollo";
70
+ export { Table, type BodyColorVariants, type HeadColorVariants, type RowSizeVariants, type TableProps, } from "./prospect-client/Table/TableApollo";
71
+ export { TableMobileCard } from "./prospect-client/TableMobileCard/TableMobileCard";
63
72
  export { Tag, tagVariants, type TagVariants, } from "./prospect-client/Tag/TagApollo";
64
73
  export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalApollo";
65
74
  export { Toggle } from "./prospect-client/Toggle/ToggleApollo";
66
- export { Table, type TableProps, type HeadColorVariants, type BodyColorVariants, type RowSizeVariants, } from "./prospect-client/Table/TableApollo";
67
- export { TableMobileCard } from "./prospect-client/TableMobileCard/TableMobileCard";
68
- export { ExitLayout, type ExitLayoutWithSubComponents, type ExitLayoutProps, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
69
- export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
70
- export { ValidPage, type ValidPageProps, } from "./prospect-client/pages/ValidPage/ValidPageApollo";
71
- export { ErrorPage, type ErrorPageProps, } from "./prospect-client/pages/ErrorPage/ErrorPageApollo";
72
75
  export type { GridContainerProps } from "./prospect-client/utilities/types/GridContainerProps";
73
- export { Loader, type LoaderProps, } from "./prospect-client/Loader/LoaderApollo";
package/dist/prospect.js CHANGED
@@ -37,19 +37,26 @@ export {
37
37
  CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo";
38
38
  export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo";
39
39
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioApollo";
40
+ export { RadioText, } from "./prospect-client/Form/Radio/RadioText/RadioTextApollo";
40
41
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaApollo";
41
42
  export { DebugGrid } from "./prospect-client/Grid/DebugGridApollo";
42
43
  export { Heading, } from "./prospect-client/Heading/HeadingApollo";
43
44
  export { Icon, iconSizeVariants, iconVariants, } from "./prospect-client/Icon/IconApollo";
44
45
  export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarApollo";
46
+ export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
45
47
  export { Footer, } from "./prospect-client/Layout/Footer/FooterApollo";
48
+ export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
46
49
  export { LevelSelector, } from "./prospect-client/LevelSelector/LevelSelectorApollo";
47
50
  export { Link, linkVariants, } from "./prospect-client/Link/LinkApollo";
48
51
  export { ClickItem, clickItemStates, clickItemVariants, } from "./prospect-client/List/ClickItem/ClickItemApollo";
49
52
  export { ContentItemDuo } from "./prospect-client/List/ContentItemDuo/ContentItemDuoApollo";
50
53
  export { List } from "./prospect-client/List/List/ListApollo";
54
+ export { Loader, } from "./prospect-client/Loader/LoaderApollo";
51
55
  export { Message, messageVariants, } from "./prospect-client/Message/MessageApollo";
56
+ export { MultiMessage, } from "./prospect-client/MultiMessage/MultiMessageApollo";
52
57
  export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./prospect-client/Modal/ModalApollo";
58
+ export { ErrorPage, } from "./prospect-client/pages/ErrorPage/ErrorPageApollo";
59
+ export { ValidPage, } from "./prospect-client/pages/ValidPage/ValidPageApollo";
53
60
  export { ItemPagination, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationApollo";
54
61
  export { Pagination } from "./prospect-client/Pagination/PaginationApollo";
55
62
  export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarApollo";
@@ -60,13 +67,8 @@ export { Spinner, spinnerVariants, } from "./prospect-client/Spinner/SpinnerApol
60
67
  export { Stepper } from "./prospect-client/Stepper/StepperApollo";
61
68
  export { Svg } from "./prospect-client/Svg/Svg";
62
69
  export { TabBar, tabBarDirection, } from "./prospect-client/TabBar/TabBarApollo";
70
+ export { Table, } from "./prospect-client/Table/TableApollo";
71
+ export { TableMobileCard } from "./prospect-client/TableMobileCard/TableMobileCard";
63
72
  export { Tag, tagVariants, } from "./prospect-client/Tag/TagApollo";
64
73
  export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalApollo";
65
74
  export { Toggle } from "./prospect-client/Toggle/ToggleApollo";
66
- export { Table, } from "./prospect-client/Table/TableApollo";
67
- export { TableMobileCard } from "./prospect-client/TableMobileCard/TableMobileCard";
68
- export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
69
- export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
70
- export { ValidPage, } from "./prospect-client/pages/ValidPage/ValidPageApollo";
71
- export { ErrorPage, } from "./prospect-client/pages/ErrorPage/ErrorPageApollo";
72
- export { Loader, } from "./prospect-client/Loader/LoaderApollo";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/canopee-react",
3
- "version": "1.7.1-alpha.3",
3
+ "version": "1.7.1-alpha.31",
4
4
  "description": "Package React - Design System Canopée",
5
5
  "exports": {
6
6
  "./distributeur": {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "homepage": "https://github.com/AxaFrance/design-system#readme",
51
51
  "peerDependencies": {
52
- "@axa-fr/canopee-css": "1.7.1-alpha.3",
52
+ "@axa-fr/canopee-css": "1.7.1-alpha.31",
53
53
  "@material-symbols/svg-400": ">= 0.19.0",
54
54
  "@material-symbols/svg-700": ">= 0.19.0",
55
55
  "react": ">= 18"
@@ -79,7 +79,7 @@
79
79
  "@vitest/ui": "^4.1.5",
80
80
  "copyfiles": "^2.4.1",
81
81
  "jest-axe": "^10.0.0",
82
- "jsdom": "^25.0.1",
82
+ "jsdom": "^29.1.1",
83
83
  "react": "^19.0.0",
84
84
  "rimraf": "^6.0.1",
85
85
  "vitest": "^4.1.5"