@axa-fr/design-system-apollo-react 2.0.4-alpha.19 → 2.0.4-alpha.20
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/ContentItemDuoAction/ContentItemDuoActionApollo.d.ts +4 -0
- package/dist/ContentItemDuoAction/ContentItemDuoActionApollo.js +6 -0
- package/dist/ContentItemDuoAction/ContentItemDuoActionCommon.d.ts +28 -0
- package/dist/ContentItemDuoAction/ContentItemDuoActionCommon.js +10 -0
- package/dist/ContentItemDuoAction/ContentItemDuoActionLF.d.ts +5 -0
- package/dist/ContentItemDuoAction/ContentItemDuoActionLF.js +7 -0
- package/dist/ContentItemMono/ContentItemMonoCommon.d.ts +6 -2
- package/dist/ContentItemMono/ContentItemMonoCommon.js +3 -2
- package/dist/Toggle/ToggleCommon.d.ts +2 -2
- 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,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemDuoAction/ContentItemDuoActionCommon.scss";
|
|
2
|
+
import { type ContentItemDuoActionProps } from "./ContentItemDuoActionCommon";
|
|
3
|
+
export { type ContentItemDuoActionState } from "./ContentItemDuoActionCommon";
|
|
4
|
+
export declare const ContentItemDuoAction: ({ ...props }: ContentItemDuoActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemDuoAction/ContentItemDuoActionCommon.scss";
|
|
3
|
+
import { ContentItemDuoActionCommon, } from "./ContentItemDuoActionCommon";
|
|
4
|
+
import { ContentItemMono } from "../ContentItemMono/ContentItemMonoApollo";
|
|
5
|
+
import { Toggle } from "../Toggle/ToggleApollo";
|
|
6
|
+
export const ContentItemDuoAction = ({ ...props }) => (_jsx(ContentItemDuoActionCommon, { ...props, ContentItemMonoComponent: ContentItemMono, ToggleComponent: Toggle }));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentType, type ReactElement } from "react";
|
|
2
|
+
import type { ToggleProps } from "../Toggle/ToggleCommon";
|
|
3
|
+
import type { ContentItemProps } from "../ContentItemMono/ContentItemMonoCommon";
|
|
4
|
+
import type { ButtonProps } from "../Button/ButtonCommon";
|
|
5
|
+
export declare const ContentItemDuoActionState: {
|
|
6
|
+
readonly edit: "edit";
|
|
7
|
+
readonly toggle: "toggle";
|
|
8
|
+
};
|
|
9
|
+
export type ContentItemDuoActionToggleProps = {
|
|
10
|
+
className?: string;
|
|
11
|
+
state: "toggle";
|
|
12
|
+
ContentItemMonoComponent: ComponentType<ContentItemProps>;
|
|
13
|
+
contentItemProps: ContentItemProps;
|
|
14
|
+
ToggleComponent: ComponentType<ToggleProps>;
|
|
15
|
+
toggleProps: ToggleProps;
|
|
16
|
+
};
|
|
17
|
+
export type ContentItemDuoActionButtonsProps = {
|
|
18
|
+
className?: string;
|
|
19
|
+
state: "edit";
|
|
20
|
+
ContentItemMonoComponent: ComponentType<ContentItemProps>;
|
|
21
|
+
contentItemProps: ContentItemProps;
|
|
22
|
+
buttons: ReactElement<ComponentType<ButtonProps>>;
|
|
23
|
+
};
|
|
24
|
+
export type ContentItemDuoActionProps = Omit<ContentItemDuoActionToggleProps, "ToggleComponent" | "ContentItemMonoComponent"> | Omit<ContentItemDuoActionButtonsProps, "ContentItemMonoComponent">;
|
|
25
|
+
export type ContentItemDuoActionCommonProps = ContentItemDuoActionToggleProps | ContentItemDuoActionButtonsProps;
|
|
26
|
+
export declare const ContentItemDuoActionCommon: ({ className, state, ContentItemMonoComponent, contentItemProps, ToggleComponent, ...props }: ContentItemDuoActionCommonProps & {
|
|
27
|
+
ToggleComponent?: ComponentType<ToggleProps>;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentClassName } from "../utilities/getComponentClassName";
|
|
3
|
+
export const ContentItemDuoActionState = {
|
|
4
|
+
edit: "edit",
|
|
5
|
+
toggle: "toggle",
|
|
6
|
+
};
|
|
7
|
+
export const ContentItemDuoActionCommon = ({ className, state, ContentItemMonoComponent, contentItemProps, ToggleComponent, ...props }) => {
|
|
8
|
+
const componentClassName = getComponentClassName("af-content-item-duo-action", className);
|
|
9
|
+
return (_jsxs("div", { className: componentClassName, children: [_jsx(ContentItemMonoComponent, { ...contentItemProps }), _jsx("div", { className: "af-action-container", children: state === "edit" ? (props.buttons) : (_jsx(ToggleComponent, { ...props.toggleProps })) })] }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemDuoAction/ContentItemDuoActionCommon.scss";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoLF.scss";
|
|
3
|
+
import { type ContentItemDuoActionProps } from "./ContentItemDuoActionCommon";
|
|
4
|
+
export { type ContentItemDuoActionState } from "./ContentItemDuoActionCommon";
|
|
5
|
+
export declare const ContentItemDuoAction: ({ ...props }: ContentItemDuoActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemDuoAction/ContentItemDuoActionCommon.scss";
|
|
3
|
+
import "@axa-fr/design-system-apollo-css/dist/ContentItemMono/ContentItemMonoLF.scss";
|
|
4
|
+
import { ContentItemDuoActionCommon, } from "./ContentItemDuoActionCommon";
|
|
5
|
+
import { ContentItemMono } from "../ContentItemMono/ContentItemMonoLF";
|
|
6
|
+
import { Toggle } from "../Toggle/ToggleLF";
|
|
7
|
+
export const ContentItemDuoAction = ({ ...props }) => (_jsx(ContentItemDuoActionCommon, { ...props, ContentItemMonoComponent: ContentItemMono, ToggleComponent: Toggle }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ComponentType } from "react";
|
|
2
|
-
import { Icon } from "../Icon/IconCommon";
|
|
2
|
+
import { Icon, IconProps } from "../Icon/IconCommon";
|
|
3
3
|
import { type ContentItemCoreProps } from "./ContentItemMonoCore";
|
|
4
4
|
export type ContentMonoItemSize = "medium" | "large";
|
|
5
5
|
export type ContentMonoItemPictureProps = {
|
|
@@ -11,7 +11,11 @@ export type ContentMonoItemPictureProps = {
|
|
|
11
11
|
};
|
|
12
12
|
export type ContentMonoItemIconProps = {
|
|
13
13
|
type: "icon";
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `iconProps` instead.
|
|
16
|
+
*/
|
|
17
|
+
icon?: string;
|
|
18
|
+
iconProps?: IconProps;
|
|
15
19
|
title: string;
|
|
16
20
|
subtitle1?: string;
|
|
17
21
|
subtitle2?: string;
|
|
@@ -3,12 +3,13 @@ import { BasePicture } from "../BasePicture/BasePicture";
|
|
|
3
3
|
import { ContentItemMonoCore, } from "./ContentItemMonoCore";
|
|
4
4
|
export const getContentItemCoreProps = ({ IconComponent, type, ...props }) => {
|
|
5
5
|
if (type === "icon") {
|
|
6
|
-
const { icon, title, subtitle1, subtitle2 } = props;
|
|
6
|
+
const { icon, iconProps, title, subtitle1, subtitle2 } = props;
|
|
7
7
|
return {
|
|
8
8
|
title,
|
|
9
9
|
primarySubtitle: subtitle1,
|
|
10
10
|
subtitle: subtitle2,
|
|
11
|
-
leftComponent:
|
|
11
|
+
leftComponent: (iconProps && _jsx(IconComponent, { "data-testid": "icon", ...iconProps })) ||
|
|
12
|
+
(icon && _jsx(IconComponent, { "data-testid": "icon", src: icon })),
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
if (type === "picture") {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
export type ToggleProps = Omit<InputHTMLAttributes<HTMLInputElement>, "style" | "type">;
|
|
2
3
|
export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
|
-
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export { Footer, type FooterProps } from "./Layout/Footer/FooterApollo";
|
|
|
38
38
|
export { Link, linkVariants, type LinkVariants } from "./Link/LinkApollo";
|
|
39
39
|
export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./List/ClickItem/ClickItemApollo";
|
|
40
40
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoApollo";
|
|
41
|
+
export { type ContentItemDuoActionState, ContentItemDuoAction, } from "./ContentItemDuoAction/ContentItemDuoActionApollo";
|
|
41
42
|
export { Message, messageVariants, type MessageVariants, } from "./Message/MessageApollo";
|
|
42
43
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalApollo";
|
|
43
44
|
export { ProgressBar } from "./ProgressBar/ProgressBarApollo";
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export { Footer } from "./Layout/Footer/FooterApollo";
|
|
|
37
37
|
export { Link, linkVariants } from "./Link/LinkApollo";
|
|
38
38
|
export { ClickItem, clickItemStates, clickItemVariants, } from "./List/ClickItem/ClickItemApollo";
|
|
39
39
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoApollo";
|
|
40
|
+
export { ContentItemDuoAction, } from "./ContentItemDuoAction/ContentItemDuoActionApollo";
|
|
40
41
|
export { Message, messageVariants, } from "./Message/MessageApollo";
|
|
41
42
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalApollo";
|
|
42
43
|
export { ProgressBar } from "./ProgressBar/ProgressBarApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export { Footer, type FooterProps } from "./Layout/Footer/FooterLF";
|
|
|
42
42
|
export { Link, linkVariants, type LinkVariants } from "./Link/LinkLF";
|
|
43
43
|
export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, type ClickItemVariants, } from "./List/ClickItem/ClickItemLF";
|
|
44
44
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoLF";
|
|
45
|
+
export { type ContentItemDuoActionState, ContentItemDuoAction, } from "./ContentItemDuoAction/ContentItemDuoActionLF";
|
|
45
46
|
export { Message, messageVariants, type MessageVariants, } from "./Message/MessageLF";
|
|
46
47
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalLF";
|
|
47
48
|
export { ProgressBar } from "./ProgressBar/ProgressBarLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -41,6 +41,7 @@ export { Footer } from "./Layout/Footer/FooterLF";
|
|
|
41
41
|
export { Link, linkVariants } from "./Link/LinkLF";
|
|
42
42
|
export { ClickItem, clickItemStates, clickItemVariants, } from "./List/ClickItem/ClickItemLF";
|
|
43
43
|
export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoLF";
|
|
44
|
+
export { ContentItemDuoAction, } from "./ContentItemDuoAction/ContentItemDuoActionLF";
|
|
44
45
|
export { Message, messageVariants, } from "./Message/MessageLF";
|
|
45
46
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal/ModalLF";
|
|
46
47
|
export { ProgressBar } from "./ProgressBar/ProgressBarLF";
|
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.20",
|
|
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.20",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "2.0.4-alpha.20",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|