@flytedan/flytebot-design-system 0.53.0 → 0.55.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 +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2651,11 +2651,11 @@ function formatPercent(n, digits = 0) {
|
|
|
2651
2651
|
return n.toFixed(digits) + "%";
|
|
2652
2652
|
}
|
|
2653
2653
|
function ChartDataTable({ caption, columns, rows }) {
|
|
2654
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.
|
|
2654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "fd-sr", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("table", { children: [
|
|
2655
2655
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("caption", { children: caption }),
|
|
2656
2656
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("tr", { children: columns.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("th", { scope: "col", children: c }, i)) }) }),
|
|
2657
2657
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("tbody", { children: rows.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("tr", { children: r.map((cell, j) => j === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("th", { scope: "row", children: cell }, j) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("td", { children: cell }, j)) }, i)) })
|
|
2658
|
-
] });
|
|
2658
|
+
] }) });
|
|
2659
2659
|
}
|
|
2660
2660
|
function ChartLegend({ items, activeKey, onActivate, className = "" }) {
|
|
2661
2661
|
if (!items.length) return null;
|
|
@@ -3195,7 +3195,8 @@ function DataTable({
|
|
|
3195
3195
|
columns = [],
|
|
3196
3196
|
rows = [],
|
|
3197
3197
|
compact: compact3 = false,
|
|
3198
|
-
|
|
3198
|
+
selectedIds,
|
|
3199
|
+
rowTitle,
|
|
3199
3200
|
onRowClick,
|
|
3200
3201
|
rowKey = "id",
|
|
3201
3202
|
loading = false,
|
|
@@ -3232,7 +3233,8 @@ function DataTable({
|
|
|
3232
3233
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tr", { children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("td", { className: c.numeric ? "is-num" : "", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)) }, i)) : rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3233
3234
|
"tr",
|
|
3234
3235
|
{
|
|
3235
|
-
"aria-selected":
|
|
3236
|
+
"aria-selected": selectedIds?.includes(r[rowKey]) ? "true" : void 0,
|
|
3237
|
+
title: rowTitle ? rowTitle(r) : void 0,
|
|
3236
3238
|
onClick: onRowClick ? () => onRowClick(r) : void 0,
|
|
3237
3239
|
style: onRowClick ? { cursor: "pointer" } : void 0,
|
|
3238
3240
|
children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("td", { className: c.numeric ? "is-num" : "", children: c.render ? c.render(r) : r[c.key] }, c.key))
|