@axa-fr/canopee-react 1.3.1-alpha.3 → 1.4.0
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/client.d.ts +23 -14
- package/dist/client.js +20 -12
- package/dist/distributeur/Form/Select/Select.d.ts +14 -14
- package/dist/distributeur/Form/Select/SelectInput.d.ts +14 -14
- package/dist/prospect-client/DataAgent/DataAgentApollo.d.ts +1 -0
- package/dist/prospect-client/DataAgent/DataAgentLF.d.ts +1 -0
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.d.ts +3 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.js +2 -2
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +2 -0
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +2 -2
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +2 -0
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +2 -2
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.d.ts +2 -0
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.js +2 -2
- package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +2 -0
- package/dist/prospect-client/Form/InputDate/InputDateCommon.js +2 -2
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +2 -0
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +2 -2
- package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +4 -2
- package/dist/prospect-client/Form/InputText/InputTextCommon.js +2 -2
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo.d.ts +3 -0
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo.js +6 -0
- package/dist/prospect-client/Form/Radio/{CardRadio/CardRadioCommon.d.ts → CardRadioGroup/CardRadioGroupCommon.d.ts} +13 -6
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +16 -0
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF.d.ts +3 -0
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF.js +6 -0
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionCommon.d.ts +5 -1
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionCommon.js +12 -8
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +2 -0
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +2 -2
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.d.ts +21 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.js +8 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutCommon.d.ts +50 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutCommon.js +37 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.d.ts +21 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.js +8 -0
- package/dist/prospect-client/Layout/FormLayout/FormLayout.d.ts +3529 -0
- package/dist/prospect-client/Layout/FormLayout/FormLayout.js +79 -0
- package/dist/prospect-client/Link/LinkApollo.d.ts +1 -1
- package/dist/prospect-client/Link/LinkApollo.js +1 -1
- package/dist/prospect-client/Link/LinkCommon.d.ts +4 -4
- package/dist/prospect-client/Link/LinkCommon.js +7 -7
- package/dist/prospect-client/Link/LinkLF.d.ts +1 -1
- package/dist/prospect-client/Link/LinkLF.js +1 -1
- package/dist/prospect-client/Table/TBody.d.ts +6 -0
- package/dist/prospect-client/Table/TBody.js +10 -0
- package/dist/prospect-client/Table/THead.d.ts +6 -0
- package/dist/prospect-client/Table/THead.js +10 -0
- package/dist/prospect-client/Table/TableApollo.d.ts +2 -0
- package/dist/prospect-client/Table/TableApollo.js +2 -0
- package/dist/prospect-client/Table/TableCommon.d.ts +14 -0
- package/dist/prospect-client/Table/TableCommon.js +19 -0
- package/dist/prospect-client/Table/TableLF.d.ts +2 -0
- package/dist/prospect-client/Table/TableLF.js +2 -0
- package/dist/prospect-client/Table/Td.d.ts +17 -0
- package/dist/prospect-client/Table/Td.js +15 -0
- package/dist/prospect-client/Table/Th.d.ts +9 -0
- package/dist/prospect-client/Table/Th.js +13 -0
- package/dist/prospect-client/Table/Tr.d.ts +11 -0
- package/dist/prospect-client/Table/Tr.js +15 -0
- package/dist/prospect-client/TableMobileCard/DRow.d.ts +6 -0
- package/dist/prospect-client/TableMobileCard/DRow.js +10 -0
- package/dist/prospect-client/TableMobileCard/Dd.d.ts +3 -0
- package/dist/prospect-client/TableMobileCard/Dd.js +9 -0
- package/dist/prospect-client/TableMobileCard/Dt.d.ts +3 -0
- package/dist/prospect-client/TableMobileCard/Dt.js +9 -0
- package/dist/prospect-client/TableMobileCard/TableMobileCard.d.ts +12 -0
- package/dist/prospect-client/TableMobileCard/TableMobileCard.js +17 -0
- package/dist/prospect-client/pages/ErrorPage/ErrorPageApollo.d.ts +3 -0
- package/dist/prospect-client/pages/ErrorPage/ErrorPageApollo.js +5 -0
- package/dist/prospect-client/pages/ErrorPage/ErrorPageCommon.d.ts +12 -0
- package/dist/prospect-client/pages/ErrorPage/ErrorPageCommon.js +7 -0
- package/dist/prospect-client/pages/ErrorPage/ErrorPageLF.d.ts +3 -0
- package/dist/prospect-client/pages/ErrorPage/ErrorPageLF.js +5 -0
- package/dist/prospect-client/pages/ValidPage/ValidPageApollo.d.ts +3 -0
- package/dist/prospect-client/pages/ValidPage/ValidPageApollo.js +6 -0
- package/dist/prospect-client/pages/ValidPage/ValidPageCommon.d.ts +15 -0
- package/dist/prospect-client/pages/ValidPage/ValidPageCommon.js +7 -0
- package/dist/prospect-client/pages/ValidPage/ValidPageLF.d.ts +3 -0
- package/dist/prospect-client/pages/ValidPage/ValidPageLF.js +6 -0
- package/dist/prospect-client/utilities/types/GridContainerProps.d.ts +10 -0
- package/dist/prospect-client/utilities/types/GridContainerProps.js +1 -0
- package/dist/prospect.d.ts +22 -13
- package/dist/prospect.js +19 -11
- package/package.json +2 -2
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.d.ts +0 -3
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.js +0 -6
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +0 -16
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.d.ts +0 -3
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.js +0 -6
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Children, isValidElement, } from "react";
|
|
3
|
+
import "@axa-fr/canopee-css/prospect/Layout/FormLayout/FormLayoutAll.css";
|
|
4
|
+
import { getClassName } from "../../utilities/getClassName";
|
|
5
|
+
const Header = ({ children }) => children;
|
|
6
|
+
const Footer = ({ children }) => children;
|
|
7
|
+
const Faq = ({ children }) => children;
|
|
8
|
+
const setDataCols = ({ dataColsMobile, dataColsTablet, dataColsDesktopSmall, dataColsDesktopMedium, dataColsDesktopLarge, }) => {
|
|
9
|
+
return {
|
|
10
|
+
"--cols-mobile": dataColsMobile || undefined,
|
|
11
|
+
"--cols-tablet": dataColsTablet || undefined,
|
|
12
|
+
"--cols-desktop-small": dataColsDesktopSmall || undefined,
|
|
13
|
+
"--cols-desktop-medium": dataColsDesktopMedium || undefined,
|
|
14
|
+
"--cols-desktop-large": dataColsDesktopLarge || undefined,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const setResponsiveStyle = (childProps) => {
|
|
18
|
+
const { "data-cols-mobile": dataColsMobile, "data-cols-tablet": dataColsTablet, "data-cols-desktop-small": dataColsDesktopSmall, "data-cols-desktop-medium": dataColsDesktopMedium, "data-cols-desktop-large": dataColsDesktopLarge, ...rest } = childProps?.containerProps || childProps;
|
|
19
|
+
if (childProps?.containerProps) {
|
|
20
|
+
return {
|
|
21
|
+
...childProps,
|
|
22
|
+
...rest,
|
|
23
|
+
containerProps: {
|
|
24
|
+
style: {
|
|
25
|
+
...(childProps.containerProps?.style ||
|
|
26
|
+
{}),
|
|
27
|
+
...setDataCols({
|
|
28
|
+
dataColsMobile,
|
|
29
|
+
dataColsTablet,
|
|
30
|
+
dataColsDesktopSmall,
|
|
31
|
+
dataColsDesktopMedium,
|
|
32
|
+
dataColsDesktopLarge,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
...rest,
|
|
40
|
+
style: {
|
|
41
|
+
...(rest.style || {}),
|
|
42
|
+
...setDataCols({
|
|
43
|
+
dataColsMobile,
|
|
44
|
+
dataColsTablet,
|
|
45
|
+
dataColsDesktopSmall,
|
|
46
|
+
dataColsDesktopMedium,
|
|
47
|
+
dataColsDesktopLarge,
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export const Body = ({ children }) => Children.map(children, function (child) {
|
|
53
|
+
if (isValidElement(child)) {
|
|
54
|
+
const childProps = typeof child.props === "object" && child.props !== null
|
|
55
|
+
? child.props
|
|
56
|
+
: {};
|
|
57
|
+
const responsiveStyle = setResponsiveStyle(childProps);
|
|
58
|
+
return {
|
|
59
|
+
...child,
|
|
60
|
+
props: responsiveStyle,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return child;
|
|
64
|
+
});
|
|
65
|
+
export const FormLayout = ({ children, className, "aria-label": ariaLabel = "Formulaire", ...formProps }) => {
|
|
66
|
+
const childrenArray = Children.toArray(children);
|
|
67
|
+
const header = childrenArray.find((child) => isValidElement(child) && child.type === Header);
|
|
68
|
+
const body = childrenArray.find((child) => isValidElement(child) && child.type === Body);
|
|
69
|
+
const footer = childrenArray.find((child) => isValidElement(child) && child.type === Footer);
|
|
70
|
+
const faq = childrenArray.find((child) => isValidElement(child) && child.type === Faq);
|
|
71
|
+
return (_jsxs(_Fragment, { children: [_jsxs("form", { className: getClassName({
|
|
72
|
+
baseClassName: "af-form-layout",
|
|
73
|
+
className,
|
|
74
|
+
}), "aria-label": ariaLabel, ...formProps, children: [header ? (_jsx("div", { className: "af-form-layout__header subgrid", children: header })) : null, body ? (_jsx("div", { className: "af-form-layout__fields subgrid", children: body })) : null, footer ? (_jsx("div", { className: "af-form-layout__actions subgrid", children: footer })) : null] }), faq ? _jsx("div", { className: "af-form-layout__faq subgrid", children: faq }) : null] }));
|
|
75
|
+
};
|
|
76
|
+
FormLayout.Header = Header;
|
|
77
|
+
FormLayout.Body = Body;
|
|
78
|
+
FormLayout.Footer = Footer;
|
|
79
|
+
FormLayout.Faq = Faq;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/prospect/Link/LinkApollo.css";
|
|
2
|
-
export { Link, type LinkVariants, linkVariants } from "./LinkCommon";
|
|
2
|
+
export { Link, type LinkVariants, linkVariants, type LinkProps, } from "./LinkCommon";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/prospect/Link/LinkApollo.css";
|
|
2
|
-
export { Link, linkVariants } from "./LinkCommon";
|
|
2
|
+
export { Link, linkVariants, } from "./LinkCommon";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, PropsWithChildren, type ReactNode } from "react";
|
|
2
2
|
export declare const linkVariants: {
|
|
3
|
-
readonly default: "default";
|
|
4
|
-
readonly underline: "underline";
|
|
5
3
|
readonly inverse: "inverse";
|
|
6
4
|
};
|
|
7
5
|
export type LinkVariants = keyof typeof linkVariants;
|
|
8
|
-
type LinkProps = {
|
|
6
|
+
export type LinkProps = {
|
|
9
7
|
variant?: LinkVariants;
|
|
10
8
|
openInNewTab?: boolean;
|
|
11
9
|
leftIcon?: ReactNode;
|
|
12
10
|
rightIcon?: ReactNode;
|
|
13
11
|
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use variant instead
|
|
14
|
+
*/
|
|
14
15
|
classModifier?: string;
|
|
15
16
|
} & ComponentPropsWithoutRef<"a">;
|
|
16
17
|
export declare const Link: ({ href, variant, openInNewTab, leftIcon, rightIcon, children, className, classModifier, ...props }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import openInNew from "@material-symbols/svg-400/outlined/open_in_new.svg";
|
|
3
|
-
import { useMemo, } from "react";
|
|
4
3
|
import { Svg } from "../Svg/Svg";
|
|
5
|
-
import {
|
|
4
|
+
import { getClassName } from "../utilities/getClassName";
|
|
6
5
|
export const linkVariants = {
|
|
7
|
-
default: "default",
|
|
8
|
-
underline: "underline",
|
|
9
6
|
inverse: "inverse",
|
|
10
7
|
};
|
|
11
|
-
export const Link = ({ href, variant
|
|
8
|
+
export const Link = ({ href, variant, openInNewTab = false, leftIcon, rightIcon, children, className, classModifier = "", ...props }) => {
|
|
12
9
|
const newTabProps = openInNewTab && {
|
|
13
10
|
target: "_blank",
|
|
14
11
|
rel: "noopener noreferrer",
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
return (_jsxs("a", { className: getClassName({
|
|
14
|
+
baseClassName: "af-link",
|
|
15
|
+
modifiers: [classModifier, variant, openInNewTab && "openInNewTab"],
|
|
16
|
+
className,
|
|
17
|
+
}), href: href, ...newTabProps, ...props, children: [leftIcon, children, openInNewTab || Boolean(rightIcon)
|
|
18
18
|
? (rightIcon ?? _jsx(Svg, { src: openInNew }))
|
|
19
19
|
: null] }));
|
|
20
20
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/client/Link/LinkLF.css";
|
|
2
|
-
export { Link, type LinkVariants, linkVariants } from "./LinkCommon";
|
|
2
|
+
export { Link, type LinkVariants, linkVariants, type LinkProps, } from "./LinkCommon";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/client/Link/LinkLF.css";
|
|
2
|
-
export { Link, linkVariants } from "./LinkCommon";
|
|
2
|
+
export { Link, linkVariants, } from "./LinkCommon";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type BodyColorVariants = "white" | "blue" | "alternate";
|
|
3
|
+
export type TBodyProps = ComponentPropsWithRef<"tbody"> & {
|
|
4
|
+
variant?: BodyColorVariants;
|
|
5
|
+
};
|
|
6
|
+
export declare const TBody: ({ variant, className, children, ...tableBodyProps }: TBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const TBody = ({ variant = "white", className, children, ...tableBodyProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__tbody",
|
|
6
|
+
className,
|
|
7
|
+
modifiers: [variant],
|
|
8
|
+
});
|
|
9
|
+
return (_jsx("tbody", { className: componentClassName, ...tableBodyProps, children: children }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type HeadColorVariants = "gray" | "blue";
|
|
3
|
+
export type THeadProps = ComponentPropsWithRef<"thead"> & {
|
|
4
|
+
variant?: HeadColorVariants;
|
|
5
|
+
};
|
|
6
|
+
export declare const THead: ({ variant, className, children, ...tableHeadProps }: THeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const THead = ({ variant = "blue", className, children, ...tableHeadProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__thead",
|
|
6
|
+
className,
|
|
7
|
+
modifiers: [variant],
|
|
8
|
+
});
|
|
9
|
+
return (_jsx("thead", { className: componentClassName, ...tableHeadProps, children: children }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import { type RowSizeVariants } from "./Tr";
|
|
3
|
+
import { type BodyColorVariants } from "./TBody";
|
|
4
|
+
import { type HeadColorVariants } from "./THead";
|
|
5
|
+
export type { HeadColorVariants, BodyColorVariants, RowSizeVariants };
|
|
6
|
+
export type TableProps = ComponentPropsWithRef<"table">;
|
|
7
|
+
export declare const Table: {
|
|
8
|
+
({ className, children, ...tableProps }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
THead: ({ variant, className, children, ...tableHeadProps }: import("./THead").THeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
TBody: ({ variant, className, children, ...tableBodyProps }: import("./TBody").TBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Th: ({ position, onCheck, checkboxPosition, onSort, className, children, ...tableHeaderProps }: import("./Th").ThProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Tr: ({ size, className, children, ...tableRowProps }: import("./Tr").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Td: ({ position, verticalAlign, size, variant, className, children, ...tableCellProps }: import("./Td").TdProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
import { Td } from "./Td";
|
|
4
|
+
import { Tr } from "./Tr";
|
|
5
|
+
import { Th } from "./Th";
|
|
6
|
+
import { TBody } from "./TBody";
|
|
7
|
+
import { THead } from "./THead";
|
|
8
|
+
export const Table = ({ className, children, ...tableProps }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-table",
|
|
11
|
+
className,
|
|
12
|
+
});
|
|
13
|
+
return (_jsx("table", { className: componentClassName, ...tableProps, children: children }));
|
|
14
|
+
};
|
|
15
|
+
Table.THead = THead;
|
|
16
|
+
Table.TBody = TBody;
|
|
17
|
+
Table.Th = Th;
|
|
18
|
+
Table.Tr = Tr;
|
|
19
|
+
Table.Td = Td;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type CellContentPositionVariants = "left" | "center" | "right";
|
|
3
|
+
export type CellContentVerticalAlignVariants = "top" | "middle";
|
|
4
|
+
export declare const tdSizeVariants: {
|
|
5
|
+
readonly L: "large";
|
|
6
|
+
readonly M: "medium";
|
|
7
|
+
readonly S: "small";
|
|
8
|
+
};
|
|
9
|
+
export type TdSizeVariants = keyof typeof tdSizeVariants;
|
|
10
|
+
export type CellColorVariant = "white" | "blue";
|
|
11
|
+
export type TdProps = ComponentPropsWithRef<"td"> & {
|
|
12
|
+
position?: CellContentPositionVariants;
|
|
13
|
+
verticalAlign?: CellContentVerticalAlignVariants;
|
|
14
|
+
size?: TdSizeVariants;
|
|
15
|
+
variant?: CellColorVariant;
|
|
16
|
+
};
|
|
17
|
+
export declare const Td: ({ position, verticalAlign, size, variant, className, children, ...tableCellProps }: TdProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const tdSizeVariants = {
|
|
4
|
+
L: "large",
|
|
5
|
+
M: "medium",
|
|
6
|
+
S: "small",
|
|
7
|
+
};
|
|
8
|
+
export const Td = ({ position = "left", verticalAlign = "middle", size, variant, className, children, ...tableCellProps }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-table__td",
|
|
11
|
+
className,
|
|
12
|
+
modifiers: [position, verticalAlign, size && tdSizeVariants[size], variant],
|
|
13
|
+
});
|
|
14
|
+
return (_jsx("td", { className: componentClassName, ...tableCellProps, children: children }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type HeaderCellPositionVariants = "left" | "center" | "right";
|
|
3
|
+
export type ThProps = ComponentPropsWithRef<"th"> & {
|
|
4
|
+
position?: HeaderCellPositionVariants;
|
|
5
|
+
checkboxPosition?: HeaderCellPositionVariants;
|
|
6
|
+
onCheck?: () => void;
|
|
7
|
+
onSort?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const Th: ({ position, onCheck, checkboxPosition, onSort, className, children, ...tableHeaderProps }: ThProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import unfoldMore from "@material-symbols/svg-400/rounded/unfold_more-fill.svg";
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
|
+
import { Checkbox } from "../Form/Checkbox/Checkbox/CheckboxCommon";
|
|
5
|
+
import { ClickIcon } from "../ClickIcon/ClickIconCommon";
|
|
6
|
+
export const Th = ({ position = "left", onCheck, checkboxPosition = "left", onSort, className, children, ...tableHeaderProps }) => {
|
|
7
|
+
const componentClassName = getClassName({
|
|
8
|
+
baseClassName: "af-table__th",
|
|
9
|
+
className,
|
|
10
|
+
modifiers: [position, checkboxPosition && `checkbox-${checkboxPosition}`],
|
|
11
|
+
});
|
|
12
|
+
return (_jsx("th", { className: componentClassName, ...tableHeaderProps, children: _jsxs("div", { className: "af-table__th-wrapper", children: [onCheck ? _jsx(Checkbox, { onChange: onCheck }) : null, _jsx("span", { className: "af-table__th-content", children: children }), onSort ? (_jsx(ClickIcon, { onClick: onSort, src: unfoldMore, variant: "ghost", className: "af-table__th-sort-icon" })) : null] }) }));
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export declare const rowSizeVariants: {
|
|
3
|
+
readonly L: "large";
|
|
4
|
+
readonly M: "medium";
|
|
5
|
+
readonly S: "small";
|
|
6
|
+
};
|
|
7
|
+
export type RowSizeVariants = keyof typeof rowSizeVariants;
|
|
8
|
+
export type TrProps = ComponentPropsWithRef<"tr"> & {
|
|
9
|
+
size?: RowSizeVariants;
|
|
10
|
+
};
|
|
11
|
+
export declare const Tr: ({ size, className, children, ...tableRowProps }: TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const rowSizeVariants = {
|
|
4
|
+
L: "large",
|
|
5
|
+
M: "medium",
|
|
6
|
+
S: "small",
|
|
7
|
+
};
|
|
8
|
+
export const Tr = ({ size = "S", className, children, ...tableRowProps }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-table__tr",
|
|
11
|
+
className,
|
|
12
|
+
modifiers: [rowSizeVariants[size]],
|
|
13
|
+
});
|
|
14
|
+
return (_jsx("tr", { className: componentClassName, ...tableRowProps, children: children }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type DRowDirectionVariants = "row" | "column";
|
|
3
|
+
export type TrProps = ComponentPropsWithRef<"div"> & {
|
|
4
|
+
direction?: DRowDirectionVariants;
|
|
5
|
+
};
|
|
6
|
+
export declare const DRow: ({ className, children, direction, ...dRowProps }: TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const DRow = ({ className, children, direction = "row", ...dRowProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table-mobile-card__drow",
|
|
6
|
+
className,
|
|
7
|
+
modifiers: [direction],
|
|
8
|
+
});
|
|
9
|
+
return (_jsx("div", { className: componentClassName, ...dRowProps, children: children }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const Dd = ({ className, children, ...ddProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table-mobile-card__dd",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("dd", { className: componentClassName, ...ddProps, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const Dt = ({ className, children, ...dtProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table-mobile-card__dt",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("dt", { className: componentClassName, ...dtProps, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import "@axa-fr/canopee-css/prospect/TableMobileCard/TableMobileCardAll.css";
|
|
3
|
+
export type TableMobileCardVariants = "white" | "blue" | "alternate";
|
|
4
|
+
export type TableMobileCardProps = ComponentPropsWithRef<"dl"> & {
|
|
5
|
+
variant?: TableMobileCardVariants;
|
|
6
|
+
};
|
|
7
|
+
export declare const TableMobileCard: {
|
|
8
|
+
({ className, children, variant, ...tableCardProps }: TableMobileCardProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
DRow: ({ className, children, direction, ...dRowProps }: import("./DRow").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Dt: ({ className, children, ...dtProps }: import("./Dt").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Dd: ({ className, children, ...ddProps }: import("./Dd").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
import { DRow } from "./DRow";
|
|
4
|
+
import { Dt } from "./Dt";
|
|
5
|
+
import { Dd } from "./Dd";
|
|
6
|
+
import "@axa-fr/canopee-css/prospect/TableMobileCard/TableMobileCardAll.css";
|
|
7
|
+
export const TableMobileCard = ({ className, children, variant = "alternate", ...tableCardProps }) => {
|
|
8
|
+
const componentClassName = getClassName({
|
|
9
|
+
baseClassName: "af-table-mobile-card",
|
|
10
|
+
className,
|
|
11
|
+
modifiers: [variant],
|
|
12
|
+
});
|
|
13
|
+
return (_jsx("dl", { className: componentClassName, ...tableCardProps, children: children }));
|
|
14
|
+
};
|
|
15
|
+
TableMobileCard.DRow = DRow;
|
|
16
|
+
TableMobileCard.Dt = Dt;
|
|
17
|
+
TableMobileCard.Dd = Dd;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Link } from "../../Link/LinkApollo";
|
|
3
|
+
import { ExitLayout } from "../../Layout/ExitLayout/ExitLayoutApollo";
|
|
4
|
+
import { ErrorPageCommon } from "./ErrorPageCommon";
|
|
5
|
+
export const ErrorPage = (props) => (_jsx(ErrorPageCommon, { ...props, LinkComponent: Link, ExitLayoutComponent: ExitLayout }));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentType, PropsWithChildren } from "react";
|
|
2
|
+
import { type ExitLayoutWithSubComponents, type ExitLayoutProps } from "../../Layout/ExitLayout/ExitLayoutCommon";
|
|
3
|
+
import { type LinkProps } from "../../Link/LinkCommon";
|
|
4
|
+
export type ErrorPageProps = PropsWithChildren & Pick<ExitLayoutProps, "headingProps"> & {
|
|
5
|
+
linkProps?: LinkProps;
|
|
6
|
+
};
|
|
7
|
+
type ErrorPageCommonProps = ErrorPageProps & {
|
|
8
|
+
LinkComponent: ComponentType<LinkProps>;
|
|
9
|
+
ExitLayoutComponent: ExitLayoutWithSubComponents;
|
|
10
|
+
};
|
|
11
|
+
export declare const ErrorPageCommon: ({ headingProps, children, linkProps, LinkComponent, ExitLayoutComponent, }: ErrorPageCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import close from "@material-symbols/svg-400/rounded/close.svg";
|
|
3
|
+
export const ErrorPageCommon = ({ headingProps, children, linkProps, LinkComponent, ExitLayoutComponent, }) => (_jsxs(ExitLayoutComponent, { headingProps: headingProps, iconProps: {
|
|
4
|
+
src: close,
|
|
5
|
+
hasBackground: true,
|
|
6
|
+
variant: "error",
|
|
7
|
+
}, children: [_jsx(ExitLayoutComponent.Content, { children: children }), linkProps ? (_jsx(ExitLayoutComponent.Action, { children: _jsx(LinkComponent, { className: "af-btn-client", ...linkProps }) })) : null] }));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Link } from "../../Link/LinkLF";
|
|
3
|
+
import { ExitLayout } from "../../Layout/ExitLayout/ExitLayoutLF";
|
|
4
|
+
import { ErrorPageCommon } from "./ErrorPageCommon";
|
|
5
|
+
export const ErrorPage = (props) => (_jsx(ErrorPageCommon, { ...props, LinkComponent: Link, ExitLayoutComponent: ExitLayout }));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DataAgent } from "../../DataAgent/DataAgentApollo";
|
|
3
|
+
import { Link } from "../../Link/LinkApollo";
|
|
4
|
+
import { ExitLayout } from "../../Layout/ExitLayout/ExitLayoutApollo";
|
|
5
|
+
import { ValidPageCommon } from "./ValidPageCommon";
|
|
6
|
+
export const ValidPage = (props) => (_jsx(ValidPageCommon, { ...props, DataAgentComponent: DataAgent, LinkComponent: Link, ExitLayoutComponent: ExitLayout }));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentType, PropsWithChildren } from "react";
|
|
2
|
+
import { type ExitLayoutWithSubComponents, type ExitLayoutProps } from "../../Layout/ExitLayout/ExitLayoutCommon";
|
|
3
|
+
import { type DataAgentProps } from "../../DataAgent/DataAgentCommon";
|
|
4
|
+
import { type LinkProps } from "../../Link/LinkCommon";
|
|
5
|
+
export type ValidPageProps = PropsWithChildren & Pick<ExitLayoutProps, "headingProps"> & {
|
|
6
|
+
dataAgentProps?: DataAgentProps;
|
|
7
|
+
linkProps?: LinkProps;
|
|
8
|
+
};
|
|
9
|
+
type ValidPageCommonProps = ValidPageProps & {
|
|
10
|
+
DataAgentComponent: ComponentType<DataAgentProps>;
|
|
11
|
+
LinkComponent: ComponentType<LinkProps>;
|
|
12
|
+
ExitLayoutComponent: ExitLayoutWithSubComponents;
|
|
13
|
+
};
|
|
14
|
+
export declare const ValidPageCommon: ({ headingProps, children, dataAgentProps, linkProps, DataAgentComponent, LinkComponent, ExitLayoutComponent, }: ValidPageCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import check from "@material-symbols/svg-400/rounded/check.svg";
|
|
3
|
+
export const ValidPageCommon = ({ headingProps, children, dataAgentProps, linkProps, DataAgentComponent, LinkComponent, ExitLayoutComponent, }) => (_jsxs(ExitLayoutComponent, { headingProps: headingProps, iconProps: {
|
|
4
|
+
src: check,
|
|
5
|
+
hasBackground: true,
|
|
6
|
+
variant: "success",
|
|
7
|
+
}, children: [_jsx(ExitLayoutComponent.Content, { children: children }), dataAgentProps ? (_jsx(ExitLayoutComponent.Agent, { children: _jsx(DataAgentComponent, { ...dataAgentProps }) })) : null, linkProps ? (_jsx(ExitLayoutComponent.Action, { children: _jsx(LinkComponent, { className: "af-btn-client", ...linkProps }) })) : null] }));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DataAgent } from "../../DataAgent/DataAgentLF";
|
|
3
|
+
import { Link } from "../../Link/LinkLF";
|
|
4
|
+
import { ExitLayout } from "../../Layout/ExitLayout/ExitLayoutLF";
|
|
5
|
+
import { ValidPageCommon } from "./ValidPageCommon";
|
|
6
|
+
export const ValidPage = (props) => (_jsx(ValidPageCommon, { ...props, DataAgentComponent: DataAgent, LinkComponent: Link, ExitLayoutComponent: ExitLayout }));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps, ElementType } from "react";
|
|
2
|
+
type Cols = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}`;
|
|
3
|
+
export type GridContainerProps<T extends ElementType = "div"> = ComponentProps<T> & {
|
|
4
|
+
"data-cols-mobile"?: Cols;
|
|
5
|
+
"data-cols-tablet"?: Cols;
|
|
6
|
+
"data-cols-desktop-small"?: Cols;
|
|
7
|
+
"data-cols-desktop-medium"?: Cols;
|
|
8
|
+
"data-cols-desktop-large"?: Cols;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|