@axa-fr/design-system-apollo-react 1.0.5-alpha.396 → 1.0.5-alpha.400
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/Accordion/AccordionCommon.js +1 -1
- package/dist/Accordion/AccordionTagDateContainer/AccordionTagDateContainerCommon.js +1 -1
- package/dist/Button/ButtonCommon.js +1 -1
- package/dist/CardMessage/CardMessageCommon.js +1 -1
- package/dist/ContentItemMono/ContentItemMonoCore.js +1 -1
- package/dist/DataAgent/DataAgentCommon.js +1 -1
- package/dist/Form/Checkbox/CardCheckbox/CardCheckboxCommon.js +1 -1
- package/dist/Form/Checkbox/CardCheckbox/CardCheckboxItem.js +1 -1
- package/dist/Form/Checkbox/Checkbox/CheckboxApollo.d.ts +1 -5
- package/dist/Form/Checkbox/Checkbox/CheckboxApollo.js +1 -6
- package/dist/Form/Checkbox/Checkbox/CheckboxCommon.d.ts +5 -11
- package/dist/Form/Checkbox/Checkbox/CheckboxCommon.js +3 -5
- package/dist/Form/Checkbox/Checkbox/CheckboxLF.d.ts +1 -5
- package/dist/Form/Checkbox/Checkbox/CheckboxLF.js +1 -6
- package/dist/Form/Checkbox/CheckboxText/CheckboxTextApollo.d.ts +2 -4
- package/dist/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +7 -14
- package/dist/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +6 -7
- package/dist/Form/Checkbox/CheckboxText/CheckboxTextLF.d.ts +2 -4
- package/dist/Form/Dropdown/DropdownCommon.js +1 -1
- package/dist/Form/InputDate/InputDateCommon.js +1 -1
- package/dist/Form/InputPhone/InputPhoneCommon.js +1 -1
- package/dist/Form/InputText/InputTextCommon.js +1 -1
- package/dist/Form/ItemLabel/ItemLabelCommon.js +1 -1
- package/dist/Form/ItemMessage/ItemMessageCommon.d.ts +1 -2
- package/dist/Form/Radio/CardRadio/CardRadioCommon.js +1 -1
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionCommon.js +1 -1
- package/dist/Form/TextArea/TextAreaApollo.d.ts +1 -5
- package/dist/Form/TextArea/TextAreaCommon.js +1 -1
- package/dist/Form/TextArea/TextAreaLF.d.ts +1 -5
- package/dist/Heading/HeadingApollo.js +1 -1
- package/dist/Heading/HeadingCommon.js +1 -1
- package/dist/Heading/HeadingLF.js +1 -1
- package/dist/Heading/HeadingWithSubheadings.js +1 -1
- package/dist/Link/LinkCommon.js +3 -2
- package/dist/List/ClickItem/components/ClickItemContentCommon.js +1 -1
- package/dist/List/ContentItemDuo/ContentItemDuoCommon.js +1 -1
- package/dist/Message/MessageCommon.js +1 -1
- package/dist/Modal/components/ModalCoreHeaderCommon.js +1 -1
- package/package.json +3 -3
|
@@ -7,5 +7,5 @@ export const accordionVariants = {
|
|
|
7
7
|
};
|
|
8
8
|
export const AccordionCommon = ({ variant = accordionVariants.primary, className, children, icon, title, subtitle, tagLabel, tagProps, dateLabel, dateProps, info1, info2, AccordionCoreComponent, AccordionTagDateContainerComponent, IconComponent, ...accordionCoreProps }) => {
|
|
9
9
|
const componentClassName = useMemo(() => getComponentClassName("af-apollo-accordion", className, variant), [className, variant]);
|
|
10
|
-
return (_jsx(AccordionCoreComponent, { className: componentClassName, summary: _jsxs(_Fragment, { children: [icon
|
|
10
|
+
return (_jsx(AccordionCoreComponent, { className: componentClassName, summary: _jsxs(_Fragment, { children: [icon ? (_jsx(IconComponent, { role: "presentation", src: icon, variant: "primary", size: "S", className: "af-accordion__icon" })) : null, title ? _jsx("p", { className: "af-accordion__title", children: title }) : null, subtitle ? (_jsx("p", { className: "af-accordion__subtitle", children: subtitle })) : null, _jsx(AccordionTagDateContainerComponent, { tagLabel: tagLabel, dateLabel: dateLabel, tagProps: tagProps, dateProps: dateProps }), info1 ? _jsx("p", { className: "af-accordion__info1", children: info1 }) : null, info2 ? _jsx("p", { className: "af-accordion__info2", children: info2 }) : null] }), ...accordionCoreProps, children: children }));
|
|
11
11
|
};
|
|
@@ -5,5 +5,5 @@ export const AccordionTagDateContainerCommon = ({ dateLabel, dateProps, tagLabel
|
|
|
5
5
|
if (!isShowing) {
|
|
6
6
|
return null;
|
|
7
7
|
}
|
|
8
|
-
return (_jsxs(_Fragment, { children: [tagLabel
|
|
8
|
+
return (_jsxs(_Fragment, { children: [tagLabel ? (_jsx("div", { className: "af-accordion__tag-container", children: _jsx(TagComponent, { variant: "warning", ...tagProps, children: tagLabel }) })) : null, dateLabel ? (_jsx("time", { className: "af-accordion__date", ...dateProps, children: dateLabel })) : null] }));
|
|
9
9
|
};
|
|
@@ -10,4 +10,4 @@ export const buttonVariants = {
|
|
|
10
10
|
};
|
|
11
11
|
export const ButtonCommon = ({ children, className, variant = "primary", iconLeft, iconRight, disabled, loading, SpinnerComponent, ...args }) => (_jsxs("button", { className: ["af-btn-client", `af-btn-client--${variant}`, className]
|
|
12
12
|
.filter(Boolean)
|
|
13
|
-
.join(" "), disabled: disabled || loading, type: "button", ...args, children: [iconLeft, children, iconRight,
|
|
13
|
+
.join(" "), disabled: disabled || loading, type: "button", ...args, children: [iconLeft, children, iconRight, disabled || loading ? _jsx(SpinnerComponent, { size: 24, variant: "gray" }) : null] }));
|
|
@@ -11,5 +11,5 @@ export const CardMessage = ({ variant = "info", title, text, className, ...props
|
|
|
11
11
|
const componentClassName = useMemo(() => {
|
|
12
12
|
return getComponentClassName("af-card-message", className, variant);
|
|
13
13
|
}, [className, variant]);
|
|
14
|
-
return (_jsxs("div", { ...props, className: componentClassName, children: [title
|
|
14
|
+
return (_jsxs("div", { ...props, className: componentClassName, children: [title ? _jsx("span", { className: "af-card-message--title", children: title }) : null, _jsx("span", { className: "af-card-message--text", children: text })] }));
|
|
15
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export const ContentItemMonoCore = ({ size = "medium", leftComponent, title, primarySubtitle, subtitle, }) => {
|
|
3
|
-
return (_jsxs("div", { "data-testid": "container", className: `af-content-item-mono ${size}`, children: [leftComponent, _jsxs("div", { className: "text-content", children: [_jsx("span", { className: "title", children: title }), primarySubtitle
|
|
3
|
+
return (_jsxs("div", { "data-testid": "container", className: `af-content-item-mono ${size}`, children: [leftComponent, _jsxs("div", { className: "text-content", children: [_jsx("span", { className: "title", children: title }), primarySubtitle ? (_jsx("span", { className: "subtitle-primary", children: primarySubtitle })) : null, subtitle ? _jsx("span", { className: "subtitle", children: subtitle }) : null] })] }));
|
|
4
4
|
};
|
|
@@ -6,7 +6,7 @@ import { BREAKPOINT } from "../utilities/constants";
|
|
|
6
6
|
export const DataAgentCommon = ({ className, agentProps, agentContractProps, contents, clickContents, texteOrias, DividerComponent, ContentItemMonoComponent, ClickItemComponent, }) => {
|
|
7
7
|
const componentClassName = useMemo(() => getComponentClassName("af-data-agent", className), [className]);
|
|
8
8
|
const isMobile = useIsSmallScreen(BREAKPOINT.SM);
|
|
9
|
-
const renderForDefaultLayout = () => (_jsxs(_Fragment, { children: [_jsxs("section", { className: "af-data-agent__intro", children: [_jsx(ContentItemMonoComponent, { ...agentProps, type: "picture" }), agentContractProps
|
|
9
|
+
const renderForDefaultLayout = () => (_jsxs(_Fragment, { children: [_jsxs("section", { className: "af-data-agent__intro", children: [_jsx(ContentItemMonoComponent, { ...agentProps, type: "picture" }), agentContractProps ? (_jsx(ContentItemMonoComponent, { ...agentContractProps, type: "stick" })) : null] }), _jsx(DividerComponent, {}), contents && contents?.length > 0 ? (_jsx("section", { className: "af-data-agent__info-content", children: contents.map((content) => (_jsxs(Fragment, { children: [_jsx(ContentItemMonoComponent, { ...content, type: "icon" }), _jsx(DividerComponent, { className: "af-data-agent__line" })] }, `content--${crypto.randomUUID()}`))) })) : null, clickContents && clickContents?.length > 0 ? (_jsx("section", { className: "af-data-agent__info-click-content", children: clickContents.map((clickContent) => (_jsxs(Fragment, { children: [_jsx(ClickItemComponent, { ...clickContent, variant: "small" }), _jsx(DividerComponent, { className: "af-data-agent__line" })] }, `clickContent--${crypto.randomUUID()}`))) })) : null, Boolean(texteOrias) && (_jsx("p", { className: "af-data-agent__text-orias", children: texteOrias }))] }));
|
|
10
10
|
const renderForMobileLayout = () => (_jsx("section", { className: "af-data-agent__intro", children: _jsx(ClickItemComponent, { ...agentProps, basePictureProps: {
|
|
11
11
|
src: agentProps.picture,
|
|
12
12
|
alt: agentProps.title,
|
|
@@ -10,6 +10,6 @@ export const CardCheckboxCommon = ({ className, labelGroup, descriptionGroup, Ch
|
|
|
10
10
|
const errorId = useId();
|
|
11
11
|
const isMobile = useIsSmallScreen(BREAKPOINT.SM);
|
|
12
12
|
const size = isMobile ? "M" : "L";
|
|
13
|
-
return (_jsxs("fieldset", { className: componentClassName, children: [labelGroup
|
|
13
|
+
return (_jsxs("fieldset", { className: componentClassName, children: [labelGroup ? (_jsxs("legend", { className: "af-card-checkbox__legend", children: [_jsxs("p", { children: [labelGroup, isRequired ? _jsx("span", { "aria-hidden": true, children: "\u00A0*" }) : null] }), descriptionGroup ? (_jsx("p", { className: "af-card-checkbox__description", children: descriptionGroup })) : null] })) : null, _jsxs("div", { className: "af-card-checkbox__choices", children: [_jsx("ul", { className: checkboxGroupClassName, children: options.map(({ hasError, ...optionProps }) => (_jsx("li", { children: _jsx(CardCheckboxItem, { ...inputProps, size: size, errorId: errorId, onChange: onChange, CheckboxComponent: CheckboxComponent, IconComponent: IconComponent, hasError: Boolean(error) || hasError, ...optionProps }) }, crypto.randomUUID()))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] })] }));
|
|
14
14
|
};
|
|
15
15
|
CardCheckboxCommon.displayName = "CardCheckboxCommon";
|
|
@@ -3,5 +3,5 @@ import { useId } from "react";
|
|
|
3
3
|
export const CardCheckboxItem = ({ CheckboxComponent, IconComponent, id, label, description, subtitle, icon, errorId, hasError, size, ...inputProps }) => {
|
|
4
4
|
let inputId = useId();
|
|
5
5
|
inputId = id ?? inputId;
|
|
6
|
-
return (_jsxs("label", { htmlFor: inputId, className: "af-card-checkbox-label", "aria-invalid": hasError, children: [_jsx(CheckboxComponent, { id: inputId, errorId: errorId, hasError: hasError, ...inputProps }), _jsxs("div", { className: "af-card-checkbox-content", children: [icon
|
|
6
|
+
return (_jsxs("label", { htmlFor: inputId, className: "af-card-checkbox-label", "aria-invalid": hasError, children: [_jsx(CheckboxComponent, { id: inputId, errorId: errorId, hasError: hasError, ...inputProps }), _jsxs("div", { className: "af-card-checkbox-content", children: [icon ? _jsx(IconComponent, { src: icon, size: size }) : null, _jsxs("div", { className: "af-card-checkbox-content-description", children: [_jsx("span", { children: label }), description ? _jsx("span", { children: description }) : null, subtitle ? _jsx("span", { children: subtitle }) : null] })] })] }));
|
|
7
7
|
};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxApollo.scss";
|
|
2
|
-
export
|
|
3
|
-
errorId?: string;
|
|
4
|
-
hasError?: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
} & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "disabled"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
2
|
+
export { Checkbox } from "./CheckboxCommon";
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxApollo.scss";
|
|
4
|
-
|
|
5
|
-
import { CheckboxCommon } from "./CheckboxCommon";
|
|
6
|
-
export const Checkbox = forwardRef((props, ref) => (_jsx(CheckboxCommon, { ...props, ref: ref, checkBoxIcon: checkBoxIcon })));
|
|
7
|
-
Checkbox.displayName = "Checkbox";
|
|
2
|
+
export { Checkbox } from "./CheckboxCommon";
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
export type CheckboxProps = {
|
|
3
|
+
/** @deprecated Use `aria-errormessage` instead */
|
|
3
4
|
errorId?: string;
|
|
5
|
+
/** @deprecated Use `aria-invalid` instead */
|
|
4
6
|
hasError?: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const CheckboxCommon: import("react").ForwardRefExoticComponent<{
|
|
8
|
-
errorId?: string;
|
|
9
|
-
hasError?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "disabled"> & {
|
|
12
|
-
checkBoxIcon: string;
|
|
13
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
14
|
-
export { CheckboxCommon };
|
|
7
|
+
} & Omit<ComponentProps<"input">, "disabled" | "type">;
|
|
8
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
CheckboxCommon.displayName = "CheckboxCommon";
|
|
6
|
-
export { CheckboxCommon };
|
|
3
|
+
export const Checkbox = forwardRef(({ errorId, hasError, className, ...inputProps }, ref) => (_jsx("input", { "aria-errormessage": errorId, "aria-invalid": hasError, ...inputProps, className: ["af-checkbox", className].filter(Boolean).join(" "), ref: ref, type: "checkbox" })));
|
|
4
|
+
Checkbox.displayName = "Checkbox";
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxLF.scss";
|
|
2
|
-
export
|
|
3
|
-
errorId?: string;
|
|
4
|
-
hasError?: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
} & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "disabled"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
2
|
+
export { Checkbox } from "./CheckboxCommon";
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxLF.scss";
|
|
4
|
-
|
|
5
|
-
import { CheckboxCommon } from "./CheckboxCommon";
|
|
6
|
-
export const Checkbox = forwardRef((props, ref) => (_jsx(CheckboxCommon, { ...props, ref: ref, checkBoxIcon: checkBoxIcon })));
|
|
7
|
-
Checkbox.displayName = "Checkbox";
|
|
2
|
+
export { Checkbox } from "./CheckboxCommon";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CheckboxText/CheckboxTextApollo.scss";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
errorMessage?: string;
|
|
5
|
-
} & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "disabled"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
2
|
+
import { type CheckboxTextProps } from "./CheckboxTextCommon";
|
|
3
|
+
export declare const CheckboxText: import("react").ForwardRefExoticComponent<Omit<CheckboxTextProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { type ReactNode, type ComponentType } from "react";
|
|
2
|
+
import type { ItemMessageProps } from "../../ItemMessage/ItemMessageCommon";
|
|
3
|
+
import type { CheckboxProps } from "../Checkbox/CheckboxCommon";
|
|
4
4
|
export type CheckboxTextProps = {
|
|
5
5
|
label: string | ReactNode;
|
|
6
6
|
errorMessage?: string;
|
|
7
|
-
} & Omit<
|
|
7
|
+
} & Omit<CheckboxProps, "aria-errormessage" | "aria-invalid">;
|
|
8
8
|
export type CheckboxTextCommonProps = CheckboxTextProps & {
|
|
9
|
-
CheckboxComponent: ComponentType<Omit<
|
|
10
|
-
ItemMessageComponent: ComponentType<
|
|
9
|
+
CheckboxComponent: ComponentType<Omit<CheckboxProps, "checkBoxIcon">>;
|
|
10
|
+
ItemMessageComponent: ComponentType<ItemMessageProps>;
|
|
11
11
|
};
|
|
12
|
-
declare const CheckboxTextCommon:
|
|
13
|
-
label: string | ReactNode;
|
|
14
|
-
errorMessage?: string;
|
|
15
|
-
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "disabled"> & {
|
|
16
|
-
CheckboxComponent: ComponentType<Omit<ComponentProps<typeof CheckboxCommon>, "checkBoxIcon">>;
|
|
17
|
-
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
18
|
-
} & React.RefAttributes<HTMLInputElement>>;
|
|
19
|
-
export { CheckboxTextCommon };
|
|
12
|
+
export declare const CheckboxTextCommon: import("react").ForwardRefExoticComponent<Omit<CheckboxTextCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId, forwardRef
|
|
3
|
-
const CheckboxTextCommon = forwardRef(({ label, errorMessage, CheckboxComponent, ItemMessageComponent, ...inputProps }, ref) => {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return (_jsxs("div", { className: "af-checkbox-text", children: [_jsx(CheckboxComponent, { id: inputId, errorId:
|
|
2
|
+
import { useId, forwardRef } from "react";
|
|
3
|
+
export const CheckboxTextCommon = forwardRef(({ label, errorMessage, id, CheckboxComponent, ItemMessageComponent, ...inputProps }, ref) => {
|
|
4
|
+
const generatedId = useId();
|
|
5
|
+
const inputId = id ?? generatedId;
|
|
6
|
+
const errorId = `${inputId}-error`;
|
|
7
|
+
return (_jsxs("div", { className: "af-checkbox-text", children: [_jsxs("label", { htmlFor: inputId, children: [_jsx(CheckboxComponent, { id: inputId, ...inputProps, "aria-errormessage": errorMessage ? errorId : undefined, "aria-invalid": errorMessage ? true : undefined, ref: ref }), _jsx("span", { className: "af-checkbox-text__label-content", children: label })] }), _jsx(ItemMessageComponent, { message: errorMessage, id: errorId })] }));
|
|
8
8
|
});
|
|
9
9
|
CheckboxTextCommon.displayName = "CheckboxTextCommon";
|
|
10
|
-
export { CheckboxTextCommon };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CheckboxText/CheckboxTextLF.scss";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
errorMessage?: string;
|
|
5
|
-
} & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "disabled"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
2
|
+
import { CheckboxTextProps } from "./CheckboxTextCommon";
|
|
3
|
+
export declare const CheckboxText: import("react").ForwardRefExoticComponent<Omit<CheckboxTextProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -6,7 +6,7 @@ const Dropdown = forwardRef(({ id, required, label, error, placeholder, children
|
|
|
6
6
|
let inputId = useId();
|
|
7
7
|
inputId = id || inputId;
|
|
8
8
|
const classname = classNames("af-form__dropdown-input", error && "af-form__dropdown-input--error");
|
|
9
|
-
return (_jsxs("div", { children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsxs("select", { className: classname, ...otherProps, ref: inputRef, id: inputId, children: [Boolean(placeholder) && (_jsx("option", { disabled: true, value: "", children: placeholder })), children] }), helper
|
|
9
|
+
return (_jsxs("div", { children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsxs("select", { className: classname, ...otherProps, ref: inputRef, id: inputId, children: [Boolean(placeholder) && (_jsx("option", { disabled: true, value: "", children: placeholder })), children] }), helper ? (_jsx("span", { className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: error || success, messageType: error ? "error" : "success" })] }));
|
|
10
10
|
});
|
|
11
11
|
Dropdown.displayName = "Dropdown";
|
|
12
12
|
export { Dropdown };
|
|
@@ -9,7 +9,7 @@ const InputDate = forwardRef(({ className, classModifier = "", defaultValue, val
|
|
|
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", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, required: required, inputId: inputId }), _jsx("input", { ...otherProps, id: inputId, className: componentClassName, type: "date", ref: inputRef, defaultValue: formatInputDateValue(defaultValue), value: formatInputDateValue(value), "aria-errormessage": ariaErrormessage ?? (error ? idMessage : undefined), "aria-invalid": Boolean(error ?? ariaErrormessage), "aria-describedby": ariaDescribedby.length > 0 ? ariaDescribedby.join(" ") : undefined, required: required, min: formatInputDateValue(min), max: formatInputDateValue(max) }), helper
|
|
12
|
+
return (_jsxs("div", { className: "af-form__input-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, required: required, inputId: inputId }), _jsx("input", { ...otherProps, id: inputId, className: componentClassName, type: "date", ref: inputRef, defaultValue: formatInputDateValue(defaultValue), value: formatInputDateValue(value), "aria-errormessage": ariaErrormessage ?? (error ? idMessage : undefined), "aria-invalid": Boolean(error ?? ariaErrormessage), "aria-describedby": ariaDescribedby.length > 0 ? ariaDescribedby.join(" ") : undefined, required: required, min: formatInputDateValue(min), max: formatInputDateValue(max) }), helper ? (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idMessage, message: error || success, messageType: error ? "error" : "success" })] }));
|
|
13
13
|
});
|
|
14
14
|
InputDate.displayName = "InputDate";
|
|
15
15
|
export { InputDate };
|
|
@@ -25,7 +25,7 @@ const InputPhoneCommon = forwardRef(({ className, classModifier = "", helper, er
|
|
|
25
25
|
const maskedValue = mask(rawValue);
|
|
26
26
|
onChangeInput?.(maskedValue);
|
|
27
27
|
};
|
|
28
|
-
return (_jsxs("div", { className: "af-form__input-phone-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsxs("div", { className: "af-form__input-phone-fields", children: [showSelect
|
|
28
|
+
return (_jsxs("div", { className: "af-form__input-phone-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _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: componentClassName, ref: inputRef, error: error, type: "tel", required: required, placeholder: otherProps.placeholder, "aria-errormessage": ariaErrormessage, value: otherProps.value, onChange: handleChangeNumber, disabled: disabled, idMessage: error ? 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: error || success, messageType: error ? "error" : "success" })] }));
|
|
29
29
|
});
|
|
30
30
|
InputPhoneCommon.displayName = "InputPhone";
|
|
31
31
|
export { InputPhoneCommon };
|
|
@@ -8,7 +8,7 @@ const InputText = forwardRef(({ unit, className, classModifier = "", helper, err
|
|
|
8
8
|
const idMessage = useId();
|
|
9
9
|
const idHelp = useId();
|
|
10
10
|
const ariaDescribedby = [helper && idHelp, success && idMessage].filter(Boolean);
|
|
11
|
-
return (_jsxs("div", { className: "af-form__input-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx(InputTextAtomComponent, { id: inputId, ref: inputRef, unit: unit, className: componentClassName, error: error, required: required, idMessage: error ? idMessage : undefined, idHelp: ariaDescribedby.length > 0 ? ariaDescribedby.join(" ") : undefined, ...otherProps }), helper
|
|
11
|
+
return (_jsxs("div", { className: "af-form__input-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx(InputTextAtomComponent, { id: inputId, ref: inputRef, unit: unit, className: componentClassName, error: error, required: required, idMessage: 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: error || success, messageType: error ? "error" : "success" })] }));
|
|
12
12
|
});
|
|
13
13
|
InputText.displayName = "InputText";
|
|
14
14
|
export { InputText };
|
|
@@ -7,5 +7,5 @@ export const ItemLabel = ({ label, description, required, inputId, sideButtonLab
|
|
|
7
7
|
if (!label && !description && !buttonLabel && !sideButtonLabel) {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
|
-
return (_jsxs("div", { className: "af-item-label", children: [label
|
|
10
|
+
return (_jsxs("div", { className: "af-item-label", children: [label ? (_jsxs("label", { htmlFor: inputId, "aria-describedby": description ? idDescription : undefined, className: "af-item-label__label", children: [label, " ", required ? _jsx("span", { "aria-hidden": true, children: " *" }) : null] })) : null, sideButtonLabel ? (_jsx(ButtonComponent, { variant: "ghost", onClick: onSideButtonClick, className: "af-item-label__sidebutton", children: sideButtonLabel })) : null, description ? (_jsx("span", { id: idDescription, className: "af-item-label__description", children: description })) : null, buttonLabel ? (_jsx(ButtonComponent, { className: "af-item-label__more", variant: "ghost", iconLeft: _jsx(Svg, { src: infoIcon, "aria-hidden": "true" }), onClick: onButtonClick, children: buttonLabel })) : null] }));
|
|
11
11
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
type ItemMessageProps = {
|
|
2
|
+
export type ItemMessageProps = {
|
|
3
3
|
message?: ReactNode;
|
|
4
4
|
id?: string;
|
|
5
5
|
messageType?: "error" | "success";
|
|
6
6
|
};
|
|
7
7
|
export declare const ItemMessage: ({ message, id, messageType, }: ItemMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
-
export {};
|
|
@@ -4,7 +4,7 @@ export const CardRadioCommon = ({ className, labelGroup, descriptionGroup, label
|
|
|
4
4
|
const generatedId = useId();
|
|
5
5
|
const cardRadioId = id ?? generatedId;
|
|
6
6
|
const errorId = `${cardRadioId}-error`;
|
|
7
|
-
return (_jsxs("fieldset", { className: ["af-card-radio", className].filter(Boolean).join(" "), role: "radiogroup", "aria-required": required ? true : undefined, "aria-invalid": error ? true : undefined, "aria-errormessage": error ? errorId : undefined, id: cardRadioId, children: [_jsxs("legend", { className: "af-card-radio__legend", children: [_jsxs("p", { className: "af-card-radio__label", children: [label, labelGroup,
|
|
7
|
+
return (_jsxs("fieldset", { className: ["af-card-radio", className].filter(Boolean).join(" "), role: "radiogroup", "aria-required": required ? true : undefined, "aria-invalid": error ? true : undefined, "aria-errormessage": error ? errorId : undefined, id: cardRadioId, children: [_jsxs("legend", { className: "af-card-radio__legend", children: [_jsxs("p", { className: "af-card-radio__label", children: [label, labelGroup, required || isRequired ? _jsx("span", { "aria-hidden": true, children: "*" }) : null] }), description || descriptionGroup ? (_jsxs("p", { className: "af-card-radio__description", children: [description, descriptionGroup] })) : null] }), _jsx("div", { className: [
|
|
8
8
|
"af-card-radio__options",
|
|
9
9
|
`af-card-radio__options--${type}`,
|
|
10
10
|
].join(" "), children: options.map((cardRadioItemProps) => (_jsx(CardRadioOptionComponent, { id: `${cardRadioId}-${cardRadioItemProps.value}`, checked: value !== undefined
|
|
@@ -7,5 +7,5 @@ export const CardRadioOptionCommon = forwardRef(({ label, type = "vertical", des
|
|
|
7
7
|
className,
|
|
8
8
|
]
|
|
9
9
|
.filter(Boolean)
|
|
10
|
-
.join(" "), children: [icon
|
|
10
|
+
.join(" "), children: [icon ? _jsx(IconComponent, { src: icon, role: "presentation" }) : null, _jsxs("div", { className: "af-card-radio-option__content", children: [_jsx("p", { className: "af-card-radio-option__label", children: label }), Boolean(description) && (_jsx("p", { className: "af-card-radio-option__description", children: description })), Boolean(subtitle) && (_jsx("p", { className: "af-card-radio-option__subtitle", children: subtitle }))] }), _jsx(RadioComponent, { ...inputProps, isInvalid: isInvalid, ref: ref })] })));
|
|
11
11
|
CardRadioOptionCommon.displayName = "CardRadioOptionCommon";
|
|
@@ -18,8 +18,4 @@ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
18
18
|
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
19
19
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
20
20
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
21
|
-
} & Partial<
|
|
22
|
-
message?: import("react").ReactNode;
|
|
23
|
-
id?: string;
|
|
24
|
-
messageType?: "error" | "success";
|
|
25
|
-
}>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
21
|
+
} & Partial<import("../ItemMessage/ItemMessageCommon").ItemMessageProps>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -7,7 +7,7 @@ const TextArea = forwardRef(({ className, classModifier = "", label, description
|
|
|
7
7
|
inputId = otherProps.id || inputId;
|
|
8
8
|
const idHelp = useId();
|
|
9
9
|
const idError = useId();
|
|
10
|
-
return (_jsxs("div", { className: "af-form__input-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx("textarea", { id: inputId, className: componentClassName, ref: inputRef, "aria-errormessage": error ? idError : undefined, "aria-describedby": helper ? idHelp : undefined, "aria-invalid": Boolean(error), ...otherProps }), helper
|
|
10
|
+
return (_jsxs("div", { className: "af-form__input-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx("textarea", { id: inputId, className: componentClassName, ref: inputRef, "aria-errormessage": error ? idError : undefined, "aria-describedby": helper ? idHelp : undefined, "aria-invalid": Boolean(error), ...otherProps }), helper ? (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: idError, message: error })] }));
|
|
11
11
|
});
|
|
12
12
|
TextArea.displayName = "TextArea";
|
|
13
13
|
export { TextArea };
|
|
@@ -18,8 +18,4 @@ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
18
18
|
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
19
19
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
20
20
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
21
|
-
} & Partial<
|
|
22
|
-
message?: import("react").ReactNode;
|
|
23
|
-
id?: string;
|
|
24
|
-
messageType?: "error" | "success";
|
|
25
|
-
}>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
21
|
+
} & Partial<import("../ItemMessage/ItemMessageCommon").ItemMessageProps>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -2,4 +2,4 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "@axa-fr/design-system-apollo-css/dist/Heading/HeadingApollo.scss";
|
|
3
3
|
import { DEFAULT_TAG_PROPS, HeadingCommon } from "./HeadingCommon";
|
|
4
4
|
import { Tag } from "../Tag/TagApollo";
|
|
5
|
-
export const Heading = ({ tag, tagProps = {}, ...props }) => (_jsx(HeadingCommon, { ...props, tag: tag
|
|
5
|
+
export const Heading = ({ tag, tagProps = {}, ...props }) => (_jsx(HeadingCommon, { ...props, tag: tag ? (_jsx(Tag, { ...DEFAULT_TAG_PROPS, ...tagProps, children: tag })) : null }));
|
|
@@ -5,4 +5,4 @@ import { HeadingWithSubheadings } from "./HeadingWithSubheadings";
|
|
|
5
5
|
export const DEFAULT_TAG_PROPS = {
|
|
6
6
|
variant: "neutral",
|
|
7
7
|
};
|
|
8
|
-
export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, ...props }) => (_jsxs("div", { className: classNames("af-heading", className), ...props, children: [tag && level < 3
|
|
8
|
+
export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, ...props }) => (_jsxs("div", { className: classNames("af-heading", className), ...props, children: [tag && level < 3 ? _jsx("div", { className: "af-heading__label", children: tag }) : null, icon && level === 1 ? (_jsx(Icon, { src: icon, size: "L", hasBackground: true, variant: "secondary", ...iconProps, className: classNames("af-heading__icon", iconProps.className) })) : null, _jsx(HeadingWithSubheadings, { title: title, firstSubtitle: firstSubtitle, titleComponent: `h${level}`, secondSubtitle: secondSubtitle })] }));
|
|
@@ -2,4 +2,4 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "@axa-fr/design-system-apollo-css/dist/Heading/HeadingLF.scss";
|
|
3
3
|
import { DEFAULT_TAG_PROPS, HeadingCommon } from "./HeadingCommon";
|
|
4
4
|
import { Tag } from "../Tag/TagLF";
|
|
5
|
-
export const Heading = ({ tag, tagProps = {}, ...props }) => (_jsx(HeadingCommon, { ...props, tag: tag
|
|
5
|
+
export const Heading = ({ tag, tagProps = {}, ...props }) => (_jsx(HeadingCommon, { ...props, tag: tag ? (_jsx(Tag, { ...DEFAULT_TAG_PROPS, ...tagProps, children: tag })) : null }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const HeadingWithSubheadings = ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent = "h1", }) => (_jsxs("hgroup", { className: "af-heading__title-container", children: [_jsx(TitleComponent, { className: "af-heading__title", children: title }), firstSubtitle
|
|
2
|
+
export const HeadingWithSubheadings = ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent = "h1", }) => (_jsxs("hgroup", { className: "af-heading__title-container", children: [_jsx(TitleComponent, { className: "af-heading__title", children: title }), firstSubtitle ? (_jsx("p", { className: "af-heading__subtitle", children: firstSubtitle })) : null, TitleComponent === "h1" && secondSubtitle ? (_jsx("p", { className: "af-heading__subtitle", children: secondSubtitle })) : null] }));
|
package/dist/Link/LinkCommon.js
CHANGED
|
@@ -14,6 +14,7 @@ export const Link = ({ href, variant = "underline", openInNewTab = false, leftIc
|
|
|
14
14
|
rel: "noopener noreferrer",
|
|
15
15
|
};
|
|
16
16
|
const componentClassName = useMemo(() => getComponentClassName("af-link", className, `${classModifier}${!className && openInNewTab ? " openInNewTab" : ""} ${variant}`), [classModifier, className, openInNewTab, variant]);
|
|
17
|
-
return (_jsxs("a", { className: componentClassName, href: href, ...newTabProps, ...props, children: [leftIcon, children,
|
|
18
|
-
(rightIcon ?? _jsx(Svg, { src: openInNew }))
|
|
17
|
+
return (_jsxs("a", { className: componentClassName, href: href, ...newTabProps, ...props, children: [leftIcon, children, openInNewTab || Boolean(rightIcon)
|
|
18
|
+
? (rightIcon ?? _jsx(Svg, { src: openInNew }))
|
|
19
|
+
: null] }));
|
|
19
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export const ClickItemContentCommon = ({ title, subtitle, textSecondary, textTertiary, tagLabel, tagProps, TagComponent, }) => {
|
|
3
|
-
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "af-apollo-click-item__title", children: title }), subtitle
|
|
3
|
+
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "af-apollo-click-item__title", children: title }), subtitle ? (_jsx("p", { className: "af-apollo-click-item__subtitle", children: subtitle })) : null, textSecondary ? (_jsx("p", { className: "af-apollo-click-item__secondary", children: textSecondary })) : null, textTertiary ? (_jsx("p", { className: "af-apollo-click-item__tertiary", children: textTertiary })) : null, tagLabel ? (_jsx("div", { className: "af-apollo-click-item__tag-container", children: _jsx(TagComponent, { ...tagProps, children: tagLabel }) })) : null] }));
|
|
4
4
|
};
|
|
@@ -9,5 +9,5 @@ export const ContentItemDuo = ({ label, value, isVertical = false, className, cl
|
|
|
9
9
|
}
|
|
10
10
|
return getComponentClassName("af-content-item-duo", className, classModifiers.filter(Boolean).join(" "));
|
|
11
11
|
}, [classModifier, className, isVertical]);
|
|
12
|
-
return (_jsxs("div", { className: componentClassName, children: [_jsx("p", { className: "af-content-item-duo__label", children: label }), typeof value === "string" ? (_jsx("p", { className: "af-content-item-duo__value", children: value })) : (_jsx("div", { className: "af-content-item-duo__value", children: value })), buttonText
|
|
12
|
+
return (_jsxs("div", { className: componentClassName, children: [_jsx("p", { className: "af-content-item-duo__label", children: label }), typeof value === "string" ? (_jsx("p", { className: "af-content-item-duo__value", children: value })) : (_jsx("div", { className: "af-content-item-duo__value", children: value })), buttonText ? (_jsx("div", { className: "af-content-item-duo__button", children: _jsx(ButtonComponent, { variant: "ghost", onClick: onButtonClick, children: buttonText }) })) : null] }));
|
|
13
13
|
};
|
|
@@ -24,5 +24,5 @@ export const Message = ({ variant = messageVariants.information, className, titl
|
|
|
24
24
|
const icon = useMemo(() => getIconFromType(variant), [variant]);
|
|
25
25
|
return (_jsxs("div", { className: ["af-message", `af-message--${variant}`, className]
|
|
26
26
|
.filter(Boolean)
|
|
27
|
-
.join(" "), role: "alert", children: [_jsx(Svg, { src: icon, width: iconSize, height: iconSize, className: "af-message__icon", role: "presentation" }), _jsxs("div", { className: "af-message__content", children: [title
|
|
27
|
+
.join(" "), role: "alert", children: [_jsx(Svg, { src: icon, width: iconSize, height: iconSize, className: "af-message__icon", role: "presentation" }), _jsxs("div", { className: "af-message__content", children: [title ? (_jsx(Heading, { className: "af-message__title", children: title })) : null, children, action ? _jsx("div", { className: "af-message__action", children: action }) : null] })] }));
|
|
28
28
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import close from "@material-symbols/svg-400/rounded/close.svg";
|
|
3
3
|
import { ClickIcon } from "../../ClickIcon/ClickIconCommon";
|
|
4
|
-
export const ModalCoreHeaderCommon = ({ className, headingComponent: HeadingComponent, headingProps, iconComponent: IconComponent, iconProps, onClose, closeButtonAriaLabel = "Fermer la boite de dialogue", ...props }) => (_jsxs("header", { className: ["af-apollo-modal__header", className].filter(Boolean).join(" "), ...props, children: [_jsx(ClickIcon, { className: "af-apollo-modal__header-close-btn", src: close, onClick: onClose, "aria-label": closeButtonAriaLabel }), _jsxs("div", { className: "af-apollo-modal__header-title", children: [IconComponent && iconProps
|
|
4
|
+
export const ModalCoreHeaderCommon = ({ className, headingComponent: HeadingComponent, headingProps, iconComponent: IconComponent, iconProps, onClose, closeButtonAriaLabel = "Fermer la boite de dialogue", ...props }) => (_jsxs("header", { className: ["af-apollo-modal__header", className].filter(Boolean).join(" "), ...props, children: [_jsx(ClickIcon, { className: "af-apollo-modal__header-close-btn", src: close, onClick: onClose, "aria-label": closeButtonAriaLabel }), _jsxs("div", { className: "af-apollo-modal__header-title", children: [IconComponent && iconProps ? (_jsx(IconComponent, { size: "M", ...iconProps })) : null, _jsx(HeadingComponent, { level: 2, ...headingProps })] })] }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.5-alpha.
|
|
3
|
+
"version": "1.0.5-alpha.400",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.400",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.400",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|