@flytedan/flytebot-design-system 0.73.1 → 0.74.0
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 +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1287,6 +1287,9 @@ type DataTableColumn = DataTableColumnLabel & {
|
|
|
1287
1287
|
/** The column's role in the stacked-card layout, at a table width of 640px or less. At least one column must be `primary`. */
|
|
1288
1288
|
phone: DataTablePhoneRole;
|
|
1289
1289
|
render?: (row: any) => React.ReactNode;
|
|
1290
|
+
/** The phone card's form of this column's value, for when `render`'s is too long for a card (a reason that
|
|
1291
|
+
* would crowd the meta line, say). Only the stacked card uses it; the table cell always uses `render`. */
|
|
1292
|
+
phoneRender?: (row: any) => React.ReactNode;
|
|
1290
1293
|
};
|
|
1291
1294
|
/** One row's own action: an icon button that acts on that row (a download, say) and never opens it. */
|
|
1292
1295
|
interface DataTableRowAction {
|
package/dist/index.d.ts
CHANGED
|
@@ -1287,6 +1287,9 @@ type DataTableColumn = DataTableColumnLabel & {
|
|
|
1287
1287
|
/** The column's role in the stacked-card layout, at a table width of 640px or less. At least one column must be `primary`. */
|
|
1288
1288
|
phone: DataTablePhoneRole;
|
|
1289
1289
|
render?: (row: any) => React.ReactNode;
|
|
1290
|
+
/** The phone card's form of this column's value, for when `render`'s is too long for a card (a reason that
|
|
1291
|
+
* would crowd the meta line, say). Only the stacked card uses it; the table cell always uses `render`. */
|
|
1292
|
+
phoneRender?: (row: any) => React.ReactNode;
|
|
1290
1293
|
};
|
|
1291
1294
|
/** One row's own action: an icon button that acts on that row (a download, say) and never opens it. */
|
|
1292
1295
|
interface DataTableRowAction {
|
package/dist/index.js
CHANGED
|
@@ -3116,6 +3116,7 @@ function RowActionCell({ action }) {
|
|
|
3116
3116
|
return /* @__PURE__ */ jsx45("td", { className: "fd-table-action", children: action ? /* @__PURE__ */ jsx45(RowActionButton, { action, size: "sm" }) : null });
|
|
3117
3117
|
}
|
|
3118
3118
|
var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
|
|
3119
|
+
var cardCellOf = (c, row) => c.phoneRender ? c.phoneRender(row) : cellOf(c, row);
|
|
3119
3120
|
function rowInteraction(row, onRowClick) {
|
|
3120
3121
|
if (!onRowClick) return {};
|
|
3121
3122
|
return {
|
|
@@ -3258,11 +3259,11 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
|
|
|
3258
3259
|
...semantics,
|
|
3259
3260
|
...rowInteraction(r, onRowClick),
|
|
3260
3261
|
children: [
|
|
3261
|
-
/* @__PURE__ */ jsx45("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx45("span", { className: c.numeric ? "is-num" : void 0, children:
|
|
3262
|
+
/* @__PURE__ */ jsx45("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx45("span", { className: c.numeric ? "is-num" : void 0, children: cardCellOf(c, r) }, c.key)) }),
|
|
3262
3263
|
secondary.length ? /* @__PURE__ */ jsx45("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs36("span", { className: c.numeric ? "is-num" : void 0, children: [
|
|
3263
3264
|
/* @__PURE__ */ jsx45("span", { className: "fd-dt-card-label", children: c.label }),
|
|
3264
3265
|
" ",
|
|
3265
|
-
|
|
3266
|
+
cardCellOf(c, r)
|
|
3266
3267
|
] }, c.key)) }) : null
|
|
3267
3268
|
]
|
|
3268
3269
|
}
|