@axa-fr/canopee-react 2.0.0-alpha.70 → 2.0.0-alpha.72
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 +1 -1
- package/dist/client.js +1 -1
- package/dist/distributeur/Card/BaseCard.d.ts +14 -0
- package/dist/distributeur/Card/BaseCard.js +23 -0
- package/dist/distributeur/CardButton/CardButton.d.ts +18 -0
- package/dist/distributeur/CardButton/CardButton.js +12 -0
- package/dist/distributeur/Form/Experimental/InputContainer.d.ts +4 -1
- package/dist/distributeur/Form/Experimental/InputContainer.js +2 -2
- package/dist/distributeur/Form/Experimental/InputUnit.d.ts +1 -1
- package/dist/distributeur/Form/Experimental/InputUnit.js +1 -1
- package/dist/distributeur/Form/Experimental/ItemMessage.d.ts +1 -1
- package/dist/distributeur/Form/Experimental/ItemMessage.js +1 -1
- package/dist/distributeur/Form/Experimental/Label.d.ts +1 -2
- package/dist/distributeur/Form/Experimental/Legend.d.ts +12 -0
- package/dist/distributeur/Form/Experimental/Legend.js +3 -0
- package/dist/distributeur/Form/Experimental/Radio/AddRadioCard.d.ts +7 -0
- package/dist/distributeur/Form/Experimental/Radio/AddRadioCard.js +14 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioButton.d.ts +13 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioButton.js +3 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioCard.d.ts +10 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioCard.js +13 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioGroup.d.ts +8 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioGroup.js +10 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioInput.d.ts +18 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioInput.js +34 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioItem.d.ts +4 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioItem.js +10 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioText.d.ts +6 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioText.js +3 -0
- package/dist/distributeur/Form/Experimental/Radio/_radioInputOptions.d.ts +8 -0
- package/dist/distributeur/Form/Experimental/Radio/_radioInputOptions.js +7 -0
- package/dist/distributeur/Form/Experimental/index.d.ts +6 -0
- package/dist/distributeur/Form/Experimental/index.js +6 -0
- package/dist/distributeur/Form/Experimental/types.d.ts +1 -1
- package/dist/distributeur/Form/Experimental/useInput.hook.js +1 -1
- package/dist/distributeur-experimental.d.ts +2 -0
- package/dist/distributeur-experimental.js +2 -0
- package/dist/distributeur.d.ts +2 -0
- package/dist/distributeur.js +2 -0
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxApollo.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.d.ts +1 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +1 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.js +1 -1
- package/dist/prospect-client/Form/Dropdown/DropdownApollo.js +1 -1
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +2 -2
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +1 -1
- package/dist/prospect-client/Form/Dropdown/DropdownLF.js +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.js +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.d.ts +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.js +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.js +1 -1
- package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileApollo.js +1 -1
- package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileCommon.d.ts +1 -1
- package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileLF.js +1 -1
- package/dist/prospect-client/Form/InputDate/InputDateApollo.js +1 -1
- package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +2 -2
- package/dist/prospect-client/Form/InputDate/InputDateCommon.js +1 -1
- package/dist/prospect-client/Form/InputDate/InputDateLF.js +1 -1
- package/dist/prospect-client/Form/InputPhone/InputPhoneApollo.js +1 -1
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +2 -2
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +1 -1
- package/dist/prospect-client/Form/InputPhone/InputPhoneLF.js +1 -1
- package/dist/prospect-client/Form/InputText/InputTextApollo.js +1 -1
- package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +3 -3
- package/dist/prospect-client/Form/InputText/InputTextCommon.js +1 -1
- package/dist/prospect-client/Form/InputText/InputTextLF.js +1 -1
- package/dist/prospect-client/Form/ItemMessage/{ItemMessageCommon.d.ts → ItemMessage.d.ts} +1 -0
- package/dist/prospect-client/Form/ItemMessage/{ItemMessageCommon.js → ItemMessage.js} +10 -9
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo.js +1 -1
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +3 -3
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +1 -1
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF.js +1 -1
- package/dist/prospect-client/Form/TextArea/TextAreaApollo.js +1 -1
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +2 -2
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +1 -1
- package/dist/prospect-client/Form/TextArea/TextAreaLF.js +1 -1
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoApollo.js +1 -1
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.d.ts +2 -2
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.js +1 -1
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoLF.js +1 -1
- package/dist/prospect-client/Stepper/StepperApollo.js +2 -1
- package/dist/prospect-client/Stepper/StepperCommon.d.ts +3 -2
- package/dist/prospect-client/Stepper/StepperCommon.js +3 -3
- package/dist/prospect-client/Stepper/StepperLF.js +3 -2
- package/dist/prospect.d.ts +1 -1
- package/dist/prospect.js +1 -1
- package/package.json +2 -2
- package/dist/prospect-client/Form/ItemMessage/ItemMessageApollo.d.ts +0 -2
- package/dist/prospect-client/Form/ItemMessage/ItemMessageApollo.js +0 -2
- package/dist/prospect-client/Form/ItemMessage/ItemMessageLF.d.ts +0 -2
- package/dist/prospect-client/Form/ItemMessage/ItemMessageLF.js +0 -2
|
@@ -4,7 +4,7 @@ import visibilityIcon from "@material-symbols/svg-400/outlined/visibility-fill.s
|
|
|
4
4
|
import { ClickIcon } from "../../../ClickIcon/ClickIconApollo";
|
|
5
5
|
import { Icon } from "../../../Icon/IconApollo";
|
|
6
6
|
import { Spinner } from "../../../Spinner/SpinnerApollo";
|
|
7
|
-
import { ItemMessage } from "../../ItemMessage/
|
|
7
|
+
import { ItemMessage } from "../../ItemMessage/ItemMessage";
|
|
8
8
|
import { ItemFileCommon } from "./ItemFileCommon";
|
|
9
9
|
import "@axa-fr/canopee-css/prospect/ContentItemMono/ContentItemMonoApollo.css";
|
|
10
10
|
import "@axa-fr/canopee-css/prospect/Form/FileUpload/ItemFile/ItemFileApollo.css";
|
|
@@ -2,7 +2,7 @@ import { type ComponentPropsWithoutRef, type ComponentType, type MouseEvent } fr
|
|
|
2
2
|
import type { ClickIconProps } from "../../../ClickIcon/ClickIconCommon";
|
|
3
3
|
import type { IconProps } from "../../../Icon/IconCommon";
|
|
4
4
|
import type { SpinnerProps } from "../../../Spinner/SpinnerCommon";
|
|
5
|
-
import type { ItemMessageProps } from "../../ItemMessage/
|
|
5
|
+
import type { ItemMessageProps } from "../../ItemMessage/ItemMessage";
|
|
6
6
|
export type ItemFileProps = {
|
|
7
7
|
/**
|
|
8
8
|
* The JavaScript File object representing the uploaded file.
|
|
@@ -4,7 +4,7 @@ import visibilityIcon from "@material-symbols/svg-400/outlined/visibility-fill.s
|
|
|
4
4
|
import { ClickIcon } from "../../../ClickIcon/ClickIconLF";
|
|
5
5
|
import { Icon } from "../../../Icon/IconLF";
|
|
6
6
|
import { Spinner } from "../../../Spinner/SpinnerLF";
|
|
7
|
-
import { ItemMessage } from "../../ItemMessage/
|
|
7
|
+
import { ItemMessage } from "../../ItemMessage/ItemMessage";
|
|
8
8
|
import { ItemFileCommon } from "./ItemFileCommon";
|
|
9
9
|
import "@axa-fr/canopee-css/client/ContentItemMono/ContentItemMonoLF.css";
|
|
10
10
|
import "@axa-fr/canopee-css/client/Form/FileUpload/ItemFile/ItemFileLF.css";
|
|
@@ -1,7 +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
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { InputDateCommon } from "./InputDateCommon";
|
|
6
6
|
export const InputDate = ({ ...props }) => (_jsx(InputDateCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
|
7
7
|
InputDate.displayName = "InputDate";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentPropsWithRef, type ComponentType } from "react";
|
|
2
2
|
import type { GridContainerProps } from "../../utilities/types/GridContainerProps";
|
|
3
3
|
import { ItemLabelCommon, type ItemLabelProps } from "../ItemLabel/ItemLabelCommon";
|
|
4
|
-
import {
|
|
4
|
+
import { type ItemMessageProps } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { type InputDateAtomProps } from "./InputDateAtom";
|
|
6
6
|
export type InputDateProps = Omit<ComponentPropsWithRef<"input">, "value" | "min" | "max"> & {
|
|
7
7
|
classModifier?: string;
|
|
@@ -16,7 +16,7 @@ export type InputDateProps = Omit<ComponentPropsWithRef<"input">, "value" | "min
|
|
|
16
16
|
} & Partial<Pick<ItemLabelProps, "description" | "moreButtonLabel" | "onMoreButtonClick"> & ItemMessageProps>;
|
|
17
17
|
type InputDateCommonProps = InputDateProps & {
|
|
18
18
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
|
|
19
|
-
ItemMessageComponent: ComponentType<
|
|
19
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
20
20
|
};
|
|
21
21
|
declare const InputDateCommon: {
|
|
22
22
|
({ className, classModifier, helper, message, messageType, label, description, moreButtonLabel, onMoreButtonClick, ItemLabelComponent, ItemMessageComponent, required, hidePicker, max, min, containerProps, ...otherProps }: InputDateCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useId, } from "react";
|
|
3
3
|
import { getClassName } from "../../utilities/getClassName";
|
|
4
4
|
import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
|
|
5
|
-
import {
|
|
5
|
+
import {} from "../ItemMessage/ItemMessage";
|
|
6
6
|
import { InputDateAtom } from "./InputDateAtom";
|
|
7
7
|
import { InputDateTextAtom } from "./InputDateTextAtom";
|
|
8
8
|
const InputDateCommon = ({ className, classModifier = "", helper, message, messageType = "error", label, description, moreButtonLabel, onMoreButtonClick, ItemLabelComponent, ItemMessageComponent, required, hidePicker, max, min, containerProps, ...otherProps }) => {
|
|
@@ -1,7 +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
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelLF";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { InputDateCommon } from "./InputDateCommon";
|
|
6
6
|
export const InputDate = ({ ...props }) => (_jsx(InputDateCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
|
7
7
|
InputDate.displayName = "InputDate";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/prospect/Form/InputPhone/InputPhoneApollo.css";
|
|
3
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { InputPhoneCommon } from "./InputPhoneCommon";
|
|
6
6
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomApollo";
|
|
7
7
|
import { Icon } from "../../Icon/IconApollo";
|
|
@@ -4,7 +4,7 @@ import { Icon } from "../../Icon/IconCommon";
|
|
|
4
4
|
import type { GridContainerProps } from "../../utilities/types/GridContainerProps";
|
|
5
5
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
|
|
6
6
|
import { ItemLabelCommon, type ItemLabelProps } from "../ItemLabel/ItemLabelCommon";
|
|
7
|
-
import {
|
|
7
|
+
import { type ItemMessageProps } from "../ItemMessage/ItemMessage";
|
|
8
8
|
import { type OptionType } from "./InputPhone.types";
|
|
9
9
|
export type InputPhoneProps = ComponentPropsWithRef<"input"> & {
|
|
10
10
|
classModifier?: string;
|
|
@@ -21,7 +21,7 @@ export type InputPhoneProps = ComponentPropsWithRef<"input"> & {
|
|
|
21
21
|
} & Pick<ItemLabelProps, "description" | "moreButtonLabel" | "onMoreButtonClick" | "sideButtonLabel" | "onSideButtonClick"> & Pick<ItemMessageProps, "message" | "messageType">;
|
|
22
22
|
type InputPhoneCommonProps = InputPhoneProps & {
|
|
23
23
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
|
|
24
|
-
ItemMessageComponent: ComponentType<
|
|
24
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
25
25
|
InputTextComponent: ComponentType<ComponentProps<typeof InputTextAtom>>;
|
|
26
26
|
IconComponent: ComponentType<ComponentProps<typeof Icon>>;
|
|
27
27
|
};
|
|
@@ -3,7 +3,7 @@ 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";
|
|
6
|
-
import {
|
|
6
|
+
import {} from "../ItemMessage/ItemMessage";
|
|
7
7
|
import { CountryCodeSelect } from "./CountryCodeSelect";
|
|
8
8
|
import {} from "./InputPhone.types";
|
|
9
9
|
import { maskFrenchPhoneNumber } from "./maskFrenchPhoneNumber";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/client/Form/InputPhone/InputPhoneLF.css";
|
|
3
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelLF";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { InputPhoneCommon } from "./InputPhoneCommon";
|
|
6
6
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomLF";
|
|
7
7
|
import { Icon } from "../../Icon/IconLF";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/prospect/Form/InputText/InputTextApollo.css";
|
|
3
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { InputTextCommon } from "./InputTextCommon";
|
|
6
6
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomApollo";
|
|
7
7
|
export const InputText = ({ ...props }) => (_jsx(InputTextCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage, InputTextAtomComponent: InputTextAtom }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentType, type ReactNode } from "react";
|
|
2
|
-
import type { GridContainerProps } from "../../utilities/types/GridContainerProps";
|
|
3
2
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
|
|
4
3
|
import { ItemLabelCommon, type ItemLabelProps } from "../ItemLabel/ItemLabelCommon";
|
|
5
|
-
import {
|
|
4
|
+
import { type ItemMessageProps } from "../ItemMessage/ItemMessage";
|
|
5
|
+
import type { GridContainerProps } from "../../utilities/types/GridContainerProps";
|
|
6
6
|
export type InputTextProps = ComponentProps<"input"> & {
|
|
7
7
|
unit?: ReactNode;
|
|
8
8
|
classModifier?: string;
|
|
@@ -12,7 +12,7 @@ export type InputTextProps = ComponentProps<"input"> & {
|
|
|
12
12
|
} & Pick<ItemLabelProps, "description" | "moreButtonLabel" | "onMoreButtonClick" | "sideButtonLabel" | "onSideButtonClick"> & Pick<ItemMessageProps, "message" | "messageType">;
|
|
13
13
|
type InputTextCommonProps = InputTextProps & {
|
|
14
14
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
|
|
15
|
-
ItemMessageComponent: ComponentType<
|
|
15
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
16
16
|
InputTextAtomComponent: ComponentType<ComponentProps<typeof InputTextAtom>>;
|
|
17
17
|
};
|
|
18
18
|
declare const InputTextCommon: {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useId, } from "react";
|
|
3
3
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
|
|
4
4
|
import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
|
|
5
|
-
import {
|
|
5
|
+
import {} from "../ItemMessage/ItemMessage";
|
|
6
6
|
const InputTextCommon = ({ unit, className, classModifier = "", helper, message, messageType = "error", label, description, moreButtonLabel, onMoreButtonClick, required, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, InputTextAtomComponent, containerProps, ...otherProps }) => {
|
|
7
7
|
let inputId = useId();
|
|
8
8
|
inputId = otherProps.id || inputId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/client/Form/InputText/InputTextLF.css";
|
|
3
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelLF";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { InputTextCommon } from "./InputTextCommon";
|
|
6
6
|
import { InputTextAtom } from "../InputTextAtom/InputTextAtomLF";
|
|
7
7
|
export const InputText = ({ ...props }) => (_jsx(InputTextCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage, InputTextAtomComponent: InputTextAtom }));
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/prospect/Form/ItemMessage/ItemMessageAll.css";
|
|
2
3
|
import successIcon from "@material-symbols/svg-400/outlined/check_circle-fill.svg";
|
|
3
4
|
import errorIcon from "@material-symbols/svg-400/outlined/error-fill.svg";
|
|
4
5
|
import warningIcon from "@material-symbols/svg-400/outlined/warning-fill.svg";
|
|
5
|
-
import {
|
|
6
|
+
import { Icon } from "../../Icon/IconCommon";
|
|
6
7
|
export const itemMessageVariants = {
|
|
7
8
|
error: "error",
|
|
8
9
|
success: "success",
|
|
9
10
|
warning: "warning",
|
|
10
11
|
};
|
|
12
|
+
const getIcon = (messageType) => {
|
|
13
|
+
if (messageType === "success")
|
|
14
|
+
return successIcon;
|
|
15
|
+
if (messageType === "warning")
|
|
16
|
+
return warningIcon;
|
|
17
|
+
return errorIcon;
|
|
18
|
+
};
|
|
11
19
|
export const ItemMessage = ({ message, id, messageType = "error", }) => {
|
|
12
20
|
if (!message) {
|
|
13
21
|
return null;
|
|
14
22
|
}
|
|
15
|
-
|
|
16
|
-
if (messageType === "success")
|
|
17
|
-
return successIcon;
|
|
18
|
-
if (messageType === "warning")
|
|
19
|
-
return warningIcon;
|
|
20
|
-
return errorIcon;
|
|
21
|
-
};
|
|
22
|
-
return (_jsxs("small", { id: id, className: `af-item-message af-item-message--${messageType}`, role: messageType === "success" ? undefined : "alert", "aria-live": "assertive", children: [_jsx(Svg, { src: getIcon(), className: "af-item-message__icon", "aria-hidden": "true" }), _jsx("span", { className: "af-item-message__message", children: message })] }));
|
|
23
|
+
return (_jsxs("small", { id: id, className: `af-item-message af-item-message--${messageType}`, role: messageType === "success" ? undefined : "alert", "aria-live": "assertive", children: [_jsx(Icon, { src: getIcon(messageType), size: "XS", variant: messageType, "aria-hidden": "true" }), _jsx("span", { className: "af-item-message__message", children: message })] }));
|
|
23
24
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ItemMessage } from "../../ItemMessage/
|
|
2
|
+
import { ItemMessage } from "../../ItemMessage/ItemMessage";
|
|
3
3
|
import { CardRadio } from "../CardRadio/CardRadioApollo";
|
|
4
4
|
import { CardRadioGroupCommon, } from "./CardRadioGroupCommon";
|
|
5
5
|
import "@axa-fr/canopee-css/prospect/Form/Radio/CardRadioGroup/CardRadioGroupApollo.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentType, type PropsWithChildren, type ReactNode } from "react";
|
|
2
2
|
import type { GridContainerProps } from "../../../utilities/types/GridContainerProps";
|
|
3
|
-
import {
|
|
3
|
+
import { type ItemMessageProps } from "../../ItemMessage/ItemMessage";
|
|
4
4
|
import { type CardRadioProps } from "../CardRadio/CardRadioCommon";
|
|
5
5
|
type RadioOption = Omit<CardRadioProps, "name" | "type" | "variant">;
|
|
6
6
|
export type CardRadioGroupProps = Omit<CardRadioProps, "value" | "label" | "type" | "variant" | "icon" | "src" | "basePictureProps" | "description" | "subtitle" | "children" | "position"> & {
|
|
@@ -13,7 +13,7 @@ export type CardRadioGroupProps = Omit<CardRadioProps, "value" | "label" | "type
|
|
|
13
13
|
} & PropsWithChildren & Partial<ItemMessageProps>;
|
|
14
14
|
export type CardRadioCommonProps = CardRadioGroupProps & {
|
|
15
15
|
CardRadioComponent: ComponentType<CardRadioProps>;
|
|
16
|
-
ItemMessageComponent: ComponentType<
|
|
16
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
17
17
|
};
|
|
18
18
|
declare const CardRadioGroupCommon: {
|
|
19
19
|
({ className, label, description, required, options, cardStyle, position, message, messageType, name, id, CardRadioComponent, ItemMessageComponent, containerProps, ...inputProps }: CardRadioCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "../../ItemMessage/ItemMessage";
|
|
4
4
|
import {} from "../CardRadio/CardRadioCommon";
|
|
5
5
|
const CardRadioGroupCommon = ({ className, label, description, required, options, cardStyle, position = cardStyle === "vertical" ? "column" : "line", message, messageType = "error", name, id, CardRadioComponent, ItemMessageComponent, containerProps, ...inputProps }) => {
|
|
6
6
|
const generatedId = useId();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ItemMessage } from "../../ItemMessage/
|
|
2
|
+
import { ItemMessage } from "../../ItemMessage/ItemMessage";
|
|
3
3
|
import { CardRadio } from "../CardRadio/CardRadioLF";
|
|
4
4
|
import { CardRadioGroupCommon, } from "./CardRadioGroupCommon";
|
|
5
5
|
import "@axa-fr/canopee-css/client/Form/Radio/CardRadioGroup/CardRadioGroupLF.css";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/prospect/Form/TextArea/TextAreaApollo.css";
|
|
3
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelApollo";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { TextAreaCommon } from "./TextAreaCommon";
|
|
6
6
|
export const TextArea = ({ ...props }) => (_jsx(TextAreaCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
|
7
7
|
TextArea.displayName = "TextArea";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentPropsWithRef, type ComponentType } from "react";
|
|
2
2
|
import type { GridContainerProps } from "../../utilities/types/GridContainerProps";
|
|
3
3
|
import { ItemLabelCommon, type ItemLabelProps } from "../ItemLabel/ItemLabelCommon";
|
|
4
|
-
import {
|
|
4
|
+
import { type ItemMessageProps } from "../ItemMessage/ItemMessage";
|
|
5
5
|
export type TextAreaProps = ComponentPropsWithRef<"textarea"> & {
|
|
6
6
|
label?: ItemLabelProps["children"];
|
|
7
7
|
helper?: string;
|
|
@@ -9,7 +9,7 @@ export type TextAreaProps = ComponentPropsWithRef<"textarea"> & {
|
|
|
9
9
|
} & Pick<ItemLabelProps, "description" | "moreButtonLabel" | "onMoreButtonClick" | "sideButtonLabel" | "onSideButtonClick"> & Pick<ItemMessageProps, "message" | "messageType">;
|
|
10
10
|
type TextAreaCommonProps = TextAreaProps & {
|
|
11
11
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">>;
|
|
12
|
-
ItemMessageComponent: ComponentType<
|
|
12
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
13
13
|
};
|
|
14
14
|
declare const TextAreaCommon: {
|
|
15
15
|
({ id, className, label, description, helper, message, messageType, moreButtonLabel, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder, containerProps, ...inputProps }: TextAreaCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useId, } from "react";
|
|
3
3
|
import { getClassName } from "../../utilities/getClassName";
|
|
4
4
|
import { ItemLabelCommon, } from "../ItemLabel/ItemLabelCommon";
|
|
5
|
-
import {
|
|
5
|
+
import {} from "../ItemMessage/ItemMessage";
|
|
6
6
|
const TextAreaCommon = ({ id, className, label, description, helper, message, messageType = "error", moreButtonLabel, onMoreButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder = " ", containerProps, ...inputProps }) => {
|
|
7
7
|
const generatedId = useId();
|
|
8
8
|
const inputId = id ?? generatedId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/client/Form/TextArea/TextAreaLF.css";
|
|
3
3
|
import { ItemLabel } from "../ItemLabel/ItemLabelLF";
|
|
4
|
-
import { ItemMessage } from "../ItemMessage/
|
|
4
|
+
import { ItemMessage } from "../ItemMessage/ItemMessage";
|
|
5
5
|
import { TextAreaCommon } from "./TextAreaCommon";
|
|
6
6
|
export const TextArea = ({ ...props }) => (_jsx(TextAreaCommon, { ...props, ItemLabelComponent: ItemLabel, ItemMessageComponent: ItemMessage }));
|
|
7
7
|
TextArea.displayName = "TextArea";
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "@axa-fr/canopee-css/prospect/List/ContentItemDuo/ContentItemDuoApollo.css";
|
|
3
3
|
import { Button } from "../../Button/ButtonApollo";
|
|
4
4
|
import { ContentItemDuoCommon, } from "./ContentItemDuoCommon";
|
|
5
|
-
import { ItemMessage } from "../../Form/ItemMessage/
|
|
5
|
+
import { ItemMessage } from "../../Form/ItemMessage/ItemMessage";
|
|
6
6
|
export const ContentItemDuo = (props) => (_jsx(ContentItemDuoCommon, { ...props, ButtonComponent: Button, ItemMessageComponent: ItemMessage }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentType, type ReactNode } from "react";
|
|
2
2
|
import type { ButtonProps } from "../../Button/ButtonCommon";
|
|
3
|
-
import {
|
|
3
|
+
import { type ItemMessageProps } from "../../Form/ItemMessage/ItemMessage";
|
|
4
4
|
type ContentItemDuoPositions = {
|
|
5
5
|
position?: "horizontal";
|
|
6
6
|
size?: "small" | "large";
|
|
@@ -16,7 +16,7 @@ export type ContentItemDuoProps = {
|
|
|
16
16
|
} & Pick<ItemMessageProps, "message" | "messageType"> & ContentItemDuoPositions & ComponentProps<"div">;
|
|
17
17
|
type ContentItemDuoCommonProps = ContentItemDuoProps & {
|
|
18
18
|
ButtonComponent: ComponentType<ButtonProps>;
|
|
19
|
-
ItemMessageComponent: ComponentType<
|
|
19
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
20
20
|
};
|
|
21
21
|
export declare const ContentItemDuoCommon: ({ label, value, position, size, className, buttonText, onButtonClick, ButtonComponent, message, messageType, ItemMessageComponent, ...containerProps }: ContentItemDuoCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import {} from "react";
|
|
3
|
-
import { ItemMessage, } from "../../Form/ItemMessage/ItemMessageCommon";
|
|
4
3
|
import { getClassName } from "../../utilities/getClassName";
|
|
4
|
+
import {} from "../../Form/ItemMessage/ItemMessage";
|
|
5
5
|
export const ContentItemDuoCommon = ({ label, value, position = "horizontal", size = "large", className, buttonText, onButtonClick, ButtonComponent, message, messageType, ItemMessageComponent, ...containerProps }) => {
|
|
6
6
|
const componentClassName = getClassName({
|
|
7
7
|
baseClassName: "af-content-item-duo",
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "@axa-fr/canopee-css/client/List/ContentItemDuo/ContentItemDuoLF.css";
|
|
3
3
|
import { Button } from "../../Button/ButtonLF";
|
|
4
4
|
import { ContentItemDuoCommon, } from "./ContentItemDuoCommon";
|
|
5
|
-
import { ItemMessage } from "../../Form/ItemMessage/
|
|
5
|
+
import { ItemMessage } from "../../Form/ItemMessage/ItemMessage";
|
|
6
6
|
export const ContentItemDuo = (props) => (_jsx(ContentItemDuoCommon, { ...props, ButtonComponent: Button, ItemMessageComponent: ItemMessage }));
|
|
@@ -2,5 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "@axa-fr/canopee-css/prospect/Stepper/StepperApollo.css";
|
|
3
3
|
import { Heading } from "../Heading/HeadingApollo";
|
|
4
4
|
import { ProgressBarGroup } from "../ProgressBarGroup/ProgressBarGroupApollo";
|
|
5
|
+
import { ItemMessage } from "../Form/ItemMessage/ItemMessage";
|
|
5
6
|
import { StepperCommon } from "./StepperCommon";
|
|
6
|
-
export const Stepper = (props) => (_jsx(StepperCommon, { ...props, ProgressBarGroupComponent: ProgressBarGroup, HeadingComponent: Heading }));
|
|
7
|
+
export const Stepper = (props) => (_jsx(StepperCommon, { ...props, ProgressBarGroupComponent: ProgressBarGroup, HeadingComponent: Heading, ItemMessageComponent: ItemMessage }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
-
import { type ItemMessageProps } from "../Form/ItemMessage/
|
|
2
|
+
import { type ItemMessageProps } from "../Form/ItemMessage/ItemMessage";
|
|
3
3
|
import { type ProgressBarGroupProps } from "../ProgressBarGroup/ProgressBarGroupCommon";
|
|
4
4
|
import type { HeadingCommonProps } from "../Heading/HeadingCommon";
|
|
5
5
|
import type { HeadingLevel } from "../Heading/types";
|
|
@@ -19,5 +19,6 @@ export type StepperProps = {
|
|
|
19
19
|
export type StepperCommonProps = StepperProps & {
|
|
20
20
|
ProgressBarGroupComponent: ComponentType<ProgressBarGroupProps>;
|
|
21
21
|
HeadingComponent: ComponentType<HeadingCommonProps>;
|
|
22
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
22
23
|
};
|
|
23
|
-
export declare const StepperCommon: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, HeadingComponent, helper, icon, iconProps, message, messageType, titleLevel, ...props }: StepperCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const StepperCommon: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, HeadingComponent, ItemMessageComponent, helper, icon, iconProps, message, messageType, titleLevel, ...props }: StepperCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "../Form/ItemMessage/ItemMessage";
|
|
4
4
|
import {} from "../ProgressBarGroup/ProgressBarGroupCommon";
|
|
5
|
-
export const StepperCommon = ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, HeadingComponent, helper, icon, iconProps, message, messageType = "success", titleLevel = 2, ...props }) => {
|
|
5
|
+
export const StepperCommon = ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, HeadingComponent, ItemMessageComponent, helper, icon, iconProps, message, messageType = "success", titleLevel = 2, ...props }) => {
|
|
6
6
|
const titleId = useId();
|
|
7
|
-
return (_jsxs("div", { className: "af-stepper", ...props, tabIndex: undefined, children: [_jsx("div", { className: "af-stepper__header", id: titleId, children: _jsx(HeadingComponent, { level: titleLevel, icon: icon, iconProps: iconProps, firstSubtitle: currentSubtitle, children: currentTitle }) }), _jsx(ProgressBarGroupComponent, { className: className, currentStep: currentStep, stepsCount: nbSteps, currentStepProgress: currentStepProgress, "aria-labelledby": titleId }), Boolean(helper) && _jsx("span", { className: "af-stepper__helper", children: helper }), _jsx(
|
|
7
|
+
return (_jsxs("div", { className: "af-stepper", ...props, tabIndex: undefined, children: [_jsx("div", { className: "af-stepper__header", id: titleId, children: _jsx(HeadingComponent, { level: titleLevel, icon: icon, iconProps: iconProps, firstSubtitle: currentSubtitle, children: currentTitle }) }), _jsx(ProgressBarGroupComponent, { className: className, currentStep: currentStep, stepsCount: nbSteps, currentStepProgress: currentStepProgress, "aria-labelledby": titleId }), Boolean(helper) && _jsx("span", { className: "af-stepper__helper", children: helper }), _jsx(ItemMessageComponent, { message: message, messageType: messageType })] }));
|
|
8
8
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/client/Stepper/StepperLF.css";
|
|
3
|
-
import { Heading } from "../Heading/HeadingLF";
|
|
4
3
|
import { ProgressBarGroup } from "../ProgressBarGroup/ProgressBarGroupLF";
|
|
5
4
|
import { StepperCommon } from "./StepperCommon";
|
|
6
|
-
|
|
5
|
+
import { Heading } from "../Heading/HeadingLF";
|
|
6
|
+
import { ItemMessage } from "../Form/ItemMessage/ItemMessage";
|
|
7
|
+
export const Stepper = (props) => (_jsx(StepperCommon, { ...props, ProgressBarGroupComponent: ProgressBarGroup, HeadingComponent: Heading, ItemMessageComponent: ItemMessage }));
|
package/dist/prospect.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export { InputPhone } from "./prospect-client/Form/InputPhone/InputPhoneApollo";
|
|
|
30
30
|
export { InputText } from "./prospect-client/Form/InputText/InputTextApollo";
|
|
31
31
|
export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomApollo";
|
|
32
32
|
export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelApollo";
|
|
33
|
-
export { ItemMessage, itemMessageVariants, type ItemMessageVariants, } from "./prospect-client/Form/ItemMessage/
|
|
33
|
+
export { ItemMessage, itemMessageVariants, type ItemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessage";
|
|
34
34
|
export { ItemMultiSelect, type ItemMultiSelectProps, } from "./prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo";
|
|
35
35
|
export { MultiSelectList, type MultiSelectListProps, } from "./prospect-client/Form/MultiSelectList/MultiSelectListApollo";
|
|
36
36
|
export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioApollo";
|
package/dist/prospect.js
CHANGED
|
@@ -30,7 +30,7 @@ export { InputPhone } from "./prospect-client/Form/InputPhone/InputPhoneApollo";
|
|
|
30
30
|
export { InputText } from "./prospect-client/Form/InputText/InputTextApollo";
|
|
31
31
|
export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomApollo";
|
|
32
32
|
export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelApollo";
|
|
33
|
-
export { ItemMessage, itemMessageVariants, } from "./prospect-client/Form/ItemMessage/
|
|
33
|
+
export { ItemMessage, itemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessage";
|
|
34
34
|
export { ItemMultiSelect, } from "./prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo";
|
|
35
35
|
export { MultiSelectList, } from "./prospect-client/Form/MultiSelectList/MultiSelectListApollo";
|
|
36
36
|
export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioApollo";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/canopee-react",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.72",
|
|
4
4
|
"description": "Package React - Design System Canopée",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./distributeur": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@axa-fr/canopee-css": "2.0.0-alpha.
|
|
56
|
+
"@axa-fr/canopee-css": "2.0.0-alpha.72",
|
|
57
57
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
58
58
|
"@material-symbols/svg-700": ">= 0.19.0",
|
|
59
59
|
"react": ">= 19"
|