@axa-fr/canopee-react 1.7.1-alpha.33 → 1.7.1-alpha.35
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/Experimental/Restitution/ExperimentalRestitution.d.ts +4 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitution.js +12 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionColumn.d.ts +3 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionColumn.js +9 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionHeader.d.ts +18 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionHeader.js +9 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionLabel.d.ts +3 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionLabel.js +9 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionLabelValue.d.ts +8 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionLabelValue.js +4 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionListDef.d.ts +3 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionListDef.js +9 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionRow.d.ts +3 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionRow.js +9 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionSection.d.ts +6 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionSection.js +11 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionValue.d.ts +3 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionValue.js +9 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionValueList.d.ts +5 -0
- package/dist/distributeur/Experimental/Restitution/ExperimentalRestitutionValueList.js +9 -0
- package/dist/distributeur/Experimental/Restitution.d.ts +20 -0
- package/dist/distributeur/Experimental/Restitution.js +10 -0
- package/dist/distributeur/Restitution/SectionRestitutionRow.js +1 -1
- package/dist/distributeur-experimental.d.ts +1 -0
- package/dist/distributeur-experimental.js +1 -0
- package/dist/distributeur.d.ts +1 -0
- package/dist/distributeur.js +1 -0
- package/package.json +6 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ComponentProps, type PropsWithChildren } from "react";
|
|
2
|
+
import { type ExperimentalRestitutionHeaderProps } from "./ExperimentalRestitutionHeader";
|
|
3
|
+
export type ExperimentalRestitutionProps = PropsWithChildren & (ExperimentalRestitutionHeaderProps | Record<string, never>) & ComponentProps<"article">;
|
|
4
|
+
export declare const ExperimentalRestitution: ({ title, children, rightElement, subtitle, className, ...otherProps }: ExperimentalRestitutionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
4
|
+
import { ExperimentalRestitutionHeader, } from "./ExperimentalRestitutionHeader";
|
|
5
|
+
export const ExperimentalRestitution = ({ title, children, rightElement, subtitle, className, ...otherProps }) => {
|
|
6
|
+
const headerId = useId();
|
|
7
|
+
const componentClassName = getClassName({
|
|
8
|
+
baseClassName: "experimental-af-restitution",
|
|
9
|
+
className,
|
|
10
|
+
});
|
|
11
|
+
return (_jsxs("article", { className: componentClassName, "aria-labelledby": headerId, ...otherProps, children: [title ? (_jsx(ExperimentalRestitutionHeader, { rightElement: rightElement, subtitle: subtitle, title: title, id: headerId })) : null, _jsx("div", { className: "experimental-af-restitution__content", children: children })] }));
|
|
12
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ComponentProps, PropsWithChildren } from "react";
|
|
2
|
+
export type ExperimentalRestitutionColumnProps = PropsWithChildren & ComponentProps<"div">;
|
|
3
|
+
export declare const ExperimentalRestitutionColumn: ({ children, className, ...props }: ExperimentalRestitutionColumnProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
|
+
export const ExperimentalRestitutionColumn = ({ children, className, ...props }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "experimental-af-restitution__column",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("div", { className: componentClassName, ...props, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
export type ExperimentalRestitutionHeaderProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The title of the restitution, which will be displayed in the header. This prop is required and should be a ReactNode, allowing for flexibility in the content that can be displayed as the title (e.g., string, JSX elements, etc.).
|
|
5
|
+
* If this prop is not provided, the header will not be displayed, and the restitution will only consist of its content without a header section.
|
|
6
|
+
*/
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** An optional subtitle to provide additional context or information about the restitution. It is displayed below the title in a smaller font size. */
|
|
9
|
+
subtitle?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* An optional element to display on the right side of the header. It can be used for actions, links, or any other content that complements the title and subtitle.
|
|
12
|
+
*/
|
|
13
|
+
rightElement?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export type ExperimentalRestitutionHeaderPropsWithId = ExperimentalRestitutionHeaderProps & {
|
|
16
|
+
id?: string;
|
|
17
|
+
} & ComponentProps<"div">;
|
|
18
|
+
export declare const ExperimentalRestitutionHeader: ({ title, rightElement, subtitle, id, className, ...props }: ExperimentalRestitutionHeaderPropsWithId) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
|
+
export const ExperimentalRestitutionHeader = ({ title, rightElement, subtitle, id, className, ...props }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "experimental-af-restitution__header",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsxs("div", { className: componentClassName, ...props, children: [_jsxs("header", { className: "experimental-af-restitution__header-left", id: id, children: [_jsx("h3", { className: "experimental-af-restitution__title", children: title }), subtitle ? (_jsx("p", { className: "experimental-af-restitution__subtitle", children: subtitle })) : null] }), rightElement ? (_jsx("div", { className: "experimental-af-restitution__header-right", children: rightElement })) : null] }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ComponentProps, PropsWithChildren } from "react";
|
|
2
|
+
export type ExperimentalRestitutionLabelProps = PropsWithChildren<ComponentProps<"dt">>;
|
|
3
|
+
export declare const ExperimentalRestitutionLabel: ({ children, className, ...props }: ExperimentalRestitutionLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
|
+
export const ExperimentalRestitutionLabel = ({ children, className, ...props }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "experimental-af-restitution__listdef-item",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("dt", { className: componentClassName, ...props, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
export type ExperimentalRestitutionLabelValueProps = {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
value: ReactNode;
|
|
5
|
+
labelProps?: ComponentProps<"dt">;
|
|
6
|
+
valueProps?: ComponentProps<"dd">;
|
|
7
|
+
};
|
|
8
|
+
export declare const ExperimentalRestitutionLabelValue: ({ label, value, labelProps, valueProps, }: ExperimentalRestitutionLabelValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ExperimentalRestitutionLabel } from "./ExperimentalRestitutionLabel";
|
|
3
|
+
import { ExperimentalRestitutionValue } from "./ExperimentalRestitutionValue";
|
|
4
|
+
export const ExperimentalRestitutionLabelValue = ({ label, value, labelProps, valueProps, }) => (_jsxs(_Fragment, { children: [_jsx(ExperimentalRestitutionLabel, { ...labelProps, children: label }), _jsx(ExperimentalRestitutionValue, { ...valueProps, children: value })] }));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ComponentProps, PropsWithChildren } from "react";
|
|
2
|
+
export type ExperimentalRestitutionListDefProps = PropsWithChildren<ComponentProps<"dl">>;
|
|
3
|
+
export declare const ExperimentalRestitutionListDef: ({ children, className, ...props }: ExperimentalRestitutionListDefProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
|
+
export const ExperimentalRestitutionListDef = ({ children, className, ...props }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "experimental-af-restitution__listdef",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("dl", { className: componentClassName, ...props, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
export type ExperimentalRestitutionRowProps = PropsWithChildren & React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare const ExperimentalRestitutionRow: ({ children, className, ...props }: ExperimentalRestitutionRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
|
+
export const ExperimentalRestitutionRow = ({ children, className, ...props }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "experimental-af-restitution__row",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("div", { className: componentClassName, ...props, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentProps, type PropsWithChildren, type ReactNode } from "react";
|
|
2
|
+
export type ExperimentalRestitutionSectionProps = PropsWithChildren<{
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}> & ComponentProps<"section">;
|
|
6
|
+
export declare const ExperimentalRestitutionSection: ({ title, children, className, ...props }: ExperimentalRestitutionSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, } from "react";
|
|
3
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
4
|
+
export const ExperimentalRestitutionSection = ({ title, children, className, ...props }) => {
|
|
5
|
+
const componentClassName = getClassName({
|
|
6
|
+
baseClassName: "experimental-af-restitution__section",
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
9
|
+
const id = useId();
|
|
10
|
+
return (_jsxs("section", { className: componentClassName, "aria-labelledby": id, ...props, children: [_jsx("h2", { id: id, className: "experimental-af-restitution__section-title", children: title }), _jsx("div", { className: "experimental-af-restitution__row-content", children: children })] }));
|
|
11
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ComponentProps, PropsWithChildren } from "react";
|
|
2
|
+
export type ExperimentalRestitutionValueProps = PropsWithChildren & ComponentProps<"dd">;
|
|
3
|
+
export declare const ExperimentalRestitutionValue: ({ children, className, ...props }: ExperimentalRestitutionValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
|
+
export const ExperimentalRestitutionValue = ({ children, className, ...props }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "experimental-af-restitution__listdef-value",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("dd", { className: componentClassName, ...props, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type ExperimentalRestitutionValueListProps = {
|
|
3
|
+
items: ReactNode[];
|
|
4
|
+
} & React.ComponentProps<"ul">;
|
|
5
|
+
export declare const ExperimentalRestitutionValueList: ({ items, className, ...props }: ExperimentalRestitutionValueListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
3
|
+
export const ExperimentalRestitutionValueList = ({ items, className, ...props }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "experimental-af-restitution__listdef-value-list",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("ul", { className: componentClassName, ...props, children: items.map((item) => (_jsx("li", { children: item }, null))) }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/Restitution/ExperimentalRestitution.css";
|
|
2
|
+
export { ExperimentalRestitution } from "./Restitution/ExperimentalRestitution";
|
|
3
|
+
export type { ExperimentalRestitutionProps } from "./Restitution/ExperimentalRestitution";
|
|
4
|
+
export { ExperimentalRestitutionColumn } from "./Restitution/ExperimentalRestitutionColumn";
|
|
5
|
+
export type { ExperimentalRestitutionColumnProps } from "./Restitution/ExperimentalRestitutionColumn";
|
|
6
|
+
export type { ExperimentalRestitutionHeaderProps, ExperimentalRestitutionHeaderPropsWithId, } from "./Restitution/ExperimentalRestitutionHeader";
|
|
7
|
+
export { ExperimentalRestitutionLabel } from "./Restitution/ExperimentalRestitutionLabel";
|
|
8
|
+
export type { ExperimentalRestitutionLabelProps } from "./Restitution/ExperimentalRestitutionLabel";
|
|
9
|
+
export { ExperimentalRestitutionLabelValue } from "./Restitution/ExperimentalRestitutionLabelValue";
|
|
10
|
+
export type { ExperimentalRestitutionLabelValueProps } from "./Restitution/ExperimentalRestitutionLabelValue";
|
|
11
|
+
export { ExperimentalRestitutionListDef } from "./Restitution/ExperimentalRestitutionListDef";
|
|
12
|
+
export type { ExperimentalRestitutionListDefProps } from "./Restitution/ExperimentalRestitutionListDef";
|
|
13
|
+
export { ExperimentalRestitutionRow } from "./Restitution/ExperimentalRestitutionRow";
|
|
14
|
+
export { ExperimentalRestitutionSection } from "./Restitution/ExperimentalRestitutionSection";
|
|
15
|
+
export type { ExperimentalRestitutionRowProps } from "./Restitution/ExperimentalRestitutionRow";
|
|
16
|
+
export type { ExperimentalRestitutionSectionProps } from "./Restitution/ExperimentalRestitutionSection";
|
|
17
|
+
export { ExperimentalRestitutionValue } from "./Restitution/ExperimentalRestitutionValue";
|
|
18
|
+
export type { ExperimentalRestitutionValueProps } from "./Restitution/ExperimentalRestitutionValue";
|
|
19
|
+
export { ExperimentalRestitutionValueList } from "./Restitution/ExperimentalRestitutionValueList";
|
|
20
|
+
export type { ExperimentalRestitutionValueListProps } from "./Restitution/ExperimentalRestitutionValueList";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/Restitution/ExperimentalRestitution.css";
|
|
2
|
+
export { ExperimentalRestitution } from "./Restitution/ExperimentalRestitution";
|
|
3
|
+
export { ExperimentalRestitutionColumn } from "./Restitution/ExperimentalRestitutionColumn";
|
|
4
|
+
export { ExperimentalRestitutionLabel } from "./Restitution/ExperimentalRestitutionLabel";
|
|
5
|
+
export { ExperimentalRestitutionLabelValue } from "./Restitution/ExperimentalRestitutionLabelValue";
|
|
6
|
+
export { ExperimentalRestitutionListDef } from "./Restitution/ExperimentalRestitutionListDef";
|
|
7
|
+
export { ExperimentalRestitutionRow } from "./Restitution/ExperimentalRestitutionRow";
|
|
8
|
+
export { ExperimentalRestitutionSection } from "./Restitution/ExperimentalRestitutionSection";
|
|
9
|
+
export { ExperimentalRestitutionValue } from "./Restitution/ExperimentalRestitutionValue";
|
|
10
|
+
export { ExperimentalRestitutionValueList } from "./Restitution/ExperimentalRestitutionValueList";
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { getClassName } from "../utilities/helpers/getClassName";
|
|
4
4
|
import { SectionRestitutionTitle } from "./SectionRestitutionTitle";
|
|
5
|
-
const DEFAULT_CLASSNAME = "
|
|
5
|
+
const DEFAULT_CLASSNAME = "af-restitution__content-row";
|
|
6
6
|
export const SectionRestitutionRow = ({ title, className, classNameContainer = "row af-restitution__content-left", children, classModifier, }) => {
|
|
7
7
|
const baseClassName = className
|
|
8
8
|
? getClassName({
|
package/dist/distributeur.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import "@axa-fr/canopee-css/distributeur/common/reboot.css";
|
|
|
4
4
|
import "@axa-fr/canopee-css/distributeur/common/tokens.css";
|
|
5
5
|
import "@axa-fr/canopee-css/distributeur/Form/core/FormCore.css";
|
|
6
6
|
import "@fontsource/source-sans-pro/400.css";
|
|
7
|
+
import "@fontsource/source-sans-pro/600.css";
|
|
7
8
|
import "@fontsource/source-sans-pro/700.css";
|
|
8
9
|
import { Message } from "./distributeur/Messages/Message";
|
|
9
10
|
import { Tag } from "./distributeur/Tag/Tag";
|
package/dist/distributeur.js
CHANGED
|
@@ -4,6 +4,7 @@ import "@axa-fr/canopee-css/distributeur/common/reboot.css";
|
|
|
4
4
|
import "@axa-fr/canopee-css/distributeur/common/tokens.css";
|
|
5
5
|
import "@axa-fr/canopee-css/distributeur/Form/core/FormCore.css";
|
|
6
6
|
import "@fontsource/source-sans-pro/400.css";
|
|
7
|
+
import "@fontsource/source-sans-pro/600.css";
|
|
7
8
|
import "@fontsource/source-sans-pro/700.css";
|
|
8
9
|
import { Message } from "./distributeur/Messages/Message";
|
|
9
10
|
import { Tag } from "./distributeur/Tag/Tag";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/canopee-react",
|
|
3
|
-
"version": "1.7.1-alpha.
|
|
3
|
+
"version": "1.7.1-alpha.35",
|
|
4
4
|
"description": "Package React - Design System Canopée",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./distributeur": {
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"./prospect": {
|
|
19
19
|
"import": "./dist/prospect.js",
|
|
20
20
|
"types": "./dist/prospect.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./distributeur-experimental": {
|
|
23
|
+
"import": "./dist/distributeur-experimental.js",
|
|
24
|
+
"types": "./dist/distributeur-experimental.d.ts"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"files": [
|
|
@@ -49,7 +53,7 @@
|
|
|
49
53
|
},
|
|
50
54
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
51
55
|
"peerDependencies": {
|
|
52
|
-
"@axa-fr/canopee-css": "1.7.1-alpha.
|
|
56
|
+
"@axa-fr/canopee-css": "1.7.1-alpha.35",
|
|
53
57
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
54
58
|
"@material-symbols/svg-700": ">= 0.19.0",
|
|
55
59
|
"react": ">= 18"
|