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/cjs/index.js CHANGED
@@ -2711,9 +2711,9 @@ var style$V = {"magneto-ui-mobile-drawer":"mg_mobile_drawer_magneto-ui-mobile-dr
2711
2711
 
2712
2712
  var cx$S = classNames.bind(style$V);
2713
2713
  var Component$23 = function (_a) {
2714
- 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;
2715
- var _d = React.useState(false), showContent = _d[0], setShowContent = _d[1];
2716
- var _e = React.useState(isOpen), renderPortal = _e[0], setRenderPortal = _e[1];
2714
+ 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;
2715
+ var _e = React.useState(false), showContent = _e[0], setShowContent = _e[1];
2716
+ var _f = React.useState(isOpen), renderPortal = _f[0], setRenderPortal = _f[1];
2717
2717
  var showMenu = showContent ? 'show' : 'hidden';
2718
2718
  React.useEffect(function () {
2719
2719
  var timer = null;
@@ -2741,7 +2741,7 @@ var Component$23 = function (_a) {
2741
2741
  React__default["default"].createElement("button", { "data-name": "close-drawer", title: "close-modal", className: cx$S('magneto-ui-close-button'), onClick: onClose },
2742
2742
  React__default["default"].createElement(IconItem, { icon: Add, hover: false })),
2743
2743
  React__default["default"].createElement("div", { className: cx$S('magneto-ui-container') }, children)),
2744
- isOpen && (React__default["default"].createElement("span", { className: cx$S('background-drawer'), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
2744
+ isOpen && (React__default["default"].createElement("span", { className: cx$S('background-drawer', backgroundClassName), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
2745
2745
  };
2746
2746
  /**
2747
2747
  * Molecule UI component for Mobile Drawer
@@ -4535,7 +4535,7 @@ var Component$1x = function (_a) {
4535
4535
  */
4536
4536
  var MobileSearchbar = Component$1x;
4537
4537
 
4538
- 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"};
4538
+ 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"};
4539
4539
 
4540
4540
  var ModalPortal = function (_a) {
4541
4541
  var children = _a.children;
@@ -4558,7 +4558,7 @@ var ModalPortal = function (_a) {
4558
4558
  };
4559
4559
 
4560
4560
  var Modal = function (_a) {
4561
- 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;
4561
+ 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;
4562
4562
  React.useEffect(function () {
4563
4563
  var body = document.body;
4564
4564
  if (!body)
@@ -4574,7 +4574,7 @@ var Modal = function (_a) {
4574
4574
  children,
4575
4575
  React__default["default"].createElement("button", { "data-name": "close-drawer", className: "".concat(styles$1p["".concat(classMUI, "-modal__close-btn")]), onClick: onClose, type: "button" },
4576
4576
  React__default["default"].createElement("img", { src: Close, alt: "close icon" }))),
4577
- React__default["default"].createElement("span", { className: "".concat(styles$1p["".concat(classMUI, "-background-modal")]), onClick: blockBackgroundClose ? function () { return null; } : onClose })));
4577
+ React__default["default"].createElement("span", { className: "".concat(styles$1p["".concat(classMUI, "-background-modal")], " ").concat(backgroundClassName), onClick: blockBackgroundClose ? function () { return null; } : onClose })));
4578
4578
  };
4579
4579
  var Title = function (_a) {
4580
4580
  var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
@@ -4587,9 +4587,9 @@ var Description = function (_a) {
4587
4587
  var Modal$1 = Object.assign(Modal, { Title: Title, Description: Description });
4588
4588
 
4589
4589
  var Component$1w = function (_a) {
4590
- var children = _a.children, open = _a.open, onClose = _a.onClose, modalClassName = _a.modalClassName, mobileDrawerClassName = _a.mobileDrawerClassName;
4591
- var container = useMediaQuery(React__default["default"].createElement(Modal$1, { className: modalClassName, isOpen: open, onClose: onClose }, children), {
4592
- md: (React__default["default"].createElement(MobileDrawer, { className: mobileDrawerClassName, isOpen: open, onClose: onClose }, children))
4590
+ 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;
4591
+ var container = useMediaQuery(React__default["default"].createElement(Modal$1, { className: modalClassName, backgroundClassName: backgroundClassNameDesktop, isOpen: open, onClose: onClose }, children), {
4592
+ md: (React__default["default"].createElement(MobileDrawer, { backgroundClassName: backgroundClassNameMobile, className: mobileDrawerClassName, isOpen: open, onClose: onClose }, children))
4593
4593
  });
4594
4594
  return container;
4595
4595
  };