@axa-fr/canopee-react 2.0.0-alpha.7 → 2.0.0-alpha.71

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 (180) hide show
  1. package/dist/client.d.ts +17 -16
  2. package/dist/client.js +17 -16
  3. package/dist/distributeur/ButtonMultiActions/ButtonMultiActions.d.ts +10 -0
  4. package/dist/distributeur/ButtonMultiActions/ButtonMultiActions.js +51 -0
  5. package/dist/distributeur/ButtonMultiActions/index.d.ts +2 -0
  6. package/dist/distributeur/ButtonMultiActions/index.js +1 -0
  7. package/dist/distributeur/Card/BaseCard.d.ts +14 -0
  8. package/dist/distributeur/Card/BaseCard.js +23 -0
  9. package/dist/distributeur/CardButton/CardButton.d.ts +18 -0
  10. package/dist/distributeur/CardButton/CardButton.js +12 -0
  11. package/dist/distributeur/Form/Experimental/InputContainer.d.ts +4 -1
  12. package/dist/distributeur/Form/Experimental/InputContainer.js +2 -2
  13. package/dist/distributeur/Form/Experimental/InputUnit.d.ts +1 -1
  14. package/dist/distributeur/Form/Experimental/InputUnit.js +1 -1
  15. package/dist/distributeur/Form/Experimental/ItemMessage.d.ts +1 -1
  16. package/dist/distributeur/Form/Experimental/ItemMessage.js +1 -1
  17. package/dist/distributeur/Form/Experimental/Label.d.ts +1 -2
  18. package/dist/distributeur/Form/Experimental/Legend.d.ts +12 -0
  19. package/dist/distributeur/Form/Experimental/Legend.js +3 -0
  20. package/dist/distributeur/Form/Experimental/Radio/AddRadioCard.d.ts +7 -0
  21. package/dist/distributeur/Form/Experimental/Radio/AddRadioCard.js +14 -0
  22. package/dist/distributeur/Form/Experimental/Radio/RadioButton.d.ts +13 -0
  23. package/dist/distributeur/Form/Experimental/Radio/RadioButton.js +3 -0
  24. package/dist/distributeur/Form/Experimental/Radio/RadioCard.d.ts +10 -0
  25. package/dist/distributeur/Form/Experimental/Radio/RadioCard.js +13 -0
  26. package/dist/distributeur/Form/Experimental/Radio/RadioGroup.d.ts +8 -0
  27. package/dist/distributeur/Form/Experimental/Radio/RadioGroup.js +10 -0
  28. package/dist/distributeur/Form/Experimental/Radio/RadioInput.d.ts +18 -0
  29. package/dist/distributeur/Form/Experimental/Radio/RadioInput.js +34 -0
  30. package/dist/distributeur/Form/Experimental/Radio/RadioItem.d.ts +4 -0
  31. package/dist/distributeur/Form/Experimental/Radio/RadioItem.js +10 -0
  32. package/dist/distributeur/Form/Experimental/Radio/RadioText.d.ts +6 -0
  33. package/dist/distributeur/Form/Experimental/Radio/RadioText.js +3 -0
  34. package/dist/distributeur/Form/Experimental/Radio/_radioInputOptions.d.ts +8 -0
  35. package/dist/distributeur/Form/Experimental/Radio/_radioInputOptions.js +7 -0
  36. package/dist/distributeur/Form/Experimental/index.d.ts +6 -0
  37. package/dist/distributeur/Form/Experimental/index.js +6 -0
  38. package/dist/distributeur/Form/Experimental/types.d.ts +1 -1
  39. package/dist/distributeur/Form/Experimental/useInput.hook.js +1 -1
  40. package/dist/distributeur/Title/Title.js +1 -1
  41. package/dist/distributeur-experimental.d.ts +2 -0
  42. package/dist/distributeur-experimental.js +2 -0
  43. package/dist/distributeur.d.ts +3 -0
  44. package/dist/distributeur.js +3 -0
  45. package/dist/prospect-client/AccordionCore/AccordionCoreCommon.d.ts +3 -5
  46. package/dist/prospect-client/AccordionCore/AccordionCoreCommon.js +10 -4
  47. package/dist/prospect-client/AppName/AppName.d.ts +44 -0
  48. package/dist/prospect-client/AppName/AppName.js +23 -0
  49. package/dist/prospect-client/Card/CardApollo.d.ts +1 -1
  50. package/dist/prospect-client/Card/CardApollo.js +1 -1
  51. package/dist/prospect-client/Card/CardCommon.d.ts +30 -2
  52. package/dist/prospect-client/Card/CardCommon.js +18 -1
  53. package/dist/prospect-client/Card/CardLF.d.ts +1 -1
  54. package/dist/prospect-client/Card/CardLF.js +1 -1
  55. package/dist/prospect-client/CardMessage/CardMessageCommon.js +6 -4
  56. package/dist/prospect-client/ContentItemDuoAction/ContentItemDuoActionCommon.d.ts +2 -2
  57. package/dist/prospect-client/ContentItemDuoAction/ContentItemDuoActionCommon.js +5 -2
  58. package/dist/prospect-client/ContentItemMono/ContentItemMonoCommon.d.ts +0 -4
  59. package/dist/prospect-client/ContentItemMono/ContentItemMonoCommon.js +2 -3
  60. package/dist/prospect-client/DataAgent/DataAgentCommon.js +2 -2
  61. package/dist/prospect-client/Divider/DividerCommon.js +6 -2
  62. package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxApollo.d.ts +1 -0
  63. package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.d.ts +1 -17
  64. package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.js +4 -4
  65. package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF.d.ts +1 -0
  66. package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.d.ts +2 -6
  67. package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.js +6 -2
  68. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +1 -5
  69. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +3 -3
  70. package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +2 -10
  71. package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +3 -3
  72. package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +2 -10
  73. package/dist/prospect-client/Form/InputDate/InputDateCommon.js +4 -5
  74. package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +2 -10
  75. package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +9 -5
  76. package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +3 -11
  77. package/dist/prospect-client/Form/InputText/InputTextCommon.js +6 -5
  78. package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.d.ts +2 -22
  79. package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.js +4 -5
  80. package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.d.ts +7 -0
  81. package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.js +6 -0
  82. package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.d.ts +8 -0
  83. package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.js +9 -0
  84. package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.d.ts +7 -0
  85. package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.js +6 -0
  86. package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.d.ts +4 -0
  87. package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.js +5 -0
  88. package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.d.ts +11 -0
  89. package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.js +2 -0
  90. package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.d.ts +4 -0
  91. package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.js +5 -0
  92. package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.d.ts +1 -5
  93. package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +4 -4
  94. package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +3 -27
  95. package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +4 -6
  96. package/dist/prospect-client/Form/Radio/Radio/RadioCommon.d.ts +2 -5
  97. package/dist/prospect-client/Form/Radio/Radio/RadioCommon.js +6 -4
  98. package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +2 -6
  99. package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +3 -3
  100. package/dist/prospect-client/Header/HeaderApollo.d.ts +4 -0
  101. package/dist/prospect-client/Header/HeaderApollo.js +8 -0
  102. package/dist/prospect-client/Header/HeaderCommon.d.ts +22 -0
  103. package/dist/prospect-client/Header/HeaderCommon.js +37 -0
  104. package/dist/prospect-client/Header/HeaderLF.d.ts +4 -0
  105. package/dist/prospect-client/Header/HeaderLF.js +8 -0
  106. package/dist/prospect-client/Icon/IconCommon.d.ts +1 -1
  107. package/dist/prospect-client/Icon/IconCommon.js +8 -9
  108. package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.js +5 -2
  109. package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.d.ts +12 -0
  110. package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.js +12 -0
  111. package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.d.ts +12 -0
  112. package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.js +12 -0
  113. package/dist/prospect-client/Layout/ExitLayout/ExitLayoutSkeleton.d.ts +23 -0
  114. package/dist/prospect-client/Layout/ExitLayout/ExitLayoutSkeleton.js +17 -0
  115. package/dist/prospect-client/Link/LinkCommon.d.ts +1 -5
  116. package/dist/prospect-client/Link/LinkCommon.js +2 -2
  117. package/dist/prospect-client/List/ClickItem/ClickItemCommon.d.ts +1 -0
  118. package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.d.ts +1 -5
  119. package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.js +3 -7
  120. package/dist/prospect-client/List/List/ListCommon.d.ts +27 -2
  121. package/dist/prospect-client/List/List/ListCommon.js +12 -0
  122. package/dist/prospect-client/MenuBurger/MenuBurgerApollo.d.ts +4 -0
  123. package/dist/prospect-client/MenuBurger/MenuBurgerApollo.js +8 -0
  124. package/dist/prospect-client/MenuBurger/MenuBurgerCommon.d.ts +60 -0
  125. package/dist/prospect-client/MenuBurger/MenuBurgerCommon.js +34 -0
  126. package/dist/prospect-client/MenuBurger/MenuBurgerLF.d.ts +4 -0
  127. package/dist/prospect-client/MenuBurger/MenuBurgerLF.js +8 -0
  128. package/dist/prospect-client/MessageBar/MessageBarAction.d.ts +8 -0
  129. package/dist/prospect-client/MessageBar/MessageBarAction.js +11 -0
  130. package/dist/prospect-client/MessageBar/MessageBarApollo.d.ts +5 -0
  131. package/dist/prospect-client/MessageBar/MessageBarApollo.js +7 -0
  132. package/dist/prospect-client/MessageBar/MessageBarCommon.d.ts +26 -0
  133. package/dist/prospect-client/MessageBar/MessageBarCommon.js +33 -0
  134. package/dist/prospect-client/MessageBar/MessageBarDescription.d.ts +6 -0
  135. package/dist/prospect-client/MessageBar/MessageBarDescription.js +8 -0
  136. package/dist/prospect-client/MessageBar/MessageBarLF.d.ts +5 -0
  137. package/dist/prospect-client/MessageBar/MessageBarLF.js +7 -0
  138. package/dist/prospect-client/MessageBar/MessageBarSummary.d.ts +11 -0
  139. package/dist/prospect-client/MessageBar/MessageBarSummary.js +2 -0
  140. package/dist/prospect-client/MessageBar/types.d.ts +1 -0
  141. package/dist/prospect-client/MessageBar/types.js +1 -0
  142. package/dist/prospect-client/Modal/ModalApollo.d.ts +1 -1
  143. package/dist/prospect-client/Modal/ModalApollo.js +1 -3
  144. package/dist/prospect-client/Modal/ModalCommon.d.ts +1 -1
  145. package/dist/prospect-client/Modal/ModalCommon.js +1 -1
  146. package/dist/prospect-client/Modal/ModalLF.d.ts +1 -1
  147. package/dist/prospect-client/Modal/ModalLF.js +1 -3
  148. package/dist/prospect-client/Modal/components/ModalCoreHeaderCommon.d.ts +0 -7
  149. package/dist/prospect-client/Modal/components/ModalCoreHeaderCommon.js +2 -12
  150. package/dist/prospect-client/Modal/types.d.ts +0 -15
  151. package/dist/prospect-client/ProgressBarGroup/ProgressBarGroupCommon.d.ts +1 -5
  152. package/dist/prospect-client/ProgressBarGroup/ProgressBarGroupCommon.js +1 -1
  153. package/dist/prospect-client/Skeleton/Skeleton.d.ts +61 -0
  154. package/dist/prospect-client/Skeleton/Skeleton.js +41 -0
  155. package/dist/prospect-client/SkeletonGrid/SkeletonGrid.d.ts +51 -0
  156. package/dist/prospect-client/SkeletonGrid/SkeletonGrid.js +37 -0
  157. package/dist/prospect-client/SkeletonList/SkeletonListApollo.d.ts +7 -0
  158. package/dist/prospect-client/SkeletonList/SkeletonListApollo.js +8 -2
  159. package/dist/prospect-client/SkeletonList/SkeletonListCommon.d.ts +21 -4
  160. package/dist/prospect-client/SkeletonList/SkeletonListCommon.js +18 -2
  161. package/dist/prospect-client/SkeletonList/SkeletonListLF.d.ts +7 -0
  162. package/dist/prospect-client/SkeletonList/SkeletonListLF.js +8 -2
  163. package/dist/prospect-client/Stepper/StepperApollo.js +2 -1
  164. package/dist/prospect-client/Stepper/StepperCommon.d.ts +11 -6
  165. package/dist/prospect-client/Stepper/StepperCommon.js +2 -3
  166. package/dist/prospect-client/Stepper/StepperLF.js +2 -1
  167. package/dist/prospect-client/TabMenu/TabMenu.js +1 -1
  168. package/dist/prospect-client/Tag/TagCommon.js +6 -2
  169. package/dist/prospect-client/Toggle/ToggleCommon.js +2 -2
  170. package/dist/prospect.d.ts +11 -6
  171. package/dist/prospect.js +11 -6
  172. package/package.json +2 -2
  173. package/dist/prospect-client/Skeleton/SkeletonApollo.d.ts +0 -2
  174. package/dist/prospect-client/Skeleton/SkeletonApollo.js +0 -2
  175. package/dist/prospect-client/Skeleton/SkeletonCommon.d.ts +0 -19
  176. package/dist/prospect-client/Skeleton/SkeletonCommon.js +0 -11
  177. package/dist/prospect-client/Skeleton/SkeletonLF.d.ts +0 -2
  178. package/dist/prospect-client/Skeleton/SkeletonLF.js +0 -2
  179. package/dist/prospect-client/utilities/getComponentClassName.d.ts +0 -4
  180. package/dist/prospect-client/utilities/getComponentClassName.js +0 -30
@@ -5,18 +5,14 @@ import { ItemMessage, type ItemMessageProps } from "../ItemMessage/ItemMessageCo
5
5
  export type TextAreaProps = ComponentPropsWithRef<"textarea"> & {
6
6
  label?: ItemLabelProps["children"];
7
7
  helper?: string;
8
- /**
9
- * @deprecated Use `message` and messageType instead.
10
- */
11
- error?: string;
12
8
  containerProps?: GridContainerProps;
13
- } & Pick<ItemLabelProps, "description" | "moreButtonLabel" | "buttonLabel" | "onMoreButtonClick" | "onButtonClick" | "sideButtonLabel" | "onSideButtonClick"> & Pick<ItemMessageProps, "message" | "messageType">;
9
+ } & Pick<ItemLabelProps, "description" | "moreButtonLabel" | "onMoreButtonClick" | "sideButtonLabel" | "onSideButtonClick"> & Pick<ItemMessageProps, "message" | "messageType">;
14
10
  type TextAreaCommonProps = TextAreaProps & {
15
11
  ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
16
12
  ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
17
13
  };
18
14
  declare const TextAreaCommon: {
19
- ({ id, className, label, description, helper, error, message, messageType, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder, containerProps, ...inputProps }: TextAreaCommonProps): import("react/jsx-runtime").JSX.Element;
15
+ ({ id, className, label, description, helper, message, messageType, moreButtonLabel, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder, containerProps, ...inputProps }: TextAreaCommonProps): import("react/jsx-runtime").JSX.Element;
20
16
  displayName: string;
21
17
  };
22
18
  export { TextAreaCommon };
@@ -3,12 +3,12 @@ import { useId, } from "react";
3
3
  import { getClassName } from "../../utilities/getClassName";
4
4
  import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
5
5
  import { ItemMessage, } from "../ItemMessage/ItemMessageCommon";
6
- const TextAreaCommon = ({ id, className, label, description, helper, error, message, messageType, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder = " ", containerProps, ...inputProps }) => {
6
+ const TextAreaCommon = ({ id, className, label, description, helper, message, messageType = "error", moreButtonLabel, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder = " ", containerProps, ...inputProps }) => {
7
7
  const generatedId = useId();
8
8
  const inputId = id ?? generatedId;
9
9
  const helperId = `${inputId}-helper`;
10
10
  const messageId = `${inputId}-error`;
11
- const hasError = (Boolean(message) && messageType === "error") || Boolean(error);
11
+ const hasError = Boolean(message) && messageType === "error";
12
12
  const hasWarning = Boolean(message) && messageType === "warning" && !hasError;
13
13
  const textareaClassName = getClassName({
14
14
  baseClassName: "af-form__textarea",
@@ -16,7 +16,7 @@ const TextAreaCommon = ({ id, className, label, description, helper, error, mess
16
16
  });
17
17
  return (_jsxs("div", { className: ["af-form__input-container", className]
18
18
  .filter(Boolean)
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, "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, onMoreButtonClick: onMoreButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsx("textarea", { id: inputId, className: textareaClassName, "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, messageType: messageType })] }));
20
20
  };
21
21
  TextAreaCommon.displayName = "TextArea";
22
22
  export { TextAreaCommon };
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/canopee-css/prospect/Header/HeaderApollo.css";
2
+ import { type HeaderProps } from "./HeaderCommon";
3
+ export declare const Header: (props: HeaderProps) => import("react/jsx-runtime").JSX.Element;
4
+ export type { HeaderProps };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/prospect/Header/HeaderApollo.css";
3
+ import { AppName } from "../AppName/AppName";
4
+ import { Heading } from "../Heading/HeadingApollo";
5
+ import { MenuBurger } from "../MenuBurger/MenuBurgerApollo";
6
+ import { ClickIcon } from "../ClickIcon/ClickIconApollo";
7
+ import { HeaderCommon } from "./HeaderCommon";
8
+ export const Header = (props) => (_jsx(HeaderCommon, { AppNameComponent: AppName, HeadingComponent: Heading, MenuBurgerComponent: MenuBurger, ClickIconComponent: ClickIcon, ...props }));
@@ -0,0 +1,22 @@
1
+ import { type ComponentPropsWithoutRef, type ComponentType, type ReactNode } from "react";
2
+ import { type ClickIconProps } from "../ClickIcon/ClickIconCommon";
3
+ import { type AppNameProps } from "../AppName/AppName";
4
+ import { type HeadingProps } from "../Heading/types";
5
+ import { type MenuBurgerProps } from "../MenuBurger/MenuBurgerCommon";
6
+ import { type TabMenuProps } from "../TabMenu/TabMenu";
7
+ export type HeaderProps = Omit<ComponentPropsWithoutRef<"header">, "title"> & {
8
+ appNameProps: AppNameProps;
9
+ menuBurgerProps?: MenuBurgerProps;
10
+ tabMenuProps?: TabMenuProps;
11
+ clickIconProps?: ClickIconProps;
12
+ title?: string;
13
+ actionChildren?: ReactNode;
14
+ };
15
+ type HeaderCommonProps = HeaderProps & {
16
+ AppNameComponent: ComponentType<AppNameProps>;
17
+ HeadingComponent: ComponentType<HeadingProps>;
18
+ MenuBurgerComponent: ComponentType<MenuBurgerProps>;
19
+ ClickIconComponent: ComponentType<ClickIconProps>;
20
+ };
21
+ export declare const HeaderCommon: ({ appNameProps, menuBurgerProps, tabMenuProps, clickIconProps, title, className, AppNameComponent, HeadingComponent, MenuBurgerComponent, ClickIconComponent, actionChildren, ...props }: HeaderCommonProps) => import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import {} from "react";
3
+ import menu from "@material-symbols/svg-400/outlined/menu.svg";
4
+ import { BREAKPOINT } from "../utilities/constants";
5
+ import {} from "../ClickIcon/ClickIconCommon";
6
+ import { TabMenu } from "../TabMenu/TabMenu";
7
+ import {} from "../AppName/AppName";
8
+ import {} from "../Heading/types";
9
+ import {} from "../MenuBurger/MenuBurgerCommon";
10
+ import {} from "../TabMenu/TabMenu";
11
+ import { getClassName } from "../utilities/getClassName";
12
+ import { useIsSmallScreen } from "../utilities/hook/useIsSmallScreen";
13
+ const withElementClass = (props, baseClassName) => ({
14
+ ...props,
15
+ className: getClassName({
16
+ baseClassName,
17
+ className: props.className,
18
+ }),
19
+ });
20
+ export const HeaderCommon = ({ appNameProps, menuBurgerProps, tabMenuProps, clickIconProps, title, className, AppNameComponent, HeadingComponent, MenuBurgerComponent, ClickIconComponent, actionChildren, ...props }) => {
21
+ const isSmallScreen = useIsSmallScreen(BREAKPOINT.MD);
22
+ const parsedAppNameProps = withElementClass(appNameProps, "af-header__app-name");
23
+ const parsedMenuBurgerProps = menuBurgerProps
24
+ ? withElementClass(menuBurgerProps, "af-header__menu-burger")
25
+ : undefined;
26
+ const parsedTabMenuProps = tabMenuProps
27
+ ? withElementClass(tabMenuProps, "af-header__tab-menu")
28
+ : undefined;
29
+ return (_jsxs("header", { className: getClassName({
30
+ baseClassName: "af-header",
31
+ className,
32
+ }), ...props, children: [_jsx(AppNameComponent, { ...parsedAppNameProps }), Boolean(parsedMenuBurgerProps) ||
33
+ Boolean(parsedTabMenuProps) ||
34
+ Boolean(actionChildren) ? (_jsx(ClickIconComponent, { ...clickIconProps, src: menu, size: "S", variant: "ghost", className: "af-header__menu-icon", "aria-haspopup": isSmallScreen ? "menu" : undefined, "aria-label": clickIconProps?.["aria-label"] ?? "Ouvrir le menu", popoverTarget: isSmallScreen ? "af-header-menu" : undefined, popoverTargetAction: isSmallScreen ? "toggle" : undefined })) : null, _jsxs("div", { id: "af-header-menu", popover: isSmallScreen ? "auto" : undefined, className: "af-header__menu", children: [parsedTabMenuProps ? _jsx(TabMenu, { ...parsedTabMenuProps }) : null, (title && !isSmallScreen) ||
35
+ actionChildren ||
36
+ parsedMenuBurgerProps ? (_jsxs("div", { className: "af-header__actions", children: [title ? (_jsx(HeadingComponent, { level: 1, className: "af-header__title", children: title })) : null, actionChildren ? (_jsx("div", { className: "af-header__actions-children", children: actionChildren })) : null, parsedMenuBurgerProps ? (_jsx(MenuBurgerComponent, { ...parsedMenuBurgerProps })) : null] })) : null] })] }));
37
+ };
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/canopee-css/client/Header/HeaderLF.css";
2
+ import { type HeaderProps } from "./HeaderCommon";
3
+ export declare const Header: (props: HeaderProps) => import("react/jsx-runtime").JSX.Element;
4
+ export type { HeaderProps };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/client/Header/HeaderLF.css";
3
+ import { AppName } from "../AppName/AppName";
4
+ import { Heading } from "../Heading/HeadingLF";
5
+ import { MenuBurger } from "../MenuBurger/MenuBurgerLF";
6
+ import { ClickIcon } from "../ClickIcon/ClickIconLF";
7
+ import { HeaderCommon } from "./HeaderCommon";
8
+ export const Header = (props) => (_jsx(HeaderCommon, { AppNameComponent: AppName, HeadingComponent: Heading, MenuBurgerComponent: MenuBurger, ClickIconComponent: ClickIcon, ...props }));
@@ -21,4 +21,4 @@ export type IconProps = ComponentProps<typeof Svg> & {
21
21
  size?: IconSizeVariants;
22
22
  hasBackground?: boolean;
23
23
  };
24
- export declare const Icon: ({ variant, size, hasBackground, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const Icon: ({ variant, size, hasBackground, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { Svg } from "../Svg/Svg";
4
- import { getComponentClassName } from "../utilities/getComponentClassName";
4
+ import { getClassName } from "../utilities/getClassName";
5
5
  export const iconVariants = {
6
6
  primary: "primary",
7
7
  secondary: "secondary",
@@ -16,16 +16,15 @@ export const iconSizeVariants = {
16
16
  S: "small",
17
17
  XS: "extra-small",
18
18
  };
19
- export const Icon = ({ variant = "primary", size = "S", hasBackground = false, ...props }) => {
20
- const componentClassName = useMemo(() => {
21
- const newClassModifier = [
19
+ export const Icon = ({ variant = "primary", size = "S", hasBackground = false, className, ...props }) => {
20
+ const componentClassName = useMemo(() => getClassName({
21
+ baseClassName: "af-icon",
22
+ className,
23
+ modifiers: [
22
24
  variant,
23
25
  iconSizeVariants[size],
24
26
  hasBackground && "has-background",
25
- ]
26
- .filter(Boolean)
27
- .join(" ");
28
- return getComponentClassName("af-icon", "", newClassModifier);
29
- }, [variant, hasBackground, size]);
27
+ ].filter(Boolean),
28
+ }), [className, variant, size, hasBackground]);
30
29
  return (_jsx("div", { className: componentClassName, children: _jsx(Svg, { ...props }) }));
31
30
  };
@@ -1,8 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import {} from "react";
3
- import { getComponentClassName } from "../utilities/getComponentClassName";
3
+ import { getClassName } from "../utilities/getClassName";
4
4
  export const ItemTabBar = ({ isActive = false, title, className, ...props }) => {
5
- const classNames = getComponentClassName("af-item-tab-bar", className);
5
+ const classNames = getClassName({
6
+ baseClassName: "af-item-tab-bar",
7
+ className,
8
+ });
6
9
  return (_jsx("button", { type: "button", role: "tab", "aria-selected": isActive, className: classNames, ...props, children: title }));
7
10
  };
8
11
  ItemTabBar.displayName = "ItemTabBar";
@@ -1,5 +1,17 @@
1
1
  import { type ExitLayoutProps } from "./ExitLayoutCommon";
2
2
  export { type ExitLayoutWithSubComponents, type ExitLayoutProps, } from "./ExitLayoutCommon";
3
+ export { ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./ExitLayoutSkeleton";
4
+ /**
5
+ * Apollo-themed `ExitLayout` component with `Agent`, `Action`, and `Content`
6
+ * static slots.
7
+ *
8
+ * @component
9
+ * @param {ExitLayoutProps} props - ExitLayout props.
10
+ * @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
11
+ * @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
12
+ * @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
13
+ * @returns {JSX.Element} The rendered Apollo-themed ExitLayout.
14
+ */
3
15
  export declare const ExitLayout: {
4
16
  (props: ExitLayoutProps): import("react/jsx-runtime").JSX.Element;
5
17
  Agent: ({ children }: import("react").PropsWithChildren) => (string | number | bigint | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | {
@@ -3,6 +3,18 @@ import { Heading } from "../../Heading/HeadingApollo";
3
3
  import { Icon } from "../../Icon/IconApollo";
4
4
  import { Agent, Action, Content, ExitLayoutCommon, } from "./ExitLayoutCommon";
5
5
  export {} from "./ExitLayoutCommon";
6
+ export { ExitLayoutSkeleton, } from "./ExitLayoutSkeleton";
7
+ /**
8
+ * Apollo-themed `ExitLayout` component with `Agent`, `Action`, and `Content`
9
+ * static slots.
10
+ *
11
+ * @component
12
+ * @param {ExitLayoutProps} props - ExitLayout props.
13
+ * @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
14
+ * @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
15
+ * @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
16
+ * @returns {JSX.Element} The rendered Apollo-themed ExitLayout.
17
+ */
6
18
  export const ExitLayout = (props) => (_jsx(ExitLayoutCommon, { ...props, HeadingComponent: Heading, IconComponent: Icon }));
7
19
  ExitLayout.Agent = Agent;
8
20
  ExitLayout.Action = Action;
@@ -1,5 +1,17 @@
1
1
  import { type ExitLayoutProps } from "./ExitLayoutCommon";
2
2
  export { type ExitLayoutWithSubComponents, type ExitLayoutProps, } from "./ExitLayoutCommon";
3
+ export { ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./ExitLayoutSkeleton";
4
+ /**
5
+ * Look and Feel-themed `ExitLayout` component with `Agent`, `Action`, and
6
+ * `Content` static slots.
7
+ *
8
+ * @component
9
+ * @param {ExitLayoutProps} props - ExitLayout props.
10
+ * @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
11
+ * @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
12
+ * @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
13
+ * @returns {JSX.Element} The rendered Look and Feel ExitLayout.
14
+ */
3
15
  export declare const ExitLayout: {
4
16
  (props: ExitLayoutProps): import("react/jsx-runtime").JSX.Element;
5
17
  Agent: ({ children }: import("react").PropsWithChildren) => (string | number | bigint | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | {
@@ -3,6 +3,18 @@ import { Heading } from "../../Heading/HeadingLF";
3
3
  import { Icon } from "../../Icon/IconLF";
4
4
  import { Agent, Action, Content, ExitLayoutCommon, } from "./ExitLayoutCommon";
5
5
  export {} from "./ExitLayoutCommon";
6
+ export { ExitLayoutSkeleton, } from "./ExitLayoutSkeleton";
7
+ /**
8
+ * Look and Feel-themed `ExitLayout` component with `Agent`, `Action`, and
9
+ * `Content` static slots.
10
+ *
11
+ * @component
12
+ * @param {ExitLayoutProps} props - ExitLayout props.
13
+ * @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
14
+ * @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
15
+ * @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
16
+ * @returns {JSX.Element} The rendered Look and Feel ExitLayout.
17
+ */
6
18
  export const ExitLayout = (props) => (_jsx(ExitLayoutCommon, { ...props, HeadingComponent: Heading, IconComponent: Icon }));
7
19
  ExitLayout.Agent = Agent;
8
20
  ExitLayout.Action = Action;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Props controlling which placeholder areas are displayed in `ExitLayoutSkeleton`.
3
+ */
4
+ export type ExitLayoutSkeletonProps = {
5
+ hasAgent?: boolean;
6
+ hasIcon?: boolean;
7
+ hasAction?: boolean;
8
+ hasContent?: boolean;
9
+ hasHeading?: boolean;
10
+ };
11
+ /**
12
+ * Renders skeleton placeholders matching the visual structure of `ExitLayout`.
13
+ *
14
+ * @component
15
+ * @param {ExitLayoutSkeletonProps} props - ExitLayoutSkeleton props.
16
+ * @param {boolean} [props.hasAgent] - Displays the agent placeholder block.
17
+ * @param {boolean} [props.hasIcon] - Displays the icon placeholder.
18
+ * @param {boolean} [props.hasAction] - Displays the action area placeholder.
19
+ * @param {boolean} [props.hasContent] - Displays the main content placeholder.
20
+ * @param {boolean} [props.hasHeading] - Displays the heading placeholder.
21
+ * @returns {JSX.Element} The rendered ExitLayoutSkeleton component.
22
+ */
23
+ export declare const ExitLayoutSkeleton: ({ hasAgent, hasIcon, hasAction, hasContent, hasHeading, }: ExitLayoutSkeletonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Skeleton } from "../../Skeleton/Skeleton";
3
+ /**
4
+ * Renders skeleton placeholders matching the visual structure of `ExitLayout`.
5
+ *
6
+ * @component
7
+ * @param {ExitLayoutSkeletonProps} props - ExitLayoutSkeleton props.
8
+ * @param {boolean} [props.hasAgent] - Displays the agent placeholder block.
9
+ * @param {boolean} [props.hasIcon] - Displays the icon placeholder.
10
+ * @param {boolean} [props.hasAction] - Displays the action area placeholder.
11
+ * @param {boolean} [props.hasContent] - Displays the main content placeholder.
12
+ * @param {boolean} [props.hasHeading] - Displays the heading placeholder.
13
+ * @returns {JSX.Element} The rendered ExitLayoutSkeleton component.
14
+ */
15
+ export const ExitLayoutSkeleton = ({ hasAgent, hasIcon, hasAction, hasContent, hasHeading, }) => {
16
+ return (_jsxs("section", { className: "af-exit-page subgrid", children: [_jsxs("article", { className: "af-exit-page__content subgrid", children: [hasIcon ? _jsx(Skeleton, { variant: "circle", size: "L" }) : null, hasHeading ? _jsx(Skeleton, { colSize: 12 }) : null, hasContent ? _jsx(Skeleton, { size: "XL", colSize: 12 }) : null] }), hasAgent ? (_jsx(Skeleton, { className: "af-exit-page__agent", size: "XXL", colSize: 12 })) : null, hasAction ? (_jsx("div", { className: "af-exit-page__actions subgrid", children: _jsx(Skeleton, { variant: "action", colSize: 12 }) })) : null] }));
17
+ };
@@ -9,9 +9,5 @@ export type LinkProps = {
9
9
  leftIcon?: ReactNode;
10
10
  rightIcon?: ReactNode;
11
11
  className?: string;
12
- /**
13
- * @deprecated Use variant instead
14
- */
15
- classModifier?: string;
16
12
  } & ComponentPropsWithoutRef<"a">;
17
- export declare const Link: ({ href, variant, openInNewTab, leftIcon, rightIcon, children, className, classModifier, ...props }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Link: ({ href, variant, openInNewTab, leftIcon, rightIcon, children, className, ...props }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
@@ -5,14 +5,14 @@ import { getClassName } from "../utilities/getClassName";
5
5
  export const linkVariants = {
6
6
  inverse: "inverse",
7
7
  };
8
- export const Link = ({ href, variant, openInNewTab = false, leftIcon, rightIcon, children, className, classModifier = "", ...props }) => {
8
+ export const Link = ({ href, variant, openInNewTab = false, leftIcon, rightIcon, children, className, ...props }) => {
9
9
  const newTabProps = openInNewTab && {
10
10
  target: "_blank",
11
11
  rel: "noopener noreferrer",
12
12
  };
13
13
  return (_jsxs("a", { className: getClassName({
14
14
  baseClassName: "af-link",
15
- modifiers: [classModifier, variant, openInNewTab && "openInNewTab"],
15
+ modifiers: [variant, openInNewTab && "openInNewTab"],
16
16
  className,
17
17
  }), href: href, ...newTabProps, ...props, children: [leftIcon, children, openInNewTab || Boolean(rightIcon)
18
18
  ? (rightIcon ?? _jsx(Svg, { src: openInNew }))
@@ -1,4 +1,5 @@
1
1
  import type { ClickItemPropsCommon } from "./types";
2
+ export type { ClickItemProps } from "./types";
2
3
  export declare const clickItemVariants: {
3
4
  readonly small: "small";
4
5
  readonly medium: "medium";
@@ -13,14 +13,10 @@ export type ContentItemDuoProps = {
13
13
  value: ReactNode;
14
14
  buttonText?: string;
15
15
  onButtonClick?: () => void;
16
- /** @deprecated Use `position` instead */
17
- isVertical?: boolean;
18
- /** @deprecated Use `size` or `className` instead */
19
- classModifier?: string;
20
16
  } & Pick<ItemMessageProps, "message" | "messageType"> & ContentItemDuoPositions & ComponentProps<"div">;
21
17
  type ContentItemDuoCommonProps = ContentItemDuoProps & {
22
18
  ButtonComponent: ComponentType<ButtonProps>;
23
19
  ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
24
20
  };
25
- export declare const ContentItemDuoCommon: ({ label, value, position, size, className, classModifier, isVertical, buttonText, onButtonClick, ButtonComponent, message, messageType, ItemMessageComponent, ...containerProps }: ContentItemDuoCommonProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const ContentItemDuoCommon: ({ label, value, position, size, className, buttonText, onButtonClick, ButtonComponent, message, messageType, ItemMessageComponent, ...containerProps }: ContentItemDuoCommonProps) => import("react/jsx-runtime").JSX.Element;
26
22
  export {};
@@ -1,16 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import {} from "react";
3
- import { getClassName } from "../../utilities/getClassName";
4
3
  import { ItemMessage, } from "../../Form/ItemMessage/ItemMessageCommon";
5
- export const ContentItemDuoCommon = ({ label, value, position = "horizontal", size = "large", className, classModifier, isVertical, buttonText, onButtonClick, ButtonComponent, message, messageType, ItemMessageComponent, ...containerProps }) => {
4
+ import { getClassName } from "../../utilities/getClassName";
5
+ export const ContentItemDuoCommon = ({ label, value, position = "horizontal", size = "large", className, buttonText, onButtonClick, ButtonComponent, message, messageType, ItemMessageComponent, ...containerProps }) => {
6
6
  const componentClassName = getClassName({
7
7
  baseClassName: "af-content-item-duo",
8
8
  className,
9
- modifiers: [
10
- isVertical ? "vertical" : position,
11
- size === "small" && size,
12
- classModifier,
13
- ],
9
+ modifiers: [position, size === "small" && size],
14
10
  });
15
11
  return (_jsxs("div", { className: componentClassName, ...containerProps, children: [_jsx("dt", { className: "af-content-item-duo__label", children: label }), _jsxs("dd", { className: "af-content-item-duo__value", children: [value, message ? (_jsx(ItemMessageComponent, { message: message, messageType: messageType })) : null] }), buttonText && onButtonClick ? (_jsx(ButtonComponent, { className: "af-content-item-duo__button", variant: "ghost", onClick: onButtonClick, children: buttonText })) : null] }));
16
12
  };
@@ -1,8 +1,33 @@
1
1
  import { type ComponentProps, type ComponentType } from "react";
2
- import { CardCommon as Card, type CardCommonProps } from "../../Card/CardCommon";
3
- export type ListProps = CardCommonProps<"ul" | "ol">;
2
+ import { CardCommon as Card, type CardCommonProps, type CardVariants } from "../../Card/CardCommon";
3
+ /**
4
+ * Props for the List component.
5
+ * Extends `CardCommonProps` (without `variant` override) to allow the list
6
+ * to be rendered as a `ul` or `ol` with optional card styling.
7
+ */
8
+ export type ListProps = Omit<CardCommonProps<"ul" | "ol">, "variant"> & {
9
+ /**
10
+ * Visual variant inherited from Card.
11
+ * - `"default"` — bordered list with padding.
12
+ * - `"unstyled"` — removes border and padding.
13
+ * @default "default"
14
+ */
15
+ variant?: CardVariants;
16
+ };
4
17
  type ListPropsCommon = ListProps & {
5
18
  CardComponent: ComponentType<ComponentProps<typeof Card>>;
6
19
  };
20
+ /**
21
+ * Renders an accessible list (`ul` or `ol`) wrapped in a Card.
22
+ * Each direct child is automatically wrapped in a `<li>` element.
23
+ *
24
+ * @component
25
+ * @param {ListPropsCommon} props - List props.
26
+ * @param {ReactNode} props.children - Items to render inside the list. Each child is wrapped in a `<li>`.
27
+ * @param {"ul" | "ol"} [props.as="ul"] - HTML list element to render.
28
+ * @param {CardVariants} [props.variant="default"] - Visual variant of the surrounding Card.
29
+ * @param {ComponentType} props.CardComponent - Injected Card component (theme-specific).
30
+ * @returns {JSX.Element} The rendered List component.
31
+ */
7
32
  export declare const ListCommon: ({ children, CardComponent, as, ...listProps }: ListPropsCommon) => import("react/jsx-runtime").JSX.Element;
8
33
  export {};
@@ -2,4 +2,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Children } from "react";
3
3
  import { CardCommon as Card, } from "../../Card/CardCommon";
4
4
  import { generateId } from "../../utilities/generateId";
5
+ /**
6
+ * Renders an accessible list (`ul` or `ol`) wrapped in a Card.
7
+ * Each direct child is automatically wrapped in a `<li>` element.
8
+ *
9
+ * @component
10
+ * @param {ListPropsCommon} props - List props.
11
+ * @param {ReactNode} props.children - Items to render inside the list. Each child is wrapped in a `<li>`.
12
+ * @param {"ul" | "ol"} [props.as="ul"] - HTML list element to render.
13
+ * @param {CardVariants} [props.variant="default"] - Visual variant of the surrounding Card.
14
+ * @param {ComponentType} props.CardComponent - Injected Card component (theme-specific).
15
+ * @returns {JSX.Element} The rendered List component.
16
+ */
5
17
  export const ListCommon = ({ children, CardComponent, as = "ul", ...listProps }) => (_jsx(CardComponent, { as: as, ...listProps, children: Children.toArray(children).map((child) => (_jsx("li", { children: child }, generateId(child)))) }));
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/canopee-css/prospect/MenuBurger/MenuBurgerAll.css";
2
+ import { type MenuBurgerProps } from "./MenuBurgerCommon";
3
+ export declare const MenuBurger: (props: MenuBurgerProps) => import("react/jsx-runtime").JSX.Element;
4
+ export type { MenuBurgerProps };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/prospect/MenuBurger/MenuBurgerAll.css";
3
+ import { Button } from "../Button/ButtonApollo";
4
+ import { Icon } from "../Icon/IconApollo";
5
+ import { ClickItem } from "../List/ClickItem/ClickItemApollo";
6
+ import { List } from "../List/List/ListApollo";
7
+ import { MenuBurgerCommon } from "./MenuBurgerCommon";
8
+ export const MenuBurger = (props) => (_jsx(MenuBurgerCommon, { ButtonComponent: Button, ClickItemComponent: ClickItem, IconComponent: Icon, ListComponent: List, ...props }));
@@ -0,0 +1,60 @@
1
+ import { type ComponentPropsWithoutRef, type ComponentType, type ReactNode, type PropsWithChildren } from "react";
2
+ import type { ButtonProps } from "../Button/ButtonCommon";
3
+ import type { IconProps } from "../Icon/IconCommon";
4
+ import type { ClickItemProps } from "../List/ClickItem/ClickItemCommon";
5
+ import type { ListProps } from "../List/List/ListCommon";
6
+ export declare const menuBurgerVariants: {
7
+ readonly primary: "primary";
8
+ readonly secondary: "secondary";
9
+ };
10
+ export type MenuBurgerVariants = keyof typeof menuBurgerVariants;
11
+ export type MenuBurgerClickItemProps = Omit<ClickItemProps, "variant"> & {
12
+ variant?: ClickItemProps["variant"];
13
+ };
14
+ /**
15
+ * Props for the MenuBurger component.
16
+ */
17
+ export type MenuBurgerProps = {
18
+ /**
19
+ * Label displayed inside the trigger button.
20
+ */
21
+ buttonLabel: string;
22
+ /**
23
+ * Extra content rendered below the ClickItem list.
24
+ */
25
+ children?: ReactNode;
26
+ /**
27
+ * Icon displayed on the left side of the trigger button.
28
+ * @default person
29
+ */
30
+ icon?: IconProps["src"];
31
+ /**
32
+ * Visual variant of the trigger button.
33
+ * @default primary
34
+ */
35
+ variant?: MenuBurgerVariants;
36
+ /**
37
+ * ClickItem list rendered inside the popover panel.
38
+ */
39
+ clickItems?: MenuBurgerClickItemProps[];
40
+ } & Omit<ComponentPropsWithoutRef<"div">, "children">;
41
+ type MenuBurgerCommonProps = PropsWithChildren<MenuBurgerProps> & {
42
+ ButtonComponent: ComponentType<ButtonProps>;
43
+ ClickItemComponent: ComponentType<ClickItemProps>;
44
+ IconComponent: ComponentType<IconProps>;
45
+ ListComponent: ComponentType<ListProps>;
46
+ };
47
+ /**
48
+ * Renders a burger-style menu button opening a popover panel with navigation and actions.
49
+ *
50
+ * @component
51
+ * @param {PropsWithChildren<MenuBurgerProps>} props - MenuBurger props.
52
+ * @param {string} props.buttonLabel - Label shown in the trigger button.
53
+ * @param {IconProps["src"]} [props.icon=person] - Icon shown on the left of the trigger button.
54
+ * @param {MenuBurgerVariants} [props.variant=primary] - Visual variant of the trigger button.
55
+ * @param {ClickItemProps[]} [props.clickItems] - Click items displayed under the links.
56
+ * @param {React.ReactNode} [props.children] - Extra content rendered below the ClickItem list.
57
+ * @returns {JSX.Element} The rendered MenuBurger component.
58
+ */
59
+ export declare const MenuBurgerCommon: ({ buttonLabel, icon, variant, clickItems, children, className, ButtonComponent, ClickItemComponent, IconComponent, ListComponent, ...props }: MenuBurgerCommonProps) => import("react/jsx-runtime").JSX.Element;
60
+ export {};
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import keyboardArrowDown from "@material-symbols/svg-400/outlined/keyboard_arrow_down.svg";
3
+ import person from "@material-symbols/svg-400/outlined/person.svg";
4
+ import { useId, } from "react";
5
+ import { getClassName } from "../utilities/getClassName";
6
+ import { useIsSmallScreen } from "../utilities/hook/useIsSmallScreen";
7
+ import { BREAKPOINT } from "../utilities/constants";
8
+ export const menuBurgerVariants = {
9
+ primary: "primary",
10
+ secondary: "secondary",
11
+ };
12
+ /**
13
+ * Renders a burger-style menu button opening a popover panel with navigation and actions.
14
+ *
15
+ * @component
16
+ * @param {PropsWithChildren<MenuBurgerProps>} props - MenuBurger props.
17
+ * @param {string} props.buttonLabel - Label shown in the trigger button.
18
+ * @param {IconProps["src"]} [props.icon=person] - Icon shown on the left of the trigger button.
19
+ * @param {MenuBurgerVariants} [props.variant=primary] - Visual variant of the trigger button.
20
+ * @param {ClickItemProps[]} [props.clickItems] - Click items displayed under the links.
21
+ * @param {React.ReactNode} [props.children] - Extra content rendered below the ClickItem list.
22
+ * @returns {JSX.Element} The rendered MenuBurger component.
23
+ */
24
+ export const MenuBurgerCommon = ({ buttonLabel, icon = person, variant = "primary", clickItems, children, className, ButtonComponent, ClickItemComponent, IconComponent, ListComponent, ...props }) => {
25
+ const isSmallScreen = useIsSmallScreen(BREAKPOINT.MD);
26
+ const isDesktop = !isSmallScreen;
27
+ const popoverId = useId();
28
+ const triggerId = `${popoverId}-trigger`;
29
+ const iconVariant = variant === "primary" ? "secondary" : "primary";
30
+ return (_jsxs("div", { className: getClassName({
31
+ baseClassName: "af-menu-burger",
32
+ className,
33
+ }), ...props, children: [isDesktop ? (_jsx(ButtonComponent, { id: triggerId, className: "af-menu-burger__button", variant: variant, iconLeft: _jsx(IconComponent, { src: icon, alt: "", role: "presentation", size: "S", variant: iconVariant }), iconRight: _jsx(IconComponent, { className: "af-menu-burger__button-icon--suffix", src: keyboardArrowDown, alt: "", role: "presentation", size: "S", variant: iconVariant }), popoverTarget: popoverId, popoverTargetAction: "toggle", "aria-haspopup": "true", children: buttonLabel })) : null, _jsxs("section", { id: isDesktop ? popoverId : undefined, popover: isDesktop ? "auto" : undefined, className: "af-menu-burger__panel", "aria-labelledby": isDesktop ? triggerId : undefined, children: [clickItems && clickItems.length > 0 ? (_jsx("div", { className: "af-menu-burger__section af-menu-burger__section--actions", children: _jsx(ListComponent, { className: "af-menu-burger__click-items", variant: "unstyled", children: clickItems.map((clickItem) => (_jsx(ClickItemComponent, { variant: clickItem.variant ?? "small", ...clickItem }, clickItem.title))) }) })) : null, children ? (_jsx("div", { className: "af-menu-burger__section af-menu-burger__content", children: children })) : null] })] }));
34
+ };
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/canopee-css/client/MenuBurger/MenuBurgerAll.css";
2
+ import { type MenuBurgerProps } from "./MenuBurgerCommon";
3
+ export declare const MenuBurger: (props: MenuBurgerProps) => import("react/jsx-runtime").JSX.Element;
4
+ export type { MenuBurgerProps };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/canopee-css/client/MenuBurger/MenuBurgerAll.css";
3
+ import { Button } from "../Button/ButtonLF";
4
+ import { Icon } from "../Icon/IconLF";
5
+ import { ClickItem } from "../List/ClickItem/ClickItemLF";
6
+ import { List } from "../List/List/ListLF";
7
+ import { MenuBurgerCommon } from "./MenuBurgerCommon";
8
+ export const MenuBurger = (props) => (_jsx(MenuBurgerCommon, { ButtonComponent: Button, ClickItemComponent: ClickItem, IconComponent: Icon, ListComponent: List, ...props }));
@@ -0,0 +1,8 @@
1
+ import type { ComponentType } from "react";
2
+ import type { ButtonProps } from "../Button/ButtonCommon";
3
+ type MessageBarActionProps = {
4
+ buttonProps?: ButtonProps;
5
+ ButtonComponent: ComponentType<ButtonProps>;
6
+ };
7
+ export declare const MessageBarAction: ({ buttonProps, ButtonComponent, }: MessageBarActionProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getClassName } from "../utilities/getClassName";
3
+ export const MessageBarAction = ({ buttonProps, ButtonComponent, }) => {
4
+ if (!buttonProps) {
5
+ return null;
6
+ }
7
+ return (_jsx(ButtonComponent, { ...buttonProps, className: getClassName({
8
+ baseClassName: "af-message-bar__action",
9
+ className: buttonProps.className,
10
+ }) }));
11
+ };
@@ -0,0 +1,5 @@
1
+ import "@axa-fr/canopee-css/prospect/MessageBar/MessageBarAll.css";
2
+ import { type MessageBarProps } from "./MessageBarCommon";
3
+ export type { MessageBarProps } from "./MessageBarCommon";
4
+ export type { MessageBarVariant } from "./types";
5
+ export declare const MessageBar: (props: MessageBarProps) => import("react/jsx-runtime").JSX.Element;