@axa-fr/design-system-apollo-react 1.0.5-alpha.253 → 1.0.5-alpha.254

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.
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/List/ContentItemDuo/ContentItemDuoApollo.scss";
2
+ import type { ComponentProps } from "react";
3
+ import { ContentItemDuo as ContentItemDuoCommon } from "./ContentItemDuoCommon";
4
+ export declare const ContentItemDuo: (props: Omit<ComponentProps<typeof ContentItemDuoCommon>, "ButtonComponent">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/List/ContentItemDuo/ContentItemDuoApollo.scss";
3
+ import { Button } from "../../Button/ButtonApollo";
4
+ import { ContentItemDuo as ContentItemDuoCommon } from "./ContentItemDuoCommon";
5
+ export const ContentItemDuo = (props) => _jsx(ContentItemDuoCommon, { ...props, ButtonComponent: Button });
@@ -0,0 +1,14 @@
1
+ import { type ComponentProps, type ComponentType, type ReactNode } from "react";
2
+ import { Button } from "../../Button/ButtonCommon";
3
+ type ContentItemDuoProps = {
4
+ label: string;
5
+ value: ReactNode;
6
+ isVertical?: boolean;
7
+ className?: string;
8
+ classModifier?: string;
9
+ buttonText?: string;
10
+ onButtonClick?: () => void;
11
+ ButtonComponent: ComponentType<ComponentProps<typeof Button>>;
12
+ };
13
+ export declare const ContentItemDuo: ({ label, value, isVertical, className, classModifier, buttonText, onButtonClick, ButtonComponent, }: ContentItemDuoProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, } from "react";
3
+ import { getComponentClassName } from "../../utilities/getComponentClassName";
4
+ export const ContentItemDuo = ({ label, value, isVertical = false, className, classModifier, buttonText, onButtonClick, ButtonComponent, }) => {
5
+ const componentClassName = useMemo(() => {
6
+ const classModifiers = [classModifier];
7
+ if (isVertical) {
8
+ classModifiers.push("vertical");
9
+ }
10
+ return getComponentClassName("af-content-item-duo", className, classModifiers.filter(Boolean).join(" "));
11
+ }, [classModifier, className, isVertical]);
12
+ return (_jsxs("div", { className: componentClassName, children: [_jsx("p", { className: "af-content-item-duo__label", children: label }), typeof value === "string" ? (_jsx("p", { className: "af-content-item-duo__value", children: value })) : (_jsx("div", { className: "af-content-item-duo__value", children: value })), buttonText && (_jsx("div", { className: "af-content-item-duo__button", children: _jsx(ButtonComponent, { variant: "ghost", onClick: onButtonClick, children: buttonText }) }))] }));
13
+ };
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/List/ContentItemDuo/ContentItemDuoLF.scss";
2
+ import type { ComponentProps } from "react";
3
+ import { ContentItemDuo as ContentItemDuoCommon } from "./ContentItemDuoCommon";
4
+ export declare const ContentItemDuo: (props: Omit<ComponentProps<typeof ContentItemDuoCommon>, "ButtonComponent">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/List/ContentItemDuo/ContentItemDuoLF.scss";
3
+ import { Button } from "../../Button/ButtonLF";
4
+ import { ContentItemDuo as ContentItemDuoCommon } from "./ContentItemDuoCommon";
5
+ export const ContentItemDuo = (props) => _jsx(ContentItemDuoCommon, { ...props, ButtonComponent: Button });
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export { Toggle } from "./Toggle/ToggleApollo";
20
20
  export { BasePicture } from "./BasePicture/BasePictureApollo";
21
21
  export { Message, messageVariants, type MessageVariants, } from "./Message/MessageApollo";
22
22
  export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./CardMessage/CardMessageApollo";
23
+ export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoApollo";
23
24
  export { ProgressBar } from "./ProgressBar/ProgressBarApollo";
24
25
  export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupApollo";
25
26
  export { Stepper } from "./Stepper/StepperApollo";
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ export { Toggle } from "./Toggle/ToggleApollo";
20
20
  export { BasePicture } from "./BasePicture/BasePictureApollo";
21
21
  export { Message, messageVariants, } from "./Message/MessageApollo";
22
22
  export { CardMessage, cardMessageVariants, } from "./CardMessage/CardMessageApollo";
23
+ export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoApollo";
23
24
  export { ProgressBar } from "./ProgressBar/ProgressBarApollo";
24
25
  export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupApollo";
25
26
  export { Stepper } from "./Stepper/StepperApollo";
package/dist/indexLF.d.ts CHANGED
@@ -19,6 +19,7 @@ export { Toggle } from "./Toggle/ToggleLF";
19
19
  export { BasePicture } from "./BasePicture/BasePictureLF";
20
20
  export { Message, messageVariants, type MessageVariants, } from "./Message/MessageLF";
21
21
  export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./CardMessage/CardMessageLF";
22
+ export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoLF";
22
23
  export { ProgressBar } from "./ProgressBar/ProgressBarLF";
23
24
  export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupLF";
24
25
  export { Stepper } from "./Stepper/StepperLF";
package/dist/indexLF.js CHANGED
@@ -19,6 +19,7 @@ export { Toggle } from "./Toggle/ToggleLF";
19
19
  export { BasePicture } from "./BasePicture/BasePictureLF";
20
20
  export { Message, messageVariants, } from "./Message/MessageLF";
21
21
  export { CardMessage, cardMessageVariants, } from "./CardMessage/CardMessageLF";
22
+ export { ContentItemDuo } from "./List/ContentItemDuo/ContentItemDuoLF";
22
23
  export { ProgressBar } from "./ProgressBar/ProgressBarLF";
23
24
  export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupLF";
24
25
  export { Stepper } from "./Stepper/StepperLF";
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.253",
3
+ "version": "1.0.5-alpha.254",
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.253",
50
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.253",
49
+ "@axa-fr/design-system-apollo-css": "1.0.5-alpha.254",
50
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.254",
51
51
  "@material-symbols/svg-400": ">= 0.19.0",
52
52
  "react": ">= 18"
53
53
  },