@axa-fr/canopee-react 1.8.1-alpha.1 → 2.0.0-alpha.2

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 (176) hide show
  1. package/dist/client.d.ts +4 -4
  2. package/dist/client.js +4 -4
  3. package/dist/distributeur/Action/Action.d.ts +8 -2
  4. package/dist/distributeur/Action/Action.js +4 -4
  5. package/dist/distributeur/Button/Button.d.ts +8 -5
  6. package/dist/distributeur/Button/Button.js +2 -2
  7. package/dist/distributeur/Form/Checkbox/Checkbox.d.ts +6 -3
  8. package/dist/distributeur/Form/Checkbox/Checkbox.js +4 -4
  9. package/dist/distributeur/Form/Checkbox/CheckboxInput.d.ts +6 -3
  10. package/dist/distributeur/Form/Checkbox/CheckboxInput.js +4 -4
  11. package/dist/distributeur/Form/Checkbox/CheckboxItem.d.ts +7 -3
  12. package/dist/distributeur/Form/Checkbox/CheckboxItem.js +4 -4
  13. package/dist/distributeur/Form/Choice/Choice.d.ts +6 -3
  14. package/dist/distributeur/Form/Choice/Choice.js +4 -4
  15. package/dist/distributeur/Form/Choice/ChoiceInput.d.ts +6 -3
  16. package/dist/distributeur/Form/Choice/ChoiceInput.js +2 -4
  17. package/dist/distributeur/Form/Date/Date.d.ts +4 -1
  18. package/dist/distributeur/Form/Date/Date.js +4 -4
  19. package/dist/distributeur/Form/Date/DateInput.d.ts +4 -1
  20. package/dist/distributeur/Form/Date/DateInput.js +2 -4
  21. package/dist/distributeur/Form/Experimental/Input.d.ts +5 -1
  22. package/dist/distributeur/Form/Experimental/Input.js +4 -4
  23. package/dist/distributeur/Form/Experimental/TextInput.d.ts +4 -1
  24. package/dist/distributeur/Form/Experimental/TextInput.js +4 -4
  25. package/dist/distributeur/Form/Number/Number.d.ts +4 -1
  26. package/dist/distributeur/Form/Number/Number.js +4 -4
  27. package/dist/distributeur/Form/Pass/Pass.d.ts +4 -1
  28. package/dist/distributeur/Form/Pass/Pass.js +4 -4
  29. package/dist/distributeur/Form/Radio/Radio.d.ts +12 -23
  30. package/dist/distributeur/Form/Radio/Radio.js +4 -4
  31. package/dist/distributeur/Form/Radio/RadioInput.d.ts +6 -3
  32. package/dist/distributeur/Form/Radio/RadioInput.js +4 -4
  33. package/dist/distributeur/Form/Radio/RadioItem.d.ts +4 -1
  34. package/dist/distributeur/Form/Radio/RadioItem.js +4 -4
  35. package/dist/distributeur/Form/Select/Select.d.ts +9 -325
  36. package/dist/distributeur/Form/Select/Select.js +5 -5
  37. package/dist/distributeur/Form/Select/SelectBase.d.ts +10 -6
  38. package/dist/distributeur/Form/Select/SelectBase.js +4 -4
  39. package/dist/distributeur/Form/Select/SelectDefault.d.ts +4 -1
  40. package/dist/distributeur/Form/Select/SelectDefault.js +4 -4
  41. package/dist/distributeur/Form/Select/SelectDefaultWithOptions.d.ts +4 -1
  42. package/dist/distributeur/Form/Select/SelectDefaultWithOptions.js +5 -12
  43. package/dist/distributeur/Form/Select/SelectInput.d.ts +9 -376
  44. package/dist/distributeur/Form/Select/SelectInput.js +2 -4
  45. package/dist/distributeur/Form/Text/Text.d.ts +4 -1
  46. package/dist/distributeur/Form/Text/Text.js +4 -4
  47. package/dist/distributeur/Form/Text/TextInput.d.ts +4 -1
  48. package/dist/distributeur/Form/Text/TextInput.js +2 -4
  49. package/dist/distributeur/Form/Textarea/Textarea.d.ts +7 -2
  50. package/dist/distributeur/Form/Textarea/Textarea.js +4 -4
  51. package/dist/distributeur/Form/Textarea/TextareaInput.d.ts +4 -1
  52. package/dist/distributeur/Form/Textarea/TextareaInput.js +2 -4
  53. package/dist/distributeur/Layout/Footer/Footer.d.ts +5 -3
  54. package/dist/distributeur/Layout/Footer/Footer.js +2 -2
  55. package/dist/distributeur/Layout/Header/Name/Name.js +1 -1
  56. package/dist/distributeur/Layout/Header/NavBar/NavBarItem/NavBarItemBase.js +1 -1
  57. package/dist/distributeur/Link/Link.d.ts +4 -1
  58. package/dist/distributeur/Link/Link.js +3 -4
  59. package/dist/distributeur/Link/LinkAnchor.d.ts +4 -1
  60. package/dist/distributeur/Link/LinkAnchor.js +4 -4
  61. package/dist/distributeur/Loader/ItemLoader.d.ts +4 -0
  62. package/dist/distributeur/Loader/ItemLoader.js +8 -0
  63. package/dist/distributeur/Loader/Loader.d.ts +7 -10
  64. package/dist/distributeur/Loader/Loader.js +12 -27
  65. package/dist/distributeur/Loader/SquareLoader.d.ts +15 -0
  66. package/dist/distributeur/Loader/SquareLoader.js +33 -0
  67. package/dist/distributeur/ModalAgent/BooleanModal.d.ts +4 -1
  68. package/dist/distributeur/ModalAgent/BooleanModal.js +4 -4
  69. package/dist/distributeur/ModalAgent/Modal.d.ts +4 -1
  70. package/dist/distributeur/ModalAgent/Modal.js +4 -4
  71. package/dist/distributeur/Steps/VerticalStep.d.ts +2 -8
  72. package/dist/distributeur/Svg/svgInjector.js +1 -0
  73. package/dist/distributeur/Tag/Tag.d.ts +4 -1
  74. package/dist/distributeur/Tag/Tag.js +4 -4
  75. package/dist/distributeur/Title/Title.d.ts +4 -1
  76. package/dist/distributeur/Title/Title.js +4 -4
  77. package/dist/distributeur.d.ts +12 -6
  78. package/dist/distributeur.js +4 -1
  79. package/dist/prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionCommon.d.ts +4 -1
  80. package/dist/prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionCommon.js +3 -3
  81. package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.d.ts +4 -1
  82. package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.js +2 -2
  83. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.d.ts +4 -1
  84. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.js +1 -2
  85. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +4 -1
  86. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +4 -4
  87. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.d.ts +4 -1
  88. package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.js +1 -2
  89. package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +4 -1
  90. package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +4 -4
  91. package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadApollo.d.ts +4 -1
  92. package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadApollo.js +1 -2
  93. package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadCommon.d.ts +4 -1
  94. package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadCommon.js +4 -4
  95. package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadLF.d.ts +4 -1
  96. package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadLF.js +1 -2
  97. package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.d.ts +4 -1
  98. package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.js +3 -4
  99. package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.d.ts +4 -1
  100. package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.js +4 -6
  101. package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.d.ts +4 -1
  102. package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.js +1 -2
  103. package/dist/prospect-client/Form/InputDate/InputDateApollo.d.ts +4 -1
  104. package/dist/prospect-client/Form/InputDate/InputDateApollo.js +1 -2
  105. package/dist/prospect-client/Form/InputDate/InputDateAtom.d.ts +4 -1
  106. package/dist/prospect-client/Form/InputDate/InputDateAtom.js +2 -2
  107. package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +4 -1
  108. package/dist/prospect-client/Form/InputDate/InputDateCommon.js +4 -4
  109. package/dist/prospect-client/Form/InputDate/InputDateLF.d.ts +4 -1
  110. package/dist/prospect-client/Form/InputDate/InputDateLF.js +1 -2
  111. package/dist/prospect-client/Form/InputDate/InputDateTextAtom.d.ts +4 -1
  112. package/dist/prospect-client/Form/InputDate/InputDateTextAtom.js +4 -4
  113. package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +4 -1
  114. package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +4 -4
  115. package/dist/prospect-client/Form/InputText/InputTextApollo.d.ts +4 -1
  116. package/dist/prospect-client/Form/InputText/InputTextApollo.js +1 -2
  117. package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +4 -1
  118. package/dist/prospect-client/Form/InputText/InputTextCommon.js +4 -4
  119. package/dist/prospect-client/Form/InputText/InputTextLF.d.ts +4 -1
  120. package/dist/prospect-client/Form/InputText/InputTextLF.js +1 -2
  121. package/dist/prospect-client/Form/InputTextAtom/InputTextAtomCommon.d.ts +4 -1
  122. package/dist/prospect-client/Form/InputTextAtom/InputTextAtomCommon.js +4 -4
  123. package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.d.ts +3 -0
  124. package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.js +6 -0
  125. package/dist/prospect-client/Form/Radio/{CardRadioOption/CardRadioOptionCommon.d.ts → CardRadio/CardRadioCommon.d.ts} +7 -4
  126. package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +16 -0
  127. package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.d.ts +3 -0
  128. package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.js +6 -0
  129. package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo.js +2 -2
  130. package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +6 -6
  131. package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +3 -3
  132. package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF.js +2 -2
  133. package/dist/prospect-client/Form/Radio/Radio/RadioCommon.d.ts +4 -1
  134. package/dist/prospect-client/Form/Radio/Radio/RadioCommon.js +3 -3
  135. package/dist/prospect-client/Form/TextArea/TextAreaApollo.d.ts +4 -1
  136. package/dist/prospect-client/Form/TextArea/TextAreaApollo.js +1 -2
  137. package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +4 -1
  138. package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +4 -4
  139. package/dist/prospect-client/Form/TextArea/TextAreaLF.d.ts +4 -1
  140. package/dist/prospect-client/Form/TextArea/TextAreaLF.js +1 -2
  141. package/dist/prospect-client/ItemMenu/ItemMenuApollo.d.ts +2 -0
  142. package/dist/prospect-client/ItemMenu/ItemMenuApollo.js +2 -0
  143. package/dist/prospect-client/ItemMenu/ItemMenuCommon.d.ts +22 -0
  144. package/dist/prospect-client/ItemMenu/ItemMenuCommon.js +18 -0
  145. package/dist/prospect-client/ItemMenu/ItemMenuLF.d.ts +2 -0
  146. package/dist/prospect-client/ItemMenu/ItemMenuLF.js +2 -0
  147. package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.d.ts +4 -1
  148. package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.js +4 -4
  149. package/dist/prospect-client/Loader/LoaderCommon.d.ts +4 -1
  150. package/dist/prospect-client/Loader/LoaderCommon.js +4 -4
  151. package/dist/prospect-client/Modal/ModalApollo.d.ts +4 -1
  152. package/dist/prospect-client/Modal/ModalApollo.js +2 -3
  153. package/dist/prospect-client/Modal/ModalCommon.d.ts +4 -1
  154. package/dist/prospect-client/Modal/ModalCommon.js +1 -2
  155. package/dist/prospect-client/Modal/ModalLF.d.ts +4 -1
  156. package/dist/prospect-client/Modal/ModalLF.js +2 -3
  157. package/dist/prospect-client/Modal/components/ModalCore.d.ts +4 -1
  158. package/dist/prospect-client/Modal/components/ModalCore.js +3 -3
  159. package/dist/prospect-client/TabMenu/TabMenu.d.ts +36 -0
  160. package/dist/prospect-client/TabMenu/TabMenu.helpers.d.ts +1 -0
  161. package/dist/prospect-client/TabMenu/TabMenu.helpers.js +12 -0
  162. package/dist/prospect-client/TabMenu/TabMenu.js +39 -0
  163. package/dist/prospect-client/Toggle/ToggleApollo.d.ts +4 -1
  164. package/dist/prospect-client/Toggle/ToggleApollo.js +1 -2
  165. package/dist/prospect-client/Toggle/ToggleCommon.d.ts +4 -3
  166. package/dist/prospect-client/Toggle/ToggleCommon.js +4 -4
  167. package/dist/prospect-client/Toggle/ToggleLF.d.ts +4 -1
  168. package/dist/prospect-client/Toggle/ToggleLF.js +1 -2
  169. package/dist/prospect.d.ts +4 -4
  170. package/dist/prospect.js +4 -4
  171. package/package.json +3 -3
  172. package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo.d.ts +0 -3
  173. package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo.js +0 -6
  174. package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionCommon.js +0 -16
  175. package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF.d.ts +0 -3
  176. package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF.js +0 -6
@@ -15,5 +15,8 @@ type TextAreaCommonProps = TextAreaProps & {
15
15
  ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
16
16
  ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
17
17
  };
18
- declare const TextAreaCommon: import("react").ForwardRefExoticComponent<Omit<TextAreaCommonProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
18
+ 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;
20
+ displayName: string;
21
+ };
19
22
  export { TextAreaCommon };
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useId, } from "react";
2
+ 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 = forwardRef(({ id, className, label, description, helper, error, message, messageType, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder = " ", containerProps, ...inputProps }, inputRef) => {
6
+ const TextAreaCommon = ({ id, className, label, description, helper, error, message, messageType, buttonLabel, moreButtonLabel, onButtonClick, 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`;
@@ -16,7 +16,7 @@ const TextAreaCommon = forwardRef(({ id, className, label, description, helper,
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, 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 })] }));
20
- });
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 })] }));
20
+ };
21
21
  TextAreaCommon.displayName = "TextArea";
22
22
  export { TextAreaCommon };
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/client/Form/TextArea/TextAreaLF.css";
2
2
  import { type TextAreaProps } from "./TextAreaCommon";
3
- export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
3
+ export declare const TextArea: {
4
+ ({ ...props }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/client/Form/TextArea/TextAreaLF.css";
3
- import { forwardRef } from "react";
4
3
  import { ItemLabel } from "../ItemLabel/ItemLabelLF";
5
4
  import { ItemMessage } from "../ItemMessage/ItemMessageLF";
6
5
  import { TextAreaCommon } from "./TextAreaCommon";
7
- export const TextArea = forwardRef((props, ref) => (_jsx(TextAreaCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage })));
6
+ export const TextArea = ({ ...props }) => (_jsx(TextAreaCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
8
7
  TextArea.displayName = "TextArea";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/prospect/ItemMenu/ItemMenuApollo.css";
2
+ export { ItemMenu, type ItemMenuProps } from "./ItemMenuCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/prospect/ItemMenu/ItemMenuApollo.css";
2
+ export { ItemMenu } from "./ItemMenuCommon";
@@ -0,0 +1,22 @@
1
+ import { type ComponentPropsWithRef, type PropsWithChildren } from "react";
2
+ /**
3
+ * Props for the ItemMenu component.
4
+ */
5
+ export type ItemMenuProps = {
6
+ /**
7
+ * Applies the active modifier class.
8
+ * @default false
9
+ */
10
+ isActive?: boolean;
11
+ } & ComponentPropsWithRef<"a">;
12
+ /**
13
+ * Renders a navigational item as an anchor element.
14
+ *
15
+ * @component
16
+ * @param {PropsWithChildren<ItemMenuProps>} props - ItemMenu props.
17
+ * @param {boolean} [props.isActive=false] - Adds active styling.
18
+ * @param {React.ReactNode} props.children - Item label/content.
19
+ * @param {React.Ref<HTMLAnchorElement>} props.ref - Optional ref to the anchor element.
20
+ * @returns {JSX.Element} The rendered ItemMenu component.
21
+ */
22
+ export declare const ItemMenu: ({ isActive, children, className, ...props }: PropsWithChildren<ItemMenuProps>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import {} from "react";
3
+ import { getClassName } from "../utilities/getClassName";
4
+ /**
5
+ * Renders a navigational item as an anchor element.
6
+ *
7
+ * @component
8
+ * @param {PropsWithChildren<ItemMenuProps>} props - ItemMenu props.
9
+ * @param {boolean} [props.isActive=false] - Adds active styling.
10
+ * @param {React.ReactNode} props.children - Item label/content.
11
+ * @param {React.Ref<HTMLAnchorElement>} props.ref - Optional ref to the anchor element.
12
+ * @returns {JSX.Element} The rendered ItemMenu component.
13
+ */
14
+ export const ItemMenu = ({ isActive = false, children, className, ...props }) => (_jsx("a", { className: getClassName({
15
+ baseClassName: "af-item-menu",
16
+ modifiers: [isActive && "active"],
17
+ className,
18
+ }), ...props, children: children }));
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/client/ItemMenu/ItemMenuLF.css";
2
+ export { ItemMenu, type ItemMenuProps } from "./ItemMenuCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/client/ItemMenu/ItemMenuLF.css";
2
+ export { ItemMenu } from "./ItemMenuCommon";
@@ -3,4 +3,7 @@ export type ItemTabBarProps = ComponentPropsWithRef<"button"> & {
3
3
  isActive?: boolean;
4
4
  title: string;
5
5
  };
6
- export declare const ItemTabBar: import("react").ForwardRefExoticComponent<Omit<ItemTabBarProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
6
+ export declare const ItemTabBar: {
7
+ ({ isActive, title, className, ...props }: ItemTabBarProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import {} from "react";
3
3
  import { getComponentClassName } from "../utilities/getComponentClassName";
4
- export const ItemTabBar = forwardRef(({ isActive = false, title, className, ...props }, ref) => {
4
+ export const ItemTabBar = ({ isActive = false, title, className, ...props }) => {
5
5
  const classNames = getComponentClassName("af-item-tab-bar", className);
6
- return (_jsx("button", { ref: ref, type: "button", role: "tab", "aria-selected": isActive, className: classNames, ...props, children: title }));
7
- });
6
+ return (_jsx("button", { type: "button", role: "tab", "aria-selected": isActive, className: classNames, ...props, children: title }));
7
+ };
8
8
  ItemTabBar.displayName = "ItemTabBar";
@@ -10,4 +10,7 @@ export type LoaderProps = {
10
10
  export type LoaderCommonProps<T extends ElementType> = PolymorphicComponent<T, LoaderProps> & {
11
11
  SpinnerComponent: ComponentType<SpinnerProps>;
12
12
  };
13
- export declare const LoaderCommon: import("react").ForwardRefExoticComponent<Omit<LoaderCommonProps<ElementType>, "ref"> & import("react").RefAttributes<HTMLElement>>;
13
+ export declare const LoaderCommon: {
14
+ ({ title, subtitle, SpinnerComponent, spinnerProps, className, isDialog, ...rest }: LoaderCommonProps<ElementType>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useId } from "react";
2
+ import { useId } from "react";
3
3
  import { getClassName } from "../utilities/getClassName";
4
4
  import {} from "../Spinner/SpinnerCommon";
5
- export const LoaderCommon = forwardRef(({ title, subtitle, SpinnerComponent, spinnerProps, className, isDialog, ...rest }, ref) => {
5
+ export const LoaderCommon = ({ title, subtitle, SpinnerComponent, spinnerProps, className, isDialog, ...rest }) => {
6
6
  const baseClassName = "af-loader";
7
7
  const titleId = useId();
8
8
  const Component = (isDialog && "dialog") || "article";
9
- return (_jsxs(Component, { ref: ref, className: getClassName({
9
+ return (_jsxs(Component, { className: getClassName({
10
10
  baseClassName,
11
11
  className,
12
12
  }), "aria-labelledby": titleId, ...rest, children: [_jsx(SpinnerComponent, { ...spinnerProps }), _jsxs("div", { className: `${baseClassName}__content`, children: [_jsx("span", { id: titleId, className: `${baseClassName}__title`, children: title }), subtitle ? (_jsx("span", { className: `${baseClassName}__subtitle`, children: subtitle })) : null] })] }));
13
- });
13
+ };
14
14
  LoaderCommon.displayName = "LoaderCommon";
@@ -5,4 +5,7 @@ export { ModalCoreBody, type ModalCoreBodyProps, } from "./components/ModalCoreB
5
5
  export { ModalCoreFooter } from "./components/ModalCoreFooterApollo";
6
6
  export { ModalCoreHeader } from "./components/ModalCoreHeaderApollo";
7
7
  export type { ModalCoreFooterProps, ModalCoreHeaderProps, ModalProps, } from "./types";
8
- export declare const Modal: import("react").ForwardRefExoticComponent<Omit<ModalProps, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
8
+ export declare const Modal: {
9
+ ({ headingProps, icon, iconProps, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/prospect/Modal/ModalApollo.css";
3
- import { forwardRef } from "react";
4
3
  import { Button } from "../Button/ButtonApollo";
5
4
  import { Heading } from "../Heading/HeadingApollo";
6
5
  import { ModalCommon } from "./ModalCommon";
@@ -8,10 +7,10 @@ export { ModalCore } from "./components/ModalCore";
8
7
  export { ModalCoreBody, } from "./components/ModalCoreBody";
9
8
  export { ModalCoreFooter } from "./components/ModalCoreFooterApollo";
10
9
  export { ModalCoreHeader } from "./components/ModalCoreHeaderApollo";
11
- export const Modal = forwardRef(({ headingProps = {}, icon, iconProps, ...props }, ref) => (_jsx(ModalCommon, { ...props, ref: ref, headingComponent: Heading, headingProps: {
10
+ export const Modal = ({ headingProps = {}, icon, iconProps, ...props }) => (_jsx(ModalCommon, { ...props, headingComponent: Heading, headingProps: {
12
11
  ...headingProps,
13
12
  children: props.title,
14
13
  icon: headingProps.icon ?? icon,
15
14
  iconProps: headingProps.iconProps ?? iconProps,
16
- }, buttonComponent: Button })));
15
+ }, buttonComponent: Button }));
17
16
  Modal.displayName = "Modal";
@@ -7,4 +7,7 @@ export type ModalCommonProps = ModalCoreProps & Omit<ModalCoreHeaderCommonProps,
7
7
  modalCoreFooterProps?: ModalCoreFooterContainerProps;
8
8
  modalCoreHeaderProps?: ModalCoreHeaderContainerProps;
9
9
  };
10
- export declare const ModalCommon: import("react").ForwardRefExoticComponent<Omit<ModalCommonProps, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
10
+ export declare const ModalCommon: {
11
+ ({ children, headingComponent, headingProps, closeButtonAriaLabel, onClose, iconProps, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, buttonComponent, modalCoreBodyProps, modalCoreFooterProps, modalCoreHeaderProps, ...props }: ModalCommonProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { ModalCore } from "./components/ModalCore";
4
3
  import { ModalCoreBody, } from "./components/ModalCoreBody";
5
4
  import { ModalCoreFooterCommon, } from "./components/ModalCoreFooterCommon";
6
5
  import { ModalCoreHeaderCommon } from "./components/ModalCoreHeaderCommon";
7
- export const ModalCommon = forwardRef(({ children, headingComponent, headingProps, closeButtonAriaLabel, onClose, iconProps, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, buttonComponent, modalCoreBodyProps, modalCoreFooterProps, modalCoreHeaderProps, ...props }, ref) => (_jsxs(ModalCore, { onClose: onClose, ref: ref, ...props, children: [_jsx(ModalCoreHeaderCommon, { headingComponent: headingComponent, headingProps: headingProps, iconProps: iconProps, onClose: onClose, closeButtonAriaLabel: closeButtonAriaLabel, ...modalCoreHeaderProps }), _jsx(ModalCoreBody, { ...modalCoreBodyProps, children: children }), _jsx(ModalCoreFooterCommon, { buttonComponent: buttonComponent, primaryButtonProps: primaryButtonProps, secondaryButtonProps: secondaryButtonProps, tertiaryButtonProps: tertiaryButtonProps, ...modalCoreFooterProps })] })));
6
+ export const ModalCommon = ({ children, headingComponent, headingProps, closeButtonAriaLabel, onClose, iconProps, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, buttonComponent, modalCoreBodyProps, modalCoreFooterProps, modalCoreHeaderProps, ...props }) => (_jsxs(ModalCore, { onClose: onClose, ...props, children: [_jsx(ModalCoreHeaderCommon, { headingComponent: headingComponent, headingProps: headingProps, iconProps: iconProps, onClose: onClose, closeButtonAriaLabel: closeButtonAriaLabel, ...modalCoreHeaderProps }), _jsx(ModalCoreBody, { ...modalCoreBodyProps, children: children }), _jsx(ModalCoreFooterCommon, { buttonComponent: buttonComponent, primaryButtonProps: primaryButtonProps, secondaryButtonProps: secondaryButtonProps, tertiaryButtonProps: tertiaryButtonProps, ...modalCoreFooterProps })] }));
8
7
  ModalCommon.displayName = "ModalCommon";
@@ -5,4 +5,7 @@ export { ModalCoreBody, type ModalCoreBodyProps, } from "./components/ModalCoreB
5
5
  export { ModalCoreFooter } from "./components/ModalCoreFooterLF";
6
6
  export { ModalCoreHeader } from "./components/ModalCoreHeaderLF";
7
7
  export type { ModalCoreFooterProps, ModalCoreHeaderProps, ModalProps, } from "./types";
8
- export declare const Modal: import("react").ForwardRefExoticComponent<Omit<ModalProps, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
8
+ export declare const Modal: {
9
+ ({ headingProps, icon, iconProps, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/client/Modal/ModalLF.css";
3
- import { forwardRef } from "react";
4
3
  import { Button } from "../Button/ButtonLF";
5
4
  import { Heading } from "../Heading/HeadingLF";
6
5
  import { ModalCommon } from "./ModalCommon";
@@ -8,10 +7,10 @@ export { ModalCore } from "./components/ModalCore";
8
7
  export { ModalCoreBody, } from "./components/ModalCoreBody";
9
8
  export { ModalCoreFooter } from "./components/ModalCoreFooterLF";
10
9
  export { ModalCoreHeader } from "./components/ModalCoreHeaderLF";
11
- export const Modal = forwardRef(({ headingProps = {}, icon, iconProps, ...props }, ref) => (_jsx(ModalCommon, { ...props, ref: ref, headingComponent: Heading, headingProps: {
10
+ export const Modal = ({ headingProps = {}, icon, iconProps, ...props }) => (_jsx(ModalCommon, { ...props, headingComponent: Heading, headingProps: {
12
11
  ...headingProps,
13
12
  children: props.title,
14
13
  icon: headingProps.icon ?? icon,
15
14
  iconProps: headingProps.iconProps ?? iconProps,
16
- }, buttonComponent: Button })));
15
+ }, buttonComponent: Button }));
17
16
  Modal.displayName = "Modal";
@@ -2,5 +2,8 @@ import { type ComponentPropsWithRef } from "react";
2
2
  export type ModalCoreProps = Omit<ComponentPropsWithRef<"dialog">, "title" | "onClose"> & Required<Pick<ComponentPropsWithRef<"dialog">, "title">> & {
3
3
  onClose?: VoidFunction;
4
4
  };
5
- declare const ModalCore: import("react").ForwardRefExoticComponent<Omit<ModalCoreProps, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
5
+ declare const ModalCore: {
6
+ ({ className, children, ...props }: ModalCoreProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
6
9
  export { ModalCore };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- const ModalCore = forwardRef(({ className, children, ...props }, ref) => (
2
+ import {} from "react";
3
+ const ModalCore = ({ className, children, ...props }) => (
4
4
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events
5
- _jsx("dialog", { "aria-modal": true, "aria-label": props["aria-label"] ?? props.title, className: ["af-modal", className].filter(Boolean).join(" "), onClick: props.onClose, ref: ref, ...props, children: _jsx("section", { className: "af-modal__content", onClick: (e) => e.stopPropagation(), children: children }) })));
5
+ _jsx("dialog", { "aria-modal": true, "aria-label": props["aria-label"] ?? props.title, className: ["af-modal", className].filter(Boolean).join(" "), onClick: props.onClose, ...props, children: _jsx("section", { className: "af-modal__content", onClick: (e) => e.stopPropagation(), children: children }) }));
6
6
  ModalCore.displayName = "ModalCore";
7
7
  export { ModalCore };
@@ -0,0 +1,36 @@
1
+ import { type ComponentPropsWithoutRef } from "react";
2
+ import { type ItemMenuProps } from "../ItemMenu/ItemMenuCommon";
3
+ import "@axa-fr/canopee-css/prospect/TabMenu/TabMenuAll.css";
4
+ /**
5
+ * One item displayed in the TabMenu component.
6
+ */
7
+ export type TabMenuItemProps = Omit<ItemMenuProps, "children"> & {
8
+ /**
9
+ * Visible label of the menu item.
10
+ */
11
+ label: string;
12
+ };
13
+ /**
14
+ * Props for the TabMenu component.
15
+ */
16
+ export type TabMenuProps = {
17
+ /**
18
+ * List of menu items.
19
+ */
20
+ items?: TabMenuItemProps[];
21
+ /**
22
+ * Initial active item position.
23
+ * @default 0
24
+ */
25
+ initialPosition?: number;
26
+ } & Omit<ComponentPropsWithoutRef<"nav">, "children">;
27
+ /**
28
+ * Renders a keyboard-navigable tab-style menu.
29
+ *
30
+ * @component
31
+ * @param {TabMenuProps} props - TabMenu props.
32
+ * @param {TabMenuItemProps[]} [props.items] - Items to render.
33
+ * @param {number} [props.initialPosition=0] - Initially selected item index.
34
+ * @returns {JSX.Element | null} The rendered TabMenu, or null when no items are provided.
35
+ */
36
+ export declare const TabMenu: ({ items, className, initialPosition, ...props }: TabMenuProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const getPosition: (max: number, position: number, direction: string) => number;
@@ -0,0 +1,12 @@
1
+ export const getPosition = (max, position, direction) => {
2
+ switch (direction) {
3
+ case "ArrowRight":
4
+ case "ArrowDown":
5
+ return position + 1 < max ? position + 1 : 0;
6
+ case "ArrowLeft":
7
+ case "ArrowUp":
8
+ return position - 1 < 0 ? max - 1 : position - 1;
9
+ default:
10
+ return position;
11
+ }
12
+ };
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useRef, useState, } from "react";
3
+ import { ItemMenu } from "../ItemMenu/ItemMenuCommon";
4
+ import { getClassName } from "../utilities/getClassName";
5
+ import { getPosition } from "./TabMenu.helpers";
6
+ import "@axa-fr/canopee-css/prospect/TabMenu/TabMenuAll.css";
7
+ /**
8
+ * Renders a keyboard-navigable tab-style menu.
9
+ *
10
+ * @component
11
+ * @param {TabMenuProps} props - TabMenu props.
12
+ * @param {TabMenuItemProps[]} [props.items] - Items to render.
13
+ * @param {number} [props.initialPosition=0] - Initially selected item index.
14
+ * @returns {JSX.Element | null} The rendered TabMenu, or null when no items are provided.
15
+ */
16
+ export const TabMenu = ({ items, className, initialPosition = 0, ...props }) => {
17
+ const [position, setPosition] = useState(initialPosition);
18
+ const itemRefs = useRef([]);
19
+ const handleKeys = useCallback((key) => {
20
+ if (key === "ArrowRight" || key === "ArrowLeft") {
21
+ const newPosition = getPosition(items?.length ?? 0, position, key);
22
+ itemRefs.current[newPosition]?.focus();
23
+ setPosition(newPosition);
24
+ }
25
+ }, [position, items?.length]);
26
+ if (!items || items.length === 0) {
27
+ return null;
28
+ }
29
+ return (
30
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
31
+ _jsx("nav", { className: getClassName({
32
+ baseClassName: "af-tab-menu",
33
+ className,
34
+ }), ...props,
35
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
36
+ tabIndex: 0, onKeyDown: (e) => handleKeys(e.key), children: _jsx("ul", { className: "af-tab-menu__list", children: items.map((item, index) => (_jsx("li", { role: "presentation", children: _jsx(ItemMenu, { ref: (el) => {
37
+ itemRefs.current[index] = el;
38
+ }, ...item, isActive: index === position ? true : item.isActive, tabIndex: index === position ? 0 : -1, children: item.label }) }, item.href))) }) }));
39
+ };
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/prospect/Toggle/ToggleApollo.css";
2
2
  import { type ToggleProps } from "./ToggleCommon";
3
- export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
3
+ export declare const Toggle: {
4
+ ({ ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/prospect/Toggle/ToggleApollo.css";
3
- import { forwardRef } from "react";
4
3
  import { Icon } from "../Icon/IconApollo";
5
4
  import { ToggleCommon } from "./ToggleCommon";
6
- export const Toggle = forwardRef((props, ref) => _jsx(ToggleCommon, { IconComponent: Icon, ...props, ref: ref }));
5
+ export const Toggle = ({ ...props }) => (_jsx(ToggleCommon, { IconComponent: Icon, ...props }));
7
6
  Toggle.displayName = "Toggle";
@@ -4,6 +4,7 @@ export type ToggleProps = Omit<InputHTMLAttributes<HTMLInputElement>, "style" |
4
4
  export type ToggleCommonProps = ToggleProps & {
5
5
  IconComponent: ComponentType<IconProps>;
6
6
  };
7
- export declare const ToggleCommon: import("react").ForwardRefExoticComponent<ToggleProps & {
8
- IconComponent: ComponentType<IconProps>;
9
- } & import("react").RefAttributes<HTMLInputElement>>;
7
+ export declare const ToggleCommon: {
8
+ ({ className, IconComponent, ...inputProps }: ToggleCommonProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import check from "@material-symbols/svg-400/rounded/check.svg";
3
3
  import close from "@material-symbols/svg-400/rounded/close.svg";
4
- import { forwardRef, useId, } from "react";
4
+ import { useId } from "react";
5
5
  import { getComponentClassName } from "../utilities/getComponentClassName";
6
- export const ToggleCommon = forwardRef(({ className, IconComponent, ...inputProps }, ref) => {
6
+ export const ToggleCommon = ({ className, IconComponent, ...inputProps }) => {
7
7
  let inputId = useId();
8
8
  inputId = inputProps.id ?? inputId;
9
- return (_jsxs("label", { className: getComponentClassName("af-toggle", className), htmlFor: inputId, children: [_jsx("div", { className: "af-toggle__root", children: _jsxs("span", { className: "af-toggle__handle", children: [_jsx(IconComponent, { src: check, "aria-hidden": "true", className: "af-toggle__icon af-toggle__icon--check", size: "XS" }), _jsx(IconComponent, { src: close, "aria-hidden": "true", className: "af-toggle__icon af-toggle__icon--close", size: "XS" })] }) }), _jsx("input", { ...inputProps, ref: ref, type: "checkbox", id: inputId })] }));
10
- });
9
+ return (_jsxs("label", { className: getComponentClassName("af-toggle", className), htmlFor: inputId, children: [_jsx("div", { className: "af-toggle__root", children: _jsxs("span", { className: "af-toggle__handle", children: [_jsx(IconComponent, { src: check, "aria-hidden": "true", className: "af-toggle__icon af-toggle__icon--check", size: "XS" }), _jsx(IconComponent, { src: close, "aria-hidden": "true", className: "af-toggle__icon af-toggle__icon--close", size: "XS" })] }) }), _jsx("input", { ...inputProps, type: "checkbox", id: inputId })] }));
10
+ };
11
11
  ToggleCommon.displayName = "ToggleCommon";
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/client/Toggle/ToggleLF.css";
2
2
  import { type ToggleProps } from "./ToggleCommon";
3
- export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
3
+ export declare const Toggle: {
4
+ ({ ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/client/Toggle/ToggleLF.css";
3
- import { forwardRef } from "react";
4
3
  import { Icon } from "../Icon/IconLF";
5
4
  import { ToggleCommon } from "./ToggleCommon";
6
- export const Toggle = forwardRef((props, ref) => _jsx(ToggleCommon, { IconComponent: Icon, ...props, ref: ref }));
5
+ export const Toggle = ({ ...props }) => (_jsx(ToggleCommon, { IconComponent: Icon, ...props }));
7
6
  Toggle.displayName = "Toggle";
@@ -32,10 +32,8 @@ export { InputText } from "./prospect-client/Form/InputText/InputTextApollo";
32
32
  export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomApollo";
33
33
  export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelApollo";
34
34
  export { ItemMessage, itemMessageVariants, type ItemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessageApollo";
35
- export {
36
- /** @deprecated Use `CardRadioGroup` instead. */
37
- CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo";
38
- export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo";
35
+ export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioApollo";
36
+ export { CardRadioGroup } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo";
39
37
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioApollo";
40
38
  export { RadioText, type RadioTextProps, } from "./prospect-client/Form/Radio/RadioText/RadioTextApollo";
41
39
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaApollo";
@@ -43,6 +41,8 @@ export { DebugGrid } from "./prospect-client/Grid/DebugGridApollo";
43
41
  export { Heading, type HeadingLevel, type HeadingProps, } from "./prospect-client/Heading/HeadingApollo";
44
42
  export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./prospect-client/Icon/IconApollo";
45
43
  export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/ItemTabBarApollo";
44
+ export { ItemMenu, type ItemMenuProps, } from "./prospect-client/ItemMenu/ItemMenuApollo";
45
+ export { TabMenu, type TabMenuProps } from "./prospect-client/TabMenu/TabMenu";
46
46
  export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
47
47
  export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterApollo";
48
48
  export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
package/dist/prospect.js CHANGED
@@ -32,10 +32,8 @@ export { InputText } from "./prospect-client/Form/InputText/InputTextApollo";
32
32
  export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomApollo";
33
33
  export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelApollo";
34
34
  export { ItemMessage, itemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessageApollo";
35
- export {
36
- /** @deprecated Use `CardRadioGroup` instead. */
37
- CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo";
38
- export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo";
35
+ export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioApollo";
36
+ export { CardRadioGroup } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo";
39
37
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioApollo";
40
38
  export { RadioText, } from "./prospect-client/Form/Radio/RadioText/RadioTextApollo";
41
39
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaApollo";
@@ -43,6 +41,8 @@ export { DebugGrid } from "./prospect-client/Grid/DebugGridApollo";
43
41
  export { Heading, } from "./prospect-client/Heading/HeadingApollo";
44
42
  export { Icon, iconSizeVariants, iconVariants, } from "./prospect-client/Icon/IconApollo";
45
43
  export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarApollo";
44
+ export { ItemMenu, } from "./prospect-client/ItemMenu/ItemMenuApollo";
45
+ export { TabMenu } from "./prospect-client/TabMenu/TabMenu";
46
46
  export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
47
47
  export { Footer, } from "./prospect-client/Layout/Footer/FooterApollo";
48
48
  export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/canopee-react",
3
- "version": "1.8.1-alpha.1",
3
+ "version": "2.0.0-alpha.2",
4
4
  "description": "Package React - Design System Canopée",
5
5
  "exports": {
6
6
  "./distributeur": {
@@ -53,10 +53,10 @@
53
53
  },
54
54
  "homepage": "https://github.com/AxaFrance/design-system#readme",
55
55
  "peerDependencies": {
56
- "@axa-fr/canopee-css": "1.8.1-alpha.1",
56
+ "@axa-fr/canopee-css": "2.0.0-alpha.2",
57
57
  "@material-symbols/svg-400": ">= 0.19.0",
58
58
  "@material-symbols/svg-700": ">= 0.19.0",
59
- "react": ">= 18"
59
+ "react": ">= 19"
60
60
  },
61
61
  "dependencies": {
62
62
  "@floating-ui/react": "^0.27.8",
@@ -1,3 +0,0 @@
1
- import { type CardRadioOptionProps } from "./CardRadioOptionCommon";
2
- import "@axa-fr/canopee-css/prospect/Form/Radio/CardRadioOption/CardRadioOptionApollo.css";
3
- export declare const CardRadioOption: (props: CardRadioOptionProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Icon } from "../../../Icon/IconApollo";
3
- import { Radio } from "../Radio/RadioApollo";
4
- import { CardRadioOptionCommon, } from "./CardRadioOptionCommon";
5
- import "@axa-fr/canopee-css/prospect/Form/Radio/CardRadioOption/CardRadioOptionApollo.css";
6
- export const CardRadioOption = (props) => (_jsx(CardRadioOptionCommon, { ...props, RadioComponent: Radio, IconComponent: Icon }));
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, } from "react";
3
- import { BasePicture } from "../../../BasePicture/BasePicture";
4
- import { getClassName } from "../../../utilities/getClassName";
5
- export const CardRadioOptionCommon = forwardRef(({ label, position, type, description, subtitle, icon, src, basePictureProps, isInvalid, className, RadioComponent, IconComponent, ...inputProps }, ref) => {
6
- const isCardRadioOptionHorizontal = [position, type].includes("horizontal");
7
- return (_jsxs("label", { className: getClassName({
8
- baseClassName: "af-card-radio-option",
9
- modifiers: [
10
- isInvalid && "invalid",
11
- isCardRadioOptionHorizontal && "horizontal",
12
- ],
13
- className,
14
- }), children: [icon ? _jsx(IconComponent, { src: icon, role: "presentation" }) : null, isCardRadioOptionHorizontal && src ? (_jsx(BasePicture, { src: src, ...basePictureProps })) : null, _jsxs("div", { className: "af-card-radio-option__content", children: [_jsx("p", { className: "af-card-radio-option__label", children: label }), Boolean(description) && (_jsx("p", { className: "af-card-radio-option__description", children: description })), Boolean(subtitle) && (_jsx("p", { className: "af-card-radio-option__subtitle", children: subtitle }))] }), _jsx(RadioComponent, { ...inputProps, isInvalid: isInvalid, ref: ref })] }));
15
- });
16
- CardRadioOptionCommon.displayName = "CardRadioOptionCommon";
@@ -1,3 +0,0 @@
1
- import { type CardRadioOptionProps } from "./CardRadioOptionCommon";
2
- import "@axa-fr/canopee-css/client/Form/Radio/CardRadioOption/CardRadioOptionLF.css";
3
- export declare const CardRadioOption: (props: CardRadioOptionProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Icon } from "../../../Icon/IconLF";
3
- import { Radio } from "../Radio/RadioLF";
4
- import { CardRadioOptionCommon, } from "./CardRadioOptionCommon";
5
- import "@axa-fr/canopee-css/client/Form/Radio/CardRadioOption/CardRadioOptionLF.css";
6
- export const CardRadioOption = (props) => (_jsx(CardRadioOptionCommon, { ...props, RadioComponent: Radio, IconComponent: Icon }));