@stfrigerio/sito-template 0.1.101 → 0.1.103

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/index.js CHANGED
@@ -762,7 +762,7 @@ const useIsMobile = () => {
762
762
  }, []);
763
763
  return isMobile;
764
764
  };
765
- const Modal = ({ open, title, onClose, children, size = 'default', actions, padding = true, mobileVariant = 'sheet', draggable = true, }) => {
765
+ const Modal = ({ open, title, onClose, children, size = 'default', actions, padding = true, mobileVariant = 'sheet', draggable = true, closeOnBackdrop = true, }) => {
766
766
  const isMobile = useIsMobile();
767
767
  const dragControls = framerMotion.useDragControls();
768
768
  const headerRef = React.useRef(null);
@@ -798,7 +798,7 @@ const Modal = ({ open, title, onClose, children, size = 'default', actions, padd
798
798
  animate: { opacity: 1, scale: 1, y: 0 },
799
799
  exit: { opacity: 0, scale: 0.96, y: 8 },
800
800
  };
801
- return reactDom.createPortal(jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && (jsxRuntime.jsx(framerMotion.motion.div, { className: backdropClass, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.15 }, onClick: onClose, "aria-hidden": "true", children: jsxRuntime.jsxs(framerMotion.motion.div, { className: dialogClass, role: "dialog", "aria-modal": "true", "aria-label": title, ...enteringAnimation, transition: isSheet
801
+ return reactDom.createPortal(jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && (jsxRuntime.jsx(framerMotion.motion.div, { className: backdropClass, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.15 }, onClick: closeOnBackdrop ? onClose : undefined, "aria-hidden": "true", children: jsxRuntime.jsxs(framerMotion.motion.div, { className: dialogClass, role: "dialog", "aria-modal": "true", "aria-label": title, ...enteringAnimation, transition: isSheet
802
802
  ? { type: 'spring', stiffness: 320, damping: 32 }
803
803
  : { duration: 0.15, ease: 'easeOut' }, onClick: (e) => e.stopPropagation(), drag: isDraggable ? 'y' : false, dragControls: isDraggable ? dragControls : undefined, dragConstraints: { top: 0 }, dragElastic: { top: 0, bottom: 0.3 }, dragListener: false, onDragEnd: (_, info) => {
804
804
  if (info.offset.y > 80)