@axa-fr/design-system-look-and-feel-react 1.0.5-ci.1 → 1.0.5-ci.100

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 (94) hide show
  1. package/dist/AccordionCore/AccordionCore.js +1 -1
  2. package/dist/Alert/Alert.d.ts +3 -3
  3. package/dist/Alert/Alert.js +6 -6
  4. package/dist/Button/Button.d.ts +2 -17
  5. package/dist/Button/Button.js +1 -15
  6. package/dist/Card/Card.js +1 -1
  7. package/dist/Divider/Divider.js +1 -1
  8. package/dist/Form/Checkbox/Checkbox.js +2 -2
  9. package/dist/Form/Checkbox/CheckboxSelect.d.ts +3 -3
  10. package/dist/Form/Checkbox/CheckboxSelect.js +5 -2
  11. package/dist/Form/FileUpload/FileUpload.d.ts +7 -5
  12. package/dist/Form/FileUpload/FileUpload.js +23 -22
  13. package/dist/Form/Radio/Radio.js +2 -2
  14. package/dist/Form/Radio/RadioSelect.d.ts +2 -1
  15. package/dist/Form/Radio/RadioSelect.js +5 -2
  16. package/dist/Form/Select/Select.d.ts +5 -22
  17. package/dist/Form/Select/Select.js +11 -23
  18. package/dist/Form/Text/Text.d.ts +3 -0
  19. package/dist/Form/Text/Text.js +7 -4
  20. package/dist/Form/TextArea/TextArea.js +2 -3
  21. package/dist/Form/core/FieldForm.d.ts +1 -1
  22. package/dist/Form/core/FieldForm.js +3 -2
  23. package/dist/IconBg/IconBg.js +1 -1
  24. package/dist/Layout/Header/Header.d.ts +3 -3
  25. package/dist/Layout/Header/Header.js +2 -2
  26. package/dist/Layout/Header/NavBar/NavBar.d.ts +2 -2
  27. package/dist/Layout/Header/NavBar/NavBar.js +3 -3
  28. package/dist/Link/Link.js +1 -1
  29. package/dist/List/ClickList/ClickItem/ClickItem.js +1 -1
  30. package/dist/List/ContentItemDuo/ContentItemDuo.d.ts +2 -1
  31. package/dist/List/ContentItemDuo/ContentItemDuo.js +3 -4
  32. package/dist/List/ContentItemMono/ContentItemMono.js +1 -1
  33. package/dist/Loader/Loader.d.ts +1 -12
  34. package/dist/Loader/Loader.js +1 -11
  35. package/dist/Modal/Modal.d.ts +12 -0
  36. package/dist/Modal/Modal.js +10 -0
  37. package/dist/Modal/ModalCore.d.ts +11 -0
  38. package/dist/Modal/ModalCore.js +6 -0
  39. package/dist/Modal/components/ModalCoreBody.d.ts +2 -0
  40. package/dist/Modal/components/ModalCoreBody.js +2 -0
  41. package/dist/Modal/components/ModalCoreFooter.d.ts +2 -0
  42. package/dist/Modal/components/ModalCoreFooter.js +2 -0
  43. package/dist/Modal/components/ModalCoreHeader.d.ts +12 -0
  44. package/dist/Modal/components/ModalCoreHeader.js +8 -0
  45. package/dist/Modal/index.d.ts +5 -0
  46. package/dist/Modal/index.js +5 -0
  47. package/dist/Skeleton/Skeleton.d.ts +1 -1
  48. package/dist/SkeletonList/SkeletonList.d.ts +1 -1
  49. package/dist/Stepper/Stepper.d.ts +1 -1
  50. package/dist/Stepper/Stepper.js +3 -3
  51. package/dist/Tag/Tag.js +1 -1
  52. package/dist/Title/Title.js +1 -1
  53. package/dist/Title/TitleWithSubtitles.d.ts +1 -1
  54. package/dist/index.d.ts +9 -5
  55. package/dist/index.js +8 -4
  56. package/dist/utilities/helpers/getComponentClassName.d.ts +1 -1
  57. package/dist/utilities/helpers/getComponentClassName.js +7 -8
  58. package/package.json +37 -72
  59. package/dist/Form/Select/CustomOption.d.ts +0 -4
  60. package/dist/Form/Select/CustomOption.js +0 -8
  61. package/dist/Form/Select/DropdownIndicator.d.ts +0 -4
  62. package/dist/Form/Select/DropdownIndicator.js +0 -11
  63. package/dist/Grid/components/Card.d.ts +0 -3
  64. package/dist/Grid/components/Card.js +0 -2
  65. package/dist/Grid/components/Contacts.d.ts +0 -1
  66. package/dist/Grid/components/Contacts.js +0 -9
  67. package/dist/Grid/components/MainTitle.d.ts +0 -1
  68. package/dist/Grid/components/MainTitle.js +0 -4
  69. package/dist/Grid/components/MyFooter.d.ts +0 -1
  70. package/dist/Grid/components/MyFooter.js +0 -31
  71. package/dist/Grid/components/MyHeader.d.ts +0 -1
  72. package/dist/Grid/components/MyHeader.js +0 -9
  73. package/dist/Grid/components/MyList.d.ts +0 -1
  74. package/dist/Grid/components/MyList.js +0 -3
  75. package/dist/Grid/components/Offsets.d.ts +0 -1
  76. package/dist/Grid/components/Offsets.js +0 -7
  77. package/dist/Grid/renderExampleForm.d.ts +0 -1
  78. package/dist/Grid/renderExampleForm.js +0 -30
  79. package/dist/Grid/renderExamplePage.d.ts +0 -1
  80. package/dist/Grid/renderExamplePage.js +0 -9
  81. package/dist/Grid/renderWireframe.d.ts +0 -1
  82. package/dist/Grid/renderWireframe.js +0 -5
  83. package/dist/Loader/index.d.ts +0 -1
  84. package/dist/Loader/index.js +0 -1
  85. package/dist/ModalClient/Modal.container.d.ts +0 -4
  86. package/dist/ModalClient/Modal.container.js +0 -45
  87. package/dist/ModalClient/Modal.d.ts +0 -4
  88. package/dist/ModalClient/Modal.hook.d.ts +0 -6
  89. package/dist/ModalClient/Modal.hook.js +0 -25
  90. package/dist/ModalClient/Modal.js +0 -6
  91. package/dist/ModalClient/index.d.ts +0 -1
  92. package/dist/ModalClient/index.js +0 -1
  93. package/dist/ModalClient/type.d.ts +0 -38
  94. package/dist/ModalClient/type.js +0 -1
@@ -4,6 +4,6 @@ import { useMemo } from "react";
4
4
  import { Svg } from "../../../Svg";
5
5
  import { getComponentClassName } from "../../../utilities";
6
6
  export const ClickItem = ({ children, icon, parentClickComponent: ClickComponent = ({ children: parentClickComponentChildren, ...parentClickComponentProps }) => (_jsx("button", { type: "button", ...parentClickComponentProps, children: parentClickComponentChildren })), isDisabled = false, className, classModifier = "", actionIcon = _jsx(Svg, { src: chevron, "aria-hidden": true }), ...otherProps }) => {
7
- const componentClassName = useMemo(() => getComponentClassName(className, `${classModifier}${isDisabled ? " disabled" : ""}`, "af-click-item"), [className, classModifier, isDisabled]);
7
+ const componentClassName = useMemo(() => getComponentClassName("af-click-item", className, `${classModifier}${isDisabled ? " disabled" : ""}`), [className, classModifier, isDisabled]);
8
8
  return (_jsxs(ClickComponent, { className: componentClassName, disabled: isDisabled, "aria-disabled": isDisabled, ...otherProps, children: [_jsxs("div", { className: "af-click-item__content", children: [icon && _jsx("div", { className: "af-click-item__icon", children: icon }), _jsx("div", { className: "af-click-item__label", children: children })] }), _jsx("div", { className: "af-click-item__action", children: actionIcon })] }));
9
9
  };
@@ -1,6 +1,7 @@
1
+ import { type ReactNode } from "react";
1
2
  type ContentItemDuoProps = {
2
3
  label: string;
3
- value: string;
4
+ value: ReactNode;
4
5
  isVertical?: boolean;
5
6
  className?: string;
6
7
  classModifier?: string;
@@ -2,17 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import checkIcon from "@material-symbols/svg-400/outlined/check.svg";
3
3
  import closeIcon from "@material-symbols/svg-400/outlined/close.svg";
4
4
  import { useMemo } from "react";
5
- import { Variants } from "../../Button/Button";
6
- import { getComponentClassName } from "../../utilities";
7
5
  import { Button, Svg } from "../..";
6
+ import { getComponentClassName } from "../../utilities";
8
7
  export const ContentItemDuo = ({ label, value, isVertical = false, className, classModifier, isShowingDoneIcon = false, isShowingCloseIcon = false, buttonText, onButtonClick, }) => {
9
8
  const componentClassName = useMemo(() => {
10
9
  const classModifiers = [classModifier];
11
10
  if (isVertical) {
12
11
  classModifiers.push("vertical");
13
12
  }
14
- return getComponentClassName(className, classModifiers.filter(Boolean).join(" "), "af-content-item-duo");
13
+ return getComponentClassName("af-content-item-duo", className, classModifiers.filter(Boolean).join(" "));
15
14
  }, [classModifier, className, isVertical]);
16
15
  const iconContainerModifier = useMemo(() => ` af-content-item-duo__icon--${isShowingDoneIcon ? "done" : "close"}`, [isShowingDoneIcon]);
17
- return (_jsxs("div", { className: componentClassName, children: [(isShowingDoneIcon || isShowingCloseIcon) && (_jsxs("div", { className: `af-content-item-duo__icon${iconContainerModifier}`, children: [isShowingDoneIcon && _jsx(Svg, { src: checkIcon }), isShowingCloseIcon && _jsx(Svg, { src: closeIcon })] })), _jsx("p", { className: "af-content-item-duo__label", children: label }), _jsx("p", { className: "af-content-item-duo__value", children: value }), buttonText && (_jsx("div", { className: "af-content-item-duo__button", children: _jsx(Button, { variant: Variants.ghost, onClick: onButtonClick, children: buttonText }) }))] }));
16
+ return (_jsxs("div", { className: componentClassName, children: [(isShowingDoneIcon || isShowingCloseIcon) && (_jsxs("div", { className: `af-content-item-duo__icon${iconContainerModifier}`, children: [isShowingDoneIcon && _jsx(Svg, { src: checkIcon }), isShowingCloseIcon && _jsx(Svg, { src: closeIcon })] })), _jsx("p", { className: "af-content-item-duo__label", children: label }), typeof value === "string" ? (_jsx("p", { className: "af-content-item-duo__value", children: value })) : (_jsx("div", { className: "af-content-item-duo__value", children: value })), buttonText && (_jsx("div", { className: "af-content-item-duo__button", children: _jsx(Button, { variant: "ghost", onClick: onButtonClick, children: buttonText }) }))] }));
18
17
  };
@@ -8,7 +8,7 @@ export const ContentItemMono = ({ children, className, classModifier, secondaryT
8
8
  if (isDisabled) {
9
9
  classModifiers.push("disabled");
10
10
  }
11
- return getComponentClassName(className, classModifiers.filter(Boolean).join(" "), "af-content-item-mono");
11
+ return getComponentClassName("af-content-item-mono", className, classModifiers.filter(Boolean).join(" "));
12
12
  }, [classModifier, isDisabled, size, className]);
13
13
  return (_jsxs("div", { className: componentClassName, children: [hasStick && (_jsx("div", { className: "af-content-item-mono__stick", role: "presentation" })), leftElement && (_jsx("div", { className: `af-content-item-mono__left-container${isLeftElementCentered
14
14
  ? " af-content-item-mono__left-container--center"
@@ -1,12 +1 @@
1
- import "@axa-fr/design-system-look-and-feel-css/dist/Loader/Loader.scss";
2
- type LoaderProps = {
3
- border?: number;
4
- size?: number;
5
- variant?: "blue" | "gray" | "white";
6
- text?: string;
7
- };
8
- declare const Loader: {
9
- ({ border, size, variant, text, }: LoaderProps): import("react/jsx-runtime").JSX.Element;
10
- displayName: string;
11
- };
12
- export { Loader };
1
+ export { Loader } from "@axa-fr/design-system-apollo-react/lf";
@@ -1,11 +1 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import "@axa-fr/design-system-look-and-feel-css/dist/Loader/Loader.scss";
3
- import classNames from "classnames";
4
- const Loader = ({ border = 5, size = 60, variant = "blue", text = "Chargement en cours", }) => (_jsx("div", { role: "alert", "aria-busy": true, "aria-label": text, "aria-live": "assertive", className: classNames("af-loader__container", `af-loader__container--${variant}`), style: {
5
- width: `${size}px`,
6
- height: `${size}px`,
7
- borderWidth: `${border}px`,
8
- borderTopWidth: `${border}px`,
9
- }, children: _jsx("div", { className: "af-loader__container-spin", "aria-hidden": "true" }) }));
10
- Loader.displayName = "Loader";
11
- export { Loader };
1
+ export { Loader } from "@axa-fr/design-system-apollo-react/lf";
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { type ModalCoreProps } from "./ModalCore";
3
+ import { type ModalCoreHeaderProps } from "./components/ModalCoreHeader";
4
+ export type ModalProps = Omit<ModalCoreProps, "onOutsideTap" | "title"> & ModalCoreHeaderProps & {
5
+ onSubmit?: (event: React.MouseEvent | React.KeyboardEvent) => void;
6
+ submitTitle?: string;
7
+ cancelTitle?: string;
8
+ submitDisabled?: boolean;
9
+ cancelDisabled?: boolean;
10
+ };
11
+ declare const Modal: React.ForwardRefExoticComponent<Omit<ModalProps, "ref"> & React.RefAttributes<HTMLDialogElement>>;
12
+ export { Modal };
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { ModalCore } from "./ModalCore";
4
+ import { Button } from "../Button/Button";
5
+ import { ModalCoreHeader, } from "./components/ModalCoreHeader";
6
+ import { ModalCoreBody } from "./components/ModalCoreBody";
7
+ import { ModalCoreFooter } from "./components/ModalCoreFooter";
8
+ const Modal = forwardRef(({ children, title, submitTitle, cancelTitle, className, onCancel, onSubmit, closeButtonAriaLabel, cancelDisabled, submitDisabled, subtitle, iconTitle, levelTitle, ...props }, ref) => (_jsxs(ModalCore, { className: className, onOutsideTap: onCancel, title: title, ref: ref, ...props, children: [_jsx(ModalCoreHeader, { title: title, subtitle: subtitle, iconTitle: iconTitle, levelTitle: levelTitle, onCancel: onCancel, closeButtonAriaLabel: closeButtonAriaLabel }), _jsx(ModalCoreBody, { children: children }), _jsxs(ModalCoreFooter, { children: [onCancel && cancelTitle && (_jsx(Button, { variant: "secondary", onClick: onCancel, disabled: cancelDisabled, children: cancelTitle })), onSubmit && submitTitle && (_jsx(Button, { variant: "primary", onClick: onSubmit, disabled: submitDisabled, children: submitTitle }))] })] })));
9
+ Modal.displayName = "Modal";
10
+ export { Modal };
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from "react";
2
+ import "@axa-fr/design-system-look-and-feel-css/dist/Modal/Modal.scss";
3
+ export type ModalCoreProps = React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement> & {
4
+ className?: string;
5
+ title: string;
6
+ onOutsideTap: (event: React.MouseEvent | React.KeyboardEvent) => void;
7
+ children: ReactNode;
8
+ ref?: React.Ref<HTMLDialogElement>;
9
+ };
10
+ declare const ModalCore: import("react").ForwardRefExoticComponent<Omit<ModalCoreProps, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
11
+ export { ModalCore };
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import "@axa-fr/design-system-look-and-feel-css/dist/Modal/Modal.scss";
4
+ const ModalCore = forwardRef(({ className, title = "", onOutsideTap, children, ...props }, ref) => (_jsx("dialog", { "aria-describedby": title, className: ["af-modal", className].filter(Boolean).join(" "), onClick: onOutsideTap, ref: ref, ...props, children: _jsx("div", { className: "af-modal__dialog", onClick: (e) => e.stopPropagation(), children: _jsx("div", { className: "af-modal__content", children: children }) }) })));
5
+ ModalCore.displayName = "ModalCore";
6
+ export { ModalCore };
@@ -0,0 +1,2 @@
1
+ export type ModalCoreBodyProps = React.HTMLAttributes<HTMLDivElement>;
2
+ export declare const ModalCoreBody: ({ children, className, ...otherProps }: ModalCoreBodyProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const ModalCoreBody = ({ children, className, ...otherProps }) => (_jsx("section", { className: ["af-modal__body", className].filter(Boolean).join(" "), ...otherProps, children: children }));
@@ -0,0 +1,2 @@
1
+ export type ModalCoreFooterProps = React.HTMLAttributes<HTMLDivElement>;
2
+ export declare const ModalCoreFooter: ({ className, ...rest }: ModalCoreFooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const ModalCoreFooter = ({ className, ...rest }) => (_jsx("footer", { className: ["af-modal__footer", className].filter(Boolean).join(" "), ...rest }));
@@ -0,0 +1,12 @@
1
+ import type { HTMLAttributes, MouseEvent, KeyboardEvent } from "react";
2
+ import type { TitleLevel } from "../../Title";
3
+ export type ModalCoreHeaderProps = HTMLAttributes<HTMLDivElement> & {
4
+ className?: string;
5
+ title: string;
6
+ subtitle?: string;
7
+ iconTitle?: string;
8
+ levelTitle?: TitleLevel;
9
+ onCancel: (event: MouseEvent | KeyboardEvent) => void;
10
+ closeButtonAriaLabel?: string;
11
+ };
12
+ export declare const ModalCoreHeader: ({ className, title, subtitle, iconTitle, levelTitle, onCancel, closeButtonAriaLabel, ...props }: ModalCoreHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import closeSmall from "@material-symbols/svg-400/outlined/close.svg";
3
+ import { Button } from "../../Button/Button";
4
+ import { Svg } from "../../Svg";
5
+ export const ModalCoreHeader = ({ className, title, subtitle, iconTitle, levelTitle = 2, onCancel, closeButtonAriaLabel = "Fermer la boite de dialogue", ...props }) => {
6
+ const HLevel = `h${levelTitle}`;
7
+ return (_jsxs("header", { className: ["af-modal__header", className].filter(Boolean).join(" "), ...props, children: [_jsx(Button, { variant: "ghost", iconLeft: _jsx(Svg, { src: closeSmall, width: 32, height: 32, role: "graphics-document" }), "aria-label": closeButtonAriaLabel, onClick: onCancel }), _jsxs("div", { className: "af-modal__header-title", children: [iconTitle && (_jsx(Svg, { src: iconTitle, width: 32, height: 32, role: "graphics-document" })), _jsx(HLevel, { className: "af-modal__header-title-heading", children: title }), subtitle && (_jsx("span", { className: "af-modal__header-title-subtitle", children: subtitle }))] })] }));
8
+ };
@@ -0,0 +1,5 @@
1
+ export { Modal, type ModalProps } from "./Modal";
2
+ export { ModalCore, type ModalCoreProps } from "./ModalCore";
3
+ export { ModalCoreFooter, type ModalCoreFooterProps, } from "./components/ModalCoreFooter";
4
+ export { ModalCoreHeader, type ModalCoreHeaderProps, } from "./components/ModalCoreHeader";
5
+ export { ModalCoreBody, type ModalCoreBodyProps, } from "./components/ModalCoreBody";
@@ -0,0 +1,5 @@
1
+ export { Modal } from "./Modal";
2
+ export { ModalCore } from "./ModalCore";
3
+ export { ModalCoreFooter, } from "./components/ModalCoreFooter";
4
+ export { ModalCoreHeader, } from "./components/ModalCoreHeader";
5
+ export { ModalCoreBody, } from "./components/ModalCoreBody";
@@ -16,5 +16,5 @@ export type SkeletonProps = {
16
16
  colGap?: number;
17
17
  rowGap?: number;
18
18
  } & isLoadingAndChildrenProps;
19
- export declare const Skeleton: ({ className, grid, ariaBusy, ariaLabel, maxCols, colGap, rowGap, isLoading, children, }: SkeletonProps) => string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
19
+ export declare const Skeleton: ({ className, grid, ariaBusy, ariaLabel, maxCols, colGap, rowGap, isLoading, children, }: SkeletonProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
20
20
  export {};
@@ -8,4 +8,4 @@ export type SkeletonListProps = {
8
8
  classModifierList?: ComponentPropsWithRef<typeof List>["classModifier"];
9
9
  isLoading: boolean;
10
10
  } & PropsWithChildren;
11
- export declare const SkeletonList: ({ children, isLoading, lists, classModifierList, }: SkeletonListProps) => string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element[] | null | undefined;
11
+ export declare const SkeletonList: ({ children, isLoading, lists, classModifierList, }: SkeletonListProps) => string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element[] | null | undefined;
@@ -1,5 +1,5 @@
1
- import { HTMLAttributes } from "react";
2
1
  import "@axa-fr/design-system-look-and-feel-css/dist/Stepper/Stepper.scss";
2
+ import { HTMLAttributes } from "react";
3
3
  export type StepperProps = {
4
4
  currentStepProgress?: number;
5
5
  currentStep: number;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useId } from "react";
3
- import classNames from "classnames";
4
2
  import "@axa-fr/design-system-look-and-feel-css/dist/Stepper/Stepper.scss";
3
+ import classNames from "classnames";
4
+ import { useCallback, useId } from "react";
5
5
  const INITIAL_STEPPER_PROGRESS = 10;
6
6
  const MAX_STEPPER_PROGRESS = 100;
7
7
  export const Stepper = ({ currentStepProgress = INITIAL_STEPPER_PROGRESS, currentTitle, nbSteps, currentStep, currentSubtitle, isTitleVisible = true, isSubtitleVisible = true, className, ...props }) => {
@@ -18,5 +18,5 @@ export const Stepper = ({ currentStepProgress = INITIAL_STEPPER_PROGRESS, curren
18
18
  }
19
19
  return 0;
20
20
  }, [currentStep, currentStepProgress]);
21
- return (_jsxs("div", { className: "af-stepper-client", ...props, children: [isTitleVisible && currentTitle && (_jsx("h2", { className: "af-stepper-client__title", "aria-describedby": stepperId, children: currentTitle })), isSubtitleVisible && currentSubtitle && (_jsx("p", { className: "af-stepper-client__subtitle", children: currentSubtitle })), _jsx("div", { id: stepperId, role: "group", "aria-label": currentTitle, className: classNames("af-stepper-client__content", className), children: [...Array(nbSteps).keys()].map((index) => (_jsx("div", { className: "af-stepper-client__progressbar", "aria-current": index === currentStep, "aria-hidden": index !== currentStep, "aria-label": `${getCurrentProgress(index)}%`, children: _jsx("div", { className: "af-stepper-client__progress", style: { width: `${getCurrentProgress(index)}%` } }) }, `${stepperId}-${index}`))) })] }));
21
+ return (_jsxs("div", { className: "af-stepper-client", ...props, children: [_jsxs("div", { children: [isTitleVisible && currentTitle && (_jsx("h2", { className: "af-stepper-client__title", "aria-describedby": stepperId, children: currentTitle })), isSubtitleVisible && currentSubtitle && (_jsx("p", { className: "af-stepper-client__subtitle", children: currentSubtitle }))] }), _jsx("div", { id: stepperId, role: "group", "aria-label": currentTitle, className: classNames("af-stepper-client__content", className), children: [...Array(nbSteps).keys()].map((index) => (_jsx("div", { className: "af-stepper-client__progressbar", "aria-current": index === currentStep, "aria-hidden": index !== currentStep, "aria-label": `${getCurrentProgress(index)}%`, children: _jsx("div", { className: "af-stepper-client__progress", style: { width: `${getCurrentProgress(index)}%` } }) }, `${stepperId}-${index}`))) })] }));
22
22
  };
package/dist/Tag/Tag.js CHANGED
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { getComponentClassName } from "../utilities";
4
4
  export const Tag = ({ children, className, classModifier = "", ...divProps }) => {
5
- const componentClassName = useMemo(() => getComponentClassName(className, classModifier, "af-tag"), [className, classModifier]);
5
+ const componentClassName = useMemo(() => getComponentClassName("af-tag", className, classModifier), [className, classModifier]);
6
6
  return (_jsx("div", { className: componentClassName, ...divProps, children: _jsx("span", { className: "af-tag__label", children: children }) }));
7
7
  };
@@ -5,7 +5,7 @@ import { getComponentClassName } from "../utilities";
5
5
  import { TitleSize } from "./constants";
6
6
  import { TitleWithSubtitles } from "./TitleWithSubtitles";
7
7
  export const Title = ({ children: title, className, classModifier, firstSubtitle, icon, secondSubtitle, size = TitleSize.XL, level = size === TitleSize.L ? 2 : 1, }) => {
8
- const componentClassName = useMemo(() => getComponentClassName(className, classModifier ? `${classModifier} ${size}` : size, "af-title"), [classModifier, className, size]);
8
+ const componentClassName = useMemo(() => getComponentClassName("af-title", className, classModifier ? `${classModifier} ${size}` : size), [classModifier, className, size]);
9
9
  const TitleWithSubtitlesPart = useCallback(({ ...args }) => (_jsx(TitleWithSubtitles, { title: title, firstSubtitle: firstSubtitle, level: level, ...args })), [title, firstSubtitle, level]);
10
10
  return (_jsx("header", { className: componentClassName, children: icon && size === TitleSize.XL ? (_jsxs(_Fragment, { children: [_jsx(IconBg, { className: "af-title__icon af-icon-bg", children: icon }), _jsx(TitleWithSubtitlesPart, { secondSubtitle: secondSubtitle })] })) : (_jsx(TitleWithSubtitlesPart, {})) }));
11
11
  };
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  import type { TitleLevel } from ".";
3
3
  type TitleTextProps = {
4
4
  title: ReactNode;
package/dist/index.d.ts CHANGED
@@ -4,26 +4,31 @@ export { Accordion } from "./Accordion";
4
4
  export { AccordionCore } from "./AccordionCore";
5
5
  export { Alert } from "./Alert/Alert";
6
6
  export type { AlertType } from "./Alert/Alert";
7
- export { ButtonClient as Button, Variants as ButtonVariants, } from "./Button/Button";
7
+ export { Button, buttonVariants, type ButtonVariants } from "./Button/Button";
8
8
  export { Card } from "./Card";
9
+ export { Divider } from "./Divider";
9
10
  export { Checkbox, CheckboxSelect } from "./Form/Checkbox";
10
11
  export { FileUpload } from "./Form/FileUpload";
12
+ export { InputError } from "./Form/InputError";
11
13
  export { Radio, RadioSelect } from "./Form/Radio";
12
14
  export { Select } from "./Form/Select";
13
15
  export { Text as TextInput } from "./Form/Text";
14
16
  export { TextArea } from "./Form/TextArea";
17
+ export { DebugGrid } from "./Grid/DebugGrid";
15
18
  export { IconBg } from "./IconBg";
16
19
  export { Footer } from "./Layout/Footer/Footer";
17
20
  export { Header } from "./Layout/Header";
21
+ export { NavBar } from "./Layout/Header/NavBar/NavBar";
22
+ export { PreviousLink } from "./Layout/Header/PreviousLink";
18
23
  export { Link } from "./Link";
19
24
  export { List } from "./List";
20
25
  export { ClickItem, ClickList, createClickItemParent } from "./List/ClickList";
21
26
  export { ContentItemDuo } from "./List/ContentItemDuo";
22
27
  export { ContentItemMono, ContentItemMonoSize } from "./List/ContentItemMono";
23
28
  export { ContentTabItem, ContentTabList } from "./List/ContentTabList";
24
- export { Loader } from "./Loader";
25
- export { Modal } from "./ModalClient";
26
- export type { ButtonAction as ModalButtonAction } from "./ModalClient/type";
29
+ export { Loader } from "./Loader/Loader";
30
+ export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal";
31
+ export type { ModalCoreBodyProps, ModalCoreFooterProps, ModalCoreHeaderProps, ModalCoreProps, ModalProps, } from "./Modal";
27
32
  export { Pagination } from "./Pagination/Pagination";
28
33
  export { Skeleton } from "./Skeleton/Skeleton";
29
34
  export { SkeletonList } from "./SkeletonList/SkeletonList";
@@ -32,4 +37,3 @@ export { Svg } from "./Svg";
32
37
  export { TabsClient as Tabs, Direction as TabsDirection } from "./Tabs/Tabs";
33
38
  export { Tag } from "./Tag";
34
39
  export { Title, TitleSize, type TitleLevel } from "./Title";
35
- export { DebugGrid } from "./Grid/DebugGrid";
package/dist/index.js CHANGED
@@ -3,25 +3,30 @@ import "@fontsource/source-sans-pro";
3
3
  export { Accordion } from "./Accordion";
4
4
  export { AccordionCore } from "./AccordionCore";
5
5
  export { Alert } from "./Alert/Alert";
6
- export { ButtonClient as Button, Variants as ButtonVariants, } from "./Button/Button";
6
+ export { Button, buttonVariants } from "./Button/Button";
7
7
  export { Card } from "./Card";
8
+ export { Divider } from "./Divider";
8
9
  export { Checkbox, CheckboxSelect } from "./Form/Checkbox";
9
10
  export { FileUpload } from "./Form/FileUpload";
11
+ export { InputError } from "./Form/InputError";
10
12
  export { Radio, RadioSelect } from "./Form/Radio";
11
13
  export { Select } from "./Form/Select";
12
14
  export { Text as TextInput } from "./Form/Text";
13
15
  export { TextArea } from "./Form/TextArea";
16
+ export { DebugGrid } from "./Grid/DebugGrid";
14
17
  export { IconBg } from "./IconBg";
15
18
  export { Footer } from "./Layout/Footer/Footer";
16
19
  export { Header } from "./Layout/Header";
20
+ export { NavBar } from "./Layout/Header/NavBar/NavBar";
21
+ export { PreviousLink } from "./Layout/Header/PreviousLink";
17
22
  export { Link } from "./Link";
18
23
  export { List } from "./List";
19
24
  export { ClickItem, ClickList, createClickItemParent } from "./List/ClickList";
20
25
  export { ContentItemDuo } from "./List/ContentItemDuo";
21
26
  export { ContentItemMono, ContentItemMonoSize } from "./List/ContentItemMono";
22
27
  export { ContentTabItem, ContentTabList } from "./List/ContentTabList";
23
- export { Loader } from "./Loader";
24
- export { Modal } from "./ModalClient";
28
+ export { Loader } from "./Loader/Loader";
29
+ export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal";
25
30
  export { Pagination } from "./Pagination/Pagination";
26
31
  export { Skeleton } from "./Skeleton/Skeleton";
27
32
  export { SkeletonList } from "./SkeletonList/SkeletonList";
@@ -30,4 +35,3 @@ export { Svg } from "./Svg";
30
35
  export { TabsClient as Tabs, Direction as TabsDirection } from "./Tabs/Tabs";
31
36
  export { Tag } from "./Tag";
32
37
  export { Title, TitleSize } from "./Title";
33
- export { DebugGrid } from "./Grid/DebugGrid";
@@ -1 +1 @@
1
- export declare const getComponentClassName: (className?: string, classModifier?: string, defaultClassName?: string) => string;
1
+ export declare const getComponentClassName: (defaultClassName: string, className?: string, classModifier?: string) => string;
@@ -1,9 +1,9 @@
1
1
  import classNames from "classnames";
2
- const getLastClassName = (classNameToUse) => {
3
- if (!classNameToUse) {
2
+ const getLastClassName = (defaultClassName) => {
3
+ if (!defaultClassName) {
4
4
  return null;
5
5
  }
6
- return classNameToUse.split(" ").filter(Boolean).at(-1);
6
+ return defaultClassName.split(" ").filter(Boolean).at(-1);
7
7
  };
8
8
  const listClassModifier = (classModifier) => {
9
9
  if (!classModifier) {
@@ -11,17 +11,16 @@ const listClassModifier = (classModifier) => {
11
11
  }
12
12
  return classModifier.split(" ");
13
13
  };
14
- export const getComponentClassName = (className, classModifier, defaultClassName) => {
15
- const classNameToUse = className || defaultClassName;
16
- if (!classNameToUse) {
14
+ export const getComponentClassName = (defaultClassName, className, classModifier) => {
15
+ if (!defaultClassName) {
17
16
  return "";
18
17
  }
19
- const classWithoutModifier = getLastClassName(classNameToUse);
18
+ const classWithoutModifier = getLastClassName(defaultClassName);
20
19
  const modifiers = listClassModifier(classModifier);
21
20
  const modifiersObject = modifiers
22
21
  .filter((it) => /\S/.test(it))
23
22
  .map((it) => {
24
23
  return `${classWithoutModifier}--${it}`;
25
24
  });
26
- return classNames(classNameToUse, modifiersObject);
25
+ return classNames(defaultClassName, className, modifiersObject);
27
26
  };
package/package.json CHANGED
@@ -1,15 +1,27 @@
1
1
  {
2
2
  "name": "@axa-fr/design-system-look-and-feel-react",
3
- "version": "1.0.5-ci.1",
3
+ "version": "1.0.5-ci.100",
4
4
  "description": "",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
5
7
  "exports": {
6
8
  ".": {
7
- "import": "./dist/index.js",
8
- "types": "./dist/index.d.ts"
9
+ "development": {
10
+ "import": "./src/index.ts"
11
+ },
12
+ "default": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
9
16
  },
10
17
  "./utilities": {
11
- "import": "./dist/utilities.js",
12
- "types": "./dist/utilities.d.ts"
18
+ "development": {
19
+ "import": "./src/utilities.ts"
20
+ },
21
+ "default": {
22
+ "import": "./dist/utilities.js",
23
+ "types": "./dist/utilities.d.ts"
24
+ }
13
25
  }
14
26
  },
15
27
  "files": [
@@ -19,18 +31,15 @@
19
31
  "prebuild": "rimraf dist",
20
32
  "build": "tsc -p tsconfig.build.json",
21
33
  "postbuild": "copyfiles --up 1 \"src/assets/svg/*.svg\" ./dist/",
22
- "start:storybook": "storybook dev -p 6009",
23
- "build:storybook": "storybook build",
24
- "build-storybook": "storybook build",
34
+ "dev": "tsc -p tsconfig.build.json --watch",
25
35
  "eslint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
26
36
  "eslint:fix": "eslint src --ext js,jsx,ts,tsx --fix",
27
37
  "prettier": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --check",
28
38
  "prettier:fix": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --write",
29
- "tsc": "tsc --noEmit",
39
+ "check-types": "tsc --noEmit",
30
40
  "test": "vitest",
31
41
  "test:ui": "vitest --ui",
32
- "test:ci": "vitest run --coverage",
33
- "chromatic": "npx chromatic"
42
+ "test:ci": "vitest run --coverage"
34
43
  },
35
44
  "repository": {
36
45
  "type": "git",
@@ -45,7 +54,7 @@
45
54
  },
46
55
  "homepage": "https://github.com/AxaFrance/design-system#readme",
47
56
  "peerDependencies": {
48
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.1",
57
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.100",
49
58
  "@material-symbols/svg-400": ">= 0.19.0",
50
59
  "react": ">= 18"
51
60
  },
@@ -55,74 +64,30 @@
55
64
  }
56
65
  },
57
66
  "dependencies": {
67
+ "@axa-fr/design-system-apollo-react": "*",
58
68
  "@fontsource/source-sans-pro": "^5.0.8",
59
69
  "@tanem/svg-injector": "^10.1.68",
60
- "@types/react-dom": "^18.2.24",
61
70
  "classnames": "^2.5.1",
62
71
  "dompurify": "^3.1.5",
63
- "rc-slider": "^11.1.7",
64
- "react-select": "^5.9.0"
65
- },
66
- "devDependencies": {
67
- "@chromatic-com/storybook": "^1.9.0",
68
- "@material-symbols/svg-400": "*",
69
- "@storybook/addon-docs": "^8.3.5",
70
- "@storybook/addon-essentials": "^8.3.5",
71
- "@storybook/addon-interactions": "^8.3.5",
72
- "@storybook/addon-links": "^8.3.5",
73
- "@storybook/addon-mdx-gfm": "^8.3.5",
74
- "@storybook/addon-onboarding": "^8.3.5",
75
- "@storybook/blocks": "^8.3.5",
76
- "@storybook/manager-api": "^8.3.5",
77
- "@storybook/react": "^8.3.5",
78
- "@storybook/react-vite": "^8.3.5",
79
- "@storybook/test": "^8.3.5",
80
- "@storybook/theming": "^8.3.5",
81
- "@testing-library/dom": "^10.1.0",
82
- "@testing-library/jest-dom": "^6.5.0",
83
- "@testing-library/react": "^15.0.7",
84
- "@testing-library/user-event": "^14.5.2",
85
- "@types/dompurify": "^3.0.5",
86
- "@types/jest": "^29.5.12",
87
- "@types/jest-axe": "^3.5.9",
88
- "@types/node": "^20.14.9",
89
- "@types/react": "^18.3.2",
90
- "@typescript-eslint/eslint-plugin": "^8.17.0",
91
- "@typescript-eslint/parser": "^8.17.0",
92
- "@vitejs/plugin-react": "^4.3.1",
93
- "@vitest/coverage-v8": "^2.0.5",
94
- "@vitest/ui": "^2.1.2",
95
- "chromatic": "^11.12.0",
96
- "copyfiles": "^2.4.1",
97
- "eslint": "^8.57.0",
98
- "eslint-config-airbnb": "^19.0.4",
99
- "eslint-config-prettier": "^9.1.0",
100
- "eslint-import-resolver-typescript": "^3.6.1",
101
- "eslint-plugin-import": "^2.29.1",
102
- "eslint-plugin-jsx-a11y": "^6.8.0",
103
- "eslint-plugin-prettier": "^5.1.3",
104
- "eslint-plugin-react": "^7.36.1",
105
- "eslint-plugin-react-hooks": "^4.6.0",
106
- "eslint-plugin-storybook": "^0.9.0",
107
- "jest-axe": "^8.0.0",
108
- "jsdom": "^25.0.1",
109
- "prettier": "^3.3.3",
110
- "prop-types": "^15.8.1",
111
- "react": "^18.3.1",
112
- "react-dom": "^18.2.0",
113
- "rimraf": "^6.0.1",
114
- "storybook": "^8.3.5",
115
- "tsc-files": "^1.1.4",
116
- "typescript": "^5.6.3",
117
- "vitest": "^2.0.5"
72
+ "rc-slider": "^11.1.7"
118
73
  },
119
74
  "lint-staged": {
120
75
  "*.(js|jsx|ts|tsx)": "eslint --fix",
121
- "*.(ts|tsx)": "tsc-files --noEmit",
122
- "*.mdx": "prettier --write"
76
+ "*.(ts|tsx)": "tsc-files --noEmit"
123
77
  },
124
78
  "volta": {
125
- "node": "20.10.0",
126
- "npm": "10.2.5"
79
+ "extends": "../../../package.json"
80
+ },
81
+ "devDependencies": {
82
+ "@testing-library/dom": "^10.4.0",
83
+ "@testing-library/jest-dom": "^6.6.3",
84
+ "@testing-library/react": "^16.2.0",
85
+ "@testing-library/user-event": "^14.6.1",
86
+ "@types/jest": "^29.5.14",
87
+ "@types/jest-axe": "^3.5.9",
88
+ "@vitest/coverage-v8": "^3.0.7",
89
+ "@vitest/ui": "^3.0.7",
90
+ "jest-axe": "^9.0.0",
91
+ "vitest": "^3.0.7"
127
92
  }
128
93
  }
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { OptionProps } from "react-select";
3
- declare const CustomOption: React.FC<OptionProps>;
4
- export { CustomOption };
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useMemo } from "react";
3
- import { components } from "react-select";
4
- const CustomOption = ({ getValue, ...otherProps }) => {
5
- const value = useMemo(() => getValue(), [getValue]);
6
- return (_jsx(components.Option, { ...otherProps, getValue: getValue, "data-value": value }));
7
- };
8
- export { CustomOption };
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { DropdownIndicatorProps } from "react-select";
3
- declare const DropdownIndicator: React.FC<DropdownIndicatorProps>;
4
- export { DropdownIndicator };
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import arrowDropDown from "@material-symbols/svg-400/outlined/arrow_drop_down.svg";
3
- import arrowDropUp from "@material-symbols/svg-400/outlined/arrow_drop_up.svg";
4
- import { components } from "react-select";
5
- import classNames from "classnames";
6
- import { Svg } from "../../Svg";
7
- const DropdownIndicator = (props) => {
8
- const { selectProps: { menuIsOpen, isDisabled }, } = props;
9
- return (_jsx(components.DropdownIndicator, { ...props, children: _jsx(Svg, { src: menuIsOpen ? arrowDropUp : arrowDropDown, className: classNames(isDisabled && "af-form__input-select-container-icon-disabled") }) }));
10
- };
11
- export { DropdownIndicator };
@@ -1,3 +0,0 @@
1
- export declare const Card: ({ title }: {
2
- title: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const Card = ({ title }) => (_jsxs("div", { className: "box-card", children: [_jsx("h3", { children: title }), _jsx("p", { children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint voluptatibus dolor ratione, ab natus reprehenderit itaque corporis officia ad necessitatibus enim et voluptatem reiciendis rem optio laudantium iure esse vero." })] }));
@@ -1 +0,0 @@
1
- export declare const Contacts: () => import("react/jsx-runtime").JSX.Element[];
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import callIcon from "@material-symbols/svg-400/outlined/call-fill.svg";
3
- import mailIcon from "@material-symbols/svg-400/outlined/mail-fill.svg";
4
- import { List, Svg, ContentItemMono, ClickItem, createClickItemParent, } from "../..";
5
- export const Contacts = () => [...Array(6).keys()].map((_, index) => (_jsxs(List, { classModifier: "first-separator-full-width", children: [_jsx(ContentItemMono, { secondaryText: "agent g\u00E9n\u00E9ral", tertiaryText: "Doe", children: "John Doe" }), index % 3 === 0 && (_jsx(ClickItem, { icon: _jsx(Svg, { src: callIcon, "aria-hidden": true }), classModifier: "small", parentClickComponent: createClickItemParent("a", {
6
- href: `tel:0601010101`,
7
- }), children: "06 01 01 01 01" })), _jsx(ClickItem, { icon: _jsx(Svg, { src: mailIcon, "aria-hidden": true }), classModifier: "small", parentClickComponent: createClickItemParent("a", {
8
- href: `mailto:john.doe@axa.fr`,
9
- }), children: "john.doe@axa.fr" })] }, "John Doe-agent")));
@@ -1 +0,0 @@
1
- export declare const MainTitle: () => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import article from "@material-symbols/svg-400/outlined/article-fill.svg";
3
- import { Svg, Title } from "../..";
4
- export const MainTitle = () => (_jsx(Title, { icon: _jsx(Svg, { src: article, "aria-hidden": true }), firstSubtitle: "Sous Titre 1", secondSubtitle: "Sous Titre 2", children: "Titre de la page" }));
@@ -1 +0,0 @@
1
- export declare const MyFooter: () => import("react/jsx-runtime").JSX.Element;