@rolster/react-components 19.6.0 → 19.6.1

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.
@@ -4235,13 +4235,14 @@ function RlsImageChooser(props) {
4235
4235
  return (jsxRuntimeExports.jsxs("div", { className: "rls-image-chooser", children: [jsxRuntimeExports.jsx("div", { className: "rls-image-chooser__avatar", onClick: controller.onImageChooser, children: src && jsxRuntimeExports.jsx("img", { src: src }) }), controller.RlsImageEditorChooser] }));
4236
4236
  }
4237
4237
 
4238
- function RlsModalSheet({ children, className, onAutoClose, visible, rlsTheme }) {
4238
+ function RlsModalSheet({ autoclose, children, className, controller, onAutoClose, visible, rlsTheme }) {
4239
4239
  const classNameModal = require$$0.useMemo(() => {
4240
- return renderClassStatus('rls-modal-sheet', { visible }, className);
4241
- }, [className, visible]);
4240
+ return renderClassStatus('rls-modal-sheet', { visible: controller?.visible ?? visible }, className);
4241
+ }, [className, visible, controller?.visible]);
4242
4242
  const onClickBackdrop = require$$0.useCallback(() => {
4243
+ autoclose && controller?.close();
4243
4244
  onAutoClose?.();
4244
- }, [onAutoClose]);
4245
+ }, [autoclose, controller, onAutoClose]);
4245
4246
  return ReactDOM.createPortal(jsxRuntimeExports.jsxs("div", { className: classNameModal, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-modal-sheet__component", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-modal-sheet__backdrop", onClick: onClickBackdrop })] }), document.body);
4246
4247
  }
4247
4248