@axa-fr/design-system-look-and-feel-react 1.0.5-ci.67 → 1.0.5-ci.68

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.
@@ -1,6 +1,7 @@
1
+ import { type ReactNode } from "react";
1
2
  type ContentItemDuoProps = {
2
3
  label: string;
3
- value: string;
4
+ value: ReactNode;
4
5
  isVertical?: boolean;
5
6
  className?: string;
6
7
  classModifier?: string;
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import checkIcon from "@material-symbols/svg-400/outlined/check.svg";
3
3
  import closeIcon from "@material-symbols/svg-400/outlined/close.svg";
4
4
  import { useMemo } from "react";
5
+ import { Button, Svg } from "../..";
5
6
  import { Variants } from "../../Button/Button";
6
7
  import { getComponentClassName } from "../../utilities";
7
- import { Button, Svg } from "../..";
8
8
  export const ContentItemDuo = ({ label, value, isVertical = false, className, classModifier, isShowingDoneIcon = false, isShowingCloseIcon = false, buttonText, onButtonClick, }) => {
9
9
  const componentClassName = useMemo(() => {
10
10
  const classModifiers = [classModifier];
@@ -14,5 +14,5 @@ export const ContentItemDuo = ({ label, value, isVertical = false, className, cl
14
14
  return getComponentClassName("af-content-item-duo", className, classModifiers.filter(Boolean).join(" "));
15
15
  }, [classModifier, className, isVertical]);
16
16
  const iconContainerModifier = useMemo(() => ` af-content-item-duo__icon--${isShowingDoneIcon ? "done" : "close"}`, [isShowingDoneIcon]);
17
- return (_jsxs("div", { className: componentClassName, children: [(isShowingDoneIcon || isShowingCloseIcon) && (_jsxs("div", { className: `af-content-item-duo__icon${iconContainerModifier}`, children: [isShowingDoneIcon && _jsx(Svg, { src: checkIcon }), isShowingCloseIcon && _jsx(Svg, { src: closeIcon })] })), _jsx("p", { className: "af-content-item-duo__label", children: label }), _jsx("p", { className: "af-content-item-duo__value", children: value }), buttonText && (_jsx("div", { className: "af-content-item-duo__button", children: _jsx(Button, { variant: Variants.ghost, onClick: onButtonClick, children: buttonText }) }))] }));
17
+ return (_jsxs("div", { className: componentClassName, children: [(isShowingDoneIcon || isShowingCloseIcon) && (_jsxs("div", { className: `af-content-item-duo__icon${iconContainerModifier}`, children: [isShowingDoneIcon && _jsx(Svg, { src: checkIcon }), isShowingCloseIcon && _jsx(Svg, { src: closeIcon })] })), _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(Button, { variant: Variants.ghost, onClick: onButtonClick, children: buttonText }) }))] }));
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/design-system-look-and-feel-react",
3
- "version": "1.0.5-ci.67",
3
+ "version": "1.0.5-ci.68",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "homepage": "https://github.com/AxaFrance/design-system#readme",
46
46
  "peerDependencies": {
47
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.67",
47
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.68",
48
48
  "@material-symbols/svg-400": ">= 0.19.0",
49
49
  "react": ">= 18"
50
50
  },