@axa-fr/design-system-apollo-react 1.0.5-tags-slash-2-0-0-RC-4.480 → 2.0.0-RC.0
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/BasePicture/BasePicture.d.ts +5 -0
- package/dist/BasePicture/BasePicture.js +6 -0
- package/dist/ContentItemMono/ContentItemMonoApollo.d.ts +1 -1
- package/dist/ContentItemMono/ContentItemMonoApollo.js +1 -2
- package/dist/ContentItemMono/ContentItemMonoCommon.d.ts +3 -5
- package/dist/ContentItemMono/ContentItemMonoCommon.js +3 -2
- package/dist/ContentItemMono/ContentItemMonoLF.d.ts +1 -1
- package/dist/ContentItemMono/ContentItemMonoLF.js +1 -2
- package/dist/Form/Dropdown/DropdownCommon.js +1 -1
- package/dist/Form/InputDate/InputDateApollo.d.ts +1 -0
- package/dist/Form/InputDate/InputDateCommon.d.ts +1 -0
- package/dist/Form/InputDate/InputDateCommon.js +22 -3
- package/dist/Form/InputDate/InputDateLF.d.ts +1 -0
- package/dist/Form/InputPhone/CountryCodeSelect.js +4 -0
- package/dist/Form/ItemMessage/ItemMessageCommon.d.ts +1 -1
- package/dist/Form/ItemMessage/ItemMessageCommon.js +9 -1
- package/dist/Form/Radio/CardRadio/CardRadioCommon.d.ts +1 -1
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionCommon.d.ts +39 -4
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionCommon.js +3 -2
- package/dist/Form/TextArea/TextAreaCommon.js +1 -1
- package/dist/List/ClickItem/components/ClickItemPrefixApollo.js +1 -2
- package/dist/List/ClickItem/components/ClickItemPrefixCommon.d.ts +4 -5
- package/dist/List/ClickItem/components/ClickItemPrefixCommon.js +3 -2
- package/dist/List/ClickItem/components/ClickItemPrefixLF.js +1 -2
- package/dist/Modal/components/ModalCore.js +1 -1
- package/dist/Modal/components/ModalCoreBody.js +2 -2
- package/dist/Modal/components/ModalCoreFooterCommon.js +2 -4
- package/dist/Modal/components/ModalCoreHeaderCommon.js +1 -1
- package/dist/ProgressBar/ProgressBarApollo.d.ts +1 -1
- package/dist/ProgressBar/ProgressBarCommon.d.ts +8 -4
- package/dist/ProgressBar/ProgressBarCommon.js +7 -5
- package/dist/ProgressBar/ProgressBarLF.d.ts +1 -1
- package/dist/ProgressBarGroup/ProgressBarGroupCommon.js +1 -1
- package/dist/Stepper/StepperCommon.d.ts +3 -1
- package/dist/Stepper/StepperCommon.js +3 -3
- package/dist/index.d.ts +15 -15
- package/dist/index.js +13 -13
- package/dist/indexLF.d.ts +19 -19
- package/dist/indexLF.js +17 -17
- package/package.json +3 -3
- package/dist/BasePicture/BasePictureApollo.d.ts +0 -2
- package/dist/BasePicture/BasePictureApollo.js +0 -2
- package/dist/BasePicture/BasePictureCommon.d.ts +0 -1
- package/dist/BasePicture/BasePictureCommon.js +0 -8
- package/dist/BasePicture/BasePictureLF.d.ts +0 -2
- package/dist/BasePicture/BasePictureLF.js +0 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/BasePicture/BasePicture.scss";
|
|
3
|
+
type BasePictureProps = ComponentProps<"img">;
|
|
4
|
+
export declare const BasePicture: ({ className, src, ...props }: BasePictureProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import logo from "@axa-fr/design-system-apollo-css/logo-axa.svg";
|
|
3
|
+
import "@axa-fr/design-system-apollo-css/dist/BasePicture/BasePicture.scss";
|
|
4
|
+
export const BasePicture = ({ className, src, ...props }) => {
|
|
5
|
+
return (_jsx("img", { className: ["af-basepicture", className].filter(Boolean).join(" "), alt: "", src: src || logo, ...props }));
|
|
6
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoApollo.scss";
|
|
2
|
-
import { ContentItemProps } from "./ContentItemMonoCommon";
|
|
2
|
+
import { type ContentItemProps } from "./ContentItemMonoCommon";
|
|
3
3
|
export declare const ContentItemMono: (props: ContentItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoApollo.scss";
|
|
3
|
-
import { BasePicture } from "../BasePicture/BasePictureApollo";
|
|
4
3
|
import { Icon } from "../Icon/IconApollo";
|
|
5
4
|
import { ContentItemMonoCommon, } from "./ContentItemMonoCommon";
|
|
6
|
-
export const ContentItemMono = (props) => (_jsx(ContentItemMonoCommon, { ...props,
|
|
5
|
+
export const ContentItemMono = (props) => (_jsx(ContentItemMonoCommon, { ...props, IconComponent: Icon }));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ComponentProps, ComponentType } from "react";
|
|
1
|
+
import type { ComponentProps, ComponentType } from "react";
|
|
2
2
|
import { Icon } from "../Icon/IconCommon";
|
|
3
|
-
import {
|
|
4
|
-
import { ContentItemCoreProps } from "./ContentItemMonoCore";
|
|
3
|
+
import { type ContentItemCoreProps } from "./ContentItemMonoCore";
|
|
5
4
|
export type ContentMonoItemSize = "medium" | "large";
|
|
6
5
|
export type ContentMonoItemPictureProps = {
|
|
7
6
|
type: "picture";
|
|
@@ -25,7 +24,6 @@ export type ContentMonoItemStickProps = {
|
|
|
25
24
|
export type ContentItemProps = ContentMonoItemPictureProps | ContentMonoItemIconProps | ContentMonoItemStickProps;
|
|
26
25
|
export type ContentItemCommonProps = ContentItemProps & {
|
|
27
26
|
IconComponent: ComponentType<ComponentProps<typeof Icon>>;
|
|
28
|
-
BasePictureComponent: ComponentType<ComponentProps<typeof BasePicture>>;
|
|
29
27
|
};
|
|
30
|
-
export declare const getContentItemCoreProps: ({ IconComponent,
|
|
28
|
+
export declare const getContentItemCoreProps: ({ IconComponent, type, ...props }: ContentItemCommonProps) => ContentItemCoreProps;
|
|
31
29
|
export declare const ContentItemMonoCommon: (props: ContentItemCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BasePicture } from "../BasePicture/BasePicture";
|
|
2
3
|
import { ContentItemMonoCore, } from "./ContentItemMonoCore";
|
|
3
|
-
export const getContentItemCoreProps = ({ IconComponent,
|
|
4
|
+
export const getContentItemCoreProps = ({ IconComponent, type, ...props }) => {
|
|
4
5
|
if (type === "icon") {
|
|
5
6
|
const { icon, title, subtitle1, subtitle2 } = props;
|
|
6
7
|
return {
|
|
@@ -13,7 +14,7 @@ export const getContentItemCoreProps = ({ IconComponent, BasePictureComponent, t
|
|
|
13
14
|
if (type === "picture") {
|
|
14
15
|
return {
|
|
15
16
|
...props,
|
|
16
|
-
leftComponent: (_jsx(
|
|
17
|
+
leftComponent: (_jsx(BasePicture, { src: props.picture, alt: props.title })),
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
return {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoLF.scss";
|
|
2
|
-
import { ContentItemProps } from "./ContentItemMonoCommon";
|
|
2
|
+
import { type ContentItemProps } from "./ContentItemMonoCommon";
|
|
3
3
|
export declare const ContentItemMono: (props: ContentItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoLF.scss";
|
|
3
|
-
import { BasePicture } from "../BasePicture/BasePictureLF";
|
|
4
3
|
import { Icon } from "../Icon/IconLF";
|
|
5
4
|
import { ContentItemMonoCommon, } from "./ContentItemMonoCommon";
|
|
6
|
-
export const ContentItemMono = (props) => (_jsx(ContentItemMonoCommon, { ...props,
|
|
5
|
+
export const ContentItemMono = (props) => (_jsx(ContentItemMonoCommon, { ...props, IconComponent: Icon }));
|
|
@@ -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", { className: "af-form__dropdown-container", 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) &&
|
|
9
|
+
return (_jsxs("div", { className: "af-form__dropdown-container", 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", { 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 };
|
|
@@ -10,6 +10,7 @@ export declare const InputDate: import("react").ForwardRefExoticComponent<Omit<O
|
|
|
10
10
|
helper?: string;
|
|
11
11
|
error?: string;
|
|
12
12
|
success?: string;
|
|
13
|
+
hidePicker?: boolean;
|
|
13
14
|
label: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
|
|
14
15
|
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
15
16
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
@@ -10,6 +10,7 @@ type InputDateProps = Omit<ComponentPropsWithRef<"input">, "value" | "min" | "ma
|
|
|
10
10
|
helper?: string;
|
|
11
11
|
error?: string;
|
|
12
12
|
success?: string;
|
|
13
|
+
hidePicker?: boolean;
|
|
13
14
|
label: ComponentProps<typeof ItemLabel>["label"];
|
|
14
15
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabel>, "ButtonComponent">>;
|
|
15
16
|
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useId, } from "react";
|
|
2
|
+
import { forwardRef, useEffect, useId, } from "react";
|
|
3
3
|
import { getComponentClassName } from "../../utilities/getComponentClassName";
|
|
4
4
|
import { formatInputDateValue } from "./InputDate.helper";
|
|
5
|
-
const InputDate = forwardRef(({ className, classModifier = "", defaultValue, value, helper, error, success, label, description, buttonLabel, onButtonClick, ItemLabelComponent, ItemMessageComponent, required, "aria-errormessage": ariaErrormessage, min, max, ...otherProps }, inputRef) => {
|
|
6
|
-
const componentClassName = getComponentClassName("af-form__input-date", className ?? "", classModifier
|
|
5
|
+
const InputDate = forwardRef(({ className, classModifier = "", defaultValue, value, helper, error, success, label, description, buttonLabel, onButtonClick, ItemLabelComponent, ItemMessageComponent, required, "aria-errormessage": ariaErrormessage, min, max, hidePicker, ...otherProps }, inputRef) => {
|
|
6
|
+
const componentClassName = getComponentClassName("af-form__input-date", className ?? "", `${classModifier}${hidePicker ? " no-picker" : ""}`);
|
|
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
|
+
/* Stop keydown (space and enter) and click events for Firefox when picker is disabled */
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
function handleKeydown(event) {
|
|
15
|
+
if (hidePicker && (event.keyCode === 13 || event.keyCode === 32)) {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function handleClick(event) {
|
|
20
|
+
if (hidePicker) {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
window.addEventListener("keydown", handleKeydown);
|
|
25
|
+
window.addEventListener("click", handleClick);
|
|
26
|
+
return () => {
|
|
27
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
28
|
+
window.removeEventListener("click", handleClick);
|
|
29
|
+
};
|
|
30
|
+
}, [hidePicker]);
|
|
12
31
|
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
32
|
});
|
|
14
33
|
InputDate.displayName = "InputDate";
|
|
@@ -10,6 +10,7 @@ export declare const InputDate: import("react").ForwardRefExoticComponent<Omit<O
|
|
|
10
10
|
helper?: string;
|
|
11
11
|
error?: string;
|
|
12
12
|
success?: string;
|
|
13
|
+
hidePicker?: boolean;
|
|
13
14
|
label: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
|
|
14
15
|
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
15
16
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
@@ -17,6 +17,10 @@ const CountryCodeSelect = ({ options, defaultCountry, onChangeSelect, IconCompon
|
|
|
17
17
|
...provided,
|
|
18
18
|
display: "none",
|
|
19
19
|
}),
|
|
20
|
+
singleValue: (provided) => ({
|
|
21
|
+
...provided,
|
|
22
|
+
color: "inherit",
|
|
23
|
+
}),
|
|
20
24
|
};
|
|
21
25
|
const formatOptionLabel = ({ flag, code }) => (_jsxs("div", { className: "country-code-select-format-label", children: [_jsx(IconComponent, { src: flag }), code] }));
|
|
22
26
|
const handleChange = (newValue) => {
|
|
@@ -2,6 +2,6 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
export type ItemMessageProps = {
|
|
3
3
|
message?: ReactNode;
|
|
4
4
|
id?: string;
|
|
5
|
-
messageType?: "error" | "success";
|
|
5
|
+
messageType?: "error" | "success" | "warning";
|
|
6
6
|
};
|
|
7
7
|
export declare const ItemMessage: ({ message, id, messageType, }: ItemMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import successIcon from "@material-symbols/svg-400/outlined/check_circle-fill.svg";
|
|
3
3
|
import errorIcon from "@material-symbols/svg-400/outlined/error-fill.svg";
|
|
4
|
+
import warningIcon from "@material-symbols/svg-400/outlined/warning-fill.svg";
|
|
4
5
|
import { Svg } from "../../Svg/Svg";
|
|
5
6
|
export const ItemMessage = ({ message, id, messageType = "error", }) => {
|
|
6
7
|
if (!message) {
|
|
7
8
|
return null;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
+
const getIcon = () => {
|
|
11
|
+
if (messageType === "success")
|
|
12
|
+
return successIcon;
|
|
13
|
+
if (messageType === "warning")
|
|
14
|
+
return warningIcon;
|
|
15
|
+
return errorIcon;
|
|
16
|
+
};
|
|
17
|
+
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 })] }));
|
|
10
18
|
};
|
|
@@ -2,7 +2,7 @@ import { type ComponentProps, type ComponentType, type PropsWithChildren, type R
|
|
|
2
2
|
import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
|
|
3
3
|
import { type CardRadioOptionProps } from "../CardRadioOption/CardRadioOptionCommon";
|
|
4
4
|
type RadioOption = Omit<CardRadioOptionProps, "name" | "type" | "isInvalid">;
|
|
5
|
-
export type CardRadioProps = Omit<CardRadioOptionProps, "value" | "label" | "type" | "isInvalid" | "icon" | "description" | "subtitle" | "children"> & {
|
|
5
|
+
export type CardRadioProps = Omit<CardRadioOptionProps, "value" | "label" | "type" | "isInvalid" | "icon" | "src" | "basePictureProps" | "description" | "subtitle" | "children"> & {
|
|
6
6
|
type?: "vertical" | "horizontal";
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated Use `label` instead.
|
|
@@ -1,15 +1,50 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentType, type ReactNode } from "react";
|
|
2
2
|
import type { Icon as IconCommon } from "../../../Icon/IconCommon";
|
|
3
|
+
import { BasePicture } from "../../../BasePicture/BasePicture";
|
|
3
4
|
import type { Radio } from "../Radio/RadioCommon";
|
|
4
|
-
|
|
5
|
+
type BaseCardRadioOptionProps = Omit<ComponentProps<typeof Radio>, "size"> & {
|
|
5
6
|
label: ReactNode;
|
|
6
|
-
type?: "vertical" | "horizontal";
|
|
7
7
|
description?: ReactNode;
|
|
8
8
|
subtitle?: ReactNode;
|
|
9
|
-
icon?: ComponentProps<typeof IconCommon>["src"];
|
|
10
9
|
};
|
|
10
|
+
export type CardRadioOptionProps = (BaseCardRadioOptionProps & {
|
|
11
|
+
type?: "vertical" | "horizontal";
|
|
12
|
+
icon?: ComponentProps<typeof IconCommon>["src"];
|
|
13
|
+
src?: undefined;
|
|
14
|
+
basePictureProps?: undefined;
|
|
15
|
+
}) | (BaseCardRadioOptionProps & {
|
|
16
|
+
type: "horizontal";
|
|
17
|
+
src?: ComponentProps<typeof BasePicture>["src"];
|
|
18
|
+
basePictureProps?: Omit<ComponentProps<typeof BasePicture>, "src">;
|
|
19
|
+
icon?: undefined;
|
|
20
|
+
});
|
|
11
21
|
export type CardRadioOptionCommonProps = CardRadioOptionProps & {
|
|
12
22
|
RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
|
|
13
23
|
IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
|
|
14
24
|
};
|
|
15
|
-
export declare const CardRadioOptionCommon: import("react").ForwardRefExoticComponent<Omit<
|
|
25
|
+
export declare const CardRadioOptionCommon: import("react").ForwardRefExoticComponent<(Omit<Omit<Omit<import("../Radio/RadioCommon").RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "size"> & {
|
|
26
|
+
label: ReactNode;
|
|
27
|
+
description?: ReactNode;
|
|
28
|
+
subtitle?: ReactNode;
|
|
29
|
+
} & {
|
|
30
|
+
type?: "vertical" | "horizontal";
|
|
31
|
+
icon?: ComponentProps<typeof IconCommon>["src"];
|
|
32
|
+
src?: undefined;
|
|
33
|
+
basePictureProps?: undefined;
|
|
34
|
+
} & {
|
|
35
|
+
RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
|
|
36
|
+
IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
|
|
37
|
+
}, "ref"> | Omit<Omit<Omit<import("../Radio/RadioCommon").RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "size"> & {
|
|
38
|
+
label: ReactNode;
|
|
39
|
+
description?: ReactNode;
|
|
40
|
+
subtitle?: ReactNode;
|
|
41
|
+
} & {
|
|
42
|
+
type: "horizontal";
|
|
43
|
+
src?: ComponentProps<typeof BasePicture>["src"];
|
|
44
|
+
basePictureProps?: Omit<ComponentProps<typeof BasePicture>, "src">;
|
|
45
|
+
icon?: undefined;
|
|
46
|
+
} & {
|
|
47
|
+
RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
|
|
48
|
+
IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
|
|
49
|
+
}, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
|
|
50
|
+
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, } from "react";
|
|
3
|
-
|
|
3
|
+
import { BasePicture } from "../../../BasePicture/BasePicture";
|
|
4
|
+
export const CardRadioOptionCommon = forwardRef(({ label, type, description, subtitle, icon, src, basePictureProps, isInvalid, className, RadioComponent, IconComponent, ...inputProps }, ref) => (_jsxs("label", { className: [
|
|
4
5
|
"af-card-radio-option",
|
|
5
6
|
isInvalid && "af-card-radio-option--invalid",
|
|
6
7
|
type === "horizontal" && "af-card-radio-option--horizontal",
|
|
7
8
|
className,
|
|
8
9
|
]
|
|
9
10
|
.filter(Boolean)
|
|
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
|
+
.join(" "), children: [icon ? _jsx(IconComponent, { src: icon, role: "presentation" }) : null, type === "horizontal" && src ? (_jsx(BasePicture, { src: src, ...basePictureProps })) : 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
12
|
CardRadioOptionCommon.displayName = "CardRadioOptionCommon";
|
|
@@ -7,6 +7,6 @@ export const TextArea = forwardRef(({ id, className, classModifier = "", label,
|
|
|
7
7
|
const errorId = `${inputId}-error`;
|
|
8
8
|
return (_jsxs("div", { className: ["af-form__input-container", className]
|
|
9
9
|
.filter(Boolean)
|
|
10
|
-
.join(" "), children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx("textarea", { id: inputId, className: "af-
|
|
10
|
+
.join(" "), children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx("textarea", { id: inputId, className: "af-form__textarea", ref: inputRef, "aria-errormessage": error ? errorId : undefined, "aria-describedby": helper ? helperId : undefined, required: required, "aria-invalid": Boolean(error) || classModifier.includes("error") ? true : undefined, placeholder: placeholder, ...inputProps }), helper ? (_jsx("span", { id: helperId, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: errorId, message: error })] }));
|
|
11
11
|
});
|
|
12
12
|
TextArea.displayName = "TextArea";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Icon } from "../../../Icon/IconApollo";
|
|
3
|
-
import { BasePicture } from "../../../BasePicture/BasePictureApollo";
|
|
4
3
|
import { ClickItemPrefixCommon, } from "./ClickItemPrefixCommon";
|
|
5
|
-
export const ClickItemPrefix = (props) => (_jsx(ClickItemPrefixCommon, {
|
|
4
|
+
export const ClickItemPrefix = (props) => (_jsx(ClickItemPrefixCommon, { ...props, IconComponent: Icon }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComponentProps, ComponentType } from "react";
|
|
2
|
-
import { BasePicture } from "../../../BasePicture/
|
|
1
|
+
import type { ComponentProps, ComponentType } from "react";
|
|
2
|
+
import { BasePicture } from "../../../BasePicture/BasePicture";
|
|
3
3
|
import type { IconProps } from "../../../Icon/IconCommon";
|
|
4
|
-
import { ClickItemStates, ClickItemVariants } from "../ClickItemCommon";
|
|
4
|
+
import type { ClickItemStates, ClickItemVariants } from "../ClickItemCommon";
|
|
5
5
|
export type ClickItemPrefixProps = {
|
|
6
6
|
state: ClickItemStates;
|
|
7
7
|
variant: ClickItemVariants;
|
|
@@ -10,6 +10,5 @@ export type ClickItemPrefixProps = {
|
|
|
10
10
|
};
|
|
11
11
|
export type ClickItemPrefixCommonProps = ClickItemPrefixProps & {
|
|
12
12
|
IconComponent: ComponentType<IconProps>;
|
|
13
|
-
BasePictureComponent: ComponentType<ComponentProps<typeof BasePicture>>;
|
|
14
13
|
};
|
|
15
|
-
export declare const ClickItemPrefixCommon: ({ state, variant, icon, basePictureProps, IconComponent,
|
|
14
|
+
export declare const ClickItemPrefixCommon: ({ state, variant, icon, basePictureProps, IconComponent, }: ClickItemPrefixCommonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
import { BasePicture } from "../../../BasePicture/BasePicture";
|
|
3
|
+
export const ClickItemPrefixCommon = ({ state, variant, icon, basePictureProps, IconComponent, }) => {
|
|
3
4
|
if (!(Boolean(basePictureProps) && variant === "agent") && !icon) {
|
|
4
5
|
return null;
|
|
5
6
|
}
|
|
6
7
|
if (Boolean(basePictureProps) && variant === "agent") {
|
|
7
|
-
return _jsx(
|
|
8
|
+
return _jsx(BasePicture, { ...basePictureProps });
|
|
8
9
|
}
|
|
9
10
|
return (_jsx(IconComponent, { role: "presentation", src: icon ?? "", variant: state === "disabled" && variant !== "small" ? "disabled" : "primary" }));
|
|
10
11
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Icon } from "../../../Icon/IconLF";
|
|
3
|
-
import { BasePicture } from "../../../BasePicture/BasePictureLF";
|
|
4
3
|
import { ClickItemPrefixCommon, } from "./ClickItemPrefixCommon";
|
|
5
|
-
export const ClickItemPrefix = (props) => (_jsx(ClickItemPrefixCommon, {
|
|
4
|
+
export const ClickItemPrefix = (props) => (_jsx(ClickItemPrefixCommon, { ...props, IconComponent: Icon }));
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
const ModalCore = forwardRef(({ className, children, ...props }, ref) => (
|
|
4
4
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events
|
|
5
|
-
_jsx("dialog", { "aria-label": props["aria-label"] ?? props.title, className: ["af-
|
|
5
|
+
_jsx("dialog", { "aria-modal": true, "aria-label": props["aria-label"] ?? props.title, className: ["af-modal", className].filter(Boolean).join(" "), onClick: props.onClose, ref: ref, ...props, children: _jsx("section", { className: "af-modal__content", onClick: (e) => e.stopPropagation(), children: children }) })));
|
|
6
6
|
ModalCore.displayName = "ModalCore";
|
|
7
7
|
export { ModalCore };
|
|
@@ -5,8 +5,8 @@ export const ModalCoreBody = ({ children, className, ...otherProps }) => {
|
|
|
5
5
|
const bodyRef = useRef(null);
|
|
6
6
|
const { vertical: hasVerticalScroll } = useHasScroll(bodyRef);
|
|
7
7
|
return (_jsx("main", { className: [
|
|
8
|
-
"af-
|
|
9
|
-
hasVerticalScroll ? "af-
|
|
8
|
+
"af-modal__body",
|
|
9
|
+
hasVerticalScroll ? "af-modal__body-vertical-scroll" : undefined,
|
|
10
10
|
className,
|
|
11
11
|
]
|
|
12
12
|
.filter(Boolean)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
const renderFooterButtons = (ButtonComponent, buttons) => ButtonComponent &&
|
|
3
|
-
buttons.map(([variant, props]) => Boolean(props) && (_jsx(ButtonComponent, { variant: variant, ...props, className: [props?.className, "af-
|
|
3
|
+
buttons.map(([variant, props]) => Boolean(props) && (_jsx(ButtonComponent, { variant: variant, ...props, className: [props?.className, "af-modal__footer-button"]
|
|
4
4
|
.filter(Boolean)
|
|
5
5
|
.join(" ") }, variant)));
|
|
6
|
-
export const ModalCoreFooterCommon = ({ className, buttonComponent: ButtonComponent, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, ...rest }) => (primaryButtonProps || secondaryButtonProps || tertiaryButtonProps) && (_jsx("footer", { className: ["af-
|
|
7
|
-
.filter(Boolean)
|
|
8
|
-
.join(" "), ...rest, children: renderFooterButtons(ButtonComponent, [
|
|
6
|
+
export const ModalCoreFooterCommon = ({ className, buttonComponent: ButtonComponent, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, ...rest }) => (primaryButtonProps || secondaryButtonProps || tertiaryButtonProps) && (_jsx("footer", { className: ["af-modal__footer", className].filter(Boolean).join(" "), ...rest, children: renderFooterButtons(ButtonComponent, [
|
|
9
7
|
["tertiary", tertiaryButtonProps],
|
|
10
8
|
["secondary", secondaryButtonProps],
|
|
11
9
|
["primary", primaryButtonProps],
|
|
@@ -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-
|
|
4
|
+
export const ModalCoreHeaderCommon = ({ className, headingComponent: HeadingComponent, headingProps, iconComponent: IconComponent, iconProps, onClose, closeButtonAriaLabel = "Fermer la boite de dialogue", ...props }) => (_jsxs("header", { className: ["af-modal__header", className].filter(Boolean).join(" "), ...props, children: [_jsx(ClickIcon, { className: "af-modal__header-close-btn", src: close, onClick: onClose, "aria-label": closeButtonAriaLabel }), _jsxs("div", { className: "af-modal__header-title", children: [IconComponent && iconProps ? (_jsx(IconComponent, { size: "M", ...iconProps })) : null, _jsx(HeadingComponent, { level: 2, ...headingProps })] })] }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/ProgressBar/ProgressBarApollo.scss";
|
|
2
|
-
export { ProgressBar
|
|
2
|
+
export { ProgressBar } from "./ProgressBarCommon";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
type ProgressBarProps = ComponentProps<"progress"> & {
|
|
3
|
+
label?: ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const ProgressBar:
|
|
5
|
+
export declare const ProgressBar: {
|
|
6
|
+
({ id, label, className, ...props }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
export const ProgressBar = ({
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
export const ProgressBar = ({ id, label, className, ...props }) => {
|
|
4
|
+
let inputId = useId();
|
|
5
|
+
inputId = id || inputId;
|
|
6
|
+
return (_jsxs(_Fragment, { children: [Boolean(label) && (_jsx("label", { className: "af-progress-bar__label", htmlFor: inputId, children: label })), _jsx("progress", { id: inputId, className: ["af-progress-bar", className].filter(Boolean).join(" "), ...props })] }));
|
|
6
7
|
};
|
|
8
|
+
ProgressBar.displayName = "ProgressBar";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/ProgressBar/ProgressBarLF.scss";
|
|
2
|
-
export { ProgressBar
|
|
2
|
+
export { ProgressBar } from "./ProgressBarCommon";
|
|
@@ -14,5 +14,5 @@ export const ProgressBarGroup = ({ currentStepProgress = INITIAL_STEPPER_PROGRES
|
|
|
14
14
|
}
|
|
15
15
|
return 0;
|
|
16
16
|
};
|
|
17
|
-
return (_jsx("div", { id: stepperId, role: "group", "aria-label": label, className: classNames("af-progress-bar-group", className), children: [...Array(nbSteps).keys()].map((index) => (_jsx(ProgressBarComponent, { value: getCurrentProgress(index),
|
|
17
|
+
return (_jsx("div", { id: stepperId, role: "group", "aria-label": label, className: classNames("af-progress-bar-group", className), children: [...Array(nbSteps).keys()].map((index) => (_jsx(ProgressBarComponent, { value: getCurrentProgress(index), max: MAX_STEPPER_PROGRESS, "aria-current": index === currentStep ? true : undefined }, `${stepperId}-${index}`))) }));
|
|
18
18
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentType, type HTMLAttributes } from "react";
|
|
2
|
+
import { type ItemMessageProps } from "../Form/ItemMessage/ItemMessageCommon";
|
|
2
3
|
import { ProgressBarGroupProps } from "../ProgressBarGroup/ProgressBarGroupCommon";
|
|
3
4
|
export type StepperProps = {
|
|
4
5
|
currentStepProgress?: number;
|
|
@@ -8,7 +9,8 @@ export type StepperProps = {
|
|
|
8
9
|
nbSteps?: 3 | 4 | 5 | 6 | 7 | 8;
|
|
9
10
|
helper?: string;
|
|
10
11
|
message?: string;
|
|
12
|
+
messageType?: ItemMessageProps["messageType"];
|
|
11
13
|
titleLevel?: 1 | 2 | 3;
|
|
12
14
|
ProgressBarGroupComponent: ComponentType<Omit<ProgressBarGroupProps, "ProgressBarComponent">>;
|
|
13
15
|
} & Omit<HTMLAttributes<HTMLDivElement>, "role">;
|
|
14
|
-
export declare const Stepper: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, titleLevel, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Stepper: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, messageType, titleLevel, ...props }: StepperProps) => 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 { ItemMessage } from "../Form/ItemMessage/ItemMessageCommon";
|
|
4
|
-
export const Stepper = ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, titleLevel = 2, ...props }) => {
|
|
3
|
+
import { ItemMessage, } from "../Form/ItemMessage/ItemMessageCommon";
|
|
4
|
+
export const Stepper = ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, messageType = "success", titleLevel = 2, ...props }) => {
|
|
5
5
|
const stepperId = useId();
|
|
6
6
|
const Title = `h${titleLevel}`;
|
|
7
|
-
return (_jsxs("div", { className: "af-stepper", ...props, children: [_jsxs("div", { className: "af-stepper__header", children: [_jsx(Title, { className: "af-stepper__title", "aria-describedby": stepperId, children: currentTitle }), Boolean(currentSubtitle) && (_jsx("p", { className: "af-stepper__subtitle", children: currentSubtitle }))] }), _jsx(ProgressBarGroupComponent, { label: currentTitle, className: className, currentStep: currentStep, nbSteps: nbSteps, currentStepProgress: currentStepProgress }), Boolean(helper) && _jsx("span", { className: "af-stepper__helper", children: helper }), _jsx(ItemMessage, { message: message, messageType:
|
|
7
|
+
return (_jsxs("div", { className: "af-stepper", ...props, children: [_jsxs("div", { className: "af-stepper__header", children: [_jsx(Title, { className: "af-stepper__title", "aria-describedby": stepperId, children: currentTitle }), Boolean(currentSubtitle) && (_jsx("p", { className: "af-stepper__subtitle", children: currentSubtitle }))] }), _jsx(ProgressBarGroupComponent, { label: currentTitle, className: className, currentStep: currentStep, nbSteps: nbSteps, currentStepProgress: currentStepProgress }), Boolean(helper) && _jsx("span", { className: "af-stepper__helper", children: helper }), _jsx(ItemMessage, { message: message, messageType: messageType })] }));
|
|
8
8
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,37 +2,41 @@ import "@axa-fr/design-system-apollo-css/dist/common/reboot.scss";
|
|
|
2
2
|
import "@axa-fr/design-system-apollo-css/dist/common/tokens.scss";
|
|
3
3
|
import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
4
4
|
import "@fontsource/source-sans-pro";
|
|
5
|
-
export { Accordion, type AccordionVariants,
|
|
5
|
+
export { Accordion, accordionVariants, type AccordionVariants, } from "./Accordion/AccordionApollo";
|
|
6
6
|
export { AccordionCore } from "./AccordionCore/AccordionCoreApollo";
|
|
7
|
-
export { BasePicture } from "./BasePicture/
|
|
7
|
+
export { BasePicture } from "./BasePicture/BasePicture";
|
|
8
8
|
export { Button, buttonVariants, type ButtonVariants, } from "./Button/ButtonApollo";
|
|
9
9
|
export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./CardMessage/CardMessageApollo";
|
|
10
10
|
export { ClickIcon } from "./ClickIcon/ClickIconApollo";
|
|
11
|
-
export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./List/ClickItem/ClickItemApollo";
|
|
12
11
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
|
|
13
12
|
export { DataAgent } from "./DataAgent/DataAgentApollo";
|
|
14
13
|
export { Divider } from "./Divider/DividerApollo";
|
|
15
|
-
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
|
|
16
14
|
export { CardCheckbox,
|
|
17
15
|
/** @deprecated Use `CardCheckbox` instead. */
|
|
18
16
|
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxApollo";
|
|
19
|
-
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
20
17
|
export { CardCheckboxOption } from "./Form/Checkbox/CardCheckboxOption/CardCheckboxOptionApollo";
|
|
18
|
+
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
|
|
19
|
+
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
20
|
+
export { Dropdown } from "./Form/Dropdown/DropdownApollo";
|
|
21
21
|
export { InputDate } from "./Form/InputDate/InputDateApollo";
|
|
22
|
+
export { type OptionType } from "./Form/InputPhone/InputPhone.types";
|
|
23
|
+
export { InputPhone } from "./Form/InputPhone/InputPhoneApollo";
|
|
24
|
+
export { InputText } from "./Form/InputText/InputTextApollo";
|
|
25
|
+
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomApollo";
|
|
26
|
+
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileApollo";
|
|
22
27
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
|
23
28
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
24
|
-
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileApollo";
|
|
25
|
-
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
26
|
-
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
27
|
-
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionApollo";
|
|
28
29
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioApollo";
|
|
29
|
-
export {
|
|
30
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionApollo";
|
|
31
|
+
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
32
|
+
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
30
33
|
export { DebugGrid } from "./Grid/DebugGridApollo";
|
|
31
34
|
export { Heading, type HeadingLevel } from "./Heading/HeadingApollo";
|
|
32
|
-
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomApollo";
|
|
33
35
|
export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./Icon/IconApollo";
|
|
34
36
|
export { ItemTabBar, itemTabBarVariants, type ItemTabBarVariants, } from "./ItemTabBar/ItemTabBarApollo";
|
|
37
|
+
export { Footer, type FooterProps } from "./Layout/Footer/FooterApollo";
|
|
35
38
|
export { Link, linkVariants, type LinkVariants } from "./Link/LinkApollo";
|
|
39
|
+
export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./List/ClickItem/ClickItemApollo";
|
|
36
40
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoApollo";
|
|
37
41
|
export { Message, messageVariants, type MessageVariants, } from "./Message/MessageApollo";
|
|
38
42
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalApollo";
|
|
@@ -44,7 +48,3 @@ export { Svg } from "./Svg/Svg";
|
|
|
44
48
|
export { Tag, tagVariants, type TagVariants } from "./Tag/TagApollo";
|
|
45
49
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
|
|
46
50
|
export { Toggle } from "./Toggle/ToggleApollo";
|
|
47
|
-
export { InputPhone } from "./Form/InputPhone/InputPhoneApollo";
|
|
48
|
-
export { type OptionType } from "./Form/InputPhone/InputPhone.types";
|
|
49
|
-
export { Dropdown } from "./Form/Dropdown/DropdownApollo";
|
|
50
|
-
export { Footer, type FooterProps } from "./Layout/Footer/FooterApollo";
|
package/dist/index.js
CHANGED
|
@@ -4,35 +4,38 @@ import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
|
4
4
|
import "@fontsource/source-sans-pro";
|
|
5
5
|
export { Accordion, accordionVariants, } from "./Accordion/AccordionApollo";
|
|
6
6
|
export { AccordionCore } from "./AccordionCore/AccordionCoreApollo";
|
|
7
|
-
export { BasePicture } from "./BasePicture/
|
|
7
|
+
export { BasePicture } from "./BasePicture/BasePicture";
|
|
8
8
|
export { Button, buttonVariants, } from "./Button/ButtonApollo";
|
|
9
9
|
export { CardMessage, cardMessageVariants, } from "./CardMessage/CardMessageApollo";
|
|
10
10
|
export { ClickIcon } from "./ClickIcon/ClickIconApollo";
|
|
11
|
-
export { ClickItem, clickItemStates, clickItemVariants, } from "./List/ClickItem/ClickItemApollo";
|
|
12
11
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
|
|
13
12
|
export { DataAgent } from "./DataAgent/DataAgentApollo";
|
|
14
13
|
export { Divider } from "./Divider/DividerApollo";
|
|
15
|
-
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
|
|
16
14
|
export { CardCheckbox,
|
|
17
15
|
/** @deprecated Use `CardCheckbox` instead. */
|
|
18
16
|
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxApollo";
|
|
19
|
-
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
20
17
|
export { CardCheckboxOption } from "./Form/Checkbox/CardCheckboxOption/CardCheckboxOptionApollo";
|
|
18
|
+
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
|
|
19
|
+
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
20
|
+
export { Dropdown } from "./Form/Dropdown/DropdownApollo";
|
|
21
21
|
export { InputDate } from "./Form/InputDate/InputDateApollo";
|
|
22
|
+
export { InputPhone } from "./Form/InputPhone/InputPhoneApollo";
|
|
23
|
+
export { InputText } from "./Form/InputText/InputTextApollo";
|
|
24
|
+
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomApollo";
|
|
25
|
+
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileApollo";
|
|
22
26
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
|
23
27
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
24
|
-
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileApollo";
|
|
25
|
-
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
26
|
-
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
27
|
-
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionApollo";
|
|
28
28
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioApollo";
|
|
29
|
-
export {
|
|
29
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionApollo";
|
|
30
|
+
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
31
|
+
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
30
32
|
export { DebugGrid } from "./Grid/DebugGridApollo";
|
|
31
33
|
export { Heading } from "./Heading/HeadingApollo";
|
|
32
|
-
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomApollo";
|
|
33
34
|
export { Icon, iconSizeVariants, iconVariants, } from "./Icon/IconApollo";
|
|
34
35
|
export { ItemTabBar, itemTabBarVariants, } from "./ItemTabBar/ItemTabBarApollo";
|
|
36
|
+
export { Footer } from "./Layout/Footer/FooterApollo";
|
|
35
37
|
export { Link, linkVariants } from "./Link/LinkApollo";
|
|
38
|
+
export { ClickItem, clickItemStates, clickItemVariants, } from "./List/ClickItem/ClickItemApollo";
|
|
36
39
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoApollo";
|
|
37
40
|
export { Message, messageVariants, } from "./Message/MessageApollo";
|
|
38
41
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalApollo";
|
|
@@ -44,6 +47,3 @@ export { Svg } from "./Svg/Svg";
|
|
|
44
47
|
export { Tag, tagVariants } from "./Tag/TagApollo";
|
|
45
48
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
|
|
46
49
|
export { Toggle } from "./Toggle/ToggleApollo";
|
|
47
|
-
export { InputPhone } from "./Form/InputPhone/InputPhoneApollo";
|
|
48
|
-
export { Dropdown } from "./Form/Dropdown/DropdownApollo";
|
|
49
|
-
export { Footer } from "./Layout/Footer/FooterApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -1,43 +1,46 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
1
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/common/reboot.scss";
|
|
2
3
|
import "@axa-fr/design-system-look-and-feel-css/dist/common/tokens.scss";
|
|
3
|
-
import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
4
4
|
import "@fontsource/source-sans-pro";
|
|
5
|
-
export { Accordion, type AccordionVariants,
|
|
5
|
+
export { Accordion, accordionVariants, type AccordionVariants, } from "./Accordion/AccordionLF";
|
|
6
6
|
export { AccordionCore } from "./AccordionCore/AccordionCoreLF";
|
|
7
|
-
export { BasePicture } from "./BasePicture/
|
|
7
|
+
export { BasePicture } from "./BasePicture/BasePicture";
|
|
8
8
|
export { Button, buttonVariants, type ButtonVariants } from "./Button/ButtonLF";
|
|
9
9
|
export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./CardMessage/CardMessageLF";
|
|
10
10
|
export { ClickIcon } from "./ClickIcon/ClickIconLF";
|
|
11
|
-
export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./List/ClickItem/ClickItemLF";
|
|
12
11
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
|
|
13
12
|
export { DataAgent } from "./DataAgent/DataAgentLF";
|
|
14
13
|
export { Divider } from "./Divider/DividerLF";
|
|
15
|
-
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
|
|
16
14
|
export { CardCheckbox,
|
|
17
15
|
/** @deprecated Use `CardCheckbox` instead. */
|
|
18
16
|
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
19
|
-
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
20
17
|
export { CardCheckboxOption } from "./Form/Checkbox/CardCheckboxOption/CardCheckboxOptionLF";
|
|
21
|
-
export {
|
|
18
|
+
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
|
|
19
|
+
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
20
|
+
export { Dropdown } from "./Form/Dropdown/DropdownLF";
|
|
21
|
+
export {
|
|
22
22
|
/** @deprecated Use `InputDate` instead. */
|
|
23
|
-
InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
|
|
23
|
+
InputDate as DateInput, InputDate, } from "./Form/InputDate/InputDateLF";
|
|
24
|
+
export { type OptionType } from "./Form/InputPhone/InputPhone.types";
|
|
24
25
|
export { InputPhone } from "./Form/InputPhone/InputPhoneLF";
|
|
25
|
-
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
26
|
-
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileLF";
|
|
27
|
-
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
28
|
-
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
29
|
-
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
30
|
-
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionLF";
|
|
31
|
-
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
32
26
|
export { InputText,
|
|
33
27
|
/** @deprecated Use `InputText` instead. */
|
|
34
28
|
InputText as TextInput, } from "./Form/InputText/InputTextLF";
|
|
29
|
+
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomLF";
|
|
30
|
+
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileLF";
|
|
31
|
+
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
32
|
+
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
33
|
+
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
34
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionLF";
|
|
35
|
+
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
36
|
+
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
35
37
|
export { DebugGrid } from "./Grid/DebugGridLF";
|
|
36
38
|
export { Heading, type HeadingLevel } from "./Heading/HeadingLF";
|
|
37
|
-
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomLF";
|
|
38
39
|
export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./Icon/IconLF";
|
|
39
40
|
export { ItemTabBar, itemTabBarVariants, type ItemTabBarVariants, } from "./ItemTabBar/ItemTabBarLF";
|
|
41
|
+
export { Footer, type FooterProps } from "./Layout/Footer/FooterLF";
|
|
40
42
|
export { Link, linkVariants, type LinkVariants } from "./Link/LinkLF";
|
|
43
|
+
export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./List/ClickItem/ClickItemLF";
|
|
41
44
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoLF";
|
|
42
45
|
export { Message, messageVariants, type MessageVariants, } from "./Message/MessageLF";
|
|
43
46
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalLF";
|
|
@@ -49,6 +52,3 @@ export { Svg } from "./Svg/Svg";
|
|
|
49
52
|
export { Tag, tagVariants, type TagVariants } from "./Tag/TagLF";
|
|
50
53
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
|
|
51
54
|
export { Toggle } from "./Toggle/ToggleLF";
|
|
52
|
-
export { type OptionType } from "./Form/InputPhone/InputPhone.types";
|
|
53
|
-
export { Dropdown } from "./Form/Dropdown/DropdownLF";
|
|
54
|
-
export { Footer, type FooterProps } from "./Layout/Footer/FooterLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -1,43 +1,45 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
1
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/common/reboot.scss";
|
|
2
3
|
import "@axa-fr/design-system-look-and-feel-css/dist/common/tokens.scss";
|
|
3
|
-
import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
4
4
|
import "@fontsource/source-sans-pro";
|
|
5
5
|
export { Accordion, accordionVariants, } from "./Accordion/AccordionLF";
|
|
6
6
|
export { AccordionCore } from "./AccordionCore/AccordionCoreLF";
|
|
7
|
-
export { BasePicture } from "./BasePicture/
|
|
7
|
+
export { BasePicture } from "./BasePicture/BasePicture";
|
|
8
8
|
export { Button, buttonVariants } from "./Button/ButtonLF";
|
|
9
9
|
export { CardMessage, cardMessageVariants, } from "./CardMessage/CardMessageLF";
|
|
10
10
|
export { ClickIcon } from "./ClickIcon/ClickIconLF";
|
|
11
|
-
export { ClickItem, clickItemStates, clickItemVariants, } from "./List/ClickItem/ClickItemLF";
|
|
12
11
|
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
|
|
13
12
|
export { DataAgent } from "./DataAgent/DataAgentLF";
|
|
14
13
|
export { Divider } from "./Divider/DividerLF";
|
|
15
|
-
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
|
|
16
14
|
export { CardCheckbox,
|
|
17
15
|
/** @deprecated Use `CardCheckbox` instead. */
|
|
18
16
|
CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
19
|
-
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
20
17
|
export { CardCheckboxOption } from "./Form/Checkbox/CardCheckboxOption/CardCheckboxOptionLF";
|
|
21
|
-
export {
|
|
18
|
+
export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
|
|
19
|
+
export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
20
|
+
export { Dropdown } from "./Form/Dropdown/DropdownLF";
|
|
21
|
+
export {
|
|
22
22
|
/** @deprecated Use `InputDate` instead. */
|
|
23
|
-
InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
|
|
23
|
+
InputDate as DateInput, InputDate, } from "./Form/InputDate/InputDateLF";
|
|
24
24
|
export { InputPhone } from "./Form/InputPhone/InputPhoneLF";
|
|
25
|
-
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
26
|
-
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileLF";
|
|
27
|
-
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
28
|
-
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
29
|
-
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
30
|
-
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionLF";
|
|
31
|
-
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
32
25
|
export { InputText,
|
|
33
26
|
/** @deprecated Use `InputText` instead. */
|
|
34
27
|
InputText as TextInput, } from "./Form/InputText/InputTextLF";
|
|
28
|
+
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomLF";
|
|
29
|
+
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileLF";
|
|
30
|
+
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
|
31
|
+
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
32
|
+
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
33
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionLF";
|
|
34
|
+
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
35
|
+
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
35
36
|
export { DebugGrid } from "./Grid/DebugGridLF";
|
|
36
37
|
export { Heading } from "./Heading/HeadingLF";
|
|
37
|
-
export { InputTextAtom } from "./Form/InputTextAtom/InputTextAtomLF";
|
|
38
38
|
export { Icon, iconSizeVariants, iconVariants, } from "./Icon/IconLF";
|
|
39
39
|
export { ItemTabBar, itemTabBarVariants, } from "./ItemTabBar/ItemTabBarLF";
|
|
40
|
+
export { Footer } from "./Layout/Footer/FooterLF";
|
|
40
41
|
export { Link, linkVariants } from "./Link/LinkLF";
|
|
42
|
+
export { ClickItem, clickItemStates, clickItemVariants, } from "./List/ClickItem/ClickItemLF";
|
|
41
43
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoLF";
|
|
42
44
|
export { Message, messageVariants, } from "./Message/MessageLF";
|
|
43
45
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalLF";
|
|
@@ -49,5 +51,3 @@ export { Svg } from "./Svg/Svg";
|
|
|
49
51
|
export { Tag, tagVariants } from "./Tag/TagLF";
|
|
50
52
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
|
|
51
53
|
export { Toggle } from "./Toggle/ToggleLF";
|
|
52
|
-
export { Dropdown } from "./Form/Dropdown/DropdownLF";
|
|
53
|
-
export { Footer } from "./Layout/Footer/FooterLF";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-RC.0",
|
|
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": "
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "2.0.0-RC.0",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "2.0.0-RC.0",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const BasePicture: ({ className, src, ...rest }: React.ImgHTMLAttributes<HTMLImageElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import logo from "@axa-fr/design-system-apollo-css/logo-axa.svg";
|
|
4
|
-
import { getComponentClassName } from "../utilities/getComponentClassName";
|
|
5
|
-
export const BasePicture = ({ className, src, ...rest }) => {
|
|
6
|
-
const componentClassName = useMemo(() => getComponentClassName("af-basepicture", className), [className]);
|
|
7
|
-
return (_jsx("img", { className: componentClassName, alt: "", src: src || logo, ...rest }));
|
|
8
|
-
};
|