@shoplflow/base 0.22.2 → 0.22.3

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.cjs CHANGED
@@ -277,6 +277,14 @@ var ModalProvider = ({ children }) => {
277
277
  }
278
278
  };
279
279
  const dispatch = React3.useMemo(() => ({ addModal, removeModal }), []);
280
+ React3.useEffect(() => {
281
+ if (openedModals.length === 1) {
282
+ document.body.style.cssText = "overflow:hidden";
283
+ return () => {
284
+ document.body.style.cssText = "overflow:unset";
285
+ };
286
+ }
287
+ }, [openedModals.length]);
280
288
  return /* @__PURE__ */ jsxRuntime.jsx(ModalContext.Provider, { value: openedModals, children: /* @__PURE__ */ jsxRuntime.jsx(ModalHandlerContext.Provider, { value: dispatch, children }) });
281
289
  };
282
290
  var ModalProvider_default = ModalProvider;
@@ -2583,7 +2591,7 @@ var InputButton = React3.forwardRef(
2583
2591
  children: /* @__PURE__ */ jsxRuntime.jsxs(exports.StyledInputButton, { onClick: handleOnClick, disabled, children: [
2584
2592
  /* @__PURE__ */ jsxRuntime.jsx(exports.StyledInputButtonContent, __spreadValues({ className: "body1_400", defaultValue: text, ref }, rest)),
2585
2593
  /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack.Horizontal, { align: "center", children: [
2586
- text && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", onClick: handleOnClear, styleVar: "GHOST", disabled, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: assetFunction("DeleteIcon"), color: "neutral600" }) }),
2594
+ text && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", onClick: handleOnClear, styleVar: "GHOST", disabled, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: assetFunction("DeleteIcon"), color: "neutral350" }) }),
2587
2595
  rightSource
2588
2596
  ] })
2589
2597
  ] })