@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.
@@ -52,6 +52,12 @@ export interface ConditionBuilderProps extends Omit<ComponentPropsWithoutRef<"di
52
52
  addLabel?: ReactNode;
53
53
  /** Custom aria-label for the remove buttons. Defaults to "Remove condition". */
54
54
  removeLabel?: string;
55
+ /** Cap the rows-area height to roughly N rows; beyond N the rows scroll
56
+ * inside a contained viewport so the panel stops growing unboundedly.
57
+ * The "Add condition" action sits OUTSIDE the scroll viewport so it
58
+ * stays reachable regardless of how many rows are configured.
59
+ * Set to 0 / omitted to disable the cap (legacy behavior). */
60
+ maxVisibleRows?: number;
55
61
  }
56
62
  export declare const ConditionBuilder: import("react").ForwardRefExoticComponent<ConditionBuilderProps & import("react").RefAttributes<HTMLDivElement>>;
57
63
  //# sourceMappingURL=ConditionBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/ConditionBuilder/ConditionBuilder.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,wBAAwB,EAG7B,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd;;4DAEw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AAM,CAAC;IACrB;;;;mEAI+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAsMD,eAAO,MAAM,gBAAgB,kHA+M3B,CAAC"}
package/dist/index.cjs CHANGED
@@ -8037,6 +8037,7 @@ var ConditionBuilder = (0, import_react45.forwardRef)(function ConditionBuilder2
8037
8037
  onJoinChange,
8038
8038
  addLabel = "Add condition",
8039
8039
  removeLabel = "Remove condition",
8040
+ maxVisibleRows,
8040
8041
  className,
8041
8042
  ...rest
8042
8043
  }, ref) {
@@ -8096,6 +8097,12 @@ var ConditionBuilder = (0, import_react45.forwardRef)(function ConditionBuilder2
8096
8097
  },
8097
8098
  [conditions, joinOperator, onChange]
8098
8099
  );
8100
+ const cappedRows = Boolean(maxVisibleRows && maxVisibleRows > 0);
8101
+ const rowsViewportStyle = cappedRows ? {
8102
+ maxHeight: `calc((var(--ods-layout-control-height, 32px) + var(--ods-space-2, 8px)) * ${maxVisibleRows} + var(--ods-space-1, 4px))`,
8103
+ overflowY: "auto",
8104
+ paddingRight: "var(--ods-space-1, 4px)"
8105
+ } : void 0;
8099
8106
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
8100
8107
  "div",
8101
8108
  {
@@ -8107,7 +8114,7 @@ var ConditionBuilder = (0, import_react45.forwardRef)(function ConditionBuilder2
8107
8114
  className
8108
8115
  ),
8109
8116
  children: [
8110
- conditions.map((condition, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ods-condition-row", children: [
8117
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ods-condition-builder__rows", style: rowsViewportStyle, children: conditions.map((condition, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ods-condition-row", children: [
8111
8118
  index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
8112
8119
  "span",
8113
8120
  {
@@ -8177,7 +8184,7 @@ var ConditionBuilder = (0, import_react45.forwardRef)(function ConditionBuilder2
8177
8184
  children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons9.CloseIcon, { "aria-hidden": "true" })
8178
8185
  }
8179
8186
  )
8180
- ] }, index)),
8187
+ ] }, index)) }),
8181
8188
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ods-condition-builder__actions", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
8182
8189
  "button",
8183
8190
  {