@shoplflow/base 0.22.2 → 0.22.4

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
@@ -252,6 +252,14 @@ var ModalProvider = ({ children }) => {
252
252
  }
253
253
  };
254
254
  const dispatch = useMemo(() => ({ addModal, removeModal }), []);
255
+ useEffect(() => {
256
+ if (openedModals.length === 1) {
257
+ document.body.style.cssText = "overflow:hidden";
258
+ return () => {
259
+ document.body.style.cssText = "overflow:unset";
260
+ };
261
+ }
262
+ }, [openedModals.length]);
255
263
  return /* @__PURE__ */ jsx(ModalContext.Provider, { value: openedModals, children: /* @__PURE__ */ jsx(ModalHandlerContext.Provider, { value: dispatch, children }) });
256
264
  };
257
265
  var ModalProvider_default = ModalProvider;
@@ -2558,7 +2566,7 @@ var InputButton = forwardRef(
2558
2566
  children: /* @__PURE__ */ jsxs(StyledInputButton, { onClick: handleOnClick, disabled, children: [
2559
2567
  /* @__PURE__ */ jsx(StyledInputButtonContent, __spreadValues({ className: "body1_400", defaultValue: text, ref }, rest)),
2560
2568
  /* @__PURE__ */ jsxs(Stack_default.Horizontal, { align: "center", children: [
2561
- text && /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", onClick: handleOnClear, styleVar: "GHOST", disabled, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: assetFunction("DeleteIcon"), color: "neutral600" }) }),
2569
+ text && /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", onClick: handleOnClear, styleVar: "GHOST", disabled, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: assetFunction("DeleteIcon"), color: "neutral350" }) }),
2562
2570
  rightSource
2563
2571
  ] })
2564
2572
  ] })