magneto365.ui 2.65.4 → 2.65.5

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/esm/index.js CHANGED
@@ -2702,9 +2702,9 @@ var style$V = {"magneto-ui-mobile-drawer":"mg_mobile_drawer_magneto-ui-mobile-dr
2702
2702
 
2703
2703
  var cx$S = classNames.bind(style$V);
2704
2704
  var Component$23 = function (_a) {
2705
- var onClose = _a.onClose, isOpen = _a.isOpen, children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.blockBackgroundClose, blockBackgroundClose = _c === void 0 ? false : _c;
2706
- var _d = useState(false), showContent = _d[0], setShowContent = _d[1];
2707
- var _e = useState(isOpen), renderPortal = _e[0], setRenderPortal = _e[1];
2705
+ var onClose = _a.onClose, isOpen = _a.isOpen, children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.blockBackgroundClose, blockBackgroundClose = _c === void 0 ? false : _c, _d = _a.backgroundClassName, backgroundClassName = _d === void 0 ? '' : _d;
2706
+ var _e = useState(false), showContent = _e[0], setShowContent = _e[1];
2707
+ var _f = useState(isOpen), renderPortal = _f[0], setRenderPortal = _f[1];
2708
2708
  var showMenu = showContent ? 'show' : 'hidden';
2709
2709
  useEffect(function () {
2710
2710
  var timer = null;
@@ -2732,7 +2732,7 @@ var Component$23 = function (_a) {
2732
2732
  React.createElement("button", { "data-name": "close-drawer", title: "close-modal", className: cx$S('magneto-ui-close-button'), onClick: onClose },
2733
2733
  React.createElement(IconItem, { icon: Add, hover: false })),
2734
2734
  React.createElement("div", { className: cx$S('magneto-ui-container') }, children)),
2735
- isOpen && (React.createElement("span", { className: cx$S('background-drawer'), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
2735
+ isOpen && (React.createElement("span", { className: cx$S('background-drawer', backgroundClassName), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
2736
2736
  };
2737
2737
  /**
2738
2738
  * Molecule UI component for Mobile Drawer
@@ -4526,7 +4526,7 @@ var Component$1x = function (_a) {
4526
4526
  */
4527
4527
  var MobileSearchbar = Component$1x;
4528
4528
 
4529
- var styles$1p = {"magneto-ui-modal":"mg_modal_magneto-ui-modal_1vun3","magneto-ui-modal__close-btn":"mg_modal_magneto-ui-modal_close-btn_1vun3","magneto-ui-modal__title":"mg_modal_magneto-ui-modal_title_1vun3","magneto-ui-modal__description":"mg_modal_magneto-ui-modal_description_1vun3","magneto-ui-modal__children-container":"mg_modal_magneto-ui-modal_children-container_1vun3","magneto-ui-background-modal":"mg_modal_magneto-ui-background-modal_1vun3","fadeIn":"mg_modal_fadeIn_1vun3"};
4529
+ var styles$1p = {"magneto-ui-modal":"mg_modal_magneto-ui-modal_1ffsw","magneto-ui-modal__close-btn":"mg_modal_magneto-ui-modal_close-btn_1ffsw","magneto-ui-modal__title":"mg_modal_magneto-ui-modal_title_1ffsw","magneto-ui-modal__description":"mg_modal_magneto-ui-modal_description_1ffsw","magneto-ui-modal__children-container":"mg_modal_magneto-ui-modal_children-container_1ffsw","magneto-ui-background-modal":"mg_modal_magneto-ui-background-modal_1ffsw","fadeIn":"mg_modal_fadeIn_1ffsw"};
4530
4530
 
4531
4531
  var ModalPortal = function (_a) {
4532
4532
  var children = _a.children;
@@ -4549,7 +4549,7 @@ var ModalPortal = function (_a) {
4549
4549
  };
4550
4550
 
4551
4551
  var Modal = function (_a) {
4552
- var onClose = _a.onClose, isOpen = _a.isOpen, children = _a.children, title = _a.title, description = _a.description, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.blockBackgroundClose, blockBackgroundClose = _c === void 0 ? false : _c;
4552
+ var onClose = _a.onClose, isOpen = _a.isOpen, children = _a.children, title = _a.title, description = _a.description, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.blockBackgroundClose, blockBackgroundClose = _c === void 0 ? false : _c, _d = _a.backgroundClassName, backgroundClassName = _d === void 0 ? '' : _d;
4553
4553
  useEffect(function () {
4554
4554
  var body = document.body;
4555
4555
  if (!body)
@@ -4565,7 +4565,7 @@ var Modal = function (_a) {
4565
4565
  children,
4566
4566
  React.createElement("button", { "data-name": "close-drawer", className: "".concat(styles$1p["".concat(classMUI, "-modal__close-btn")]), onClick: onClose, type: "button" },
4567
4567
  React.createElement("img", { src: Close, alt: "close icon" }))),
4568
- React.createElement("span", { className: "".concat(styles$1p["".concat(classMUI, "-background-modal")]), onClick: blockBackgroundClose ? function () { return null; } : onClose })));
4568
+ React.createElement("span", { className: "".concat(styles$1p["".concat(classMUI, "-background-modal")], " ").concat(backgroundClassName), onClick: blockBackgroundClose ? function () { return null; } : onClose })));
4569
4569
  };
4570
4570
  var Title = function (_a) {
4571
4571
  var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
@@ -4578,9 +4578,9 @@ var Description = function (_a) {
4578
4578
  var Modal$1 = Object.assign(Modal, { Title: Title, Description: Description });
4579
4579
 
4580
4580
  var Component$1w = function (_a) {
4581
- var children = _a.children, open = _a.open, onClose = _a.onClose, modalClassName = _a.modalClassName, mobileDrawerClassName = _a.mobileDrawerClassName;
4582
- var container = useMediaQuery(React.createElement(Modal$1, { className: modalClassName, isOpen: open, onClose: onClose }, children), {
4583
- md: (React.createElement(MobileDrawer, { className: mobileDrawerClassName, isOpen: open, onClose: onClose }, children))
4581
+ var children = _a.children, open = _a.open, onClose = _a.onClose, _b = _a.modalClassName, modalClassName = _b === void 0 ? '' : _b, _c = _a.mobileDrawerClassName, mobileDrawerClassName = _c === void 0 ? '' : _c, _d = _a.backgroundClassNameDesktop, backgroundClassNameDesktop = _d === void 0 ? '' : _d, _e = _a.backgroundClassNameMobile, backgroundClassNameMobile = _e === void 0 ? '' : _e;
4582
+ var container = useMediaQuery(React.createElement(Modal$1, { className: modalClassName, backgroundClassName: backgroundClassNameDesktop, isOpen: open, onClose: onClose }, children), {
4583
+ md: (React.createElement(MobileDrawer, { backgroundClassName: backgroundClassNameMobile, className: mobileDrawerClassName, isOpen: open, onClose: onClose }, children))
4584
4584
  });
4585
4585
  return container;
4586
4586
  };