@axa-fr/canopee-react 1.6.1-alpha.5 → 1.6.1-alpha.6
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/distributeur/Accordion/Accordion.js +8 -5
- package/dist/distributeur/Accordion/CollapseCard.d.ts +1 -0
- package/dist/distributeur/Accordion/CollapseCard.js +6 -2
- package/dist/distributeur/Accordion/Header.d.ts +1 -0
- package/dist/distributeur/Accordion/Header.js +6 -2
- package/dist/distributeur/Action/Action.d.ts +1 -0
- package/dist/distributeur/Action/Action.js +7 -2
- package/dist/distributeur/Form/Checkbox/CheckboxItem.d.ts +2 -0
- package/dist/distributeur/Form/Checkbox/CheckboxItem.js +2 -2
- package/dist/distributeur/Form/Choice/Choice.d.ts +1 -0
- package/dist/distributeur/Form/Date/Date.d.ts +1 -0
- package/dist/distributeur/Form/Date/Date.js +6 -2
- package/dist/distributeur/Form/File/File.d.ts +1 -0
- package/dist/distributeur/Form/File/File.js +6 -2
- package/dist/distributeur/Form/Number/Number.d.ts +1 -0
- package/dist/distributeur/Form/Number/Number.js +6 -2
- package/dist/distributeur/Form/Pass/Pass.d.ts +3 -0
- package/dist/distributeur/Form/Pass/Pass.js +3 -0
- package/dist/distributeur/Form/Pass/PassInput.d.ts +3 -0
- package/dist/distributeur/Form/Pass/PassInput.js +3 -0
- package/dist/distributeur/Form/Radio/RadioItem.d.ts +1 -0
- package/dist/distributeur/Form/Select/SelectBase.d.ts +1 -0
- package/dist/distributeur/Form/Select/SelectBase.js +6 -2
- package/dist/distributeur/Form/Slider/Slider.d.ts +1 -0
- package/dist/distributeur/Form/Slider/Slider.js +6 -2
- package/dist/distributeur/Form/Text/Text.d.ts +1 -0
- package/dist/distributeur/Form/Text/Text.js +6 -2
- package/dist/distributeur/Form/Textarea/Textarea.d.ts +1 -0
- package/dist/distributeur/Form/Textarea/Textarea.js +6 -2
- package/dist/distributeur/Form/core/getOptionClassName.d.ts +1 -1
- package/dist/distributeur/Form/core/getOptionClassName.js +11 -9
- package/dist/distributeur/HelpButton/index.js +6 -2
- package/dist/distributeur/Layout/Header/Header.d.ts +1 -0
- package/dist/distributeur/Layout/Header/Header.js +6 -2
- package/dist/distributeur/Layout/Header/Infos/Infos.d.ts +1 -0
- package/dist/distributeur/Layout/Header/Infos/Infos.js +6 -2
- package/dist/distributeur/Layout/Header/Name/Name.d.ts +1 -0
- package/dist/distributeur/Layout/Header/Name/Name.js +6 -2
- package/dist/distributeur/Layout/Header/NavBar/NavBarBase.d.ts +1 -0
- package/dist/distributeur/Layout/Header/NavBar/NavBarBase.js +6 -2
- package/dist/distributeur/Layout/Header/User/User.d.ts +1 -0
- package/dist/distributeur/Layout/Header/User/User.js +6 -2
- package/dist/distributeur/Loader/Loader.d.ts +1 -0
- package/dist/distributeur/Loader/Loader.js +6 -2
- package/dist/distributeur/Messages/Message.js +5 -5
- package/dist/distributeur/ModalAgent/components/Body.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/Body.js +6 -2
- package/dist/distributeur/ModalAgent/components/Footer.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/Footer.js +6 -2
- package/dist/distributeur/ModalAgent/components/Header.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/Header.js +7 -2
- package/dist/distributeur/ModalAgent/components/HeaderBase.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/HeaderBase.js +6 -2
- package/dist/distributeur/Popover/AnimatedPopover.d.ts +1 -0
- package/dist/distributeur/Popover/AnimatedPopover.js +6 -2
- package/dist/distributeur/Popover/Popover.d.ts +1 -0
- package/dist/distributeur/Popover/Popover.types.d.ts +2 -0
- package/dist/distributeur/Popover/PopoverBase.d.ts +1 -0
- package/dist/distributeur/Popover/PopoverBase.js +1 -2
- package/dist/distributeur/Restitution/ArticleRestitution.d.ts +1 -0
- package/dist/distributeur/Restitution/ArticleRestitution.js +6 -2
- package/dist/distributeur/Restitution/HeaderRestitution.d.ts +1 -0
- package/dist/distributeur/Restitution/HeaderRestitution.js +6 -2
- package/dist/distributeur/Restitution/Restitution.d.ts +3 -1
- package/dist/distributeur/Restitution/Restitution.js +7 -3
- package/dist/distributeur/Restitution/SectionRestitution.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitution.js +6 -2
- package/dist/distributeur/Restitution/SectionRestitutionColumn.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitutionColumn.js +9 -2
- package/dist/distributeur/Restitution/SectionRestitutionRow.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitutionRow.js +10 -3
- package/dist/distributeur/Restitution/SectionRestitutionTitle.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitutionTitle.js +6 -2
- package/dist/distributeur/Steps/StepBase.d.ts +1 -0
- package/dist/distributeur/Steps/StepBase.js +7 -2
- package/dist/distributeur/Steps/Steps.d.ts +2 -1
- package/dist/distributeur/Steps/Steps.js +7 -3
- package/dist/distributeur/Table/TBody.d.ts +1 -0
- package/dist/distributeur/Table/TBody.js +6 -2
- package/dist/distributeur/Table/THead.d.ts +1 -0
- package/dist/distributeur/Table/THead.js +6 -2
- package/dist/distributeur/Table/Table.d.ts +3 -1
- package/dist/distributeur/Table/Table.js +6 -2
- package/dist/distributeur/Table/Td.d.ts +1 -0
- package/dist/distributeur/Table/Td.js +6 -2
- package/dist/distributeur/Table/Th.d.ts +3 -1
- package/dist/distributeur/Table/Th.js +7 -3
- package/dist/distributeur/Table/Tr.d.ts +1 -0
- package/dist/distributeur/Table/Tr.js +6 -2
- package/dist/distributeur/Tag/Tag.js +9 -9
- package/dist/distributeur/Title/Title.d.ts +1 -0
- package/dist/distributeur/Title/Title.js +6 -2
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Loader/Loader.css";
|
|
3
3
|
import {} from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
5
5
|
const getText = (index) => {
|
|
6
6
|
switch (index) {
|
|
7
7
|
case "get":
|
|
@@ -19,7 +19,11 @@ const getText = (index) => {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
export const Loader = ({ className, text, children, classModifier, mode = "none", }) => {
|
|
22
|
-
const componentClassName =
|
|
22
|
+
const componentClassName = getClassName({
|
|
23
|
+
baseClassName: "af-loader",
|
|
24
|
+
modifiers: classModifier?.split(" "),
|
|
25
|
+
className,
|
|
26
|
+
});
|
|
23
27
|
const message = text || getText(mode);
|
|
24
28
|
const isLoaderVisible = mode !== "none";
|
|
25
29
|
const isLoaderInError = mode === "error";
|
|
@@ -6,7 +6,7 @@ import errorSvg from "@material-symbols/svg-400/outlined/error-fill.svg";
|
|
|
6
6
|
import infoSvg from "@material-symbols/svg-400/outlined/info-fill.svg";
|
|
7
7
|
import warningSvg from "@material-symbols/svg-400/outlined/warning-fill.svg";
|
|
8
8
|
import { Svg } from "../Svg";
|
|
9
|
-
import {
|
|
9
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
10
10
|
const getIconUrl = (type) => {
|
|
11
11
|
switch (type) {
|
|
12
12
|
case "info":
|
|
@@ -33,10 +33,10 @@ const getVariant = (classModifier, variant) => {
|
|
|
33
33
|
export const Message = ({ className, onClose, icon, title, children, classModifier = "error", variant, // Backward compatibility
|
|
34
34
|
closeButtonAriaLabel = "close", }) => {
|
|
35
35
|
const safeVariant = getVariant(classModifier, variant);
|
|
36
|
-
const componentClassName =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
const componentClassName = getClassName({
|
|
37
|
+
baseClassName: "af-alert",
|
|
38
|
+
modifiers: [safeVariant],
|
|
39
|
+
className,
|
|
40
40
|
});
|
|
41
41
|
const iconSrc = icon ?? getIconUrl(safeVariant);
|
|
42
42
|
return (_jsxs("div", { className: componentClassName, role: "alert", children: [_jsx("div", { className: "af-alert__sidebar", children: _jsx("div", { className: "af-alert__indicator", children: _jsx(Svg, { src: iconSrc, className: "af-alert__icon", role: "presentation" }) }) }), _jsxs("div", { className: "af-alert__content", children: [_jsx("div", { className: "af-alert__title", children: title }), children] }), onClose ? (_jsx("button", { onClick: onClose, "aria-label": closeButtonAriaLabel, type: "button", className: "af-alert__close-button", children: _jsx(Svg, { src: closeSvg, className: "af-alert__close-icon", role: "presentation" }) })) : null] }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type BodyProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
2
|
+
/** @deprecated Use `className` instead. */
|
|
2
3
|
classModifier?: string;
|
|
3
4
|
};
|
|
4
5
|
declare const Body: ({ children, className, classModifier, ...otherProps }: BodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
3
|
const Body = ({ children, className, classModifier, ...otherProps }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-modal__body",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return (_jsx("section", { className: componentClassName, ...otherProps, children: children }));
|
|
6
10
|
};
|
|
7
11
|
export { Body };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
3
|
const Footer = ({ classModifier, className, ...rest }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-modal__footer",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return _jsx("footer", { ...rest, className: componentClassName });
|
|
6
10
|
};
|
|
7
11
|
export { Footer };
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import closeIcon from "@material-symbols/svg-400/outlined/close.svg";
|
|
3
|
-
import {
|
|
3
|
+
import { Svg } from "../../../distributeur";
|
|
4
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
4
5
|
const Header = ({ className, classModifier, title, closeButtonAriaLabel = "Fermer la boite de dialogue", onCancel, children, ...props }) => {
|
|
5
|
-
const componentClassName =
|
|
6
|
+
const componentClassName = getClassName({
|
|
7
|
+
baseClassName: "af-modal__header",
|
|
8
|
+
modifiers: classModifier?.split(" "),
|
|
9
|
+
className,
|
|
10
|
+
});
|
|
6
11
|
return (_jsxs("header", { className: componentClassName, ...props, children: [_jsx("h4", { className: "af-modal__header-title", children: children ?? title }), _jsx("button", { className: "af-modal__header-close-btn", type: "button", "aria-label": closeButtonAriaLabel, onClick: onCancel, children: _jsx(Svg, { src: closeIcon }) })] }));
|
|
7
12
|
};
|
|
8
13
|
export { Header };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type HeaderBaseProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
2
|
+
/** @deprecated Use `className` instead. */
|
|
2
3
|
classModifier?: string;
|
|
3
4
|
};
|
|
4
5
|
declare const HeaderBase: ({ classModifier, className, ...rest }: HeaderBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
3
|
const HeaderBase = ({ classModifier, className, ...rest }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-modal__header",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return _jsx("header", { ...rest, className: componentClassName });
|
|
6
10
|
};
|
|
7
11
|
export { HeaderBase };
|
|
@@ -6,6 +6,7 @@ type PropsAnimatedPopover = {
|
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
target: React.ReactNode;
|
|
8
8
|
className?: string;
|
|
9
|
+
/** @deprecated Use `className` instead. */
|
|
9
10
|
classModifier?: string;
|
|
10
11
|
onMouseEnter?: (event: React.MouseEvent) => void;
|
|
11
12
|
onMouseLeave?: (event: React.MouseEvent) => void;
|
|
@@ -2,10 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
3
|
import { arrow, FloatingArrow, offset, useFloating, } from "@floating-ui/react";
|
|
4
4
|
import React, { useRef } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
6
6
|
const defaultClassName = "af-popover__container";
|
|
7
7
|
export const AnimatedPopover = ({ placement, children, isOpen, target, className, classModifier, onMouseEnter, onMouseLeave, }) => {
|
|
8
|
-
const componentClassName =
|
|
8
|
+
const componentClassName = getClassName({
|
|
9
|
+
baseClassName: defaultClassName,
|
|
10
|
+
modifiers: classModifier?.split(" ") ?? [],
|
|
11
|
+
className,
|
|
12
|
+
});
|
|
9
13
|
const [referenceElement, setReferenceElement] = React.useState(null);
|
|
10
14
|
const [popperElement, setPopperElement] = React.useState(null);
|
|
11
15
|
const arrowRef = useRef(null);
|
|
@@ -2,7 +2,9 @@ import type { Placement } from "@floating-ui/react";
|
|
|
2
2
|
export type PopoverModes = "hover" | "click";
|
|
3
3
|
export type PopoverProps = {
|
|
4
4
|
className?: string;
|
|
5
|
+
/** @deprecated Use `className` instead. */
|
|
5
6
|
classModifier?: string;
|
|
7
|
+
size?: "small";
|
|
6
8
|
placement?: Placement;
|
|
7
9
|
children?: React.ReactNode;
|
|
8
10
|
element: React.ReactNode;
|
|
@@ -4,6 +4,7 @@ import "@axa-fr/canopee-css/distributeur/Popover/Popover.css";
|
|
|
4
4
|
type Props = {
|
|
5
5
|
placement?: Placement;
|
|
6
6
|
className?: string;
|
|
7
|
+
/** @deprecated Use `className` instead. */
|
|
7
8
|
classModifier?: string;
|
|
8
9
|
element: React.ReactNode;
|
|
9
10
|
children: React.ReactNode | React.ReactNode[];
|
|
@@ -2,8 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { AnimatedPopover } from "./AnimatedPopover";
|
|
4
4
|
import "@axa-fr/canopee-css/distributeur/Popover/Popover.css";
|
|
5
|
-
const
|
|
6
|
-
const PopoverBase = ({ children, isOpen, placement = "right", className = defaultClassName, classModifier, element, onMouseEnter, onMouseLeave, }) => {
|
|
5
|
+
const PopoverBase = ({ children, isOpen, placement = "right", className, classModifier, element, onMouseEnter, onMouseLeave, }) => {
|
|
7
6
|
return (_jsx(AnimatedPopover, { target: children, placement: placement, isOpen: isOpen, className: className, classModifier: classModifier, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: element }));
|
|
8
7
|
};
|
|
9
8
|
export { PopoverBase };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, PropsWithChildren } from "react";
|
|
2
2
|
type ArticleRestitutionProps = ComponentPropsWithoutRef<"article"> & {
|
|
3
|
+
/** @deprecated Use `className` instead. */
|
|
3
4
|
classModifier?: string;
|
|
4
5
|
};
|
|
5
6
|
export declare const ArticleRestitution: ({ children, className, classModifier, ...otherProps }: PropsWithChildren<ArticleRestitutionProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
export const ArticleRestitution = ({ children, className, classModifier, ...otherProps }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-restitution",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return (_jsx("article", { className: componentClassName, ...otherProps, children: children }));
|
|
6
10
|
};
|
|
@@ -4,6 +4,7 @@ export type HeaderRestitutionProps = {
|
|
|
4
4
|
title: React.ReactNode;
|
|
5
5
|
subtitle?: React.ReactNode;
|
|
6
6
|
rightTitle?: React.ReactNode;
|
|
7
|
+
/** @deprecated Use `className` instead. */
|
|
7
8
|
classModifier?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const HeaderRestitution: ({ title, subtitle, rightTitle, className, classModifier, }: HeaderRestitutionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
4
4
|
export const HeaderRestitution = ({ title, subtitle, rightTitle, className, classModifier, }) => {
|
|
5
|
-
const componentClassName =
|
|
5
|
+
const componentClassName = getClassName({
|
|
6
|
+
baseClassName: "af-restitution__header",
|
|
7
|
+
modifiers: classModifier?.split(" "),
|
|
8
|
+
className,
|
|
9
|
+
});
|
|
6
10
|
return (_jsxs("header", { className: componentClassName, children: [_jsx("div", { className: "af-restitution__header-left", children: _jsxs("h3", { className: "af-restitution__title", children: [_jsx("span", { className: "af-restitution__title-main", children: title }), subtitle ? (_jsx("span", { className: "af-restitution__title-subtitle", children: subtitle })) : null] }) }), rightTitle ? (_jsx("div", { className: "af-restitution__header-right", children: _jsx("span", { className: "af-restitution__title", children: rightTitle }) })) : null] }));
|
|
7
11
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, PropsWithChildren } from "react";
|
|
2
2
|
export type RestitutionProps = ComponentPropsWithoutRef<"dl"> & {
|
|
3
3
|
label: string;
|
|
4
|
+
/** @deprecated Use `className` instead. */
|
|
4
5
|
classModifier?: string;
|
|
6
|
+
variant?: "marge";
|
|
5
7
|
};
|
|
6
|
-
export declare const Restitution: ({ label, children, className, classModifier, }: PropsWithChildren<RestitutionProps>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Restitution: ({ label, children, className, classModifier, variant, }: PropsWithChildren<RestitutionProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
export const Restitution = ({ label, children = "-", className, classModifier, }) => {
|
|
4
|
-
const componentClassName =
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
|
+
export const Restitution = ({ label, children = "-", className, classModifier, variant, }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-restitution__listdef",
|
|
6
|
+
modifiers: [variant, ...(classModifier?.split(" ") ?? [])],
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return (_jsxs("dl", { className: componentClassName, children: [_jsx("dt", { className: "af-restitution__listdef-item", children: _jsx("span", { className: "af-restitution__text", children: label }) }), _jsx("dd", { className: "af-restitution__listdef-value", children: children })] }));
|
|
6
10
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PropsWithChildren } from "react";
|
|
2
2
|
export type SectionRestitutionProps = {
|
|
3
3
|
className?: string;
|
|
4
|
+
/** @deprecated Use `className` instead. */
|
|
4
5
|
classModifier?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const SectionRestitution: ({ children, className, classModifier, }: PropsWithChildren<SectionRestitutionProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
export const SectionRestitution = ({ children, className, classModifier, }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-restitution__content",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return _jsx("section", { className: componentClassName, children: children });
|
|
6
10
|
};
|
|
@@ -2,6 +2,7 @@ import type { PropsWithChildren } from "react";
|
|
|
2
2
|
export type SectionRestitutionColumnProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
title?: string;
|
|
5
|
+
/** @deprecated Use `className` instead. */
|
|
5
6
|
classModifier?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const SectionRestitutionColumn: ({ children, className, title, classModifier, }: PropsWithChildren<SectionRestitutionColumnProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
4
|
import { SectionRestitutionTitle } from "./SectionRestitutionTitle";
|
|
4
5
|
export const SectionRestitutionColumn = ({ children, className, title, classModifier, }) => {
|
|
5
|
-
const
|
|
6
|
+
const baseClassName = className
|
|
7
|
+
? getClassName({
|
|
8
|
+
baseClassName: className,
|
|
9
|
+
modifiers: classModifier?.split(" "),
|
|
10
|
+
})
|
|
11
|
+
: null;
|
|
12
|
+
const componentClassName = classNames("col-sm-12 col-md-12 col-lg-6 col-xl-6", baseClassName);
|
|
6
13
|
return (_jsxs("div", { className: componentClassName, children: [title ? _jsx(SectionRestitutionTitle, { title: title }) : null, children] }));
|
|
7
14
|
};
|
|
@@ -3,6 +3,7 @@ export type SectionRestitutionRowProps = {
|
|
|
3
3
|
title?: React.ReactNode;
|
|
4
4
|
classNameContainer?: string;
|
|
5
5
|
className?: string;
|
|
6
|
+
/** @deprecated Use `className` instead. */
|
|
6
7
|
classModifier?: string;
|
|
7
8
|
};
|
|
8
9
|
export declare const SectionRestitutionRow: ({ title, className, classNameContainer, children, classModifier, }: PropsWithChildren<SectionRestitutionRowProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
4
|
import { SectionRestitutionTitle } from "./SectionRestitutionTitle";
|
|
4
5
|
const DEFAULT_CLASSNAME = "col col-sm-12 col-md-12 col-lg-12 col-xl-12";
|
|
5
|
-
export const SectionRestitutionRow = ({ title, className
|
|
6
|
-
const
|
|
6
|
+
export const SectionRestitutionRow = ({ title, className, classNameContainer = "row af-restitution__content-left", children, classModifier, }) => {
|
|
7
|
+
const baseClassName = className
|
|
8
|
+
? getClassName({
|
|
9
|
+
baseClassName: className,
|
|
10
|
+
modifiers: classModifier?.split(" "),
|
|
11
|
+
})
|
|
12
|
+
: null;
|
|
13
|
+
const componentClassName = classNames(DEFAULT_CLASSNAME, baseClassName);
|
|
7
14
|
return (_jsxs("div", { className: componentClassName, children: [title ? _jsx(SectionRestitutionTitle, { title: title }) : null, _jsx("div", { className: classNameContainer, children: children })] }));
|
|
8
15
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type SectionRestitutionTitleProps = {
|
|
2
2
|
title: React.ReactNode;
|
|
3
3
|
className?: string;
|
|
4
|
+
/** @deprecated Use `className` instead. */
|
|
4
5
|
classModifier?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const SectionRestitutionTitle: ({ title, className, classModifier, }: SectionRestitutionTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
export const SectionRestitutionTitle = ({ title, className, classModifier, }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-restitution__content-title",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return _jsx("h4", { className: componentClassName, children: title });
|
|
6
10
|
};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import checkSvg from "@material-symbols/svg-400/outlined/check.svg";
|
|
3
3
|
import chevronSvg from "@material-symbols/svg-400/outlined/chevron_right.svg";
|
|
4
|
-
import {
|
|
4
|
+
import { Svg } from "../../distributeur";
|
|
5
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
5
6
|
const StepBase = ({ children, id, title, className, classModifier, stateLabel, }) => {
|
|
6
|
-
const componentClassName =
|
|
7
|
+
const componentClassName = getClassName({
|
|
8
|
+
baseClassName: "af-steps-list-step",
|
|
9
|
+
modifiers: classModifier?.split(" "),
|
|
10
|
+
className,
|
|
11
|
+
});
|
|
7
12
|
const outputTitle = stateLabel ? `${title} (${stateLabel})` : title;
|
|
8
13
|
return (_jsxs("li", { className: componentClassName, title: outputTitle, children: [_jsx(Svg, { src: checkSvg }), children, _jsx(Svg, { src: chevronSvg })] }, id));
|
|
9
14
|
};
|
|
@@ -2,7 +2,8 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
type Props = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
className?: string;
|
|
5
|
+
/** @deprecated Use `className` instead. */
|
|
5
6
|
classModifier?: string;
|
|
6
7
|
};
|
|
7
|
-
declare const Steps: ({ children, className, classModifier
|
|
8
|
+
declare const Steps: ({ children, className, classModifier }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export { Steps };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
const defaultClassName = "af-steps-new";
|
|
4
|
-
const Steps = ({ children, className
|
|
5
|
-
const componentClassName =
|
|
4
|
+
const Steps = ({ children, className, classModifier }) => {
|
|
5
|
+
const componentClassName = getClassName({
|
|
6
|
+
baseClassName: defaultClassName,
|
|
7
|
+
modifiers: classModifier?.split(" "),
|
|
8
|
+
className,
|
|
9
|
+
});
|
|
6
10
|
return (_jsx("div", { className: componentClassName, children: _jsx("ol", { className: "af-steps-list", children: children }) }));
|
|
7
11
|
};
|
|
8
12
|
export { Steps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
type Props = ComponentPropsWithoutRef<"tbody"> & {
|
|
3
|
+
/** @deprecated Use `className` instead. */
|
|
3
4
|
classModifier?: string;
|
|
4
5
|
};
|
|
5
6
|
declare const TBody: ({ children, className, classModifier, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
const TBody = ({ children, className, classModifier, ...otherProps }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__body",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return (_jsx("tbody", { className: componentClassName, ...otherProps, children: children }));
|
|
6
10
|
};
|
|
7
11
|
export { TBody };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
type Props = ComponentPropsWithoutRef<"thead"> & {
|
|
3
|
+
/** @deprecated Use `className` instead. */
|
|
3
4
|
classModifier?: string;
|
|
4
5
|
};
|
|
5
6
|
declare const THead: ({ children, className, classModifier, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
const THead = ({ children, className, classModifier, ...otherProps }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__thead",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return (_jsx("thead", { className: componentClassName, ...otherProps, children: children }));
|
|
6
10
|
};
|
|
7
11
|
export { THead };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Table/Table.css";
|
|
3
3
|
type TableProps = ComponentPropsWithoutRef<"table"> & {
|
|
4
|
+
/** @deprecated Use `className` instead. */
|
|
4
5
|
classModifier?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const Table: {
|
|
@@ -23,8 +24,9 @@ declare const Table: {
|
|
|
23
24
|
TBody: ({ children, className, classModifier, ...otherProps }: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
|
|
24
25
|
classModifier?: string;
|
|
25
26
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
Th: ({ children, id, className, classModifier, ...otherProps }: Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & {
|
|
27
|
+
Th: ({ children, id, className, classModifier, sortable, ...otherProps }: Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & {
|
|
27
28
|
classModifier?: string;
|
|
29
|
+
sortable?: boolean;
|
|
28
30
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
31
|
Tr: ({ children, id, className, classModifier, ...otherProps }: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & {
|
|
30
32
|
classModifier?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
import { TBody } from "./TBody";
|
|
4
4
|
import { THead } from "./THead";
|
|
5
5
|
import { Td } from "./Td";
|
|
@@ -7,7 +7,11 @@ import { Th } from "./Th";
|
|
|
7
7
|
import { Tr } from "./Tr";
|
|
8
8
|
import "@axa-fr/canopee-css/distributeur/Table/Table.css";
|
|
9
9
|
const Table = ({ className, classModifier, children, ...othersProps }) => {
|
|
10
|
-
const componentClassName =
|
|
10
|
+
const componentClassName = getClassName({
|
|
11
|
+
baseClassName: "af-table",
|
|
12
|
+
modifiers: classModifier?.split(" "),
|
|
13
|
+
className,
|
|
14
|
+
});
|
|
11
15
|
return (_jsx("table", { className: componentClassName, ...othersProps, children: children }));
|
|
12
16
|
};
|
|
13
17
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
type Props = ComponentPropsWithoutRef<"td"> & {
|
|
3
|
+
/** @deprecated Use `className` instead. */
|
|
3
4
|
classModifier?: string;
|
|
4
5
|
};
|
|
5
6
|
declare const Td: ({ children, id, className, classModifier, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
3
|
const Td = ({ children, id, className, classModifier, ...otherProps }) => {
|
|
4
|
-
const componentClassName =
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__cell",
|
|
6
|
+
modifiers: classModifier?.split(" "),
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return (_jsx("td", { className: componentClassName, id: id, ...otherProps, children: children }, id));
|
|
6
10
|
};
|
|
7
11
|
export { Td };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
type Props = ComponentPropsWithoutRef<"th"> & {
|
|
3
|
+
/** @deprecated Use `className` instead. */
|
|
3
4
|
classModifier?: string;
|
|
5
|
+
sortable?: boolean;
|
|
4
6
|
};
|
|
5
|
-
declare const Th: ({ children, id, className, classModifier, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const Th: ({ children, id, className, classModifier, sortable, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export { Th };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
const Th = ({ children, id, className, classModifier, ...otherProps }) => {
|
|
4
|
-
const componentClassName =
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
|
+
const Th = ({ children, id, className, classModifier, sortable, ...otherProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__th",
|
|
6
|
+
modifiers: [sortable && "sortable", ...(classModifier?.split(" ") ?? [])],
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
5
9
|
return (_jsx("th", { className: componentClassName, id: id, ...otherProps, children: children }, id));
|
|
6
10
|
};
|
|
7
11
|
export { Th };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
type Props = ComponentPropsWithoutRef<"tr"> & {
|
|
3
|
+
/** @deprecated Use `className` instead. */
|
|
3
4
|
classModifier?: string;
|
|
4
5
|
};
|
|
5
6
|
declare const Tr: ({ children, id, className, classModifier, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import {} from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
4
4
|
const Tr = ({ children, id, className, classModifier, ...otherProps }) => {
|
|
5
|
-
const componentClassName =
|
|
5
|
+
const componentClassName = getClassName({
|
|
6
|
+
baseClassName: "af-table__tr",
|
|
7
|
+
modifiers: classModifier?.split(" "),
|
|
8
|
+
className,
|
|
9
|
+
});
|
|
6
10
|
return (_jsx("tr", { className: componentClassName, ...otherProps, children: children }, id));
|
|
7
11
|
};
|
|
8
12
|
export { Tr };
|