@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 +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +8 -0
package/dist/index.js
CHANGED
|
@@ -3622,6 +3622,7 @@ function RowActionCell({ action }) {
|
|
|
3622
3622
|
var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
|
|
3623
3623
|
var cellClassOf = (c) => [c.numeric ? "is-num" : "", c.noWrap ? "fd-table-nowrap" : ""].filter(Boolean).join(" ") || void 0;
|
|
3624
3624
|
var cardCellOf = (c, row) => c.phoneRender ? c.phoneRender(row) : cellOf(c, row);
|
|
3625
|
+
var hasContent = (node) => node !== null && node !== void 0 && typeof node !== "boolean" && node !== "";
|
|
3625
3626
|
function rowInteraction(row, onRowClick) {
|
|
3626
3627
|
if (!onRowClick) return {};
|
|
3627
3628
|
return {
|
|
@@ -3753,6 +3754,7 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
|
|
|
3753
3754
|
] }) }, i)) : rows.map((r) => {
|
|
3754
3755
|
const selected = isSelected(r);
|
|
3755
3756
|
const action = rowAction ? rowAction(r) : null;
|
|
3757
|
+
const metaItems = secondary.map((c) => ({ column: c, cell: cardCellOf(c, r) })).filter((item2) => hasContent(item2.cell));
|
|
3756
3758
|
const semantics = onRowClick ? { role: "button", "aria-pressed": selected } : { "aria-current": selected ? "true" : void 0 };
|
|
3757
3759
|
return /* @__PURE__ */ jsxs40("div", { className: "fd-dt-item", children: [
|
|
3758
3760
|
/* @__PURE__ */ jsxs40(
|
|
@@ -3765,10 +3767,10 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
|
|
|
3765
3767
|
...rowInteraction(r, onRowClick),
|
|
3766
3768
|
children: [
|
|
3767
3769
|
/* @__PURE__ */ jsx50("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx50("span", { className: c.numeric ? "is-num" : void 0, children: cardCellOf(c, r) }, c.key)) }),
|
|
3768
|
-
|
|
3770
|
+
metaItems.length ? /* @__PURE__ */ jsx50("div", { className: "fd-dt-card-meta", children: metaItems.map(({ column: c, cell }) => /* @__PURE__ */ jsxs40("span", { className: cellClassOf(c), children: [
|
|
3769
3771
|
/* @__PURE__ */ jsx50("span", { className: "fd-dt-card-label", children: c.label }),
|
|
3770
3772
|
" ",
|
|
3771
|
-
|
|
3773
|
+
cell
|
|
3772
3774
|
] }, c.key)) }) : null
|
|
3773
3775
|
]
|
|
3774
3776
|
}
|