@axa-fr/design-system-apollo-react 1.0.3-ci.138 → 1.0.5-alpha.243

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/BasePicture/BasePictureApollo.d.ts +2 -0
  2. package/dist/BasePicture/BasePictureApollo.js +2 -0
  3. package/dist/BasePicture/BasePictureCommon.d.ts +1 -0
  4. package/dist/BasePicture/BasePictureCommon.js +8 -0
  5. package/dist/BasePicture/BasePictureLF.d.ts +2 -0
  6. package/dist/BasePicture/BasePictureLF.js +2 -0
  7. package/dist/CardMessage/CardMessageApollo.d.ts +2 -0
  8. package/dist/CardMessage/CardMessageApollo.js +2 -0
  9. package/dist/CardMessage/CardMessageCommon.d.ts +14 -0
  10. package/dist/CardMessage/CardMessageCommon.js +15 -0
  11. package/dist/CardMessage/CardMessageLF.d.ts +2 -0
  12. package/dist/CardMessage/CardMessageLF.js +2 -0
  13. package/dist/ClickIcon/ClickIconApollo.d.ts +2 -0
  14. package/dist/ClickIcon/ClickIconApollo.js +2 -0
  15. package/dist/ClickIcon/ClickIconCommon.d.ts +9 -0
  16. package/dist/ClickIcon/ClickIconCommon.js +3 -0
  17. package/dist/ClickIcon/ClickIconLF.d.ts +2 -0
  18. package/dist/ClickIcon/ClickIconLF.js +2 -0
  19. package/dist/Divider/DividerApollo.d.ts +2 -0
  20. package/dist/Divider/DividerApollo.js +2 -0
  21. package/dist/Divider/DividerCommon.d.ts +6 -0
  22. package/dist/Divider/DividerCommon.js +7 -0
  23. package/dist/Divider/DividerLF.d.ts +2 -0
  24. package/dist/Divider/DividerLF.js +2 -0
  25. package/dist/Form/DateInput/DateInput.helper.d.ts +1 -0
  26. package/dist/Form/DateInput/DateInput.helper.js +20 -0
  27. package/dist/Form/DateInput/DateInputApollo.d.ts +4 -0
  28. package/dist/Form/DateInput/DateInputApollo.js +6 -0
  29. package/dist/Form/DateInput/DateInputCommon.d.ts +17 -0
  30. package/dist/Form/DateInput/DateInputCommon.js +15 -0
  31. package/dist/Form/DateInput/DateInputLF.d.ts +4 -0
  32. package/dist/Form/DateInput/DateInputLF.js +6 -0
  33. package/dist/Form/ItemLabel/ItemLabelApollo.d.ts +4 -0
  34. package/dist/Form/ItemLabel/ItemLabelApollo.js +5 -0
  35. package/dist/Form/ItemLabel/ItemLabelCommon.d.ts +16 -0
  36. package/dist/Form/ItemLabel/ItemLabelCommon.js +8 -0
  37. package/dist/Form/ItemLabel/ItemLabelLF.d.ts +4 -0
  38. package/dist/Form/ItemLabel/ItemLabelLF.js +5 -0
  39. package/dist/Form/ItemMessage/ItemMessageApollo.d.ts +2 -0
  40. package/dist/Form/ItemMessage/ItemMessageApollo.js +2 -0
  41. package/dist/Form/ItemMessage/ItemMessageCommon.d.ts +7 -0
  42. package/dist/Form/ItemMessage/ItemMessageCommon.js +10 -0
  43. package/dist/Form/ItemMessage/ItemMessageLF.d.ts +2 -0
  44. package/dist/Form/ItemMessage/ItemMessageLF.js +2 -0
  45. package/dist/Form/Select/SelectApollo.d.ts +4 -0
  46. package/dist/Form/Select/SelectApollo.js +6 -0
  47. package/dist/Form/Select/SelectCommon.d.ts +19 -0
  48. package/dist/Form/Select/SelectCommon.js +13 -0
  49. package/dist/Form/Select/SelectLF.d.ts +4 -0
  50. package/dist/Form/Select/SelectLF.js +6 -0
  51. package/dist/Form/TextArea/TextAreaApollo.d.ts +4 -0
  52. package/dist/Form/TextArea/TextAreaApollo.js +6 -0
  53. package/dist/Form/TextArea/TextAreaCommon.d.ts +18 -0
  54. package/dist/Form/TextArea/TextAreaCommon.js +13 -0
  55. package/dist/Form/TextArea/TextAreaLF.d.ts +4 -0
  56. package/dist/Form/TextArea/TextAreaLF.js +6 -0
  57. package/dist/Form/TextInput/TextInputApollo.d.ts +4 -0
  58. package/dist/Form/TextInput/TextInputApollo.js +6 -0
  59. package/dist/Form/TextInput/TextInputCommon.d.ts +15 -0
  60. package/dist/Form/TextInput/TextInputCommon.js +14 -0
  61. package/dist/Form/TextInput/TextInputLF.d.ts +4 -0
  62. package/dist/Form/TextInput/TextInputLF.js +6 -0
  63. package/dist/Icon/IconApollo.d.ts +2 -0
  64. package/dist/Icon/IconApollo.js +2 -0
  65. package/dist/Icon/IconCommon.d.ts +21 -0
  66. package/dist/Icon/IconCommon.js +28 -0
  67. package/dist/Icon/IconLF.d.ts +2 -0
  68. package/dist/Icon/IconLF.js +2 -0
  69. package/dist/Link/LinkApollo.d.ts +2 -0
  70. package/dist/Link/LinkApollo.js +2 -0
  71. package/dist/Link/LinkCommon.d.ts +17 -0
  72. package/dist/Link/LinkCommon.js +19 -0
  73. package/dist/Link/LinkLF.d.ts +2 -0
  74. package/dist/Link/LinkLF.js +2 -0
  75. package/dist/Message/MessageApollo.d.ts +2 -0
  76. package/dist/Message/MessageApollo.js +2 -0
  77. package/dist/Message/MessageCommon.d.ts +21 -0
  78. package/dist/Message/MessageCommon.js +28 -0
  79. package/dist/Message/MessageLF.d.ts +2 -0
  80. package/dist/Message/MessageLF.js +2 -0
  81. package/dist/ProgressBar/ProgressBarApollo.d.ts +2 -0
  82. package/dist/ProgressBar/ProgressBarApollo.js +2 -0
  83. package/dist/ProgressBar/ProgressBarCommon.d.ts +5 -0
  84. package/dist/ProgressBar/ProgressBarCommon.js +6 -0
  85. package/dist/ProgressBar/ProgressBarLF.d.ts +2 -0
  86. package/dist/ProgressBar/ProgressBarLF.js +2 -0
  87. package/dist/ProgressBarGroup/ProgressBarGroupApollo.d.ts +3 -0
  88. package/dist/ProgressBarGroup/ProgressBarGroupApollo.js +5 -0
  89. package/dist/ProgressBarGroup/ProgressBarGroupCommon.d.ts +11 -0
  90. package/dist/ProgressBarGroup/ProgressBarGroupCommon.js +18 -0
  91. package/dist/ProgressBarGroup/ProgressBarGroupLF.d.ts +3 -0
  92. package/dist/ProgressBarGroup/ProgressBarGroupLF.js +5 -0
  93. package/dist/Stepper/StepperApollo.d.ts +3 -0
  94. package/dist/Stepper/StepperApollo.js +5 -0
  95. package/dist/Stepper/StepperCommon.d.ts +13 -0
  96. package/dist/Stepper/StepperCommon.js +7 -0
  97. package/dist/Stepper/StepperLF.d.ts +3 -0
  98. package/dist/Stepper/StepperLF.js +5 -0
  99. package/dist/Tag/TagApollo.d.ts +2 -0
  100. package/dist/Tag/TagApollo.js +2 -0
  101. package/dist/Tag/TagCommon.d.ts +13 -0
  102. package/dist/Tag/TagCommon.js +14 -0
  103. package/dist/Tag/TagLF.d.ts +2 -0
  104. package/dist/Tag/TagLF.js +2 -0
  105. package/dist/TimelineVertical/TimelineVerticalApollo.d.ts +4 -0
  106. package/dist/TimelineVertical/TimelineVerticalApollo.js +5 -0
  107. package/dist/TimelineVertical/TimelineVerticalCommon.d.ts +7 -0
  108. package/dist/TimelineVertical/TimelineVerticalCommon.js +3 -0
  109. package/dist/TimelineVertical/TimelineVerticalLF.d.ts +4 -0
  110. package/dist/TimelineVertical/TimelineVerticalLF.js +5 -0
  111. package/dist/TimelineVertical/types.d.ts +5 -0
  112. package/dist/TimelineVertical/types.js +1 -0
  113. package/dist/Toggle/ToggleApollo.d.ts +2 -0
  114. package/dist/Toggle/ToggleApollo.js +2 -0
  115. package/dist/Toggle/ToggleCommon.d.ts +3 -0
  116. package/dist/Toggle/ToggleCommon.js +9 -0
  117. package/dist/Toggle/ToggleLF.d.ts +2 -0
  118. package/dist/Toggle/ToggleLF.js +2 -0
  119. package/dist/index.d.ts +20 -0
  120. package/dist/index.js +20 -0
  121. package/dist/indexLF.d.ts +19 -0
  122. package/dist/indexLF.js +19 -0
  123. package/dist/utilities/getComponentClassName.d.ts +1 -0
  124. package/dist/utilities/getComponentClassName.js +26 -0
  125. package/package.json +4 -4
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Link/LinkApollo.scss";
2
+ export { Link, linkVariants } from "./LinkCommon";
@@ -0,0 +1,17 @@
1
+ import { ComponentPropsWithoutRef, PropsWithChildren, type ReactNode } from "react";
2
+ export declare const linkVariants: {
3
+ readonly default: "default";
4
+ readonly underline: "underline";
5
+ readonly inverse: "inverse";
6
+ };
7
+ export type LinkVariants = keyof typeof linkVariants;
8
+ type LinkProps = {
9
+ variant?: LinkVariants;
10
+ openInNewTab?: boolean;
11
+ leftIcon?: ReactNode;
12
+ rightIcon?: ReactNode;
13
+ className?: string;
14
+ classModifier?: string;
15
+ } & ComponentPropsWithoutRef<"a">;
16
+ export declare const Link: ({ href, variant, openInNewTab, leftIcon, rightIcon, children, className, classModifier, ...props }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import openInNew from "@material-symbols/svg-400/outlined/open_in_new.svg";
3
+ import { useMemo, } from "react";
4
+ import { Svg } from "../Svg/Svg";
5
+ import { getComponentClassName } from "../utilities/getComponentClassName";
6
+ export const linkVariants = {
7
+ default: "default",
8
+ underline: "underline",
9
+ inverse: "inverse",
10
+ };
11
+ export const Link = ({ href, variant = "underline", openInNewTab = false, leftIcon, rightIcon, children, className, classModifier = "", ...props }) => {
12
+ const newTabProps = openInNewTab && {
13
+ target: "_blank",
14
+ rel: "noopener noreferrer",
15
+ };
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, (openInNewTab || Boolean(rightIcon)) &&
18
+ (rightIcon ?? _jsx(Svg, { src: openInNew }))] }));
19
+ };
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Link/LinkLF.scss";
2
+ export { Link, type LinkVariants, linkVariants } from "./LinkCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Link/LinkLF.scss";
2
+ export { Link, linkVariants } from "./LinkCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Message/MessageApollo.scss";
2
+ export { Message, messageVariants, type MessageVariants, } from "./MessageCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Message/MessageApollo.scss";
2
+ export { Message, messageVariants, } from "./MessageCommon";
@@ -0,0 +1,21 @@
1
+ import { type ComponentPropsWithoutRef, type PropsWithChildren, type ReactElement } from "react";
2
+ import { Button } from "../Button/ButtonCommon";
3
+ import { Link } from "../Link/LinkCommon";
4
+ type Headings = "h2" | "h3" | "h4" | "h5" | "h6";
5
+ export declare const messageVariants: {
6
+ readonly validation: "validation";
7
+ readonly error: "error";
8
+ readonly warning: "warning";
9
+ readonly information: "information";
10
+ readonly neutral: "neutral";
11
+ };
12
+ export type MessageVariants = keyof typeof messageVariants;
13
+ export type MessageProps = {
14
+ variant: MessageVariants;
15
+ title?: string;
16
+ action?: ReactElement<typeof Link | typeof Button>;
17
+ iconSize?: number;
18
+ heading?: Headings;
19
+ } & ComponentPropsWithoutRef<"div">;
20
+ export declare const Message: ({ variant, className, title, children, action, iconSize, heading: Heading, }: PropsWithChildren<MessageProps>) => import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import validationIcon from "@material-symbols/svg-400/outlined/check_circle-fill.svg";
3
+ import errorIcon from "@material-symbols/svg-400/outlined/error-fill.svg";
4
+ import warningIcon from "@material-symbols/svg-400/outlined/warning-fill.svg";
5
+ import neutralIcon from "@material-symbols/svg-400/outlined/info-fill.svg";
6
+ import infoIcon from "@material-symbols/svg-400/outlined/emoji_objects-fill.svg";
7
+ import { useMemo, } from "react";
8
+ import { Svg } from "../Svg/Svg";
9
+ export const messageVariants = {
10
+ validation: "validation",
11
+ error: "error",
12
+ warning: "warning",
13
+ information: "information",
14
+ neutral: "neutral",
15
+ };
16
+ const getIconFromType = (variant) => ({
17
+ [messageVariants.validation]: validationIcon,
18
+ [messageVariants.error]: errorIcon,
19
+ [messageVariants.neutral]: neutralIcon,
20
+ [messageVariants.warning]: warningIcon,
21
+ [messageVariants.information]: infoIcon,
22
+ })[variant] || infoIcon;
23
+ export const Message = ({ variant = messageVariants.information, className, title, children, action, iconSize = 24, heading: Heading = "h4", }) => {
24
+ const icon = useMemo(() => getIconFromType(variant), [variant]);
25
+ return (_jsxs("div", { className: ["af-message", `af-message--${variant}`, className]
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 && _jsx(Heading, { className: "af-message__title", children: title }), children, action && _jsx("div", { className: "af-message__action", children: action })] })] }));
28
+ };
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Message/MessageLF.scss";
2
+ export { Message, messageVariants, type MessageVariants, } from "./MessageCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Message/MessageLF.scss";
2
+ export { Message, messageVariants, } from "./MessageCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBar/ProgressBarApollo.scss";
2
+ export { ProgressBar, type ProgressBarProps } from "./ProgressBarCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBar/ProgressBarApollo.scss";
2
+ export { ProgressBar } from "./ProgressBarCommon";
@@ -0,0 +1,5 @@
1
+ export type ProgressBarProps = {
2
+ value: number;
3
+ active?: boolean;
4
+ };
5
+ export declare const ProgressBar: ({ value, active, }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const MAX_STEPPER_PROGRESS = 100;
3
+ export const ProgressBar = ({ value = MAX_STEPPER_PROGRESS, active = true, }) => {
4
+ const clampedValue = Math.max(0, Math.min(value, MAX_STEPPER_PROGRESS));
5
+ return (_jsx("div", { role: "progressbar", className: "af-progressbar", "aria-valuemin": 0, "aria-valuemax": MAX_STEPPER_PROGRESS, "aria-valuenow": clampedValue, "aria-current": active, "aria-hidden": !active, "aria-label": `Progression : ${clampedValue}%`, children: _jsx("div", { className: "af-progressbar__progress", style: { width: `${clampedValue}%` } }) }));
6
+ };
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBar/ProgressBarLF.scss";
2
+ export { ProgressBar, type ProgressBarProps } from "./ProgressBarCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBar/ProgressBarLF.scss";
2
+ export { ProgressBar } from "./ProgressBarCommon";
@@ -0,0 +1,3 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBarGroup/ProgressBarGroupApollo.scss";
2
+ import { ProgressBarGroupProps } from "./ProgressBarGroupCommon";
3
+ export declare const ProgressBarGroup: (props: Omit<ProgressBarGroupProps, "ProgressBarComponent">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBarGroup/ProgressBarGroupApollo.scss";
3
+ import { ProgressBar } from "../ProgressBar/ProgressBarApollo";
4
+ import { ProgressBarGroup as ProgressBarGroupCommon, } from "./ProgressBarGroupCommon";
5
+ export const ProgressBarGroup = (props) => _jsx(ProgressBarGroupCommon, { ...props, ProgressBarComponent: ProgressBar });
@@ -0,0 +1,11 @@
1
+ import { type ComponentProps, type ComponentType } from "react";
2
+ import { ProgressBar } from "../ProgressBar/ProgressBarCommon";
3
+ export type ProgressBarGroupProps = {
4
+ currentStepProgress?: number;
5
+ currentStep: number;
6
+ nbSteps?: 3 | 4 | 5 | 6 | 7 | 8;
7
+ label?: string;
8
+ className?: string;
9
+ ProgressBarComponent: ComponentType<ComponentProps<typeof ProgressBar>>;
10
+ };
11
+ export declare const ProgressBarGroup: ({ currentStepProgress, nbSteps, currentStep, label, className, ProgressBarComponent, }: ProgressBarGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import { useId } from "react";
4
+ const INITIAL_STEPPER_PROGRESS = 10;
5
+ const MAX_STEPPER_PROGRESS = 100;
6
+ export const ProgressBarGroup = ({ currentStepProgress = INITIAL_STEPPER_PROGRESS, nbSteps = 4, currentStep, label, className, ProgressBarComponent, }) => {
7
+ const stepperId = useId();
8
+ const getCurrentProgress = (index) => {
9
+ if (index < currentStep) {
10
+ return MAX_STEPPER_PROGRESS;
11
+ }
12
+ if (index === currentStep) {
13
+ return currentStepProgress || INITIAL_STEPPER_PROGRESS;
14
+ }
15
+ return 0;
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), active: index === currentStep }, `${stepperId}-${index}`))) }));
18
+ };
@@ -0,0 +1,3 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBarGroup/ProgressBarGroupLF.scss";
2
+ import { ProgressBarGroupProps } from "./ProgressBarGroupCommon";
3
+ export declare const ProgressBarGroup: (props: Omit<ProgressBarGroupProps, "ProgressBarComponent">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/ProgressBarGroup/ProgressBarGroupLF.scss";
3
+ import { ProgressBar } from "../ProgressBar/ProgressBarLF";
4
+ import { ProgressBarGroup as ProgressBarGroupCommon, } from "./ProgressBarGroupCommon";
5
+ export const ProgressBarGroup = (props) => _jsx(ProgressBarGroupCommon, { ...props, ProgressBarComponent: ProgressBar });
@@ -0,0 +1,3 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Stepper/StepperApollo.scss";
2
+ import { StepperProps } from "./StepperCommon";
3
+ export declare const Stepper: (props: Omit<StepperProps, "ProgressBarGroupComponent">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/Stepper/StepperApollo.scss";
3
+ import { ProgressBarGroup } from "../ProgressBarGroup/ProgressBarGroupApollo";
4
+ import { Stepper as StepperCommon } from "./StepperCommon";
5
+ export const Stepper = (props) => _jsx(StepperCommon, { ...props, ProgressBarGroupComponent: ProgressBarGroup });
@@ -0,0 +1,13 @@
1
+ import { ComponentType, HTMLAttributes } from "react";
2
+ import { ProgressBarGroupProps } from "../ProgressBarGroup/ProgressBarGroupCommon";
3
+ export type StepperProps = {
4
+ currentStepProgress?: number;
5
+ currentStep: number;
6
+ currentSubtitle?: string;
7
+ currentTitle?: string;
8
+ nbSteps?: 3 | 4 | 5 | 6 | 7 | 8;
9
+ helper?: string;
10
+ message?: string;
11
+ ProgressBarGroupComponent: ComponentType<Omit<ProgressBarGroupProps, "ProgressBarComponent">>;
12
+ } & Omit<HTMLAttributes<HTMLDivElement>, "role">;
13
+ export declare const Stepper: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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, ...props }) => {
5
+ const stepperId = useId();
6
+ return (_jsxs("div", { className: "af-stepper", ...props, children: [_jsxs("div", { className: "af-stepper__header", children: [_jsx("h2", { 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: "success" })] }));
7
+ };
@@ -0,0 +1,3 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Stepper/StepperLF.scss";
2
+ import { StepperProps } from "./StepperCommon";
3
+ export declare const Stepper: (props: Omit<StepperProps, "ProgressBarGroupComponent">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/Stepper/StepperLF.scss";
3
+ import { ProgressBarGroup } from "../ProgressBarGroup/ProgressBarGroupLF";
4
+ import { Stepper as StepperCommon } from "./StepperCommon";
5
+ export const Stepper = (props) => _jsx(StepperCommon, { ...props, ProgressBarGroupComponent: ProgressBarGroup });
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Tag/TagApollo.scss";
2
+ export { Tag, type TagVariants, tagVariants } from "./TagCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Tag/TagApollo.scss";
2
+ export { Tag, tagVariants } from "./TagCommon";
@@ -0,0 +1,13 @@
1
+ import { type ComponentProps } from "react";
2
+ export declare const tagVariants: {
3
+ readonly info: "info";
4
+ readonly success: "success";
5
+ readonly warning: "warning";
6
+ readonly error: "error";
7
+ readonly neutral: "neutral";
8
+ };
9
+ export type TagVariants = keyof typeof tagVariants;
10
+ export type TagProps = ComponentProps<"div"> & {
11
+ variant?: TagVariants;
12
+ };
13
+ export declare const Tag: ({ children, className, variant, ...divProps }: TagProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { getComponentClassName } from "../utilities/getComponentClassName";
4
+ export const tagVariants = {
5
+ info: "info",
6
+ success: "success",
7
+ warning: "warning",
8
+ error: "error",
9
+ neutral: "neutral",
10
+ };
11
+ export const Tag = ({ children, className, variant = "info", ...divProps }) => {
12
+ const componentClassName = useMemo(() => getComponentClassName("af-tag", className, variant), [className, variant]);
13
+ return (_jsx("div", { className: componentClassName, ...divProps, children: _jsx("span", { className: "af-tag__label", children: children }) }));
14
+ };
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Tag/TagLF.scss";
2
+ export { Tag, type TagVariants, tagVariants } from "./TagCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Tag/TagLF.scss";
2
+ export { Tag, tagVariants } from "./TagCommon";
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/TimelineVertical/TimelineVerticalApollo.scss";
2
+ import type { TimelineVerticalProps } from "./types";
3
+ export type { TimelineVerticalProps } from "./types";
4
+ export declare const TimelineVertical: ({ tag, tagProps, ...props }: TimelineVerticalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/TimelineVertical/TimelineVerticalApollo.scss";
3
+ import { TimelineVertical as TimelineVerticalCommon } from "./TimelineVerticalCommon";
4
+ import { Tag } from "../Tag/TagApollo";
5
+ export const TimelineVertical = ({ tag, tagProps = {}, ...props }) => (_jsx(TimelineVerticalCommon, { tag: _jsx(Tag, { ...tagProps, children: tag }), ...props }));
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren, ReactNode } from "react";
2
+ export type TimelineVerticalProps = PropsWithChildren<{
3
+ title: string;
4
+ tag: ReactNode;
5
+ className?: string;
6
+ }>;
7
+ export declare const TimelineVertical: ({ title, children, tag, className, }: TimelineVerticalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ export const TimelineVertical = ({ title, children, tag, className, }) => (_jsxs("section", { className: classNames("af-timeline-vertical", className), children: [_jsxs("header", { className: "af-timeline-vertical__header", children: [tag, _jsx("h4", { className: "af-timeline-vertical__title", children: title })] }), Boolean(children) && (_jsx("main", { className: "af-timeline-vertical__description", children: children }))] }));
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/TimelineVertical/TimelineVerticalLF.scss";
2
+ import type { TimelineVerticalProps } from "./types";
3
+ export type { TimelineVerticalProps } from "./types";
4
+ export declare const TimelineVertical: ({ tag, tagProps, ...props }: TimelineVerticalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/TimelineVertical/TimelineVerticalLF.scss";
3
+ import { TimelineVertical as TimelineVerticalCommon } from "./TimelineVerticalCommon";
4
+ import { Tag } from "../Tag/TagLF";
5
+ export const TimelineVertical = ({ tag, tagProps = {}, ...props }) => (_jsx(TimelineVerticalCommon, { tag: _jsx(Tag, { ...tagProps, children: tag }), ...props }));
@@ -0,0 +1,5 @@
1
+ import { TagProps } from "../Tag/TagCommon";
2
+ import type { TimelineVerticalProps as TimelineVerticalCommonProps } from "./TimelineVerticalCommon";
3
+ export type TimelineVerticalProps = TimelineVerticalCommonProps & {
4
+ tagProps?: Omit<TagProps, "children">;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Toggle/ToggleApollo.scss";
2
+ export { Toggle } from "./ToggleCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Toggle/ToggleApollo.scss";
2
+ export { Toggle } from "./ToggleCommon";
@@ -0,0 +1,3 @@
1
+ type ToggleProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "style" | "type">;
2
+ export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
3
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useId } from "react";
3
+ import { getComponentClassName } from "../utilities/getComponentClassName";
4
+ export const Toggle = forwardRef(({ className, ...inputProps }, ref) => {
5
+ let inputId = useId();
6
+ inputId = inputProps.id ?? inputId;
7
+ return (_jsxs("label", { className: getComponentClassName("af-toggle", className), htmlFor: inputId, children: [_jsx("div", { className: "af-toggle__root", children: _jsx("span", { className: "af-toggle__handle" }) }), _jsx("input", { ...inputProps, ref: ref, type: "checkbox", id: inputId })] }));
8
+ });
9
+ Toggle.displayName = "Toggle";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Toggle/ToggleLF.scss";
2
+ export { Toggle } from "./ToggleCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Toggle/ToggleLF.scss";
2
+ export { Toggle } from "./ToggleCommon";
package/dist/index.d.ts CHANGED
@@ -1,7 +1,27 @@
1
1
  import "@axa-fr/design-system-apollo-css/dist/common/tokens.scss";
2
+ import "@axa-fr/design-system-apollo-css/dist/common/reboot.scss";
2
3
  import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
3
4
  import "@fontsource/source-sans-pro";
4
5
  export { Button, buttonVariants, type ButtonVariants, } from "./Button/ButtonApollo";
6
+ export { Link, linkVariants, type LinkVariants } from "./Link/LinkApollo";
5
7
  export { Svg } from "./Svg/Svg";
6
8
  export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerApollo";
9
+ export { Tag, type TagVariants, tagVariants } from "./Tag/TagApollo";
7
10
  export { DebugGrid } from "./Grid/DebugGrid";
11
+ export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
12
+ export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
13
+ export { TextArea } from "./Form/TextArea/TextAreaApollo";
14
+ export { Select } from "./Form/Select/SelectApollo";
15
+ export { TextInput } from "./Form/TextInput/TextInputApollo";
16
+ export { Icon, iconVariants, type IconVariants, iconSizeVariants, type IconSizeVariants, } from "./Icon/IconApollo";
17
+ export { Divider } from "./Divider/DividerApollo";
18
+ export { ClickIcon } from "./ClickIcon/ClickIconApollo";
19
+ export { Toggle } from "./Toggle/ToggleApollo";
20
+ export { BasePicture } from "./BasePicture/BasePictureApollo";
21
+ export { Message, messageVariants, type MessageVariants, } from "./Message/MessageApollo";
22
+ export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./CardMessage/CardMessageApollo";
23
+ export { ProgressBar } from "./ProgressBar/ProgressBarApollo";
24
+ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupApollo";
25
+ export { Stepper } from "./Stepper/StepperApollo";
26
+ export { DateInput } from "./Form/DateInput/DateInputApollo";
27
+ export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
package/dist/index.js CHANGED
@@ -1,7 +1,27 @@
1
1
  import "@axa-fr/design-system-apollo-css/dist/common/tokens.scss";
2
+ import "@axa-fr/design-system-apollo-css/dist/common/reboot.scss";
2
3
  import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
3
4
  import "@fontsource/source-sans-pro";
4
5
  export { Button, buttonVariants, } from "./Button/ButtonApollo";
6
+ export { Link, linkVariants } from "./Link/LinkApollo";
5
7
  export { Svg } from "./Svg/Svg";
6
8
  export { Spinner, spinnerVariants, } from "./Spinner/SpinnerApollo";
9
+ export { Tag, tagVariants } from "./Tag/TagApollo";
7
10
  export { DebugGrid } from "./Grid/DebugGrid";
11
+ export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
12
+ export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
13
+ export { TextArea } from "./Form/TextArea/TextAreaApollo";
14
+ export { Select } from "./Form/Select/SelectApollo";
15
+ export { TextInput } from "./Form/TextInput/TextInputApollo";
16
+ export { Icon, iconVariants, iconSizeVariants, } from "./Icon/IconApollo";
17
+ export { Divider } from "./Divider/DividerApollo";
18
+ export { ClickIcon } from "./ClickIcon/ClickIconApollo";
19
+ export { Toggle } from "./Toggle/ToggleApollo";
20
+ export { BasePicture } from "./BasePicture/BasePictureApollo";
21
+ export { Message, messageVariants, } from "./Message/MessageApollo";
22
+ export { CardMessage, cardMessageVariants, } from "./CardMessage/CardMessageApollo";
23
+ export { ProgressBar } from "./ProgressBar/ProgressBarApollo";
24
+ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupApollo";
25
+ export { Stepper } from "./Stepper/StepperApollo";
26
+ export { DateInput } from "./Form/DateInput/DateInputApollo";
27
+ export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
package/dist/indexLF.d.ts CHANGED
@@ -2,6 +2,25 @@ import "@axa-fr/design-system-look-and-feel-css/dist/common/tokens.scss";
2
2
  import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
3
3
  import "@fontsource/source-sans-pro";
4
4
  export { Button, buttonVariants, type ButtonVariants } from "./Button/ButtonLF";
5
+ export { Link, linkVariants, type LinkVariants } from "./Link/LinkLF";
5
6
  export { Svg } from "./Svg/Svg";
6
7
  export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerLF";
8
+ export { Tag, type TagVariants, tagVariants } from "./Tag/TagLF";
7
9
  export { DebugGrid } from "./Grid/DebugGrid";
10
+ export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
11
+ export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
12
+ export { Select } from "./Form/Select/SelectLF";
13
+ export { TextArea } from "./Form/TextArea/TextAreaLF";
14
+ export { TextInput } from "./Form/TextInput/TextInputLF";
15
+ export { Icon, iconVariants, type IconVariants, iconSizeVariants, type IconSizeVariants, } from "./Icon/IconLF";
16
+ export { Divider } from "./Divider/DividerLF";
17
+ export { ClickIcon } from "./ClickIcon/ClickIconLF";
18
+ export { Toggle } from "./Toggle/ToggleLF";
19
+ export { BasePicture } from "./BasePicture/BasePictureLF";
20
+ export { Message, messageVariants, type MessageVariants, } from "./Message/MessageLF";
21
+ export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./CardMessage/CardMessageLF";
22
+ export { ProgressBar } from "./ProgressBar/ProgressBarLF";
23
+ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupLF";
24
+ export { Stepper } from "./Stepper/StepperLF";
25
+ export { DateInput } from "./Form/DateInput/DateInputLF";
26
+ export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
package/dist/indexLF.js CHANGED
@@ -2,6 +2,25 @@ import "@axa-fr/design-system-look-and-feel-css/dist/common/tokens.scss";
2
2
  import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
3
3
  import "@fontsource/source-sans-pro";
4
4
  export { Button, buttonVariants } from "./Button/ButtonLF";
5
+ export { Link, linkVariants } from "./Link/LinkLF";
5
6
  export { Svg } from "./Svg/Svg";
6
7
  export { Spinner, spinnerVariants, } from "./Spinner/SpinnerLF";
8
+ export { Tag, tagVariants } from "./Tag/TagLF";
7
9
  export { DebugGrid } from "./Grid/DebugGrid";
10
+ export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
11
+ export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
12
+ export { Select } from "./Form/Select/SelectLF";
13
+ export { TextArea } from "./Form/TextArea/TextAreaLF";
14
+ export { TextInput } from "./Form/TextInput/TextInputLF";
15
+ export { Icon, iconVariants, iconSizeVariants, } from "./Icon/IconLF";
16
+ export { Divider } from "./Divider/DividerLF";
17
+ export { ClickIcon } from "./ClickIcon/ClickIconLF";
18
+ export { Toggle } from "./Toggle/ToggleLF";
19
+ export { BasePicture } from "./BasePicture/BasePictureLF";
20
+ export { Message, messageVariants, } from "./Message/MessageLF";
21
+ export { CardMessage, cardMessageVariants, } from "./CardMessage/CardMessageLF";
22
+ export { ProgressBar } from "./ProgressBar/ProgressBarLF";
23
+ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupLF";
24
+ export { Stepper } from "./Stepper/StepperLF";
25
+ export { DateInput } from "./Form/DateInput/DateInputLF";
26
+ export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
@@ -0,0 +1 @@
1
+ export declare const getComponentClassName: (defaultClassName: string, className?: string, classModifier?: string) => string;
@@ -0,0 +1,26 @@
1
+ import classNames from "classnames";
2
+ const getLastClassName = (defaultClassName) => {
3
+ if (!defaultClassName) {
4
+ return null;
5
+ }
6
+ return defaultClassName.split(" ").filter(Boolean).at(-1);
7
+ };
8
+ const listClassModifier = (classModifier) => {
9
+ if (!classModifier) {
10
+ return [];
11
+ }
12
+ return classModifier.split(" ");
13
+ };
14
+ export const getComponentClassName = (defaultClassName, className, classModifier) => {
15
+ if (!defaultClassName) {
16
+ return "";
17
+ }
18
+ const classWithoutModifier = getLastClassName(defaultClassName);
19
+ const modifiers = listClassModifier(classModifier);
20
+ const modifiersObject = modifiers
21
+ .filter((it) => /\S/.test(it))
22
+ .map((it) => {
23
+ return `${classWithoutModifier}--${it}`;
24
+ });
25
+ return classNames(defaultClassName, className, modifiersObject);
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/design-system-apollo-react",
3
- "version": "1.0.3-ci.138",
3
+ "version": "1.0.5-alpha.243",
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.3-ci.138",
50
- "@axa-fr/design-system-look-and-feel-css": "*",
49
+ "@axa-fr/design-system-apollo-css": "1.0.5-alpha.243",
50
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.243",
51
51
  "@material-symbols/svg-400": ">= 0.19.0",
52
52
  "react": ">= 18"
53
53
  },
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  "dependencies": {
60
- "@fontsource/source-sans-pro": "^5.0.8",
60
+ "@fontsource/source-sans-pro": "^5.2.5",
61
61
  "@tanem/svg-injector": "^10.1.68",
62
62
  "classnames": "^2.5.1",
63
63
  "dompurify": "^3.1.5"