@axa-fr/design-system-look-and-feel-react 1.0.4 → 1.0.5-alpha.244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/AccordionTagDateContainer.d.ts +1 -1
- package/dist/Accordion/AccordionTagDateContainer.js +2 -2
- package/dist/AccordionCore/AccordionCore.js +1 -1
- package/dist/Alert/Alert.d.ts +3 -3
- package/dist/Alert/Alert.js +6 -6
- package/dist/BasePicture/BasePicture.d.ts +1 -0
- package/dist/BasePicture/BasePicture.js +1 -0
- package/dist/Button/Button.d.ts +2 -17
- package/dist/Button/Button.js +1 -15
- package/dist/Card/Card.js +1 -1
- package/dist/CardMessage/CardMessage.d.ts +1 -0
- package/dist/CardMessage/CardMessage.js +1 -0
- package/dist/ClickIcon/ClickIcon.d.ts +1 -0
- package/dist/ClickIcon/ClickIcon.js +1 -0
- package/dist/Divider/Divider.d.ts +1 -6
- package/dist/Divider/Divider.js +1 -7
- package/dist/Form/Checkbox/Checkbox.js +2 -2
- package/dist/Form/Checkbox/CheckboxSelect.d.ts +3 -3
- package/dist/Form/Checkbox/CheckboxSelect.js +5 -2
- package/dist/Form/Date/Date.d.ts +1 -0
- package/dist/Form/Date/Date.js +1 -0
- package/dist/Form/FileUpload/FileUpload.d.ts +7 -5
- package/dist/Form/FileUpload/FileUpload.js +14 -23
- package/dist/Form/ItemLabel/ItemLabel.d.ts +1 -0
- package/dist/Form/ItemLabel/ItemLabel.js +1 -0
- package/dist/Form/ItemMessage/ItemMessage.d.ts +1 -0
- package/dist/Form/ItemMessage/ItemMessage.js +1 -0
- package/dist/Form/Radio/Radio.js +2 -2
- package/dist/Form/Radio/RadioSelect.d.ts +2 -1
- package/dist/Form/Radio/RadioSelect.js +5 -2
- package/dist/Form/Select/Select.d.ts +1 -27
- package/dist/Form/Select/Select.js +1 -27
- package/dist/Form/Text/Text.d.ts +1 -13
- package/dist/Form/Text/Text.js +1 -18
- package/dist/Form/TextArea/TextArea.d.ts +1 -12
- package/dist/Form/TextArea/TextArea.js +1 -16
- package/dist/Form/core/FieldForm.d.ts +1 -1
- package/dist/Form/core/FieldForm.js +3 -2
- package/dist/Grid/DebugGrid.d.ts +1 -5
- package/dist/Grid/DebugGrid.js +1 -9
- package/dist/Icon/Icon.d.ts +1 -0
- package/dist/Icon/Icon.js +1 -0
- package/dist/IconBg/IconBg.js +1 -1
- package/dist/Layout/Header/BurgerMenu/BurgerMenu.d.ts +13 -0
- package/dist/Layout/Header/BurgerMenu/BurgerMenu.js +26 -0
- package/dist/Layout/Header/BurgerMenu/index.d.ts +1 -0
- package/dist/Layout/Header/BurgerMenu/index.js +1 -0
- package/dist/Layout/Header/Header.d.ts +6 -6
- package/dist/Layout/Header/Header.js +30 -4
- package/dist/Layout/Header/NavBar/NavBar.d.ts +3 -3
- package/dist/Layout/Header/NavBar/NavBar.js +10 -5
- package/dist/Layout/Header/PreviousLink/PreviousLink.d.ts +1 -1
- package/dist/Layout/Header/PreviousLink/PreviousLink.js +3 -1
- package/dist/Layout/Header/index.d.ts +3 -0
- package/dist/Layout/Header/index.js +3 -0
- package/dist/Link/Link.d.ts +1 -10
- package/dist/Link/Link.js +1 -14
- package/dist/List/ClickItem/ClickItem.d.ts +2 -0
- package/dist/List/ClickItem/ClickItem.js +9 -0
- package/dist/List/{ClickList/ClickItem → ClickItem}/index.d.ts +1 -0
- package/dist/List/{ClickList/ClickItem → ClickItem}/index.js +1 -0
- package/dist/List/ContentItemDuo/ContentItemDuo.d.ts +2 -1
- package/dist/List/ContentItemDuo/ContentItemDuo.js +3 -4
- package/dist/List/ContentItemMono/ContentItemMono.js +1 -1
- package/dist/List/ContentTabList/ContentTabItem/ContentTabItem.js +2 -2
- package/dist/Message/Message.d.ts +2 -0
- package/dist/Message/Message.js +1 -0
- package/dist/Modal/Modal.d.ts +12 -0
- package/dist/Modal/Modal.js +10 -0
- package/dist/Modal/ModalCore.d.ts +11 -0
- package/dist/Modal/ModalCore.js +6 -0
- package/dist/Modal/components/ModalCoreBody.d.ts +2 -0
- package/dist/Modal/components/ModalCoreBody.js +2 -0
- package/dist/Modal/components/ModalCoreFooter.d.ts +2 -0
- package/dist/Modal/components/ModalCoreFooter.js +2 -0
- package/dist/Modal/components/ModalCoreHeader.d.ts +12 -0
- package/dist/Modal/components/ModalCoreHeader.js +8 -0
- package/dist/Modal/index.d.ts +5 -0
- package/dist/Modal/index.js +5 -0
- package/dist/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/ProgressBar/ProgressBar.js +1 -0
- package/dist/ProgressBarGroup/ProgressBarGroup.d.ts +1 -0
- package/dist/ProgressBarGroup/ProgressBarGroup.js +1 -0
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/SkeletonList/SkeletonList.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts +2 -0
- package/dist/Spinner/Spinner.js +1 -0
- package/dist/Stepper/Stepper.d.ts +1 -12
- package/dist/Stepper/Stepper.js +1 -22
- package/dist/Tag/Tag.d.ts +2 -6
- package/dist/Tag/Tag.js +1 -7
- package/dist/TimelineVertical/TimelineVertical.d.ts +1 -0
- package/dist/TimelineVertical/TimelineVertical.js +1 -0
- package/dist/Title/Title.js +1 -1
- package/dist/Title/TitleWithSubtitles.d.ts +1 -1
- package/dist/Toggle/Toggle.d.ts +1 -0
- package/dist/Toggle/Toggle.js +1 -0
- package/dist/index.d.ts +27 -13
- package/dist/index.js +26 -12
- package/dist/utilities/helpers/getComponentClassName.d.ts +1 -1
- package/dist/utilities/helpers/getComponentClassName.js +6 -10
- package/package.json +38 -71
- package/dist/Divider/index.d.ts +0 -2
- package/dist/Divider/index.js +0 -2
- package/dist/Form/Select/CustomOption.d.ts +0 -4
- package/dist/Form/Select/CustomOption.js +0 -8
- package/dist/Form/Select/DropdownIndicator.d.ts +0 -4
- package/dist/Form/Select/DropdownIndicator.js +0 -11
- package/dist/Form/Select/index.d.ts +0 -1
- package/dist/Form/Select/index.js +0 -1
- package/dist/Form/Text/index.d.ts +0 -1
- package/dist/Form/Text/index.js +0 -1
- package/dist/Form/TextArea/index.d.ts +0 -2
- package/dist/Form/TextArea/index.js +0 -2
- package/dist/Grid/components/Card.d.ts +0 -3
- package/dist/Grid/components/Card.js +0 -2
- package/dist/Grid/components/Contacts.d.ts +0 -1
- package/dist/Grid/components/Contacts.js +0 -9
- package/dist/Grid/components/MainTitle.d.ts +0 -1
- package/dist/Grid/components/MainTitle.js +0 -4
- package/dist/Grid/components/MyFooter.d.ts +0 -1
- package/dist/Grid/components/MyFooter.js +0 -31
- package/dist/Grid/components/MyHeader.d.ts +0 -1
- package/dist/Grid/components/MyHeader.js +0 -9
- package/dist/Grid/components/MyList.d.ts +0 -1
- package/dist/Grid/components/MyList.js +0 -3
- package/dist/Grid/components/Offsets.d.ts +0 -1
- package/dist/Grid/components/Offsets.js +0 -7
- package/dist/Grid/renderExampleForm.d.ts +0 -1
- package/dist/Grid/renderExampleForm.js +0 -30
- package/dist/Grid/renderExamplePage.d.ts +0 -1
- package/dist/Grid/renderExamplePage.js +0 -9
- package/dist/Grid/renderWireframe.d.ts +0 -1
- package/dist/Grid/renderWireframe.js +0 -5
- package/dist/Link/index.d.ts +0 -2
- package/dist/Link/index.js +0 -2
- package/dist/List/ClickList/ClickItem/ClickItem.d.ts +0 -2
- package/dist/List/ClickList/ClickItem/ClickItem.js +0 -9
- package/dist/List/ClickList/ClickList.d.ts +0 -8
- package/dist/List/ClickList/ClickList.js +0 -4
- package/dist/List/ClickList/index.d.ts +0 -3
- package/dist/List/ClickList/index.js +0 -3
- package/dist/Loader/Loader.d.ts +0 -12
- package/dist/Loader/Loader.js +0 -11
- package/dist/Loader/index.d.ts +0 -1
- package/dist/Loader/index.js +0 -1
- package/dist/ModalClient/Modal.container.d.ts +0 -4
- package/dist/ModalClient/Modal.container.js +0 -45
- package/dist/ModalClient/Modal.d.ts +0 -4
- package/dist/ModalClient/Modal.hook.d.ts +0 -6
- package/dist/ModalClient/Modal.hook.js +0 -25
- package/dist/ModalClient/Modal.js +0 -6
- package/dist/ModalClient/index.d.ts +0 -1
- package/dist/ModalClient/index.js +0 -1
- package/dist/ModalClient/type.d.ts +0 -38
- package/dist/ModalClient/type.js +0 -1
- package/dist/Tag/index.d.ts +0 -2
- package/dist/Tag/index.js +0 -2
- /package/dist/List/{ClickList/ClickItem → ClickItem}/ClickItem.helpers.d.ts +0 -0
- /package/dist/List/{ClickList/ClickItem → ClickItem}/ClickItem.helpers.js +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
export { Icon, iconVariants, iconSizeVariants, } from "@axa-fr/design-system-apollo-react/lf";
|
package/dist/IconBg/IconBg.js
CHANGED
@@ -7,7 +7,7 @@ export const IconBg = ({ children, className, classModifier, isDisabled = false,
|
|
7
7
|
if (isDisabled) {
|
8
8
|
newClassModifier += " disabled";
|
9
9
|
}
|
10
|
-
return getComponentClassName(
|
10
|
+
return getComponentClassName("af-icon-bg", className, newClassModifier);
|
11
11
|
}, [classModifier, isDisabled, className]);
|
12
12
|
return _jsx("div", { className: componentClassName, children: children });
|
13
13
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { type ComponentPropsWithoutRef, type Dispatch, type ReactElement, type SetStateAction } from "react";
|
2
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/Layout/Header/BurgerMenu/BurgerMenu.scss";
|
3
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/Card/Card.scss";
|
4
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/List/List.scss";
|
5
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/List/ClickItem/ClickItem.scss";
|
6
|
+
type BurgerMenuProps = {
|
7
|
+
isOpen: boolean;
|
8
|
+
items: ReactElement[];
|
9
|
+
setActiveLink: Dispatch<SetStateAction<number | undefined>>;
|
10
|
+
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
11
|
+
} & ComponentPropsWithoutRef<"nav">;
|
12
|
+
declare const BurgerMenu: ({ isOpen, items, setActiveLink, setIsOpen, ...props }: BurgerMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
13
|
+
export { BurgerMenu };
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/Layout/Header/BurgerMenu/BurgerMenu.scss";
|
3
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/Card/Card.scss";
|
4
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/List/List.scss";
|
5
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/List/ClickItem/ClickItem.scss";
|
6
|
+
import classNames from "classnames";
|
7
|
+
import { ClickItem, createClickItemParent } from "../../../List/ClickItem";
|
8
|
+
const BurgerMenu = ({ isOpen, items, setActiveLink, setIsOpen, ...props }) => {
|
9
|
+
const handleOnClick = (index) => () => {
|
10
|
+
setActiveLink(index);
|
11
|
+
setIsOpen(false);
|
12
|
+
};
|
13
|
+
if (items.length === 0)
|
14
|
+
return null;
|
15
|
+
return (_jsx("nav", { role: "navigation", "aria-label": "Menu principal mobile", "aria-hidden": !isOpen, className: classNames("af-card", "af-card--list", "af-burger-menu", {
|
16
|
+
open: isOpen,
|
17
|
+
}), ...props, children: _jsx("ul", { role: "menubar", children: items.map((item, index) => {
|
18
|
+
const { key, props: itemProps, type } = item;
|
19
|
+
const { children, ...otherProps } = itemProps;
|
20
|
+
return (_jsx("li", { className: "af-list__item", role: "none", children: _jsx(ClickItem, { classModifier: "small", onClick: handleOnClick(index), parentClickComponent: createClickItemParent(type, {
|
21
|
+
...otherProps,
|
22
|
+
role: "menuitem",
|
23
|
+
}), children: children }) }, key ?? `list item ${index}`));
|
24
|
+
}) }) }));
|
25
|
+
};
|
26
|
+
export { BurgerMenu };
|
@@ -0,0 +1 @@
|
|
1
|
+
export { BurgerMenu } from "./BurgerMenu";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { BurgerMenu } from "./BurgerMenu";
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import "@axa-fr/design-system-look-and-feel-css/dist/Layout/Header/Header.scss";
|
2
|
-
import {
|
3
|
-
type HeaderProps = {
|
2
|
+
import { ComponentProps, PropsWithChildren, ReactElement, type ReactNode } from "react";
|
3
|
+
type HeaderProps = PropsWithChildren<{
|
4
4
|
defaultActiveLink?: number;
|
5
|
-
previousLink?:
|
6
|
-
rightItem?:
|
7
|
-
} &
|
8
|
-
export declare const Header: ({ children, defaultActiveLink, previousLink, rightItem, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
previousLink?: ReactNode;
|
6
|
+
rightItem?: ReactElement | ReactElement[];
|
7
|
+
} & ComponentProps<"header">>;
|
8
|
+
export declare const Header: ({ children, defaultActiveLink, previousLink, rightItem, ...props }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
9
9
|
export {};
|
@@ -1,11 +1,37 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/Layout/Header/Header.scss";
|
3
|
-
import logo from "@axa-fr/design-system-look-and-feel-css/
|
4
|
-
import { useCallback, useState } from "react";
|
3
|
+
import logo from "@axa-fr/design-system-look-and-feel-css/logo-axa.svg";
|
4
|
+
import { Children, isValidElement, useCallback, useEffect, useMemo, useState, } from "react";
|
5
|
+
import menu from "@material-symbols/svg-400/outlined/menu.svg";
|
5
6
|
import { NavBar } from "./NavBar";
|
6
7
|
import { PreviousLink } from "./PreviousLink/PreviousLink";
|
7
|
-
|
8
|
+
import { Button, IconBg, Svg } from "../..";
|
9
|
+
import { BurgerMenu } from "./BurgerMenu";
|
10
|
+
import { BREAKPOINT } from "../../utilities";
|
11
|
+
export const Header = ({ children, defaultActiveLink, previousLink, rightItem, ...props }) => {
|
8
12
|
const [activeLink, setActiveLink] = useState(defaultActiveLink);
|
13
|
+
const [isOpen, setIsOpen] = useState(false);
|
14
|
+
const toggleMenu = () => setIsOpen((prev) => !prev);
|
9
15
|
const resetActiveLink = useCallback(() => setActiveLink(defaultActiveLink), [defaultActiveLink]);
|
10
|
-
|
16
|
+
useEffect(() => {
|
17
|
+
const handleResize = () => {
|
18
|
+
if (window.innerWidth > BREAKPOINT.MD && isOpen) {
|
19
|
+
setIsOpen(false);
|
20
|
+
}
|
21
|
+
};
|
22
|
+
window.addEventListener("resize", handleResize);
|
23
|
+
return () => window.removeEventListener("resize", handleResize);
|
24
|
+
}, [isOpen]);
|
25
|
+
const burgerMenuItems = useMemo(() => {
|
26
|
+
const mapValidElements = (items) => (Children.map(items, (child) => isValidElement(child) && child) ?? []).filter(Boolean);
|
27
|
+
const validLinks = mapValidElements(children);
|
28
|
+
if (!rightItem) {
|
29
|
+
return [...validLinks];
|
30
|
+
}
|
31
|
+
if (Array.isArray(rightItem)) {
|
32
|
+
return [...validLinks, ...mapValidElements(rightItem)];
|
33
|
+
}
|
34
|
+
return [...validLinks, rightItem];
|
35
|
+
}, [children, rightItem]);
|
36
|
+
return (_jsxs(_Fragment, { children: [_jsxs("header", { className: "af-header", ...props, children: [_jsxs("div", { className: "af-header-container", children: [_jsxs("div", { className: "af-header-left-item", children: [_jsx("img", { className: "af-logo", src: logo, alt: "logo AXA" }), _jsx(NavBar, { activeLink: activeLink, setActiveLink: setActiveLink, children: children })] }), rightItem && _jsx("div", { className: "af-header-right-item", children: rightItem }), burgerMenuItems && burgerMenuItems.length > 0 && (_jsx(Button, { "aria-label": isOpen ? "Fermer le menu" : "Ouvrir le menu", onClick: toggleMenu, variant: "ghost", children: _jsx(IconBg, { children: _jsx(Svg, { src: menu, "aria-hidden": "true" }) }) }))] }), _jsx(BurgerMenu, { isOpen: isOpen, items: burgerMenuItems, setActiveLink: setActiveLink, setIsOpen: setIsOpen })] }), _jsx(PreviousLink, { handleClick: resetActiveLink, children: previousLink }), burgerMenuItems && burgerMenuItems.length > 0 && (_jsx("div", { className: `af-header-overlay ${isOpen ? "open" : ""}` }))] }));
|
11
37
|
};
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import
|
1
|
+
import { type ComponentPropsWithoutRef, type PropsWithChildren, type Dispatch, type SetStateAction } from "react";
|
2
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/Layout/Header/NavBar/NavBar.scss";
|
3
3
|
type NavBarProps = {
|
4
4
|
activeLink?: number;
|
5
|
-
setActiveLink:
|
5
|
+
setActiveLink: Dispatch<SetStateAction<number | undefined>>;
|
6
6
|
} & ComponentPropsWithoutRef<"nav">;
|
7
|
-
declare const NavBar: ({ activeLink, children, setActiveLink, ...
|
7
|
+
declare const NavBar: ({ activeLink, children, setActiveLink, ...props }: PropsWithChildren<NavBarProps>) => import("react/jsx-runtime").JSX.Element | null;
|
8
8
|
export { NavBar };
|
@@ -1,10 +1,15 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import
|
2
|
+
import { isValidElement, useMemo, Children, cloneElement, } from "react";
|
3
3
|
import "@axa-fr/design-system-look-and-feel-css/dist/Layout/Header/NavBar/NavBar.scss";
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
import classNames from "classnames";
|
5
|
+
const NavBar = ({ activeLink, children, setActiveLink, ...props }) => {
|
6
|
+
const validChildren = useMemo(() => (Children.map(children, (child) => isValidElement(child) && child) ?? []).filter((c) => Boolean(c)), [children]);
|
7
|
+
if (validChildren.length === 0)
|
8
|
+
return null;
|
9
|
+
return (_jsx("nav", { role: "navigation", "aria-label": "Menu principal", ...props, children: _jsx("ul", { className: "af-navbar-container", role: "menubar", children: Children.map(validChildren, (child, index) => (_jsx("li", { className: "af-navbar-item", role: "none", children: cloneElement(child, {
|
10
|
+
className: classNames("af-navbar-item__link", {
|
11
|
+
"af-navbar-item__link--active": index === activeLink,
|
12
|
+
}),
|
8
13
|
onClick: () => setActiveLink(index),
|
9
14
|
onFocus: () => setActiveLink(index),
|
10
15
|
role: "menuitem",
|
@@ -3,5 +3,5 @@ import { ComponentPropsWithoutRef, PropsWithChildren } from "react";
|
|
3
3
|
type PreviousLinkProps = {
|
4
4
|
handleClick: () => void;
|
5
5
|
} & ComponentPropsWithoutRef<"div">;
|
6
|
-
declare const PreviousLink: ({ handleClick, children, ...otherProps }: PropsWithChildren<PreviousLinkProps>) => import("react/jsx-runtime").JSX.Element;
|
6
|
+
declare const PreviousLink: ({ handleClick, children, ...otherProps }: PropsWithChildren<PreviousLinkProps>) => import("react/jsx-runtime").JSX.Element | null;
|
7
7
|
export { PreviousLink };
|
@@ -5,8 +5,10 @@ import React, { isValidElement, useMemo, } from "react";
|
|
5
5
|
import { Svg } from "../../../Svg";
|
6
6
|
const PreviousLink = ({ handleClick, children, ...otherProps }) => {
|
7
7
|
const validChildren = useMemo(() => (React.Children.map(children, (child) => isValidElement(child) && child) ?? []).filter((c) => Boolean(c)), [children]);
|
8
|
+
if (validChildren.length === 0)
|
9
|
+
return null;
|
8
10
|
return (_jsx("div", { className: "af-header-previous-link-container", ...otherProps, children: React.Children.map(validChildren, (child) => React.cloneElement(child, {
|
9
|
-
children: (_jsxs(_Fragment, { children: [_jsx(Svg, { src: arrowBack }), child.props.children] })),
|
11
|
+
children: (_jsxs(_Fragment, { children: [_jsx(Svg, { src: arrowBack, "aria-hidden": true }), child.props.children] })),
|
10
12
|
className: "af-btn-client af-btn-client--ghost af-btn-client--header-previous-link",
|
11
13
|
onClick: handleClick,
|
12
14
|
})) }));
|
package/dist/Link/Link.d.ts
CHANGED
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
type LinkProps = {
|
3
|
-
openInNewTab?: boolean;
|
4
|
-
leftIcon?: ReactNode;
|
5
|
-
rightIcon?: ReactNode;
|
6
|
-
className?: string;
|
7
|
-
classModifier?: string;
|
8
|
-
} & ComponentPropsWithoutRef<"a">;
|
9
|
-
export declare const Link: ({ href, openInNewTab, leftIcon, rightIcon, children, className, classModifier, ...props }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
|
10
|
-
export {};
|
1
|
+
export { Link } from "@axa-fr/design-system-apollo-react/lf";
|
package/dist/Link/Link.js
CHANGED
@@ -1,14 +1 @@
|
|
1
|
-
|
2
|
-
import openInNew from "@material-symbols/svg-400/outlined/open_in_new.svg";
|
3
|
-
import { useMemo, } from "react";
|
4
|
-
import { Svg } from "../Svg";
|
5
|
-
import { getComponentClassName } from "../utilities";
|
6
|
-
export const Link = ({ href, openInNewTab = false, leftIcon, rightIcon, children, className, classModifier = "", ...props }) => {
|
7
|
-
const newTabProps = openInNewTab && {
|
8
|
-
target: "_blank",
|
9
|
-
rel: "noopener noreferrer",
|
10
|
-
};
|
11
|
-
const componentClassName = useMemo(() => getComponentClassName(className, `${classModifier}${!className && openInNewTab ? " openInNewTab" : ""}`, "af-link"), [classModifier, className, openInNewTab]);
|
12
|
-
return (_jsxs("a", { className: componentClassName, href: href, ...newTabProps, ...props, children: [leftIcon, children, (openInNewTab || Boolean(rightIcon)) &&
|
13
|
-
(rightIcon ?? _jsx(Svg, { src: openInNew }))] }));
|
14
|
-
};
|
1
|
+
export { Link } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import chevron from "@material-symbols/svg-400/outlined/chevron_right.svg";
|
3
|
+
import { useMemo } from "react";
|
4
|
+
import { Svg } from "../../Svg";
|
5
|
+
import { getComponentClassName } from "../../utilities";
|
6
|
+
export const ClickItem = ({ children, icon, parentClickComponent: ClickComponent = ({ children: parentClickComponentChildren, ...parentClickComponentProps }) => (_jsx("button", { type: "button", ...parentClickComponentProps, children: parentClickComponentChildren })), isDisabled = false, disabled = isDisabled, className, classModifier = "", actionIcon = _jsx(Svg, { src: chevron, "aria-hidden": true }), ...otherProps }) => {
|
7
|
+
const componentClassName = useMemo(() => getComponentClassName("af-click-item", className, `${classModifier}${disabled ? " disabled" : ""}`), [className, classModifier, disabled]);
|
8
|
+
return (_jsxs(ClickComponent, { className: componentClassName, disabled: disabled, ...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
|
+
};
|
@@ -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(" ")
|
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:
|
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(" ")
|
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,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
2
|
import { Tag } from "../../..";
|
3
|
-
export const ContentTabItem = ({ title, subtitle, tag, tagProps, date, actions = [], value, isMobile = false, }) => (_jsxs(_Fragment, { children: [_jsxs("div", { className: "af-list-item__left-container", children: [Boolean(value) && (Boolean(tag) || Boolean(date)) && (_jsxs("div", { className: "af-list-item__additional-data-container", children: [Boolean(tag) && (_jsx(Tag, {
|
3
|
+
export const ContentTabItem = ({ title, subtitle, tag, tagProps, date, actions = [], value, isMobile = false, }) => (_jsxs(_Fragment, { children: [_jsxs("div", { className: "af-list-item__left-container", children: [Boolean(value) && (Boolean(tag) || Boolean(date)) && (_jsxs("div", { className: "af-list-item__additional-data-container", children: [Boolean(tag) && (_jsx(Tag, { variant: "warning", ...tagProps, children: tag })), Boolean(date) && _jsx("span", { className: "af-list-item__date", children: date })] })), _jsxs("div", { className: "af-list-item__label", children: [_jsx("span", { className: "af-list-item-label__title", children: title }), Boolean(subtitle) && (_jsx("span", { className: "af-list-item-label__subtitle", children: subtitle }))] }), !value && isMobile && (Boolean(tag) || Boolean(date)) && (_jsxs("div", { className: "af-list-item__additional-data-container", children: [Boolean(tag) && (_jsx(Tag, { variant: "warning", ...tagProps, children: tag })), Boolean(date) && _jsx("span", { className: "af-list-item__date", children: date })] }))] }), (actions.length > 0 ||
|
4
4
|
Boolean(tag) ||
|
5
5
|
Boolean(date) ||
|
6
|
-
Boolean(value)) && (_jsxs("div", { className: "af-list-item__right-container", children: [!value && (Boolean(tag) || Boolean(date)) && !isMobile && (_jsxs("div", { className: "af-list-item__additional-data-container", children: [Boolean(tag) && (_jsx(Tag, {
|
6
|
+
Boolean(value)) && (_jsxs("div", { className: "af-list-item__right-container", children: [!value && (Boolean(tag) || Boolean(date)) && !isMobile && (_jsxs("div", { className: "af-list-item__additional-data-container", children: [Boolean(tag) && (_jsx(Tag, { variant: "warning", ...tagProps, children: tag })), Boolean(date) && (_jsx("span", { className: "af-list-item__date", children: date }))] })), actions.map(({ id, component }) => (_jsx("div", { className: "af-list-item__action-container", children: component }, id))), Boolean(value) && _jsx("span", { className: "af-list-item__value", children: value })] }))] }));
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Message, messageVariants, } 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-label": 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,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";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ProgressBar } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ProgressBar } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ProgressBarGroup } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ProgressBarGroup } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -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;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Spinner, spinnerVariants, } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -1,12 +1 @@
|
|
1
|
-
|
2
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Stepper/Stepper.scss";
|
3
|
-
export type StepperProps = {
|
4
|
-
currentStepProgress?: number;
|
5
|
-
currentStep: number;
|
6
|
-
currentSubtitle?: string;
|
7
|
-
currentTitle?: string;
|
8
|
-
nbSteps: 2 | 3 | 4 | 5 | 6;
|
9
|
-
isTitleVisible?: boolean;
|
10
|
-
isSubtitleVisible?: boolean;
|
11
|
-
} & Omit<HTMLAttributes<HTMLDivElement>, "role">;
|
12
|
-
export declare const Stepper: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, isTitleVisible, isSubtitleVisible, className, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
1
|
+
export { Stepper } from "@axa-fr/design-system-apollo-react/lf";
|
package/dist/Stepper/Stepper.js
CHANGED
@@ -1,22 +1 @@
|
|
1
|
-
|
2
|
-
import { useCallback, useId } from "react";
|
3
|
-
import classNames from "classnames";
|
4
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Stepper/Stepper.scss";
|
5
|
-
const INITIAL_STEPPER_PROGRESS = 10;
|
6
|
-
const MAX_STEPPER_PROGRESS = 100;
|
7
|
-
export const Stepper = ({ currentStepProgress = INITIAL_STEPPER_PROGRESS, currentTitle, nbSteps, currentStep, currentSubtitle, isTitleVisible = true, isSubtitleVisible = true, className, ...props }) => {
|
8
|
-
const stepperId = useId();
|
9
|
-
const getCurrentProgress = useCallback((index) => {
|
10
|
-
if (index < currentStep) {
|
11
|
-
return MAX_STEPPER_PROGRESS;
|
12
|
-
}
|
13
|
-
if (index === currentStep) {
|
14
|
-
if (currentStepProgress === 0) {
|
15
|
-
return INITIAL_STEPPER_PROGRESS;
|
16
|
-
}
|
17
|
-
return currentStepProgress;
|
18
|
-
}
|
19
|
-
return 0;
|
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}`))) })] }));
|
22
|
-
};
|
1
|
+
export { Stepper } from "@axa-fr/design-system-apollo-react/lf";
|
package/dist/Tag/Tag.d.ts
CHANGED
@@ -1,6 +1,2 @@
|
|
1
|
-
|
2
|
-
type
|
3
|
-
classModifier?: string;
|
4
|
-
};
|
5
|
-
export declare const Tag: ({ children, className, classModifier, ...divProps }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
6
|
-
export {};
|
1
|
+
export { Tag, tagVariants } from "@axa-fr/design-system-apollo-react/lf";
|
2
|
+
export type { TagVariants } from "@axa-fr/design-system-apollo-react/lf";
|
package/dist/Tag/Tag.js
CHANGED
@@ -1,7 +1 @@
|
|
1
|
-
|
2
|
-
import { useMemo } from "react";
|
3
|
-
import { getComponentClassName } from "../utilities";
|
4
|
-
export const Tag = ({ children, className, classModifier = "", ...divProps }) => {
|
5
|
-
const componentClassName = useMemo(() => getComponentClassName(className, classModifier, "af-tag"), [className, classModifier]);
|
6
|
-
return (_jsx("div", { className: componentClassName, ...divProps, children: _jsx("span", { className: "af-tag__label", children: children }) }));
|
7
|
-
};
|
1
|
+
export { Tag, tagVariants } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { TimelineVertical } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { TimelineVertical } from "@axa-fr/design-system-apollo-react/lf";
|
package/dist/Title/Title.js
CHANGED
@@ -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
|
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
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Toggle } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Toggle } from "@axa-fr/design-system-apollo-react/lf";
|