@axa-fr/design-system-apollo-react 1.0.5-alpha.260 → 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/Form/TextArea/TextAreaApollo.d.ts +12 -6
- package/dist/Form/TextArea/TextAreaCommon.d.ts +1 -6
- package/dist/Form/TextArea/TextAreaLF.d.ts +12 -6
- 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 }));
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/TextArea/TextAreaApollo.scss";
|
|
2
2
|
import { type ComponentProps } from "react";
|
|
3
3
|
import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
|
|
4
|
-
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLTextAreaElement> & import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLTextAreaElement> & import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & Pick<{
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
inputId: string;
|
|
9
|
+
idLabel: string;
|
|
10
|
+
sideButtonLabel?: string;
|
|
7
11
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
12
|
+
buttonLabel?: string;
|
|
13
|
+
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
14
|
+
ButtonComponent: import("react").ComponentType<ComponentProps<typeof import("../..").Button>>;
|
|
15
|
+
}, "label" | "description" | "sideButtonLabel" | "onSideButtonClick" | "buttonLabel"> & {
|
|
16
|
+
classModifier?: string;
|
|
8
17
|
helper?: string;
|
|
9
18
|
error?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
label: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
|
|
12
19
|
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
13
20
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
14
|
-
buttonLabel?: string;
|
|
15
21
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
16
22
|
} & Partial<{
|
|
17
23
|
message?: string;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { type ComponentProps, ComponentPropsWithRef, type ComponentType, MouseEventHandler } from "react";
|
|
2
2
|
import { ItemLabel } from "../ItemLabel/ItemLabelCommon";
|
|
3
3
|
import { ItemMessage } from "../ItemMessage/ItemMessageCommon";
|
|
4
|
-
type Props = ComponentPropsWithRef<"textarea"> & {
|
|
4
|
+
type Props = ComponentPropsWithRef<"textarea"> & Pick<ComponentProps<typeof ItemLabel>, "label" | "description" | "buttonLabel" | "sideButtonLabel" | "onSideButtonClick"> & {
|
|
5
5
|
classModifier?: string;
|
|
6
|
-
sideButtonLabel: string;
|
|
7
|
-
onSideButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
6
|
helper?: string;
|
|
9
7
|
error?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
label: ComponentProps<typeof ItemLabel>["label"];
|
|
12
8
|
ItemLabelComponent: ComponentType<Omit<ComponentProps<typeof ItemLabel>, "ButtonComponent">>;
|
|
13
9
|
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
14
|
-
buttonLabel?: string;
|
|
15
10
|
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
16
11
|
} & Partial<ComponentPropsWithRef<typeof ItemMessage>>;
|
|
17
12
|
declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/TextArea/TextAreaLF.scss";
|
|
2
2
|
import { type ComponentProps } from "react";
|
|
3
3
|
import { ItemMessage } from "../ItemMessage/ItemMessageLF";
|
|
4
|
-
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLTextAreaElement> & import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLTextAreaElement> & import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & Pick<{
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
inputId: string;
|
|
9
|
+
idLabel: string;
|
|
10
|
+
sideButtonLabel?: string;
|
|
7
11
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
12
|
+
buttonLabel?: string;
|
|
13
|
+
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
14
|
+
ButtonComponent: import("react").ComponentType<ComponentProps<typeof import("../..").Button>>;
|
|
15
|
+
}, "label" | "description" | "sideButtonLabel" | "onSideButtonClick" | "buttonLabel"> & {
|
|
16
|
+
classModifier?: string;
|
|
8
17
|
helper?: string;
|
|
9
18
|
error?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
label: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
|
|
12
19
|
ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
|
|
13
20
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
14
|
-
buttonLabel?: string;
|
|
15
21
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
16
22
|
} & Partial<{
|
|
17
23
|
message?: string;
|
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
|
},
|