@axa-fr/design-system-apollo-react 1.0.5-alpha.459 → 1.0.5-alpha.463

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.
@@ -7,6 +7,6 @@ export const TextArea = forwardRef(({ id, className, classModifier = "", label,
7
7
  const errorId = `${inputId}-error`;
8
8
  return (_jsxs("div", { className: ["af-form__input-container", className]
9
9
  .filter(Boolean)
10
- .join(" "), children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx("textarea", { id: inputId, className: "af-form__input-textarea", ref: inputRef, "aria-errormessage": error ? errorId : undefined, "aria-describedby": helper ? helperId : undefined, required: required, "aria-invalid": Boolean(error) || classModifier.includes("error") ? true : undefined, placeholder: placeholder, ...inputProps }), helper ? (_jsx("span", { id: helperId, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: errorId, message: error })] }));
10
+ .join(" "), children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx("textarea", { id: inputId, className: "af-form__textarea", ref: inputRef, "aria-errormessage": error ? errorId : undefined, "aria-describedby": helper ? helperId : undefined, required: required, "aria-invalid": Boolean(error) || classModifier.includes("error") ? true : undefined, placeholder: placeholder, ...inputProps }), helper ? (_jsx("span", { id: helperId, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: errorId, message: error })] }));
11
11
  });
12
12
  TextArea.displayName = "TextArea";
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  const ModalCore = forwardRef(({ className, children, ...props }, ref) => (
4
4
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events
5
- _jsx("dialog", { "aria-label": props["aria-label"] ?? props.title, className: ["af-apollo-modal", className].filter(Boolean).join(" "), onClick: props.onClose, ref: ref, ...props, children: _jsx("section", { className: "af-apollo-modal__content", onClick: (e) => e.stopPropagation(), children: children }) })));
5
+ _jsx("dialog", { "aria-modal": true, "aria-label": props["aria-label"] ?? props.title, className: ["af-modal", className].filter(Boolean).join(" "), onClick: props.onClose, ref: ref, ...props, children: _jsx("section", { className: "af-modal__content", onClick: (e) => e.stopPropagation(), children: children }) })));
6
6
  ModalCore.displayName = "ModalCore";
7
7
  export { ModalCore };
@@ -5,8 +5,8 @@ export const ModalCoreBody = ({ children, className, ...otherProps }) => {
5
5
  const bodyRef = useRef(null);
6
6
  const { vertical: hasVerticalScroll } = useHasScroll(bodyRef);
7
7
  return (_jsx("main", { className: [
8
- "af-apollo-modal__body",
9
- hasVerticalScroll ? "af-apollo-modal__body-vertical-scroll" : undefined,
8
+ "af-modal__body",
9
+ hasVerticalScroll ? "af-modal__body-vertical-scroll" : undefined,
10
10
  className,
11
11
  ]
12
12
  .filter(Boolean)
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  const renderFooterButtons = (ButtonComponent, buttons) => ButtonComponent &&
3
- buttons.map(([variant, props]) => Boolean(props) && (_jsx(ButtonComponent, { variant: variant, ...props, className: [props?.className, "af-apollo-modal__footer-button"]
3
+ buttons.map(([variant, props]) => Boolean(props) && (_jsx(ButtonComponent, { variant: variant, ...props, className: [props?.className, "af-modal__footer-button"]
4
4
  .filter(Boolean)
5
5
  .join(" ") }, variant)));
6
- export const ModalCoreFooterCommon = ({ className, buttonComponent: ButtonComponent, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, ...rest }) => (primaryButtonProps || secondaryButtonProps || tertiaryButtonProps) && (_jsx("footer", { className: ["af-apollo-modal__footer", className]
7
- .filter(Boolean)
8
- .join(" "), ...rest, children: renderFooterButtons(ButtonComponent, [
6
+ export const ModalCoreFooterCommon = ({ className, buttonComponent: ButtonComponent, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, ...rest }) => (primaryButtonProps || secondaryButtonProps || tertiaryButtonProps) && (_jsx("footer", { className: ["af-modal__footer", className].filter(Boolean).join(" "), ...rest, children: renderFooterButtons(ButtonComponent, [
9
7
  ["tertiary", tertiaryButtonProps],
10
8
  ["secondary", secondaryButtonProps],
11
9
  ["primary", primaryButtonProps],
@@ -1,4 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import close from "@material-symbols/svg-400/rounded/close.svg";
3
3
  import { ClickIcon } from "../../ClickIcon/ClickIconCommon";
4
- export const ModalCoreHeaderCommon = ({ className, headingComponent: HeadingComponent, headingProps, iconComponent: IconComponent, iconProps, onClose, closeButtonAriaLabel = "Fermer la boite de dialogue", ...props }) => (_jsxs("header", { className: ["af-apollo-modal__header", className].filter(Boolean).join(" "), ...props, children: [_jsx(ClickIcon, { className: "af-apollo-modal__header-close-btn", src: close, onClick: onClose, "aria-label": closeButtonAriaLabel }), _jsxs("div", { className: "af-apollo-modal__header-title", children: [IconComponent && iconProps ? (_jsx(IconComponent, { size: "M", ...iconProps })) : null, _jsx(HeadingComponent, { level: 2, ...headingProps })] })] }));
4
+ export const ModalCoreHeaderCommon = ({ className, headingComponent: HeadingComponent, headingProps, iconComponent: IconComponent, iconProps, onClose, closeButtonAriaLabel = "Fermer la boite de dialogue", ...props }) => (_jsxs("header", { className: ["af-modal__header", className].filter(Boolean).join(" "), ...props, children: [_jsx(ClickIcon, { className: "af-modal__header-close-btn", src: close, onClick: onClose, "aria-label": closeButtonAriaLabel }), _jsxs("div", { className: "af-modal__header-title", children: [IconComponent && iconProps ? (_jsx(IconComponent, { size: "M", ...iconProps })) : null, _jsx(HeadingComponent, { level: 2, ...headingProps })] })] }));
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.459",
3
+ "version": "1.0.5-alpha.463",
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.459",
50
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.459",
49
+ "@axa-fr/design-system-apollo-css": "1.0.5-alpha.463",
50
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.463",
51
51
  "@material-symbols/svg-400": ">= 0.19.0",
52
52
  "react": ">= 18"
53
53
  },