@shoplflow/base 0.32.44 → 0.32.46

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
@@ -966,12 +966,11 @@ var ScrollArea = React3.forwardRef((_a, ref) => {
966
966
  }, [onResize]);
967
967
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: Boolean(windowWidth) && Boolean(windowHeight) && /* @__PURE__ */ jsxRuntime.jsx(
968
968
  Scrollbars__default.default,
969
- __spreadProps(__spreadValues({
969
+ __spreadProps(__spreadValues({}, rest), {
970
970
  ref: mergeRef,
971
971
  autoHide: true,
972
972
  autoHideTimeout: 1e3,
973
- autoHideDuration: 200
974
- }, rest), {
973
+ autoHideDuration: 200,
975
974
  "data-shoplflow": "ScrollArea",
976
975
  children
977
976
  })
@@ -1046,6 +1045,17 @@ var ModalBody = ({
1046
1045
  }
1047
1046
  return 0;
1048
1047
  };
1048
+ const setContentHeightMax = () => {
1049
+ let autoHeightMax = setAutoHeightMax();
1050
+ autoHeightMax = autoHeightMax - 24;
1051
+ if (isIncludeHeader) {
1052
+ autoHeightMax = autoHeightMax - 24;
1053
+ }
1054
+ if (!isIncludeHeader) {
1055
+ autoHeightMax = autoHeightMax - 16;
1056
+ }
1057
+ return autoHeightMax;
1058
+ };
1049
1059
  const autoHeightMin = setAutoHeightMin();
1050
1060
  const _autoHeightMin = typeof autoHeightMin === "string" ? autoHeightMin : autoHeightMin - heightToDeduct;
1051
1061
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -1062,7 +1072,7 @@ var ModalBody = ({
1062
1072
  universal: true,
1063
1073
  autoHeight: !modalContainerHeight,
1064
1074
  autoHeightMin: _autoHeightMin,
1065
- autoHeightMax: "100%",
1075
+ autoHeightMax: setContentHeightMax() - heightToDeduct,
1066
1076
  style: {},
1067
1077
  children: /* @__PURE__ */ jsxRuntime.jsx(ModalBodyContainerInner, { children: /* @__PURE__ */ jsxRuntime.jsx(ModalBodyContent, { isIncludeHeader, sizeVar, children }) })
1068
1078
  }
package/dist/index.js CHANGED
@@ -939,12 +939,11 @@ var ScrollArea = forwardRef((_a, ref) => {
939
939
  }, [onResize]);
940
940
  return /* @__PURE__ */ jsx(Fragment, { children: Boolean(windowWidth) && Boolean(windowHeight) && /* @__PURE__ */ jsx(
941
941
  Scrollbars,
942
- __spreadProps(__spreadValues({
942
+ __spreadProps(__spreadValues({}, rest), {
943
943
  ref: mergeRef,
944
944
  autoHide: true,
945
945
  autoHideTimeout: 1e3,
946
- autoHideDuration: 200
947
- }, rest), {
946
+ autoHideDuration: 200,
948
947
  "data-shoplflow": "ScrollArea",
949
948
  children
950
949
  })
@@ -1019,6 +1018,17 @@ var ModalBody = ({
1019
1018
  }
1020
1019
  return 0;
1021
1020
  };
1021
+ const setContentHeightMax = () => {
1022
+ let autoHeightMax = setAutoHeightMax();
1023
+ autoHeightMax = autoHeightMax - 24;
1024
+ if (isIncludeHeader) {
1025
+ autoHeightMax = autoHeightMax - 24;
1026
+ }
1027
+ if (!isIncludeHeader) {
1028
+ autoHeightMax = autoHeightMax - 16;
1029
+ }
1030
+ return autoHeightMax;
1031
+ };
1022
1032
  const autoHeightMin = setAutoHeightMin();
1023
1033
  const _autoHeightMin = typeof autoHeightMin === "string" ? autoHeightMin : autoHeightMin - heightToDeduct;
1024
1034
  return /* @__PURE__ */ jsx(
@@ -1035,7 +1045,7 @@ var ModalBody = ({
1035
1045
  universal: true,
1036
1046
  autoHeight: !modalContainerHeight,
1037
1047
  autoHeightMin: _autoHeightMin,
1038
- autoHeightMax: "100%",
1048
+ autoHeightMax: setContentHeightMax() - heightToDeduct,
1039
1049
  style: {},
1040
1050
  children: /* @__PURE__ */ jsx(ModalBodyContainerInner, { children: /* @__PURE__ */ jsx(ModalBodyContent, { isIncludeHeader, sizeVar, children }) })
1041
1051
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplflow/base",
3
- "version": "0.32.44",
3
+ "version": "0.32.46",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",