@festo-ui/react 10.0.1-dev.840 → 10.0.1-dev.844

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.
@@ -3,6 +3,7 @@ import { type ComponentPropsWithoutRef } from 'react';
3
3
  export interface ModalBaseProps extends ComponentPropsWithoutRef<'div'> {
4
4
  isOpen: boolean;
5
5
  isLoading?: boolean;
6
+ closeOnBackdrop?: boolean;
6
7
  onClose?: () => void;
7
8
  onCloseDone?: () => void;
8
9
  }
@@ -7,7 +7,7 @@ import { RemoveScroll } from "react-remove-scroll";
7
7
  import { CSSTransition } from "react-transition-group";
8
8
  import { useForkRef } from "../../utils/useForkRef.js";
9
9
  import { LoadingIndicator } from "../loading-indicator/LoadingIndicator.js";
10
- const ModalBase = /*#__PURE__*/ forwardRef(({ isOpen, isLoading, onClose, onCloseDone, className, children, ...props }, ref)=>{
10
+ const ModalBase = /*#__PURE__*/ forwardRef(({ isOpen, isLoading, closeOnBackdrop = true, onClose, onCloseDone, className, children, ...props }, ref)=>{
11
11
  const modalRef = useRef(null);
12
12
  const backdropRef = useRef(null);
13
13
  const mouseDownOnBackdropActive = useRef(false);
@@ -100,7 +100,7 @@ const ModalBase = /*#__PURE__*/ forwardRef(({ isOpen, isLoading, onClose, onClos
100
100
  onMouseUp: (e)=>{
101
101
  const closeModal = mouseDownOnBackdropActive.current && e.target === e.currentTarget;
102
102
  mouseDownOnBackdropActive.current = false;
103
- if (closeModal) onClose?.();
103
+ if (closeModal && closeOnBackdrop) onClose?.();
104
104
  },
105
105
  children: /*#__PURE__*/ jsx(RemoveScroll, {
106
106
  ref: allRefs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "10.0.1-dev.840",
3
+ "version": "10.0.1-dev.844",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "copyright": "Copyright (c) 2025 Festo SE & Co. KG. All rights reserved.",
6
6
  "license": "apache-2.0",