@axa-fr/canopee-react 1.8.0 → 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
package/dist/client.d.ts CHANGED
@@ -36,10 +36,8 @@ InputText as TextInput, } from "./prospect-client/Form/InputText/InputTextLF";
36
36
  export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomLF";
37
37
  export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelLF";
38
38
  export { ItemMessage, itemMessageVariants, type ItemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessageLF";
39
- export {
40
- /** @deprecated Use `CardRadioGroup` instead. */
41
- CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
42
- export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF";
39
+ export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioLF";
40
+ export { CardRadioGroup } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
43
41
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioLF";
44
42
  export { RadioText, type RadioTextProps, } from "./prospect-client/Form/Radio/RadioText/RadioTextLF";
45
43
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaLF";
@@ -47,6 +45,8 @@ export { DebugGrid } from "./prospect-client/Grid/DebugGridLF";
47
45
  export { Heading, type HeadingLevel, type HeadingProps, } from "./prospect-client/Heading/HeadingLF";
48
46
  export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./prospect-client/Icon/IconLF";
49
47
  export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
48
+ export { ItemMenu, type ItemMenuProps, } from "./prospect-client/ItemMenu/ItemMenuLF";
49
+ export { TabMenu, type TabMenuProps } from "./prospect-client/TabMenu/TabMenu";
50
50
  export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
51
51
  export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterLF";
52
52
  export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
package/dist/client.js CHANGED
@@ -36,10 +36,8 @@ InputText as TextInput, } from "./prospect-client/Form/InputText/InputTextLF";
36
36
  export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomLF";
37
37
  export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelLF";
38
38
  export { ItemMessage, itemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessageLF";
39
- export {
40
- /** @deprecated Use `CardRadioGroup` instead. */
41
- CardRadioGroup as CardRadio, CardRadioGroup, } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
42
- export { CardRadioOption } from "./prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF";
39
+ export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioLF";
40
+ export { CardRadioGroup } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
43
41
  export { Radio } from "./prospect-client/Form/Radio/Radio/RadioLF";
44
42
  export { RadioText, } from "./prospect-client/Form/Radio/RadioText/RadioTextLF";
45
43
  export { TextArea } from "./prospect-client/Form/TextArea/TextAreaLF";
@@ -47,6 +45,8 @@ export { DebugGrid } from "./prospect-client/Grid/DebugGridLF";
47
45
  export { Heading, } from "./prospect-client/Heading/HeadingLF";
48
46
  export { Icon, iconSizeVariants, iconVariants, } from "./prospect-client/Icon/IconLF";
49
47
  export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
48
+ export { ItemMenu, } from "./prospect-client/ItemMenu/ItemMenuLF";
49
+ export { TabMenu } from "./prospect-client/TabMenu/TabMenu";
50
50
  export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
51
51
  export { Footer, } from "./prospect-client/Layout/Footer/FooterLF";
52
52
  export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
@@ -1,6 +1,12 @@
1
1
  import "@axa-fr/canopee-css/distributeur/Action/Action.css";
2
- export declare const Action: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
2
+ import { type ComponentPropsWithRef } from "react";
3
+ type ActionCoreProps = ComponentPropsWithRef<"a"> & {
3
4
  icon: string;
4
5
  /** @deprecated Use `className` instead. */
5
6
  classModifier?: string;
6
- } & import("react").RefAttributes<HTMLAnchorElement>>;
7
+ };
8
+ export declare const Action: {
9
+ ({ icon, className, classModifier, ...otherProps }: ActionCoreProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export {};
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/distributeur/Action/Action.css";
3
3
  import classNames from "classnames";
4
- import { forwardRef } from "react";
4
+ import {} from "react";
5
5
  import { getClassName } from "../utilities/helpers/getClassName";
6
- export const Action = forwardRef(({ icon, className, classModifier, ...otherProps }, ref) => {
6
+ export const Action = ({ icon, className, classModifier, ...otherProps }) => {
7
7
  const componentClassName = classNames("btn", getClassName({
8
8
  baseClassName: "af-btn--circle",
9
9
  modifiers: classModifier?.split(" "),
10
10
  className,
11
11
  }));
12
- return (_jsx("a", { ...otherProps, className: componentClassName, ref: ref, children: _jsx("i", { role: "img", className: `glyphicon glyphicon-${icon}` }) }));
13
- });
12
+ return (_jsx("a", { ...otherProps, className: componentClassName, children: _jsx("i", { role: "img", className: `glyphicon glyphicon-${icon}` }) }));
13
+ };
14
14
  Action.displayName = "Action";
@@ -1,11 +1,14 @@
1
- import { type ReactNode } from "react";
1
+ import { type ComponentPropsWithRef, type PropsWithChildren, type ReactNode } from "react";
2
2
  import "@axa-fr/canopee-css/distributeur/Button/Button.css";
3
3
  export type ButtonVariant = "primary" | "secondary" | "validated" | "danger" | "ghost" | "ghost-reverse";
4
- export declare const Button: import("react").ForwardRefExoticComponent<{
4
+ type ButtonProps = PropsWithChildren<{
5
5
  variant?: ButtonVariant;
6
6
  small?: boolean;
7
7
  leftIcon?: ReactNode;
8
8
  rightIcon?: ReactNode;
9
- } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
10
- children?: ReactNode | undefined;
11
- } & import("react").RefAttributes<HTMLButtonElement>>;
9
+ } & ComponentPropsWithRef<"button">>;
10
+ export declare const Button: {
11
+ ({ variant, small, leftIcon, rightIcon, className, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import classNames from "classnames";
3
- import { forwardRef, } from "react";
3
+ import {} from "react";
4
4
  import "@axa-fr/canopee-css/distributeur/Button/Button.css";
5
5
  const DEFAULT_CLASS_NAME = "af-btn";
6
- export const Button = forwardRef(({ variant = "primary", small, leftIcon, rightIcon, className, children, ...props }, ref) => (_jsxs("button", { type: "button", className: classNames(DEFAULT_CLASS_NAME, variant !== "primary" && `${DEFAULT_CLASS_NAME}--${variant}`, small && `${DEFAULT_CLASS_NAME}--small`, className), ...props, ref: ref, children: [leftIcon, children, rightIcon] })));
6
+ export const Button = ({ variant = "primary", small, leftIcon, rightIcon, className, children, ...props }) => (_jsxs("button", { type: "button", className: classNames(DEFAULT_CLASS_NAME, variant !== "primary" && `${DEFAULT_CLASS_NAME}--${variant}`, small && `${DEFAULT_CLASS_NAME}--small`, className), ...props, children: [leftIcon, children, rightIcon] }));
7
7
  Button.displayName = "Button";
@@ -1,4 +1,4 @@
1
- import React, { type ComponentProps, type ReactNode } from "react";
1
+ import { type ComponentPropsWithRef, type ReactNode } from "react";
2
2
  import type { Option } from "../core";
3
3
  import { CheckboxItem } from "./CheckboxItem";
4
4
  import { CheckboxModes } from "./CheckboxModes";
@@ -13,7 +13,7 @@ type OnChange = {
13
13
  id?: string;
14
14
  }) => void;
15
15
  };
16
- type Props = Omit<ComponentProps<typeof CheckboxItem>, "value" | "label" | "checked" | "onChange"> & {
16
+ type Props = Omit<ComponentPropsWithRef<typeof CheckboxItem>, "value" | "label" | "checked" | "onChange"> & {
17
17
  options: Option[];
18
18
  values?: string[];
19
19
  children?: ReactNode;
@@ -22,5 +22,8 @@ type Props = Omit<ComponentProps<typeof CheckboxItem>, "value" | "label" | "chec
22
22
  */
23
23
  mode?: keyof typeof CheckboxModes;
24
24
  } & OnChange;
25
- export declare const Checkbox: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
25
+ export declare const Checkbox: {
26
+ ({ id, name, options, disabled, children, values, mode, onChange, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
27
+ displayName: string;
28
+ };
26
29
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createElement as _createElement } from "react";
3
- import React, { forwardRef } from "react";
3
+ import React, {} from "react";
4
4
  import { CheckboxItem } from "./CheckboxItem";
5
5
  import { CheckboxModes } from "./CheckboxModes";
6
6
  const defaultClassName = (mode) => {
@@ -13,7 +13,7 @@ const defaultClassName = (mode) => {
13
13
  return `af-form__checkbox-${mode}`;
14
14
  }
15
15
  };
16
- const CheckboxInner = forwardRef(({ id, name, options, disabled, children, values = [], mode = CheckboxModes.default, onChange = () => { }, ...otherProps }, inputRef) => {
16
+ const CheckboxInner = ({ id, name, options, disabled, children, values = [], mode = CheckboxModes.default, onChange = () => { }, ...otherProps }) => {
17
17
  const className = defaultClassName(mode);
18
18
  const handleOnChange = ({ target: { value, checked }, }) => {
19
19
  const newValues = checked
@@ -23,8 +23,8 @@ const CheckboxInner = forwardRef(({ id, name, options, disabled, children, value
23
23
  };
24
24
  return (_jsx("div", { className: "af-form__checkbox-container", children: options.map((option) => {
25
25
  const isChecked = values ? values.indexOf(option.value) >= 0 : false;
26
- return (_createElement(CheckboxItem, { ...otherProps, onChange: handleOnChange, key: option.value, className: className, isChecked: isChecked, name: name, disabled: option.disabled || disabled, ref: inputRef, ...option }, children));
26
+ return (_createElement(CheckboxItem, { ...otherProps, onChange: handleOnChange, key: option.value, className: className, isChecked: isChecked, name: name, disabled: option.disabled || disabled, ...option }, children));
27
27
  }) }));
28
- });
28
+ };
29
29
  CheckboxInner.displayName = "Checkbox";
30
30
  export const Checkbox = CheckboxInner;
@@ -1,6 +1,9 @@
1
- import { type ComponentProps } from "react";
1
+ import { type ComponentPropsWithRef } from "react";
2
2
  import { type ConsumerFieldProps } from "../core";
3
3
  import { Checkbox } from "./Checkbox";
4
- type Props = Omit<ComponentProps<typeof Checkbox> & ConsumerFieldProps, "placeholder">;
5
- declare const CheckboxInput: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
4
+ type Props = Omit<ComponentPropsWithRef<typeof Checkbox> & ConsumerFieldProps, "placeholder">;
5
+ declare const CheckboxInput: {
6
+ ({ label, mode, options, children, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
6
9
  export { CheckboxInput };
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import {} from "react";
3
3
  import { Field, useOptionsWithId } from "../core";
4
4
  import { Checkbox } from "./Checkbox";
5
5
  import { CheckboxModes } from "./CheckboxModes";
6
- const CheckboxInput = forwardRef(({ label, mode = "default", options, children, ...otherProps }, inputRef) => {
6
+ const CheckboxInput = ({ label, mode = "default", options, children, ...otherProps }) => {
7
7
  const newOptions = useOptionsWithId(options);
8
8
  return (_jsx(Field, { label: label, labelPosition: mode === CheckboxModes.classic ? "top" : "center", roleContainer: "group", ...otherProps, renderInput: ({ classModifier, id, ariaInvalid, errorId, ...props }) => {
9
- return (_jsxs(_Fragment, { children: [_jsx(Checkbox, { id: id, mode: mode, options: newOptions, classModifier: ariaInvalid ? `${classModifier} error` : classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] }));
9
+ return (_jsxs(_Fragment, { children: [_jsx(Checkbox, { id: id, mode: mode, options: newOptions, classModifier: ariaInvalid ? `${classModifier} error` : classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] }));
10
10
  } }));
11
- });
11
+ };
12
12
  CheckboxInput.displayName = "CheckboxInput";
13
13
  export { CheckboxInput };
@@ -1,6 +1,6 @@
1
- import { type ReactNode } from "react";
1
+ import { type ComponentPropsWithRef, type ReactNode } from "react";
2
2
  import "@axa-fr/canopee-css/distributeur/Form/Checkbox/Checkbox.css";
3
- declare const CheckboxItem: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type"> & {
3
+ type Props = Omit<ComponentPropsWithRef<"input">, "type"> & {
4
4
  /** @deprecated Use `className` instead. */
5
5
  classModifier?: string;
6
6
  optionClassName?: string;
@@ -8,5 +8,9 @@ declare const CheckboxItem: import("react").ForwardRefExoticComponent<Omit<Omit<
8
8
  label?: ReactNode;
9
9
  isChecked?: boolean;
10
10
  variant?: "error" | "warning";
11
- } & import("react").RefAttributes<HTMLInputElement>>;
11
+ };
12
+ declare const CheckboxItem: {
13
+ ({ disabled, value, id, children, label, isChecked, className, classModifier, variant, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
12
16
  export { CheckboxItem };
@@ -1,15 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import check from "@material-symbols/svg-700/sharp/check.svg";
3
- import { forwardRef, useId, } from "react";
3
+ import { useId } from "react";
4
4
  import { getOptionClassName } from "../core";
5
5
  import "@axa-fr/canopee-css/distributeur/Form/Checkbox/Checkbox.css";
6
6
  import { Svg } from "../../Svg";
7
- const CheckboxItem = forwardRef(({ disabled = false, value = "", id, children, label, isChecked, className, classModifier, variant, ...otherProps }, inputRef) => {
7
+ const CheckboxItem = ({ disabled = false, value = "", id, children, label, isChecked, className, classModifier, variant, ...otherProps }) => {
8
8
  const newLabel = children || label;
9
9
  const generatedId = useId();
10
10
  const newId = id ?? generatedId; // id is required on this component
11
11
  const optionClassName = getOptionClassName(className ?? "", classModifier ?? "", "af-form__checkbox", disabled, variant);
12
- return (_jsxs("div", { className: optionClassName, children: [_jsx("input", { ...otherProps, className: "af-form__input-checkbox", value: value, id: newId, disabled: disabled, checked: isChecked, type: "checkbox", ref: inputRef }), _jsxs("label", { className: "af-form__label", htmlFor: newId, children: [_jsx("span", { className: "af-form__indicator", children: _jsx(Svg, { role: "presentation", className: "ok-icon", src: check }) }), _jsx("span", { className: "af-form__description", children: newLabel })] })] }));
13
- });
12
+ return (_jsxs("div", { className: optionClassName, children: [_jsx("input", { ...otherProps, className: "af-form__input-checkbox", value: value, id: newId, disabled: disabled, checked: isChecked, type: "checkbox" }), _jsxs("label", { className: "af-form__label", htmlFor: newId, children: [_jsx("span", { className: "af-form__indicator", children: _jsx(Svg, { role: "presentation", className: "ok-icon", src: check }) }), _jsx("span", { className: "af-form__description", children: newLabel })] })] }));
13
+ };
14
14
  CheckboxItem.displayName = "CheckboxItem";
15
15
  export { CheckboxItem };
@@ -1,7 +1,7 @@
1
- import { type ComponentProps } from "react";
1
+ import { type ComponentPropsWithRef } from "react";
2
2
  import { Radio } from "../Radio";
3
3
  import { type Option } from "../core";
4
- type Props = Omit<ComponentProps<typeof Radio>, "options" | "value"> & {
4
+ type Props = Omit<ComponentPropsWithRef<typeof Radio>, "options" | "value"> & {
5
5
  id: string;
6
6
  name?: string;
7
7
  options?: Array<Omit<Option, "value"> & {
@@ -11,5 +11,8 @@ type Props = Omit<ComponentProps<typeof Radio>, "options" | "value"> & {
11
11
  /** @deprecated Use `className` instead. */
12
12
  classModifier?: string;
13
13
  };
14
- declare const Choice: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
14
+ declare const Choice: {
15
+ ({ children, value, options, name, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
16
+ displayName: string;
17
+ };
15
18
  export { Choice };
@@ -1,18 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, useId } from "react";
2
+ import { useId } from "react";
3
3
  import { Radio } from "../Radio";
4
4
  import { useOptionsWithId } from "../core";
5
5
  const defaultOptions = [
6
6
  { label: "Oui", value: true },
7
7
  { label: "Non", value: false },
8
8
  ];
9
- const Choice = forwardRef(({ children, value, options = defaultOptions, name, ...otherProps }, inputRef) => {
9
+ const Choice = ({ children, value, options = defaultOptions, name, ...otherProps }) => {
10
10
  const choiceOptions = useOptionsWithId(options.map((o) => ({
11
11
  ...o,
12
12
  value: `${o.value}`,
13
13
  })));
14
14
  const generatedId = useId();
15
- return (_jsx(Radio, { ...otherProps, mode: "default", ref: inputRef, name: name ?? `choice_${generatedId}`, value: value?.toString(), options: choiceOptions, children: children }));
16
- });
15
+ return (_jsx(Radio, { ...otherProps, mode: "default", name: name ?? `choice_${generatedId}`, value: value?.toString(), options: choiceOptions, children: children }));
16
+ };
17
17
  Choice.displayName = "Choice";
18
18
  export { Choice };
@@ -1,6 +1,9 @@
1
- import { type ComponentProps } from "react";
1
+ import { type ComponentPropsWithRef } from "react";
2
2
  import { type ConsumerFieldProps } from "../core";
3
3
  import { Choice } from "./Choice";
4
- type Props = ComponentProps<typeof Choice> & ConsumerFieldProps;
5
- declare const ChoiceInput: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
4
+ type Props = ComponentPropsWithRef<typeof Choice> & ConsumerFieldProps;
5
+ declare const ChoiceInput: {
6
+ ({ label, options, children, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
6
9
  export { ChoiceInput };
@@ -1,13 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import {} from "react";
3
3
  import { Field } from "../core";
4
4
  import { Choice } from "./Choice";
5
5
  const defaultOptions = [
6
6
  { label: "Oui", value: true },
7
7
  { label: "Non", value: false },
8
8
  ];
9
- const ChoiceInput = forwardRef(({ label, options = defaultOptions, children, ...otherProps }, inputRef) => {
10
- return (_jsx(Field, { label: label, roleContainer: "radiogroup", ...otherProps, renderInput: ({ classModifier, id, errorId, ariaInvalid, ...props }) => (_jsxs(_Fragment, { children: [_jsx(Choice, { id: id, ref: inputRef, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, options: options, ...props }), children] })) }));
11
- });
9
+ const ChoiceInput = ({ label, options = defaultOptions, children, ...otherProps }) => (_jsx(Field, { label: label, roleContainer: "radiogroup", ...otherProps, renderInput: ({ classModifier, id, errorId, ariaInvalid, ...props }) => (_jsxs(_Fragment, { children: [_jsx(Choice, { id: id, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, options: options, ...props }), children] })) }));
12
10
  ChoiceInput.displayName = "ChoiceInput";
13
11
  export { ChoiceInput };
@@ -6,5 +6,8 @@ type Props = Omit<ComponentPropsWithRef<"input">, "value"> & {
6
6
  defaultValue?: Date | string;
7
7
  value?: Date | string;
8
8
  };
9
- declare const Date: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
9
+ declare const Date: {
10
+ ({ className, classModifier, defaultValue, value, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
10
13
  export { Date };
@@ -1,15 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/distributeur/Form/Date/Date.css";
3
- import { forwardRef } from "react";
3
+ import {} from "react";
4
4
  import { formatDateInputValue } from "../../utilities/helpers/date";
5
5
  import { getClassName } from "../../utilities/helpers/getClassName";
6
- const Date = forwardRef(({ className, classModifier, defaultValue, value, ...otherProps }, ref) => {
6
+ const Date = ({ className, classModifier, defaultValue, value, ...otherProps }) => {
7
7
  const componentClassName = getClassName({
8
8
  baseClassName: "af-form__input-date",
9
9
  modifiers: classModifier?.split(" "),
10
10
  className,
11
11
  });
12
- return (_jsx("input", { className: componentClassName, type: "date", defaultValue: formatDateInputValue(defaultValue), value: formatDateInputValue(value), ref: ref, disabled: classModifier?.includes("disabled"), required: classModifier?.includes("required"), ...otherProps }));
13
- });
12
+ return (_jsx("input", { className: componentClassName, type: "date", defaultValue: formatDateInputValue(defaultValue), value: formatDateInputValue(value), disabled: classModifier?.includes("disabled"), required: classModifier?.includes("required"), ...otherProps }));
13
+ };
14
14
  Date.displayName = "Date";
15
15
  export { Date };
@@ -4,5 +4,8 @@ import { Date } from "./Date";
4
4
  type Props = ConsumerFieldProps & ComponentProps<typeof Date> & {
5
5
  helpMessage?: ReactNode;
6
6
  };
7
- declare const DateInput: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
7
+ declare const DateInput: {
8
+ ({ children, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
8
11
  export { DateInput };
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import {} from "react";
3
3
  import { Field } from "../core";
4
4
  import { Date } from "./Date";
5
- const DateInput = forwardRef(({ children, ...otherProps }, inputRef) => {
6
- return (_jsx(Field, { classNameSuffix: "date", ...otherProps, renderInput: ({ id, classModifier, ariaInvalid, errorId, ...props }) => (_jsxs(_Fragment, { children: [_jsx(Date, { id: id, classModifier: classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] })) }));
7
- });
5
+ const DateInput = ({ children, ...otherProps }) => (_jsx(Field, { classNameSuffix: "date", ...otherProps, renderInput: ({ id, classModifier, ariaInvalid, errorId, ...props }) => (_jsxs(_Fragment, { children: [_jsx(Date, { id: id, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] })) }));
8
6
  DateInput.displayName = "DateInput";
9
7
  export { DateInput };
@@ -1,3 +1,7 @@
1
1
  import "@axa-fr/canopee-css/distributeur/Form/Experimental/Input.css";
2
- declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
2
+ import { type ComponentPropsWithRef } from "react";
3
+ declare const Input: {
4
+ ({ className, ...otherProps }: ComponentPropsWithRef<"input">): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
3
7
  export { Input };
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/distributeur/Form/Experimental/Input.css";
3
- import { forwardRef } from "react";
3
+ import {} from "react";
4
4
  import { getClassName } from "../../utilities/helpers/getClassName";
5
- const Input = forwardRef(({ className, ...otherProps }, inputRef) => {
5
+ const Input = ({ className, ...otherProps }) => {
6
6
  const componentClassName = getClassName({
7
7
  baseClassName: "af-input__input",
8
8
  className,
9
9
  });
10
- return (_jsx("input", { className: componentClassName, ref: inputRef, ...otherProps }));
11
- });
10
+ return _jsx("input", { className: componentClassName, ...otherProps });
11
+ };
12
12
  Input.displayName = "Input";
13
13
  export { Input };
@@ -7,5 +7,8 @@ export type TextInputProps = Omit<ComponentProps<typeof Input>, "children"> & In
7
7
  * It can be customized to render the label on top, or on the left of the input.
8
8
  * It also supports adding a unit on the right of the input.
9
9
  */
10
- declare const TextInput: import("react").ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
10
+ declare const TextInput: {
11
+ ({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, ...props }: TextInputProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
11
14
  export { TextInput };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import {} from "react";
3
3
  import { Input } from "./Input";
4
4
  import { InputContainer } from "./InputContainer";
5
5
  import { InputUnit } from "./InputUnit";
@@ -11,7 +11,7 @@ import { useInput } from "./useInput.hook";
11
11
  * It can be customized to render the label on top, or on the left of the input.
12
12
  * It also supports adding a unit on the right of the input.
13
13
  */
14
- const TextInput = forwardRef(({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, ...props }, inputRef) => {
14
+ const TextInput = ({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, ...props }) => {
15
15
  const { describedBy, errorId, helperId, inputClassName, inputId, isContainerVertical, isInvalid, labelClassName, } = useInput({
16
16
  id,
17
17
  labelPosition,
@@ -20,7 +20,7 @@ const TextInput = forwardRef(({ contentRight, id, labelPosition, inputClassName:
20
20
  errorMessage,
21
21
  helpMessage,
22
22
  });
23
- return (_jsxs(InputContainer, { vertical: isContainerVertical, className: containerClassName, children: [_jsx(Label, { htmlFor: inputId, required: required, className: labelClassName, children: label }), _jsx(Input, { ...props, className: inputClassName, id: inputId, ref: inputRef, "aria-describedby": describedBy, "aria-invalid": isInvalid }), contentRight ? _jsx(InputUnit, { children: contentRight }) : null, helpMessage ? (_jsx(ItemMessage, { id: helperId, children: helpMessage })) : null, errorMessage ? (_jsx(ItemMessage, { variant: "error", id: errorId, children: errorMessage })) : null] }));
24
- });
23
+ return (_jsxs(InputContainer, { vertical: isContainerVertical, className: containerClassName, children: [_jsx(Label, { htmlFor: inputId, required: required, className: labelClassName, children: label }), _jsx(Input, { ...props, className: inputClassName, id: inputId, "aria-describedby": describedBy, "aria-invalid": isInvalid }), contentRight ? _jsx(InputUnit, { children: contentRight }) : null, helpMessage ? (_jsx(ItemMessage, { id: helperId, children: helpMessage })) : null, errorMessage ? (_jsx(ItemMessage, { variant: "error", id: errorId, children: errorMessage })) : null] }));
24
+ };
25
25
  TextInput.displayName = "TextInput";
26
26
  export { TextInput };
@@ -4,5 +4,8 @@ type Props = Omit<ComponentPropsWithRef<"input">, "type"> & {
4
4
  /** @deprecated Use `className` and the native `required` prop instead. */
5
5
  classModifier?: string;
6
6
  };
7
- declare const Number: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
7
+ declare const Number: {
8
+ ({ id, className, classModifier, required, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
8
11
  export { Number };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/distributeur/Form/Text/Text.css";
3
- import { forwardRef, useId } from "react";
3
+ import { useId } from "react";
4
4
  import { getClassName } from "../../utilities/helpers/getClassName";
5
- const Number = forwardRef(({ id, className, classModifier, required, ...otherProps }, inputRef) => {
5
+ const Number = ({ id, className, classModifier, required, ...otherProps }) => {
6
6
  const inputUseId = useId();
7
7
  const inputId = id ?? inputUseId;
8
8
  const componentClassName = getClassName({
@@ -10,7 +10,7 @@ const Number = forwardRef(({ id, className, classModifier, required, ...otherPro
10
10
  modifiers: classModifier?.split(" "),
11
11
  className,
12
12
  });
13
- return (_jsx("input", { className: componentClassName, id: inputId, type: "number", ref: inputRef, required: required || classModifier?.includes("required"), ...otherProps }));
14
- });
13
+ return (_jsx("input", { className: componentClassName, id: inputId, type: "number", required: required || classModifier?.includes("required"), ...otherProps }));
14
+ };
15
15
  Number.displayName = "Number";
16
16
  export { Number };
@@ -8,5 +8,8 @@ type Props = Omit<ComponentPropsWithRef<"input">, "type" | "role"> & {
8
8
  /**
9
9
  * @deprecated The Pass component is deprecated and will be removed in a future release
10
10
  */
11
- declare const Pass: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
11
+ declare const Pass: {
12
+ ({ onToggleType, type, className, classModifier, ...inputProps }: Props): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
12
15
  export { Pass };
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import {} from "react";
3
3
  import { getComponentClassName } from "../../utilities";
4
4
  import "@axa-fr/canopee-css/distributeur/Form/Pass/Pass.css";
5
5
  /**
6
6
  * @deprecated The Pass component is deprecated and will be removed in a future release
7
7
  */
8
- const Pass = forwardRef(({ onToggleType, type = "password", className, classModifier, ...inputProps }, inputRef) => {
8
+ const Pass = ({ onToggleType, type = "password", className, classModifier, ...inputProps }) => {
9
9
  const componentClassName = getComponentClassName(className, classModifier, "af-form__pass");
10
- return (_jsxs("div", { className: componentClassName, children: [_jsx("div", { className: "af-form__pass-strength" }), _jsx("input", { ...inputProps, role: type === "password" ? "password" : "textbox", className: "af-form__input-text", type: type, ref: inputRef, required: classModifier?.includes("required") }), _jsx("button", { className: "af-form__pass-btn", type: "button", "aria-label": "show password", onClick: onToggleType, children: _jsx("i", { className: `glyphicon glyphicon-eye${type === "text" ? "-close" : "-open"}` }) })] }));
11
- });
10
+ return (_jsxs("div", { className: componentClassName, children: [_jsx("div", { className: "af-form__pass-strength" }), _jsx("input", { ...inputProps, role: type === "password" ? "password" : "textbox", className: "af-form__input-text", type: type, required: classModifier?.includes("required") }), _jsx("button", { className: "af-form__pass-btn", type: "button", "aria-label": "show password", onClick: onToggleType, children: _jsx("i", { className: `glyphicon glyphicon-eye${type === "text" ? "-close" : "-open"}` }) })] }));
11
+ };
12
12
  Pass.displayName = "Pass";
13
13
  export { Pass };
@@ -1,33 +1,22 @@
1
+ import { type ComponentPropsWithRef } from "react";
1
2
  import type { Option } from "../core";
3
+ import { RadioCardGroup } from "./RadioCardGroup";
4
+ import { RadioItem } from "./RadioItem";
2
5
  export declare enum RadioModes {
3
6
  classic = "classic",
4
7
  default = "default",
5
8
  inline = "inline",
6
9
  cardRadio = "cardRadio"
7
10
  }
8
- declare const Radio: import("react").ForwardRefExoticComponent<(({
11
+ type Props = {
9
12
  options: Option[];
10
- } & Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & {
11
- options: ({
12
- id?: string;
13
- icon?: import("react").ReactNode;
14
- label: import("react").ReactNode;
15
- description?: import("react").ReactNode;
16
- value: string;
17
- } & import("react").InputHTMLAttributes<HTMLInputElement> & {
18
- action?: import("react").ReactNode;
19
- })[];
20
- orientation?: "horizontal" | "vertical";
21
- }, "ref"> & {
22
- mode: "cardRadio";
23
- }) | Omit<{
24
- options: Option[];
25
- } & Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "checked"> & {
26
- classModifier?: string;
27
- optionClassName?: string;
28
- label?: import("react").ReactNode;
29
- isChecked?: boolean;
30
- }, "ref"> & import("react").RefAttributes<HTMLInputElement>, "className" | "id" | "label"> & {
13
+ } & ((Omit<ComponentPropsWithRef<typeof RadioItem>, "id" | "label" | "className"> & {
31
14
  mode?: "classic" | "default" | "inline";
32
- }, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
15
+ }) | (ComponentPropsWithRef<typeof RadioCardGroup> & {
16
+ mode: "cardRadio";
17
+ }));
18
+ declare const Radio: {
19
+ ({ options, value, children, disabled, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
20
+ displayName: string;
21
+ };
33
22
  export { Radio };
@@ -1,7 +1,7 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import classNames from "classnames";
4
- import { forwardRef, } from "react";
4
+ import {} from "react";
5
5
  import { RadioCardGroup } from "./RadioCardGroup";
6
6
  import { RadioItem } from "./RadioItem";
7
7
  export var RadioModes;
@@ -23,7 +23,7 @@ const getClassNameMode = (mode) => {
23
23
  return "af-form__radio-custom";
24
24
  }
25
25
  };
26
- const Radio = forwardRef(({ options, value = "", children, disabled, ...otherProps }, inputRef) => {
26
+ const Radio = ({ options, value = "", children, disabled, ...otherProps }) => {
27
27
  const { mode, ...onlyNecessaryProps } = otherProps;
28
28
  const classNameMode = getClassNameMode(mode ?? "default");
29
29
  if (mode === "cardRadio") {
@@ -31,7 +31,7 @@ const Radio = forwardRef(({ options, value = "", children, disabled, ...otherPro
31
31
  }
32
32
  return (_jsxs(_Fragment, { children: [_jsx("div", { className: classNames("af-form__radio-group", [
33
33
  { "af-form__radio-group-classic": mode === RadioModes.classic },
34
- ]), children: options.map((option) => (_createElement(RadioItem, { ...onlyNecessaryProps, key: option.value, isChecked: option.value === value, disabled: option.disabled || disabled, className: classNameMode, ref: inputRef, ...option }))) }), children] }));
35
- });
34
+ ]), children: options.map((option) => (_createElement(RadioItem, { ...onlyNecessaryProps, key: option.value, isChecked: option.value === value, disabled: option.disabled || disabled, className: classNameMode, ...option }))) }), children] }));
35
+ };
36
36
  Radio.displayName = "EnhancedInputRadio";
37
37
  export { Radio };
@@ -1,6 +1,9 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import { type ComponentPropsWithRef } from "react";
2
2
  import { type ConsumerFieldProps } from "../core";
3
3
  import { Radio } from "./Radio";
4
- type RadioInputProps = ConsumerFieldProps & ComponentPropsWithoutRef<typeof Radio>;
5
- declare const RadioInput: import("react").ForwardRefExoticComponent<RadioInputProps & import("react").RefAttributes<HTMLInputElement>>;
4
+ type RadioInputProps = ConsumerFieldProps & ComponentPropsWithRef<typeof Radio>;
5
+ declare const RadioInput: {
6
+ ({ label, mode, options, children, ...props }: RadioInputProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
6
9
  export { RadioInput };