@flytedan/flytebot-design-system 0.90.0 → 0.90.1

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
@@ -4808,6 +4808,7 @@ function RowActionCell({ action }) {
4808
4808
  var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
4809
4809
  var cellClassOf = (c) => [c.numeric ? "is-num" : "", c.noWrap ? "fd-table-nowrap" : ""].filter(Boolean).join(" ") || void 0;
4810
4810
  var cardCellOf = (c, row) => c.phoneRender ? c.phoneRender(row) : cellOf(c, row);
4811
+ var hasContent = (node) => node !== null && node !== void 0 && typeof node !== "boolean" && node !== "";
4811
4812
  function rowInteraction(row, onRowClick) {
4812
4813
  if (!onRowClick) return {};
4813
4814
  return {
@@ -4939,6 +4940,7 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
4939
4940
  ] }) }, i)) : rows.map((r) => {
4940
4941
  const selected = isSelected(r);
4941
4942
  const action = rowAction ? rowAction(r) : null;
4943
+ const metaItems = secondary.map((c) => ({ column: c, cell: cardCellOf(c, r) })).filter((item2) => hasContent(item2.cell));
4942
4944
  const semantics = onRowClick ? { role: "button", "aria-pressed": selected } : { "aria-current": selected ? "true" : void 0 };
4943
4945
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "fd-dt-item", children: [
4944
4946
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
@@ -4951,10 +4953,10 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
4951
4953
  ...rowInteraction(r, onRowClick),
4952
4954
  children: [
4953
4955
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: c.numeric ? "is-num" : void 0, children: cardCellOf(c, r) }, c.key)) }),
4954
- secondary.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: cellClassOf(c), children: [
4956
+ metaItems.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "fd-dt-card-meta", children: metaItems.map(({ column: c, cell }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: cellClassOf(c), children: [
4955
4957
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "fd-dt-card-label", children: c.label }),
4956
4958
  " ",
4957
- cardCellOf(c, r)
4959
+ cell
4958
4960
  ] }, c.key)) }) : null
4959
4961
  ]
4960
4962
  }