@axa-fr/design-system-apollo-react 2.0.4-alpha.71 → 2.0.4-alpha.74
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.
|
@@ -10,11 +10,12 @@ export type DataAgentProps = {
|
|
|
10
10
|
contents?: TupleMax3<ContentMonoItemIconProps>;
|
|
11
11
|
clickContents?: TupleMax3<ClickItemProps>;
|
|
12
12
|
texteOrias?: string;
|
|
13
|
+
isCompact?: boolean;
|
|
13
14
|
};
|
|
14
15
|
type DataAgentCommonProps = DataAgentProps & {
|
|
15
16
|
DividerComponent: ComponentType<ComponentProps<typeof Divider>>;
|
|
16
17
|
ContentItemMonoComponent: ComponentType<ContentItemProps>;
|
|
17
18
|
ClickItemComponent: ComponentType<ClickItemProps>;
|
|
18
19
|
};
|
|
19
|
-
export declare const DataAgentCommon: ({ className, agentProps, agentContractProps, contents, clickContents, texteOrias, DividerComponent, ContentItemMonoComponent, ClickItemComponent, }: DataAgentCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const DataAgentCommon: ({ className, agentProps, agentContractProps, contents, clickContents, texteOrias, DividerComponent, ContentItemMonoComponent, ClickItemComponent, isCompact, }: DataAgentCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -3,7 +3,7 @@ import { Fragment, useMemo } from "react";
|
|
|
3
3
|
import { getComponentClassName } from "../utilities/getComponentClassName";
|
|
4
4
|
import { useIsSmallScreen } from "../utilities/hook/useIsSmallScreen";
|
|
5
5
|
import { BREAKPOINT } from "../utilities/constants";
|
|
6
|
-
export const DataAgentCommon = ({ className, agentProps, agentContractProps, contents, clickContents, texteOrias, DividerComponent, ContentItemMonoComponent, ClickItemComponent, }) => {
|
|
6
|
+
export const DataAgentCommon = ({ className, agentProps, agentContractProps, contents, clickContents, texteOrias, DividerComponent, ContentItemMonoComponent, ClickItemComponent, isCompact = true, }) => {
|
|
7
7
|
const componentClassName = useMemo(() => getComponentClassName("af-data-agent", className), [className]);
|
|
8
8
|
const isMobile = useIsSmallScreen(BREAKPOINT.SM);
|
|
9
9
|
const renderForDefaultLayout = () => (_jsxs(_Fragment, { children: [_jsxs("section", { className: "af-data-agent__intro", children: [_jsx(ContentItemMonoComponent, { ...agentProps, type: "picture" }), agentContractProps ? (_jsx(ContentItemMonoComponent, { ...agentContractProps, type: "stick" })) : null] }), _jsx(DividerComponent, {}), contents && contents?.length > 0 ? (_jsx("section", { className: "af-data-agent__info-content", children: contents.map((content) => (_jsxs(Fragment, { children: [_jsx(ContentItemMonoComponent, { ...content, type: "icon" }), _jsx(DividerComponent, { className: "af-data-agent__line" })] }, `content--${crypto.randomUUID()}`))) })) : null, clickContents && clickContents?.length > 0 ? (_jsx("section", { className: "af-data-agent__info-click-content", children: clickContents.map((clickContent) => (_jsxs(Fragment, { children: [_jsx(ClickItemComponent, { ...clickContent, variant: "small" }), _jsx(DividerComponent, { className: "af-data-agent__line" })] }, `clickContent--${crypto.randomUUID()}`))) })) : null, Boolean(texteOrias) && (_jsx("p", { className: "af-data-agent__text-orias", children: texteOrias }))] }));
|
|
@@ -11,5 +11,7 @@ export const DataAgentCommon = ({ className, agentProps, agentContractProps, con
|
|
|
11
11
|
src: agentProps.picture,
|
|
12
12
|
alt: agentProps.title,
|
|
13
13
|
}, variant: "agent" }) }));
|
|
14
|
-
return (_jsx("section", { className: componentClassName, children: isMobile
|
|
14
|
+
return (_jsx("section", { className: componentClassName, children: isMobile && isCompact
|
|
15
|
+
? renderForMobileLayout()
|
|
16
|
+
: renderForDefaultLayout() }));
|
|
15
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "2.0.4-alpha.
|
|
3
|
+
"version": "2.0.4-alpha.74",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@axa-fr/design-system-apollo-css": "2.0.4-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "2.0.4-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "2.0.4-alpha.74",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "2.0.4-alpha.74",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|