@axa-fr/canopee-react 1.8.1-alpha.1 → 2.0.0-alpha.22
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.
- package/dist/client.d.ts +11 -6
- package/dist/client.js +11 -6
- package/dist/distributeur/Action/Action.d.ts +8 -2
- package/dist/distributeur/Action/Action.js +4 -4
- package/dist/distributeur/Button/Button.d.ts +8 -5
- package/dist/distributeur/Button/Button.js +2 -2
- package/dist/distributeur/Form/Checkbox/Checkbox.d.ts +6 -3
- package/dist/distributeur/Form/Checkbox/Checkbox.js +4 -4
- package/dist/distributeur/Form/Checkbox/CheckboxInput.d.ts +6 -3
- package/dist/distributeur/Form/Checkbox/CheckboxInput.js +4 -4
- package/dist/distributeur/Form/Checkbox/CheckboxItem.d.ts +7 -3
- package/dist/distributeur/Form/Checkbox/CheckboxItem.js +4 -4
- package/dist/distributeur/Form/Choice/Choice.d.ts +6 -3
- package/dist/distributeur/Form/Choice/Choice.js +4 -4
- package/dist/distributeur/Form/Choice/ChoiceInput.d.ts +6 -3
- package/dist/distributeur/Form/Choice/ChoiceInput.js +2 -4
- package/dist/distributeur/Form/Date/Date.d.ts +4 -1
- package/dist/distributeur/Form/Date/Date.js +4 -4
- package/dist/distributeur/Form/Date/DateInput.d.ts +4 -1
- package/dist/distributeur/Form/Date/DateInput.js +2 -4
- package/dist/distributeur/Form/Experimental/Input.d.ts +5 -1
- package/dist/distributeur/Form/Experimental/Input.js +4 -4
- package/dist/distributeur/Form/Experimental/TextInput.d.ts +4 -1
- package/dist/distributeur/Form/Experimental/TextInput.js +4 -4
- package/dist/distributeur/Form/Number/Number.d.ts +4 -1
- package/dist/distributeur/Form/Number/Number.js +4 -4
- package/dist/distributeur/Form/Pass/Pass.d.ts +4 -1
- package/dist/distributeur/Form/Pass/Pass.js +4 -4
- package/dist/distributeur/Form/Radio/Radio.d.ts +12 -23
- package/dist/distributeur/Form/Radio/Radio.js +4 -4
- package/dist/distributeur/Form/Radio/RadioInput.d.ts +6 -3
- package/dist/distributeur/Form/Radio/RadioInput.js +4 -4
- package/dist/distributeur/Form/Radio/RadioItem.d.ts +4 -1
- package/dist/distributeur/Form/Radio/RadioItem.js +4 -4
- package/dist/distributeur/Form/Select/Select.d.ts +9 -325
- package/dist/distributeur/Form/Select/Select.js +5 -5
- package/dist/distributeur/Form/Select/SelectBase.d.ts +10 -6
- package/dist/distributeur/Form/Select/SelectBase.js +4 -4
- package/dist/distributeur/Form/Select/SelectDefault.d.ts +4 -1
- package/dist/distributeur/Form/Select/SelectDefault.js +4 -4
- package/dist/distributeur/Form/Select/SelectDefaultWithOptions.d.ts +4 -1
- package/dist/distributeur/Form/Select/SelectDefaultWithOptions.js +5 -12
- package/dist/distributeur/Form/Select/SelectInput.d.ts +9 -376
- package/dist/distributeur/Form/Select/SelectInput.js +2 -4
- package/dist/distributeur/Form/Text/Text.d.ts +4 -1
- package/dist/distributeur/Form/Text/Text.js +4 -4
- package/dist/distributeur/Form/Text/TextInput.d.ts +4 -1
- package/dist/distributeur/Form/Text/TextInput.js +2 -4
- package/dist/distributeur/Form/Textarea/Textarea.d.ts +7 -2
- package/dist/distributeur/Form/Textarea/Textarea.js +4 -4
- package/dist/distributeur/Form/Textarea/TextareaInput.d.ts +4 -1
- package/dist/distributeur/Form/Textarea/TextareaInput.js +2 -4
- package/dist/distributeur/Layout/Footer/Footer.d.ts +5 -3
- package/dist/distributeur/Layout/Footer/Footer.js +2 -2
- package/dist/distributeur/Layout/Header/Name/Name.js +1 -1
- package/dist/distributeur/Layout/Header/NavBar/NavBarItem/NavBarItemBase.js +1 -1
- package/dist/distributeur/Link/Link.d.ts +4 -1
- package/dist/distributeur/Link/Link.js +3 -4
- package/dist/distributeur/Link/LinkAnchor.d.ts +4 -1
- package/dist/distributeur/Link/LinkAnchor.js +4 -4
- package/dist/distributeur/Loader/ItemLoader.d.ts +4 -0
- package/dist/distributeur/Loader/ItemLoader.js +8 -0
- package/dist/distributeur/Loader/Loader.d.ts +7 -10
- package/dist/distributeur/Loader/Loader.js +12 -27
- package/dist/distributeur/Loader/SquareLoader.d.ts +15 -0
- package/dist/distributeur/Loader/SquareLoader.js +33 -0
- package/dist/distributeur/ModalAgent/BooleanModal.d.ts +4 -1
- package/dist/distributeur/ModalAgent/BooleanModal.js +4 -4
- package/dist/distributeur/ModalAgent/Modal.d.ts +4 -1
- package/dist/distributeur/ModalAgent/Modal.js +4 -4
- package/dist/distributeur/Steps/VerticalStep.d.ts +2 -8
- package/dist/distributeur/Svg/svgInjector.js +1 -0
- package/dist/distributeur/Tag/Tag.d.ts +4 -1
- package/dist/distributeur/Tag/Tag.js +4 -4
- package/dist/distributeur/Title/Title.d.ts +4 -1
- package/dist/distributeur/Title/Title.js +4 -4
- package/dist/distributeur.d.ts +12 -6
- package/dist/distributeur.js +4 -1
- package/dist/prospect-client/AppName/AppName.d.ts +44 -0
- package/dist/prospect-client/AppName/AppName.js +23 -0
- package/dist/prospect-client/Card/CardApollo.d.ts +1 -1
- package/dist/prospect-client/Card/CardApollo.js +1 -1
- package/dist/prospect-client/Card/CardCommon.d.ts +30 -2
- package/dist/prospect-client/Card/CardCommon.js +18 -1
- package/dist/prospect-client/Card/CardLF.d.ts +1 -1
- package/dist/prospect-client/Card/CardLF.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionCommon.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionCommon.js +3 -3
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.js +2 -2
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.js +1 -2
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +4 -4
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.js +1 -2
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +4 -1
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +4 -4
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadApollo.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadApollo.js +1 -2
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadCommon.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadCommon.js +4 -4
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadLF.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadLF.js +1 -2
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.js +3 -4
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.js +4 -6
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.js +1 -2
- package/dist/prospect-client/Form/InputDate/InputDateApollo.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateApollo.js +1 -2
- package/dist/prospect-client/Form/InputDate/InputDateAtom.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateAtom.js +2 -2
- package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateCommon.js +4 -4
- package/dist/prospect-client/Form/InputDate/InputDateLF.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateLF.js +1 -2
- package/dist/prospect-client/Form/InputDate/InputDateTextAtom.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateTextAtom.js +4 -4
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +4 -1
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +4 -4
- package/dist/prospect-client/Form/InputText/InputTextApollo.d.ts +4 -1
- package/dist/prospect-client/Form/InputText/InputTextApollo.js +1 -2
- package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +4 -1
- package/dist/prospect-client/Form/InputText/InputTextCommon.js +4 -4
- package/dist/prospect-client/Form/InputText/InputTextLF.d.ts +4 -1
- package/dist/prospect-client/Form/InputText/InputTextLF.js +1 -2
- package/dist/prospect-client/Form/InputTextAtom/InputTextAtomCommon.d.ts +4 -1
- package/dist/prospect-client/Form/InputTextAtom/InputTextAtomCommon.js +4 -4
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.js +6 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.d.ts +8 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.js +9 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.js +6 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.d.ts +3 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.js +6 -0
- package/dist/prospect-client/Form/Radio/{CardRadioOption/CardRadioOptionCommon.d.ts → CardRadio/CardRadioCommon.d.ts} +7 -4
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +16 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.d.ts +3 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.js +6 -0
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo.js +2 -2
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +6 -6
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +3 -3
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF.js +2 -2
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.d.ts +4 -1
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.js +3 -3
- package/dist/prospect-client/Form/TextArea/TextAreaApollo.d.ts +4 -1
- package/dist/prospect-client/Form/TextArea/TextAreaApollo.js +1 -2
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +4 -1
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +4 -4
- package/dist/prospect-client/Form/TextArea/TextAreaLF.d.ts +4 -1
- package/dist/prospect-client/Form/TextArea/TextAreaLF.js +1 -2
- package/dist/prospect-client/Header/HeaderApollo.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderApollo.js +8 -0
- package/dist/prospect-client/Header/HeaderCommon.d.ts +22 -0
- package/dist/prospect-client/Header/HeaderCommon.js +37 -0
- package/dist/prospect-client/Header/HeaderLF.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderLF.js +8 -0
- package/dist/prospect-client/ItemMenu/ItemMenuApollo.d.ts +2 -0
- package/dist/prospect-client/ItemMenu/ItemMenuApollo.js +2 -0
- package/dist/prospect-client/ItemMenu/ItemMenuCommon.d.ts +22 -0
- package/dist/prospect-client/ItemMenu/ItemMenuCommon.js +18 -0
- package/dist/prospect-client/ItemMenu/ItemMenuLF.d.ts +2 -0
- package/dist/prospect-client/ItemMenu/ItemMenuLF.js +2 -0
- package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.d.ts +4 -1
- package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.js +4 -4
- package/dist/prospect-client/List/ClickItem/ClickItemCommon.d.ts +1 -0
- package/dist/prospect-client/List/List/ListCommon.d.ts +27 -2
- package/dist/prospect-client/List/List/ListCommon.js +12 -0
- package/dist/prospect-client/Loader/LoaderCommon.d.ts +4 -1
- package/dist/prospect-client/Loader/LoaderCommon.js +4 -4
- package/dist/prospect-client/MenuBurger/MenuBurgerApollo.d.ts +4 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerApollo.js +8 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerCommon.d.ts +60 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerCommon.js +34 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerLF.d.ts +4 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerLF.js +8 -0
- package/dist/prospect-client/Modal/ModalApollo.d.ts +4 -1
- package/dist/prospect-client/Modal/ModalApollo.js +2 -3
- package/dist/prospect-client/Modal/ModalCommon.d.ts +4 -1
- package/dist/prospect-client/Modal/ModalCommon.js +1 -2
- package/dist/prospect-client/Modal/ModalLF.d.ts +4 -1
- package/dist/prospect-client/Modal/ModalLF.js +2 -3
- package/dist/prospect-client/Modal/components/ModalCore.d.ts +4 -1
- package/dist/prospect-client/Modal/components/ModalCore.js +3 -3
- package/dist/prospect-client/TabMenu/TabMenu.d.ts +36 -0
- package/dist/prospect-client/TabMenu/TabMenu.helpers.d.ts +1 -0
- package/dist/prospect-client/TabMenu/TabMenu.helpers.js +12 -0
- package/dist/prospect-client/TabMenu/TabMenu.js +39 -0
- package/dist/prospect-client/TagList/TagListApollo.d.ts +4 -0
- package/dist/prospect-client/TagList/TagListApollo.js +5 -0
- package/dist/prospect-client/TagList/TagListCommon.d.ts +10 -0
- package/dist/prospect-client/TagList/TagListCommon.js +16 -0
- package/dist/prospect-client/TagList/TagListLF.d.ts +4 -0
- package/dist/prospect-client/TagList/TagListLF.js +5 -0
- package/dist/prospect-client/Toggle/ToggleApollo.d.ts +4 -1
- package/dist/prospect-client/Toggle/ToggleApollo.js +1 -2
- package/dist/prospect-client/Toggle/ToggleCommon.d.ts +4 -3
- package/dist/prospect-client/Toggle/ToggleCommon.js +4 -4
- package/dist/prospect-client/Toggle/ToggleLF.d.ts +4 -1
- package/dist/prospect-client/Toggle/ToggleLF.js +1 -2
- package/dist/prospect.d.ts +10 -5
- package/dist/prospect.js +10 -5
- package/package.json +3 -3
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo.d.ts +0 -3
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo.js +0 -6
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionCommon.js +0 -16
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF.d.ts +0 -3
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF.js +0 -6
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/prospect/Form/Checkbox/CheckboxText/CheckboxTextApollo.css";
|
|
2
2
|
import { type CheckboxTextProps } from "./CheckboxTextCommon";
|
|
3
|
-
export declare const CheckboxText:
|
|
3
|
+
export declare const CheckboxText: {
|
|
4
|
+
({ ...props }: CheckboxTextProps): 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
|
-
import { forwardRef } from "react";
|
|
3
2
|
import "@axa-fr/canopee-css/prospect/Form/Checkbox/CheckboxText/CheckboxTextApollo.css";
|
|
4
3
|
import { ItemMessage } from "../../ItemMessage/ItemMessageApollo";
|
|
5
4
|
import { Checkbox } from "../Checkbox/CheckboxApollo";
|
|
6
5
|
import { CheckboxTextCommon, } from "./CheckboxTextCommon";
|
|
7
|
-
export const CheckboxText =
|
|
6
|
+
export const CheckboxText = ({ ...props }) => (_jsx(CheckboxTextCommon, { ...props, CheckboxComponent: Checkbox, ItemMessageComponent: ItemMessage }));
|
|
8
7
|
CheckboxText.displayName = "CheckboxText";
|
|
@@ -14,5 +14,8 @@ export type CheckboxTextCommonProps = CheckboxTextProps & {
|
|
|
14
14
|
CheckboxComponent: ComponentType<Omit<CheckboxProps, "checkBoxIcon">>;
|
|
15
15
|
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
16
16
|
};
|
|
17
|
-
declare const CheckboxTextCommon:
|
|
17
|
+
declare const CheckboxTextCommon: {
|
|
18
|
+
({ label, errorMessage, id, message, messageType, CheckboxComponent, ItemMessageComponent, containerProps, ...inputProps }: CheckboxTextCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
18
21
|
export { CheckboxTextCommon };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
const CheckboxTextCommon =
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
const CheckboxTextCommon = ({ label, errorMessage, id, message, messageType, CheckboxComponent, ItemMessageComponent, containerProps, ...inputProps }) => {
|
|
4
4
|
const generatedId = useId();
|
|
5
5
|
const inputId = id ?? generatedId;
|
|
6
6
|
const messageId = `${inputId}-error`;
|
|
7
7
|
const hasError = (Boolean(message) && messageType === "error") || Boolean(errorMessage);
|
|
8
|
-
return (_jsxs("div", { className: "af-checkbox-text", ...containerProps, children: [_jsxs("label", { htmlFor: inputId, children: [_jsx(CheckboxComponent, { id: inputId, ...inputProps, "aria-errormessage": hasError ? messageId : undefined, "aria-invalid": hasError || undefined
|
|
9
|
-
}
|
|
8
|
+
return (_jsxs("div", { className: "af-checkbox-text", ...containerProps, children: [_jsxs("label", { htmlFor: inputId, children: [_jsx(CheckboxComponent, { id: inputId, ...inputProps, "aria-errormessage": hasError ? messageId : undefined, "aria-invalid": hasError || undefined }), _jsx("span", { className: "af-checkbox-text__label-content", children: label })] }), _jsx(ItemMessageComponent, { message: message || errorMessage, id: messageId, messageType: messageType })] }));
|
|
9
|
+
};
|
|
10
10
|
CheckboxTextCommon.displayName = "CheckboxTextCommon";
|
|
11
11
|
export { CheckboxTextCommon };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/client/Form/Checkbox/CheckboxText/CheckboxTextLF.css";
|
|
2
2
|
import { type CheckboxTextProps } from "./CheckboxTextCommon";
|
|
3
|
-
export declare const CheckboxText:
|
|
3
|
+
export declare const CheckboxText: {
|
|
4
|
+
({ ...props }: CheckboxTextProps): 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
|
-
import { forwardRef } from "react";
|
|
3
2
|
import "@axa-fr/canopee-css/client/Form/Checkbox/CheckboxText/CheckboxTextLF.css";
|
|
4
3
|
import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
|
|
5
4
|
import { Checkbox } from "../Checkbox/CheckboxLF";
|
|
6
5
|
import { CheckboxTextCommon, } from "./CheckboxTextCommon";
|
|
7
|
-
export const CheckboxText =
|
|
6
|
+
export const CheckboxText = ({ ...props }) => (_jsx(CheckboxTextCommon, { ...props, CheckboxComponent: Checkbox, ItemMessageComponent: ItemMessage }));
|
|
8
7
|
CheckboxText.displayName = "CheckboxText";
|
|
@@ -23,5 +23,8 @@ type DropdownCommonProps = DropdownProps & {
|
|
|
23
23
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
|
|
24
24
|
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
25
25
|
};
|
|
26
|
-
declare const DropdownCommon:
|
|
26
|
+
declare const DropdownCommon: {
|
|
27
|
+
({ id, required, label, error, placeholder, children, helper, success, message, messageType, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, containerProps, ...otherProps }: DropdownCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
27
30
|
export { DropdownCommon };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import {
|
|
3
|
+
import { useId, } from "react";
|
|
4
4
|
import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
|
|
5
5
|
import { ItemMessage, } from "../ItemMessage/ItemMessageCommon";
|
|
6
|
-
const DropdownCommon =
|
|
6
|
+
const DropdownCommon = ({ id, required, label, error, placeholder, children, helper, success, message, messageType, description, buttonLabel, moreButtonLabel, onButtonClick, onMoreButtonClick, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, containerProps, ...otherProps }) => {
|
|
7
7
|
const idMessage = useId();
|
|
8
8
|
let inputId = useId();
|
|
9
9
|
inputId = id || inputId;
|
|
10
10
|
const hasError = (Boolean(message) && messageType === "error") || Boolean(error);
|
|
11
11
|
const hasWarning = !hasError && Boolean(message) && messageType === "warning";
|
|
12
12
|
const classname = classNames("af-form__dropdown-input", hasError && "af-form__dropdown-input--error", hasWarning && "af-form__dropdown-input--warning");
|
|
13
|
-
return (_jsxs("div", { className: "af-form__dropdown-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsxs("select", { className: classname, ...otherProps,
|
|
14
|
-
}
|
|
13
|
+
return (_jsxs("div", { className: "af-form__dropdown-container", ...containerProps, children: [_jsx(ItemLabelComponent, { description: description, moreButtonLabel: moreButtonLabel ?? buttonLabel, onMoreButtonClick: onMoreButtonClick ?? onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, htmlFor: inputId, children: label }), _jsxs("select", { className: classname, ...otherProps, id: inputId, children: [Boolean(placeholder) && _jsx("option", { value: "", children: placeholder }), children] }), helper ? _jsx("span", { className: "af-form__input-helper", children: helper }) : null, _jsx(ItemMessageComponent, { id: idMessage, message: message || error || success, messageType: messageType || (error ? "error" : "success") })] }));
|
|
14
|
+
};
|
|
15
15
|
DropdownCommon.displayName = "Dropdown";
|
|
16
16
|
export { DropdownCommon };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { type FileUploadProps } from "./FileUploadCommon";
|
|
2
2
|
import "@axa-fr/canopee-css/prospect/Form/FileUpload/FileUpload/FileUploadAll.css";
|
|
3
|
-
export declare const FileUpload:
|
|
3
|
+
export declare const FileUpload: {
|
|
4
|
+
({ ...props }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { InputFile } from "../InputFile/InputFileApollo";
|
|
4
3
|
import { FileUploadCommon } from "./FileUploadCommon";
|
|
5
4
|
import "@axa-fr/canopee-css/prospect/Form/FileUpload/FileUpload/FileUploadAll.css";
|
|
6
|
-
export const FileUpload =
|
|
5
|
+
export const FileUpload = ({ ...props }) => (_jsx(FileUploadCommon, { ...props, InputFileComponent: InputFile }));
|
|
7
6
|
FileUpload.displayName = "FileUpload";
|
|
@@ -14,5 +14,8 @@ export type FileUploadProps = Omit<InputFileProps, "children"> & {
|
|
|
14
14
|
type FileUploadCommonProps = FileUploadProps & {
|
|
15
15
|
InputFileComponent: ComponentType<InputFileProps>;
|
|
16
16
|
};
|
|
17
|
-
export declare const FileUploadCommon:
|
|
17
|
+
export declare const FileUploadCommon: {
|
|
18
|
+
({ InputFileComponent, className, children, fileListLabel, ...props }: FileUploadCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
18
21
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Children,
|
|
2
|
+
import { Children, } from "react";
|
|
3
3
|
import { generateId } from "../../../utilities/generateId";
|
|
4
4
|
import { getClassName } from "../../../utilities/getClassName";
|
|
5
|
-
export const FileUploadCommon =
|
|
5
|
+
export const FileUploadCommon = ({ InputFileComponent, className, children, fileListLabel = "Vos fichiers importés :", ...props }) => {
|
|
6
6
|
return (_jsx(InputFileComponent, { ...props, className: getClassName({
|
|
7
7
|
baseClassName: "af-file-upload",
|
|
8
8
|
className,
|
|
9
|
-
}),
|
|
10
|
-
}
|
|
9
|
+
}), children: children ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "af-file-list__title", children: fileListLabel }), _jsx("ul", { className: "af-file-list", children: Children.map(children, (child) => (_jsx("li", { className: "af-file-list__item", children: child }, generateId(child)))) })] })) : null }));
|
|
10
|
+
};
|
|
11
11
|
FileUploadCommon.displayName = "FileUploadCommon";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { type FileUploadProps } from "./FileUploadCommon";
|
|
2
2
|
import "@axa-fr/canopee-css/client/Form/FileUpload/FileUpload/FileUploadAll.css";
|
|
3
|
-
export declare const FileUpload:
|
|
3
|
+
export declare const FileUpload: {
|
|
4
|
+
({ ...props }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { InputFile } from "../InputFile/InputFileLF";
|
|
4
3
|
import { FileUploadCommon } from "./FileUploadCommon";
|
|
5
4
|
import "@axa-fr/canopee-css/client/Form/FileUpload/FileUpload/FileUploadAll.css";
|
|
6
|
-
export const FileUpload =
|
|
5
|
+
export const FileUpload = ({ ...props }) => (_jsx(FileUploadCommon, { ...props, InputFileComponent: InputFile }));
|
|
7
6
|
FileUpload.displayName = "FileUpload";
|
|
@@ -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:
|
|
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 =
|
|
8
|
-
return (_jsx(InputFileCommon, { ...props,
|
|
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:
|
|
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 {
|
|
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 =
|
|
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", {
|
|
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:
|
|
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 =
|
|
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:
|
|
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 =
|
|
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:
|
|
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 {
|
|
2
|
+
import {} from "react";
|
|
3
3
|
import { formatInputDateValue } from "./InputDate.helper";
|
|
4
|
-
const InputDateAtom =
|
|
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:
|
|
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 {
|
|
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 =
|
|
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,
|
|
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:
|
|
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 =
|
|
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:
|
|
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 {
|
|
2
|
+
import {} from "react";
|
|
3
3
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
|
|
4
4
|
import { formatDateTextValue, formatInputDateValue } from "./InputDate.helper";
|
|
5
|
-
const InputDateTextAtom =
|
|
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,
|
|
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:
|
|
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 {
|
|
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 =
|
|
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,
|
|
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:
|
|
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 =
|
|
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:
|
|
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 {
|
|
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 =
|
|
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,
|
|
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:
|
|
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 =
|
|
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:
|
|
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 {
|
|
2
|
+
import { useId } from "react";
|
|
3
3
|
import { getClassName } from "../../utilities/getClassName";
|
|
4
|
-
const InputTextAtom =
|
|
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,
|
|
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,7 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/prospect/Form/ItemMultiSelect/ItemMultiSelectApollo.css";
|
|
2
|
+
import { type ItemMultiSelectCommonProps } from "./ItemMultiSelectCommon";
|
|
3
|
+
export type ItemMultiSelectProps = Omit<ItemMultiSelectCommonProps, "Checkbox">;
|
|
4
|
+
export declare const ItemMultiSelect: {
|
|
5
|
+
(props: ItemMultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/prospect/Form/ItemMultiSelect/ItemMultiSelectApollo.css";
|
|
3
|
+
import { Checkbox } from "../Checkbox/Checkbox/CheckboxApollo";
|
|
4
|
+
import { ItemMultiSelectCommon, } from "./ItemMultiSelectCommon";
|
|
5
|
+
export const ItemMultiSelect = (props) => (_jsx(ItemMultiSelectCommon, { ...props, Checkbox: Checkbox }));
|
|
6
|
+
ItemMultiSelect.displayName = "ItemMultiSelect";
|