@axa-fr/design-system-apollo-react 1.0.5-alpha.261 → 1.0.5-alpha.262
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/ContentItemMono/ContentItemMonoApollo.d.ts +3 -0
- package/dist/ContentItemMono/ContentItemMonoApollo.js +6 -0
- package/dist/ContentItemMono/ContentItemMonoCommon.d.ts +31 -0
- package/dist/ContentItemMono/ContentItemMonoCommon.js +23 -0
- package/dist/ContentItemMono/ContentItemMonoCore.d.ts +9 -0
- package/dist/ContentItemMono/ContentItemMonoCore.js +4 -0
- package/dist/ContentItemMono/ContentItemMonoLF.d.ts +3 -0
- package/dist/ContentItemMono/ContentItemMonoLF.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/indexLF.d.ts +1 -0
- package/dist/indexLF.js +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoApollo.scss";
|
|
3
|
+
import { BasePicture } from "../BasePicture/BasePictureApollo";
|
|
4
|
+
import { Icon } from "../Icon/IconApollo";
|
|
5
|
+
import { ContentItemMonoCommon, } from "./ContentItemMonoCommon";
|
|
6
|
+
export const ContentItemMono = (props) => (_jsx(ContentItemMonoCommon, { ...props, BasePictureComponent: BasePicture, IconComponent: Icon }));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentProps, ComponentType } from "react";
|
|
2
|
+
import { Icon } from "../Icon/IconCommon";
|
|
3
|
+
import { BasePicture } from "../BasePicture/BasePictureCommon";
|
|
4
|
+
import { ContentItemCoreProps } from "./ContentItemMonoCore";
|
|
5
|
+
export type ContentMonoItemSize = "medium" | "large";
|
|
6
|
+
export type ContentMonoItemPictureProps = {
|
|
7
|
+
type: "picture";
|
|
8
|
+
size?: ContentMonoItemSize;
|
|
9
|
+
picture: string;
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
};
|
|
13
|
+
export type ContentMonoItemIconProps = {
|
|
14
|
+
type: "icon";
|
|
15
|
+
icon: string;
|
|
16
|
+
title: string;
|
|
17
|
+
subtitle1?: string;
|
|
18
|
+
subtitle2?: string;
|
|
19
|
+
};
|
|
20
|
+
export type ContentMonoItemStickProps = {
|
|
21
|
+
type: "stick";
|
|
22
|
+
title: string;
|
|
23
|
+
subtitle?: string;
|
|
24
|
+
};
|
|
25
|
+
export type ContentItemProps = ContentMonoItemPictureProps | ContentMonoItemIconProps | ContentMonoItemStickProps;
|
|
26
|
+
export type ContentItemCommonProps = ContentItemProps & {
|
|
27
|
+
IconComponent: ComponentType<ComponentProps<typeof Icon>>;
|
|
28
|
+
BasePictureComponent: ComponentType<ComponentProps<typeof BasePicture>>;
|
|
29
|
+
};
|
|
30
|
+
export declare const getContentItemCoreProps: ({ IconComponent, BasePictureComponent, type, ...props }: ContentItemCommonProps) => ContentItemCoreProps;
|
|
31
|
+
export declare const ContentItemMonoCommon: (props: ContentItemCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ContentItemMonoCore, } from "./ContentItemMonoCore";
|
|
3
|
+
export const getContentItemCoreProps = ({ IconComponent, BasePictureComponent, type, ...props }) => {
|
|
4
|
+
if (type === "icon") {
|
|
5
|
+
const { icon, title, subtitle1, subtitle2 } = props;
|
|
6
|
+
return {
|
|
7
|
+
title,
|
|
8
|
+
primarySubtitle: subtitle1,
|
|
9
|
+
subtitle: subtitle2,
|
|
10
|
+
leftComponent: _jsx(IconComponent, { "data-testid": "icon", src: icon }),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
if (type === "picture") {
|
|
14
|
+
return {
|
|
15
|
+
...props,
|
|
16
|
+
leftComponent: (_jsx(BasePictureComponent, { src: props.picture, alt: props.title })),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return props;
|
|
20
|
+
};
|
|
21
|
+
export const ContentItemMonoCommon = (props) => {
|
|
22
|
+
return _jsx(ContentItemMonoCore, { ...getContentItemCoreProps(props) });
|
|
23
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ContentMonoItemSize = "medium" | "large";
|
|
2
|
+
export type ContentItemCoreProps = {
|
|
3
|
+
size?: ContentMonoItemSize;
|
|
4
|
+
title?: string;
|
|
5
|
+
primarySubtitle?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
leftComponent?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare const ContentItemMonoCore: ({ size, leftComponent, title, primarySubtitle, subtitle, }: ContentItemCoreProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const ContentItemMonoCore = ({ size = "medium", leftComponent, title, primarySubtitle, subtitle, }) => {
|
|
3
|
+
return (_jsxs("div", { "data-testid": "container", className: `af-content-item-mono ${size}`, children: [leftComponent ?? _jsx("div", { className: "stick" }), _jsxs("div", { className: "text-content", children: [_jsx("span", { className: "title", children: title }), primarySubtitle && (_jsx("span", { className: "subtitle-primary", children: primarySubtitle })), subtitle && _jsx("span", { className: "subtitle", children: subtitle })] })] }));
|
|
4
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoLF.scss";
|
|
3
|
+
import { BasePicture } from "../BasePicture/BasePictureLF";
|
|
4
|
+
import { Icon } from "../Icon/IconLF";
|
|
5
|
+
import { ContentItemMonoCommon, } from "./ContentItemMonoCommon";
|
|
6
|
+
export const ContentItemMono = (props) => (_jsx(ContentItemMonoCommon, { ...props, BasePictureComponent: BasePicture, IconComponent: Icon }));
|
package/dist/index.d.ts
CHANGED
|
@@ -31,3 +31,4 @@ export { Heading, type HeadingLevel } from "./Heading/HeadingApollo";
|
|
|
31
31
|
export { Checkbox } from "./Form/checkbox/checkbox/CheckboxApollo";
|
|
32
32
|
export { CheckboxText } from "./Form/checkbox/checkboxText/CheckboxTextApollo";
|
|
33
33
|
export { CheckboxCard } from "./Form/checkbox/checkboxCard/CheckboxCardApollo";
|
|
34
|
+
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
|
package/dist/index.js
CHANGED
|
@@ -31,3 +31,4 @@ export { Heading } from "./Heading/HeadingApollo";
|
|
|
31
31
|
export { Checkbox } from "./Form/checkbox/checkbox/CheckboxApollo";
|
|
32
32
|
export { CheckboxText } from "./Form/checkbox/checkboxText/CheckboxTextApollo";
|
|
33
33
|
export { CheckboxCard } from "./Form/checkbox/checkboxCard/CheckboxCardApollo";
|
|
34
|
+
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -30,3 +30,4 @@ export { Heading, type HeadingLevel } from "./Heading/HeadingLF";
|
|
|
30
30
|
export { Checkbox } from "./Form/checkbox/checkbox/CheckboxLf";
|
|
31
31
|
export { CheckboxText } from "./Form/checkbox/checkboxText/CheckboxTextLF";
|
|
32
32
|
export { CheckboxCard } from "./Form/checkbox/checkboxCard/CheckboxCardLF";
|
|
33
|
+
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -30,3 +30,4 @@ export { Heading } from "./Heading/HeadingLF";
|
|
|
30
30
|
export { Checkbox } from "./Form/checkbox/checkbox/CheckboxLf";
|
|
31
31
|
export { CheckboxText } from "./Form/checkbox/checkboxText/CheckboxTextLF";
|
|
32
32
|
export { CheckboxCard } from "./Form/checkbox/checkboxCard/CheckboxCardLF";
|
|
33
|
+
export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.5-alpha.
|
|
3
|
+
"version": "1.0.5-alpha.262",
|
|
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": "1.0.5-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.262",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.262",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|