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

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
@@ -1,4 +1,7 @@
1
1
  import { type InputFileProps } from "./InputFileCommon";
2
2
  import "@axa-fr/canopee-css/prospect/Form/FileUpload/InputFile/InputFileApollo.css";
3
- declare const InputFile: import("react").ForwardRefExoticComponent<Omit<InputFileProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
3
+ declare const InputFile: {
4
+ ({ ...props }: InputFileProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
4
7
  export { InputFile };
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { ItemLabel } from "../../ItemLabel/ItemLabelApollo";
4
3
  import { ItemMessage } from "../../ItemMessage/ItemMessageApollo";
5
4
  import { InputFileCommon } from "./InputFileCommon";
6
5
  import "@axa-fr/canopee-css/prospect/Form/FileUpload/InputFile/InputFileApollo.css";
7
- const InputFile = forwardRef((props, ref) => {
8
- return (_jsx(InputFileCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
9
- });
6
+ const InputFile = ({ ...props }) => {
7
+ return (_jsx(InputFileCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
8
+ };
10
9
  InputFile.displayName = "InputFile";
11
10
  export { InputFile };
@@ -58,5 +58,8 @@ type InputFileCommonProps = InputFileProps & {
58
58
  ItemLabelComponent: ComponentType<ItemLabelProps>;
59
59
  ItemMessageComponent: ComponentType<ItemMessageProps>;
60
60
  };
61
- export declare const InputFileCommon: import("react").ForwardRefExoticComponent<Omit<InputFileCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
61
+ export declare const InputFileCommon: {
62
+ ({ ItemLabelComponent, ItemMessageComponent, id, label, description, sideButtonLabel, onSideButtonClick, moreButtonLabel, onMoreButtonClick, labelProps, helper, required, message, messageType, className, dropzoneLabels, children, containerProps, ...props }: InputFileCommonProps): import("react/jsx-runtime").JSX.Element;
63
+ displayName: string;
64
+ };
62
65
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import addCircleIcon from "@material-symbols/svg-400/rounded/add_circle-fill.svg";
3
- import { forwardRef, useId, } from "react";
3
+ import { useId, } from "react";
4
4
  import { Svg } from "../../../Svg/Svg";
5
5
  import { getClassName } from "../../../utilities/getClassName";
6
6
  import {} from "../../ItemLabel/ItemLabelCommon";
@@ -10,7 +10,7 @@ const DEFAULT_DROPZONE_LABELS = {
10
10
  or: "ou",
11
11
  button: "Importer fichier",
12
12
  };
13
- export const InputFileCommon = forwardRef(({ ItemLabelComponent, ItemMessageComponent, id, label, description, sideButtonLabel, onSideButtonClick, moreButtonLabel, onMoreButtonClick, labelProps, helper, required, message, messageType = "error", className, dropzoneLabels = {}, children, containerProps, ...props }, ref) => {
13
+ export const InputFileCommon = ({ ItemLabelComponent, ItemMessageComponent, id, label, description, sideButtonLabel, onSideButtonClick, moreButtonLabel, onMoreButtonClick, labelProps, helper, required, message, messageType = "error", className, dropzoneLabels = {}, children, containerProps, ...props }) => {
14
14
  const generatedId = useId();
15
15
  const inputId = id || generatedId;
16
16
  const messageId = `${inputId}-message`;
@@ -31,11 +31,9 @@ export const InputFileCommon = forwardRef(({ ItemLabelComponent, ItemMessageComp
31
31
  }), ...containerProps, children: [_jsx(ItemLabelComponent, { htmlFor: inputId, description: description, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, moreButtonLabel: moreButtonLabel, onMoreButtonClick: onMoreButtonClick, required: required, ...labelProps, children: label }), _jsxs("div", { className: "af-input-file__container", children: [_jsxs("span", { className: getClassName({
32
32
  baseClassName: "af-input-file__dropzone",
33
33
  modifiers: [hasError && "error"],
34
- }), children: [_jsx("input", { ref: ref, type: "file", id: inputId, required: required, "aria-invalid": hasError || undefined, "aria-errormessage": hasError ? messageId : undefined, "aria-describedby": ariaDescribedby.length > 0
35
- ? ariaDescribedby.join(" ")
36
- : undefined, ...props }), _jsx("span", { children: resolvedDropzoneLabels.dropzone }), _jsx("span", { children: resolvedDropzoneLabels.or }), _jsxs("span", { className: getClassName({
34
+ }), children: [_jsx("input", { type: "file", id: inputId, required: required, "aria-invalid": hasError || undefined, "aria-errormessage": hasError ? messageId : undefined, "aria-describedby": ariaDescribedby.length > 0 ? ariaDescribedby.join(" ") : undefined, ...props }), _jsx("span", { children: resolvedDropzoneLabels.dropzone }), _jsx("span", { children: resolvedDropzoneLabels.or }), _jsxs("span", { className: getClassName({
37
35
  baseClassName: "af-btn-client",
38
36
  modifiers: ["tertiary"],
39
37
  }), children: [_jsx(Svg, { src: addCircleIcon, role: "presentation" }), resolvedDropzoneLabels.button] })] }), helper ? (_jsx("span", { id: helpId, className: "af-input-file__help", children: helper })) : null, _jsx(ItemMessageComponent, { id: messageId, message: message, messageType: messageType })] }), children] }));
40
- });
38
+ };
41
39
  InputFileCommon.displayName = "InputFileCommon";
@@ -1,4 +1,7 @@
1
1
  import { type InputFileProps } from "./InputFileCommon";
2
2
  import "@axa-fr/canopee-css/client/Form/FileUpload/InputFile/InputFileLF.css";
3
- declare const InputFile: import("react").ForwardRefExoticComponent<Omit<InputFileProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
3
+ declare const InputFile: {
4
+ ({ ...props }: InputFileProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
4
7
  export { InputFile };
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { ItemLabel } from "../../ItemLabel/ItemLabelLF";
4
3
  import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
5
4
  import { InputFileCommon } from "./InputFileCommon";
6
5
  import "@axa-fr/canopee-css/client/Form/FileUpload/InputFile/InputFileLF.css";
7
- const InputFile = forwardRef((props, ref) => (_jsx(InputFileCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage })));
6
+ const InputFile = ({ ...props }) => (_jsx(InputFileCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
8
7
  InputFile.displayName = "InputFile";
9
8
  export { InputFile };
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/prospect/Form/InputDate/InputDateApollo.css";
2
2
  import { type InputDateProps } from "./InputDateCommon";
3
- export declare const InputDate: import("react").ForwardRefExoticComponent<Omit<InputDateProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
3
+ export declare const InputDate: {
4
+ ({ ...props }: InputDateProps): 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/prospect/Form/InputDate/InputDateApollo.css";
3
- import { forwardRef } from "react";
4
3
  import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
5
4
  import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
6
5
  import { InputDateCommon } from "./InputDateCommon";
7
- export const InputDate = forwardRef((props, ref) => (_jsx(InputDateCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage })));
6
+ export const InputDate = ({ ...props }) => (_jsx(InputDateCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
8
7
  InputDate.displayName = "InputDate";
@@ -5,5 +5,8 @@ export type InputDateAtomProps = Omit<ComponentPropsWithRef<"input">, "value" |
5
5
  min?: ComponentProps<"input">["min"] | Date;
6
6
  max?: ComponentProps<"input">["max"] | Date;
7
7
  };
8
- declare const InputDateAtom: import("react").ForwardRefExoticComponent<Omit<InputDateAtomProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
8
+ declare const InputDateAtom: {
9
+ ({ defaultValue, value, min, max, ...otherProps }: InputDateAtomProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
9
12
  export { InputDateAtom };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, } from "react";
2
+ import {} from "react";
3
3
  import { formatInputDateValue } from "./InputDate.helper";
4
- const InputDateAtom = forwardRef(({ defaultValue, value, min, max, ...otherProps }, inputRef) => (_jsx("input", { ...otherProps, type: "date", ref: inputRef, defaultValue: formatInputDateValue(defaultValue), value: formatInputDateValue(value), min: formatInputDateValue(min), max: formatInputDateValue(max) })));
4
+ const InputDateAtom = ({ defaultValue, value, min, max, ...otherProps }) => (_jsx("input", { ...otherProps, type: "date", defaultValue: formatInputDateValue(defaultValue), value: formatInputDateValue(value), min: formatInputDateValue(min), max: formatInputDateValue(max) }));
5
5
  InputDateAtom.displayName = "InputDateAtom";
6
6
  export { InputDateAtom };
@@ -26,5 +26,8 @@ type InputDateCommonProps = InputDateProps & {
26
26
  ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
27
27
  ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
28
28
  };
29
- declare const InputDateCommon: import("react").ForwardRefExoticComponent<Omit<InputDateCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
29
+ declare const InputDateCommon: {
30
+ ({ className, classModifier, helper, error, success, message, messageType, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, ItemLabelComponent, ItemMessageComponent, required, hidePicker, max, min, containerProps, ...otherProps }: InputDateCommonProps): import("react/jsx-runtime").JSX.Element;
31
+ displayName: string;
32
+ };
30
33
  export { InputDateCommon };
@@ -1,11 +1,11 @@
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
6
  import { InputDateAtom } from "./InputDateAtom";
7
7
  import { InputDateTextAtom } from "./InputDateTextAtom";
8
- const InputDateCommon = forwardRef(({ className, classModifier = "", helper, error, success, message, messageType, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, ItemLabelComponent, ItemMessageComponent, required, hidePicker, max, min, containerProps, ...otherProps }, inputRef) => {
8
+ const InputDateCommon = ({ className, classModifier = "", helper, error, success, message, messageType, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, ItemLabelComponent, ItemMessageComponent, required, hidePicker, max, min, containerProps, ...otherProps }) => {
9
9
  let inputId = useId();
10
10
  inputId = otherProps.id ?? inputId;
11
11
  const idMessage = useId();
@@ -27,7 +27,7 @@ const InputDateCommon = forwardRef(({ className, classModifier = "", helper, err
27
27
  modifiers: [...classModifier.split(" "), hasWarning && "warning"],
28
28
  className,
29
29
  });
30
- return (_jsxs("div", { className: "af-form__input-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, required: required, htmlFor: inputId, children: label }), hidePicker ? (_jsx(InputDateTextAtom, { ...otherProps, id: inputId, className: componentClassName, ref: inputRef, "aria-errormessage": ariaErrormessage, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, required: required })) : (_jsx(InputDateAtom, { ...otherProps, id: inputId, className: componentClassName, ref: inputRef, "aria-errormessage": ariaErrormessage, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, required: required, max: max, min: min })), helper ? (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: message || error || success, messageType: messageType || (error ? "error" : "success") })] }));
31
- });
30
+ return (_jsxs("div", { className: "af-form__input-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, required: required, htmlFor: inputId, children: label }), hidePicker ? (_jsx(InputDateTextAtom, { ...otherProps, id: inputId, className: componentClassName, "aria-errormessage": ariaErrormessage, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, required: required })) : (_jsx(InputDateAtom, { ...otherProps, id: inputId, className: componentClassName, "aria-errormessage": ariaErrormessage, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, required: required, max: max, min: min })), helper ? (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: message || error || success, messageType: messageType || (error ? "error" : "success") })] }));
31
+ };
32
32
  InputDateCommon.displayName = "InputDate";
33
33
  export { InputDateCommon };
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/client/Form/InputDate/InputDateLF.css";
2
2
  import { type InputDateProps } from "./InputDateCommon";
3
- export declare const InputDate: import("react").ForwardRefExoticComponent<Omit<InputDateProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
3
+ export declare const InputDate: {
4
+ ({ ...props }: InputDateProps): 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/InputDate/InputDateLF.css";
3
- import { forwardRef } from "react";
4
3
  import { ItemLabel } from "../ItemLabel/ItemLabelLF";
5
4
  import { ItemMessage } from "../ItemMessage/ItemMessageLF";
6
5
  import { InputDateCommon } from "./InputDateCommon";
7
- export const InputDate = forwardRef((props, ref) => (_jsx(InputDateCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage })));
6
+ export const InputDate = ({ ...props }) => (_jsx(InputDateCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
8
7
  InputDate.displayName = "InputDate";
@@ -5,5 +5,8 @@ export type InputDateTextAtomProps = Omit<ComponentProps<typeof InputTextAtom>,
5
5
  defaultValue?: Date | string;
6
6
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
7
  };
8
- declare const InputDateTextAtom: import("react").ForwardRefExoticComponent<Omit<InputDateTextAtomProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
8
+ declare const InputDateTextAtom: {
9
+ ({ onChange, value, defaultValue, ...otherProps }: InputDateTextAtomProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
9
12
  export { InputDateTextAtom };
@@ -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 { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
4
4
  import { formatDateTextValue, formatInputDateValue } from "./InputDate.helper";
5
- const InputDateTextAtom = forwardRef(({ onChange, value, defaultValue, ...otherProps }, inputRef) => {
5
+ const InputDateTextAtom = ({ onChange, value, defaultValue, ...otherProps }) => {
6
6
  const handleChange = (e) => {
7
7
  const formattedValue = formatDateTextValue(e.target.value);
8
8
  onChange?.({
@@ -10,7 +10,7 @@ const InputDateTextAtom = forwardRef(({ onChange, value, defaultValue, ...otherP
10
10
  target: { ...e.target, value: formattedValue },
11
11
  });
12
12
  };
13
- return (_jsx(InputTextAtom, { pattern: "\\d{0,2}/?\\d{0,2}/?\\d{0,4}", maxLength: 10, ref: inputRef, inputMode: "numeric", onChange: handleChange, value: formatInputDateValue(value), defaultValue: formatInputDateValue(defaultValue), ...otherProps }));
14
- });
13
+ return (_jsx(InputTextAtom, { pattern: "\\d{0,2}/?\\d{0,2}/?\\d{0,4}", maxLength: 10, inputMode: "numeric", onChange: handleChange, value: formatInputDateValue(value), defaultValue: formatInputDateValue(defaultValue), ...otherProps }));
14
+ };
15
15
  InputDateTextAtom.displayName = "InputDateText";
16
16
  export { InputDateTextAtom };
@@ -33,5 +33,8 @@ type InputPhoneCommonProps = InputPhoneProps & {
33
33
  InputTextComponent: ComponentType<ComponentProps<typeof InputTextAtom>>;
34
34
  IconComponent: ComponentType<ComponentProps<typeof Icon>>;
35
35
  };
36
- declare const InputPhoneCommon: import("react").ForwardRefExoticComponent<Omit<InputPhoneCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
36
+ declare const InputPhoneCommon: {
37
+ ({ className, classModifier, helper, error, success, message, messageType, defaultCountry, showSelect, disabled, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, onSideButtonClick, countryCodeOptions, onChangeSelect, onChangeInput, mask, ItemLabelComponent, ItemMessageComponent, InputTextComponent, IconComponent, "aria-errormessage": ariaErrormessage, containerProps, ...otherProps }: InputPhoneCommonProps): import("react/jsx-runtime").JSX.Element;
38
+ displayName: string;
39
+ };
37
40
  export { InputPhoneCommon };
@@ -1,5 +1,5 @@
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 { Icon } from "../../Icon/IconCommon";
4
4
  import { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
5
5
  import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
@@ -7,7 +7,7 @@ import { ItemMessage, } from "../ItemMessage/ItemMessageCommon";
7
7
  import { CountryCodeSelect } from "./CountryCodeSelect";
8
8
  import {} from "./InputPhone.types";
9
9
  import { maskFrenchPhoneNumber } from "./maskFrenchPhoneNumber";
10
- const InputPhoneCommon = forwardRef(({ className, classModifier = "", helper, error, success, message, messageType, defaultCountry, showSelect, disabled, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, onSideButtonClick, countryCodeOptions = [], onChangeSelect, onChangeInput, mask = maskFrenchPhoneNumber, ItemLabelComponent, ItemMessageComponent, InputTextComponent, IconComponent, "aria-errormessage": ariaErrormessage, containerProps, ...otherProps }, inputRef) => {
10
+ const InputPhoneCommon = ({ className, classModifier = "", helper, error, success, message, messageType, defaultCountry, showSelect, disabled, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, onSideButtonClick, countryCodeOptions = [], onChangeSelect, onChangeInput, mask = maskFrenchPhoneNumber, ItemLabelComponent, ItemMessageComponent, InputTextComponent, IconComponent, "aria-errormessage": ariaErrormessage, containerProps, ...otherProps }) => {
11
11
  let inputId = useId();
12
12
  inputId = otherProps.id || inputId;
13
13
  const idMessage = useId();
@@ -31,7 +31,7 @@ const InputPhoneCommon = forwardRef(({ className, classModifier = "", helper, er
31
31
  };
32
32
  return (_jsxs("div", { className: "af-form__input-phone-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsxs("div", { className: "af-form__input-phone-fields", children: [showSelect ? (_jsx("div", { className: "af-form__country-code-wrapper", children: _jsx(CountryCodeSelect, { options: countryCodeOptions, defaultCountry: defaultCountry, onChangeSelect: onChangeSelect, IconComponent: IconComponent, disabled: disabled }) })) : null, _jsx(InputTextComponent, { ...otherProps, className: ["af-form__input-phone", className]
33
33
  .filter(Boolean)
34
- .join(" "), classModifier: classModifier, ref: inputRef, error: hasError ? messageType || error : undefined, type: "tel", required: required, placeholder: otherProps.placeholder, "aria-errormessage": ariaErrormessage, value: otherProps.value, onChange: handleChangeNumber, disabled: disabled, idMessage: hasError ? idMessage : undefined, idHelp: ariaDescribedby.length > 0 ? ariaDescribedby.join(" ") : undefined, id: inputId })] }), helper ? (_jsx("span", { id: idHelp, className: "af-form__input-phone-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: message || error || success, messageType: messageType || (error ? "error" : "success") })] }));
35
- });
34
+ .join(" "), classModifier: classModifier, error: hasError ? messageType || error : undefined, type: "tel", required: required, placeholder: otherProps.placeholder, "aria-errormessage": ariaErrormessage, value: otherProps.value, onChange: handleChangeNumber, disabled: disabled, idMessage: hasError ? idMessage : undefined, idHelp: ariaDescribedby.length > 0 ? ariaDescribedby.join(" ") : undefined, id: inputId })] }), helper ? (_jsx("span", { id: idHelp, className: "af-form__input-phone-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: message || error || success, messageType: messageType || (error ? "error" : "success") })] }));
35
+ };
36
36
  InputPhoneCommon.displayName = "InputPhone";
37
37
  export { InputPhoneCommon };
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/prospect/Form/InputText/InputTextApollo.css";
2
2
  import { type InputTextProps } from "./InputTextCommon";
3
- export declare const InputText: import("react").ForwardRefExoticComponent<Omit<InputTextProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
3
+ export declare const InputText: {
4
+ ({ ...props }: InputTextProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/prospect/Form/InputText/InputTextApollo.css";
3
- import { forwardRef } from "react";
4
3
  import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
5
4
  import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
6
5
  import { InputTextCommon } from "./InputTextCommon";
7
6
  import { InputTextAtom } from "../InputTextAtom/InputTextAtomApollo";
8
- export const InputText = forwardRef((props, ref) => (_jsx(InputTextCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage, InputTextAtomComponent: InputTextAtom })));
7
+ export const InputText = ({ ...props }) => (_jsx(InputTextCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage, InputTextAtomComponent: InputTextAtom }));
9
8
  InputText.displayName = "InputText";
@@ -23,5 +23,8 @@ type InputTextCommonProps = InputTextProps & {
23
23
  ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
24
24
  InputTextAtomComponent: ComponentType<ComponentProps<typeof InputTextAtom>>;
25
25
  };
26
- declare const InputTextCommon: import("react").ForwardRefExoticComponent<Omit<InputTextCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
26
+ declare const InputTextCommon: {
27
+ ({ unit, className, classModifier, helper, error, success, message, messageType, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, InputTextAtomComponent, containerProps, ...otherProps }: InputTextCommonProps): import("react/jsx-runtime").JSX.Element;
28
+ displayName: string;
29
+ };
27
30
  export { InputTextCommon };
@@ -1,17 +1,17 @@
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 { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
4
4
  import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
5
5
  import { ItemMessage, } from "../ItemMessage/ItemMessageCommon";
6
- const InputTextCommon = forwardRef(({ unit, className, classModifier = "", helper, error, success, message, messageType, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, InputTextAtomComponent, containerProps, ...otherProps }, inputRef) => {
6
+ const InputTextCommon = ({ unit, className, classModifier = "", helper, error, success, message, messageType, label, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, required, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, InputTextAtomComponent, containerProps, ...otherProps }) => {
7
7
  let inputId = useId();
8
8
  inputId = otherProps.id || inputId;
9
9
  const idMessage = useId();
10
10
  const idHelp = useId();
11
11
  const ariaDescribedby = [helper && idHelp, success && idMessage].filter(Boolean);
12
- return (_jsxs("div", { className: "af-form__input-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsx(InputTextAtomComponent, { id: inputId, ref: inputRef, unit: unit, className: className, classModifier: classModifier, error: (message && messageType === "error") || Boolean(error)
12
+ return (_jsxs("div", { className: "af-form__input-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsx(InputTextAtomComponent, { id: inputId, unit: unit, className: className, classModifier: classModifier, error: (message && messageType === "error") || Boolean(error)
13
13
  ? messageType || error
14
14
  : undefined, warning: message && messageType === "warning" ? messageType : undefined, required: required, idMessage: message || error ? idMessage : undefined, idHelp: ariaDescribedby.length > 0 ? ariaDescribedby.join(" ") : undefined, ...otherProps }), helper ? (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: message || error || success, messageType: messageType || (error ? "error" : "success") })] }));
15
- });
15
+ };
16
16
  InputTextCommon.displayName = "InputText";
17
17
  export { InputTextCommon };
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/client/Form/InputText/InputTextLF.css";
2
2
  import { type InputTextProps } from "./InputTextCommon";
3
- export declare const InputText: import("react").ForwardRefExoticComponent<Omit<InputTextProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
3
+ export declare const InputText: {
4
+ ({ ...props }: InputTextProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/client/Form/InputText/InputTextLF.css";
3
- import { forwardRef } from "react";
4
3
  import { ItemLabel } from "../ItemLabel/ItemLabelLF";
5
4
  import { ItemMessage } from "../ItemMessage/ItemMessageLF";
6
5
  import { InputTextCommon } from "./InputTextCommon";
7
6
  import { InputTextAtom } from "../InputTextAtom/InputTextAtomLF";
8
- export const InputText = forwardRef((props, ref) => (_jsx(InputTextCommon, { ...props, ref: ref, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage, InputTextAtomComponent: InputTextAtom })));
7
+ export const InputText = ({ ...props }) => (_jsx(InputTextCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage, InputTextAtomComponent: InputTextAtom }));
9
8
  InputText.displayName = "InputText";
@@ -7,5 +7,8 @@ type InputTextAtomProps = ComponentPropsWithRef<"input"> & {
7
7
  idMessage?: string;
8
8
  idHelp?: string;
9
9
  };
10
- declare const InputTextAtom: import("react").ForwardRefExoticComponent<Omit<InputTextAtomProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
10
+ declare const InputTextAtom: {
11
+ ({ unit, className, classModifier, error, warning, required, idMessage, idHelp, "aria-errormessage": ariaErrormessage, "aria-describedby": ariaDescribedby, type, ...otherProps }: InputTextAtomProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
11
14
  export { InputTextAtom };
@@ -1,7 +1,7 @@
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
- const InputTextAtom = forwardRef(({ unit, className, classModifier = "", error, warning, required, idMessage, idHelp, "aria-errormessage": ariaErrormessage, "aria-describedby": ariaDescribedby, type = "text", ...otherProps }, inputRef) => {
4
+ const InputTextAtom = ({ unit, className, classModifier = "", error, warning, required, idMessage, idHelp, "aria-errormessage": ariaErrormessage, "aria-describedby": ariaDescribedby, type = "text", ...otherProps }) => {
5
5
  const componentClassName = getClassName({
6
6
  baseClassName: "af-form__input-text",
7
7
  modifiers: [
@@ -13,7 +13,7 @@ const InputTextAtom = forwardRef(({ unit, className, classModifier = "", error,
13
13
  });
14
14
  let inputId = useId();
15
15
  inputId = otherProps.id || inputId;
16
- return (_jsxs("div", { className: "af-form__input-atom-container", children: [_jsx("input", { id: inputId, className: componentClassName, type: type, required: required, ref: inputRef, "aria-errormessage": ariaErrormessage ?? idMessage, "aria-invalid": Boolean(error || ariaErrormessage), "aria-describedby": ariaDescribedby ?? idHelp, ...otherProps }), unit] }));
17
- });
16
+ return (_jsxs("div", { className: "af-form__input-atom-container", children: [_jsx("input", { id: inputId, className: componentClassName, type: type, required: required, "aria-errormessage": ariaErrormessage ?? idMessage, "aria-invalid": Boolean(error || ariaErrormessage), "aria-describedby": ariaDescribedby ?? idHelp, ...otherProps }), unit] }));
17
+ };
18
18
  InputTextAtom.displayName = "InputTextAtom";
19
19
  export { InputTextAtom };
@@ -0,0 +1,3 @@
1
+ import { type CardRadioProps } from "./CardRadioCommon";
2
+ import "@axa-fr/canopee-css/prospect/Form/Radio/CardRadio/CardRadioApollo.css";
3
+ export declare const CardRadio: (props: CardRadioProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Icon } from "../../../Icon/IconApollo";
3
+ import { Radio } from "../Radio/RadioApollo";
4
+ import { CardRadioCommon } from "./CardRadioCommon";
5
+ import "@axa-fr/canopee-css/prospect/Form/Radio/CardRadio/CardRadioApollo.css";
6
+ export const CardRadio = (props) => (_jsx(CardRadioCommon, { ...props, RadioComponent: Radio, IconComponent: Icon }));
@@ -2,12 +2,12 @@ import { type ComponentProps, type ComponentType, type ReactNode } from "react";
2
2
  import { BasePicture } from "../../../BasePicture/BasePicture";
3
3
  import type { Icon as IconCommon } from "../../../Icon/IconCommon";
4
4
  import type { Radio } from "../Radio/RadioCommon";
5
- type BaseCardRadioOptionProps = Omit<ComponentProps<typeof Radio>, "size"> & {
5
+ type BaseCardRadioProps = Omit<ComponentProps<typeof Radio>, "size"> & {
6
6
  label: ReactNode;
7
7
  description?: ReactNode;
8
8
  subtitle?: ReactNode;
9
9
  };
10
- export type CardRadioOptionProps = BaseCardRadioOptionProps & {
10
+ export type CardRadioProps = BaseCardRadioProps & {
11
11
  /**
12
12
  * @deprecated Use `position` instead.
13
13
  */
@@ -17,9 +17,12 @@ export type CardRadioOptionProps = BaseCardRadioOptionProps & {
17
17
  src?: ComponentProps<typeof BasePicture>["src"];
18
18
  basePictureProps?: Omit<ComponentProps<typeof BasePicture>, "src">;
19
19
  };
20
- export type CardRadioOptionCommonProps = CardRadioOptionProps & {
20
+ export type CardRadioCommonProps = CardRadioProps & {
21
21
  RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
22
22
  IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
23
23
  };
24
- export declare const CardRadioOptionCommon: import("react").ForwardRefExoticComponent<Omit<CardRadioOptionCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
24
+ export declare const CardRadioCommon: {
25
+ ({ label, position, type, description, subtitle, icon, src, basePictureProps, isInvalid, className, RadioComponent, IconComponent, ...inputProps }: CardRadioCommonProps): import("react/jsx-runtime").JSX.Element;
26
+ displayName: string;
27
+ };
25
28
  export {};
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import {} from "react";
3
+ import { BasePicture } from "../../../BasePicture/BasePicture";
4
+ import { getClassName } from "../../../utilities/getClassName";
5
+ export const CardRadioCommon = ({ label, position, type, description, subtitle, icon, src, basePictureProps, isInvalid, className, RadioComponent, IconComponent, ...inputProps }) => {
6
+ const isCardRadioHorizontal = [position, type].includes("horizontal");
7
+ return (_jsxs("label", { className: getClassName({
8
+ baseClassName: "af-card-radio",
9
+ modifiers: [
10
+ isInvalid && "invalid",
11
+ isCardRadioHorizontal && "horizontal",
12
+ ],
13
+ className,
14
+ }), children: [icon ? _jsx(IconComponent, { src: icon, role: "presentation" }) : null, isCardRadioHorizontal && src ? (_jsx(BasePicture, { src: src, ...basePictureProps })) : null, _jsxs("div", { className: "af-card-radio__content", children: [_jsx("p", { className: "af-card-radio__label", children: label }), Boolean(description) && (_jsx("p", { className: "af-card-radio__description", children: description })), Boolean(subtitle) && (_jsx("p", { className: "af-card-radio__subtitle", children: subtitle }))] }), _jsx(RadioComponent, { ...inputProps, isInvalid: isInvalid })] }));
15
+ };
16
+ CardRadioCommon.displayName = "CardRadioCommon";
@@ -0,0 +1,3 @@
1
+ import { type CardRadioProps } from "./CardRadioCommon";
2
+ import "@axa-fr/canopee-css/client/Form/Radio/CardRadio/CardRadioLF.css";
3
+ export declare const CardRadio: (props: CardRadioProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Icon } from "../../../Icon/IconLF";
3
+ import { Radio } from "../Radio/RadioLF";
4
+ import { CardRadioCommon } from "./CardRadioCommon";
5
+ import "@axa-fr/canopee-css/client/Form/Radio/CardRadio/CardRadioLF.css";
6
+ export const CardRadio = (props) => (_jsx(CardRadioCommon, { ...props, RadioComponent: Radio, IconComponent: Icon }));
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ItemMessage } from "../../ItemMessage/ItemMessageApollo";
3
- import { CardRadioOption } from "../CardRadioOption/CardRadioOptionApollo";
3
+ import { CardRadio } from "../CardRadio/CardRadioApollo";
4
4
  import { CardRadioGroupCommon, } from "./CardRadioGroupCommon";
5
5
  import "@axa-fr/canopee-css/prospect/Form/Radio/CardRadioGroup/CardRadioGroupApollo.css";
6
- export const CardRadioGroup = (props) => (_jsx(CardRadioGroupCommon, { ...props, CardRadioOptionComponent: CardRadioOption, ItemMessageComponent: ItemMessage }));
6
+ export const CardRadioGroup = (props) => (_jsx(CardRadioGroupCommon, { ...props, CardRadioComponent: CardRadio, ItemMessageComponent: ItemMessage }));
@@ -1,14 +1,14 @@
1
1
  import { type ComponentProps, type ComponentType, type PropsWithChildren, type ReactNode } from "react";
2
2
  import type { GridContainerProps } from "../../../utilities/types/GridContainerProps";
3
3
  import { ItemMessage, type ItemMessageProps } from "../../ItemMessage/ItemMessageCommon";
4
- import { type CardRadioOptionProps } from "../CardRadioOption/CardRadioOptionCommon";
5
- type RadioOption = Omit<CardRadioOptionProps, "name" | "type" | "isInvalid">;
6
- export type CardRadioGroupProps = Omit<CardRadioOptionProps, "value" | "label" | "type" | "isInvalid" | "icon" | "src" | "basePictureProps" | "description" | "subtitle" | "children" | "position"> & {
4
+ import { type CardRadioProps } from "../CardRadio/CardRadioCommon";
5
+ type RadioOption = Omit<CardRadioProps, "name" | "type" | "isInvalid">;
6
+ export type CardRadioGroupProps = Omit<CardRadioProps, "value" | "label" | "type" | "isInvalid" | "icon" | "src" | "basePictureProps" | "description" | "subtitle" | "children" | "position"> & {
7
7
  /**
8
8
  * @deprecated Use `position` and `cardStyle` instead.
9
9
  */
10
10
  type?: "vertical" | "horizontal";
11
- cardStyle?: CardRadioOptionProps["position"];
11
+ cardStyle?: CardRadioProps["position"];
12
12
  position?: "line" | "column";
13
13
  /**
14
14
  * @deprecated Use `label` instead.
@@ -36,11 +36,11 @@ export type CardRadioGroupProps = Omit<CardRadioOptionProps, "value" | "label" |
36
36
  containerProps?: GridContainerProps<"fieldset">;
37
37
  } & PropsWithChildren & Partial<ItemMessageProps>;
38
38
  export type CardRadioCommonProps = CardRadioGroupProps & {
39
- CardRadioOptionComponent: ComponentType<CardRadioOptionProps>;
39
+ CardRadioComponent: ComponentType<CardRadioProps>;
40
40
  ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
41
41
  };
42
42
  declare const CardRadioGroupCommon: {
43
- ({ className, labelGroup, descriptionGroup, label, description, isRequired, required, options, cardStyle, type, position, error, message, messageType, name, value, id, CardRadioOptionComponent, ItemMessageComponent, containerProps, ...inputProps }: CardRadioCommonProps): import("react/jsx-runtime").JSX.Element;
43
+ ({ className, labelGroup, descriptionGroup, label, description, isRequired, required, options, cardStyle, type, position, error, message, messageType, name, value, id, CardRadioComponent, ItemMessageComponent, containerProps, ...inputProps }: CardRadioCommonProps): import("react/jsx-runtime").JSX.Element;
44
44
  displayName: string;
45
45
  };
46
46
  export { CardRadioGroupCommon };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId, } from "react";
3
3
  import { ItemMessage, } from "../../ItemMessage/ItemMessageCommon";
4
- import {} from "../CardRadioOption/CardRadioOptionCommon";
5
- const CardRadioGroupCommon = ({ className, labelGroup, descriptionGroup, label, description, isRequired, required, options, cardStyle, type = "vertical", position = (cardStyle ?? type) === "vertical" ? "column" : "line", error, message, messageType = "error", name, value, id, CardRadioOptionComponent, ItemMessageComponent, containerProps, ...inputProps }) => {
4
+ import {} from "../CardRadio/CardRadioCommon";
5
+ const CardRadioGroupCommon = ({ className, labelGroup, descriptionGroup, label, description, isRequired, required, options, cardStyle, type = "vertical", position = (cardStyle ?? type) === "vertical" ? "column" : "line", error, message, messageType = "error", name, value, id, CardRadioComponent, ItemMessageComponent, containerProps, ...inputProps }) => {
6
6
  const generatedId = useId();
7
7
  const cardRadioGroupId = id ?? generatedId;
8
8
  const messageId = `${cardRadioGroupId}-error`;
@@ -10,7 +10,7 @@ const CardRadioGroupCommon = ({ className, labelGroup, descriptionGroup, label,
10
10
  return (_jsxs("fieldset", { className: ["af-card-radio-group", className].filter(Boolean).join(" "), role: "radiogroup", "aria-required": Boolean(required) || undefined, "aria-invalid": hasError || undefined, "aria-errormessage": hasError ? messageId : undefined, id: cardRadioGroupId, ...containerProps, children: [_jsxs("legend", { className: "af-card-radio-group__legend", children: [_jsxs("p", { className: "af-card-radio-group__label", children: [label, labelGroup, required || isRequired ? _jsx("span", { "aria-hidden": true, children: "*" }) : null] }), description || descriptionGroup ? (_jsxs("p", { className: "af-card-radio-group__description", children: [description, descriptionGroup] })) : null] }), _jsx("div", { className: [
11
11
  "af-card-radio-group__options",
12
12
  `af-card-radio-group__options--${position}`,
13
- ].join(" "), children: options.map((cardRadioItemProps) => (_jsx(CardRadioOptionComponent, { id: `${cardRadioGroupId}-${cardRadioItemProps.value}`, checked: value !== undefined
13
+ ].join(" "), children: options.map((cardRadioItemProps) => (_jsx(CardRadioComponent, { id: `${cardRadioGroupId}-${cardRadioItemProps.value}`, checked: value !== undefined
14
14
  ? value === cardRadioItemProps.value
15
15
  : undefined, required: required, position: cardStyle ?? type, ...inputProps, ...cardRadioItemProps, isInvalid: hasError, name: name }, `${name ?? cardRadioGroupId}-${cardRadioItemProps.label}`))) }), _jsx(ItemMessageComponent, { id: messageId, message: message || error, messageType: messageType })] }));
16
16
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
3
- import { CardRadioOption } from "../CardRadioOption/CardRadioOptionLF";
3
+ import { CardRadio } from "../CardRadio/CardRadioLF";
4
4
  import { CardRadioGroupCommon, } from "./CardRadioGroupCommon";
5
5
  import "@axa-fr/canopee-css/client/Form/Radio/CardRadioGroup/CardRadioGroupLF.css";
6
- export const CardRadioGroup = (props) => (_jsx(CardRadioGroupCommon, { ...props, CardRadioOptionComponent: CardRadioOption, ItemMessageComponent: ItemMessage }));
6
+ export const CardRadioGroup = (props) => (_jsx(CardRadioGroupCommon, { ...props, CardRadioComponent: CardRadio, ItemMessageComponent: ItemMessage }));
@@ -2,4 +2,7 @@ import { type ComponentProps } from "react";
2
2
  export type RadioProps = Omit<ComponentProps<"input">, "disabled" | "type"> & {
3
3
  isInvalid?: boolean;
4
4
  };
5
- export declare const Radio: import("react").ForwardRefExoticComponent<Omit<RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
5
+ export declare const Radio: {
6
+ ({ className, isInvalid, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- export const Radio = forwardRef(({ className, isInvalid, ...props }, ref) => (_jsx("input", { ...props, className: ["af-radio", isInvalid && "af-radio--invalid", className]
2
+ import {} from "react";
3
+ export const Radio = ({ className, isInvalid, ...props }) => (_jsx("input", { ...props, className: ["af-radio", isInvalid && "af-radio--invalid", className]
4
4
  .filter(Boolean)
5
- .join(" "), type: "radio", ref: ref })));
5
+ .join(" "), type: "radio" }));
6
6
  Radio.displayName = "Radio";
@@ -1,3 +1,6 @@
1
1
  import "@axa-fr/canopee-css/prospect/Form/TextArea/TextAreaApollo.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/prospect/Form/TextArea/TextAreaApollo.css";
3
- import { forwardRef } from "react";
4
3
  import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
5
4
  import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
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";