@octaviaflow/core 3.0.18-beta.40 → 3.0.18-beta.41

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
@@ -7939,6 +7939,7 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
7939
7939
  onJoinChange,
7940
7940
  addLabel = "Add condition",
7941
7941
  removeLabel = "Remove condition",
7942
+ maxVisibleRows,
7942
7943
  className,
7943
7944
  ...rest
7944
7945
  }, ref) {
@@ -7998,6 +7999,12 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
7998
7999
  },
7999
8000
  [conditions, joinOperator, onChange]
8000
8001
  );
8002
+ const cappedRows = Boolean(maxVisibleRows && maxVisibleRows > 0);
8003
+ const rowsViewportStyle = cappedRows ? {
8004
+ maxHeight: `calc((var(--ods-layout-control-height, 32px) + var(--ods-space-2, 8px)) * ${maxVisibleRows} + var(--ods-space-1, 4px))`,
8005
+ overflowY: "auto",
8006
+ paddingRight: "var(--ods-space-1, 4px)"
8007
+ } : void 0;
8001
8008
  return /* @__PURE__ */ jsxs27(
8002
8009
  "div",
8003
8010
  {
@@ -8009,7 +8016,7 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
8009
8016
  className
8010
8017
  ),
8011
8018
  children: [
8012
- conditions.map((condition, index) => /* @__PURE__ */ jsxs27("div", { className: "ods-condition-row", children: [
8019
+ /* @__PURE__ */ jsx28("div", { className: "ods-condition-builder__rows", style: rowsViewportStyle, children: conditions.map((condition, index) => /* @__PURE__ */ jsxs27("div", { className: "ods-condition-row", children: [
8013
8020
  index === 0 ? /* @__PURE__ */ jsx28(
8014
8021
  "span",
8015
8022
  {
@@ -8079,7 +8086,7 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
8079
8086
  children: /* @__PURE__ */ jsx28(CloseIcon3, { "aria-hidden": "true" })
8080
8087
  }
8081
8088
  )
8082
- ] }, index)),
8089
+ ] }, index)) }),
8083
8090
  /* @__PURE__ */ jsx28("div", { className: "ods-condition-builder__actions", children: /* @__PURE__ */ jsxs27(
8084
8091
  "button",
8085
8092
  {