@flytedan/flytebot-design-system 0.90.0 → 0.91.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 +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +8 -0
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
|
-
|
|
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
|
-
|
|
4959
|
+
cell
|
|
4958
4960
|
] }, c.key)) }) : null
|
|
4959
4961
|
]
|
|
4960
4962
|
}
|
|
@@ -15713,6 +15715,7 @@ function ModelControls({
|
|
|
15713
15715
|
onFastModeChange,
|
|
15714
15716
|
fastModeLabel = "Enable fast mode",
|
|
15715
15717
|
moreModels,
|
|
15718
|
+
modelsHeading = "Models",
|
|
15716
15719
|
narrow: _narrow
|
|
15717
15720
|
}) {
|
|
15718
15721
|
if (!models || !models.length) return null;
|
|
@@ -15736,7 +15739,7 @@ function ModelControls({
|
|
|
15736
15739
|
shortcut: m.shortcut ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
|
|
15737
15740
|
onSelect: () => onModelChange && onModelChange(m.id)
|
|
15738
15741
|
});
|
|
15739
|
-
const items = [{ kind: "section", label:
|
|
15742
|
+
const items = [{ kind: "section", label: modelsHeading }].concat(flat.map(item2));
|
|
15740
15743
|
Object.keys(grouped).forEach((g) => {
|
|
15741
15744
|
items.push({ id: "grp_" + g, label: g, icon: "stack", submenu: grouped[g].map(item2) });
|
|
15742
15745
|
});
|
|
@@ -15853,6 +15856,7 @@ function AgentChatPanel({
|
|
|
15853
15856
|
fastMode,
|
|
15854
15857
|
onFastModeChange,
|
|
15855
15858
|
moreModels,
|
|
15859
|
+
modelsHeading,
|
|
15856
15860
|
/* threads */
|
|
15857
15861
|
threads,
|
|
15858
15862
|
onSelectThread,
|
|
@@ -15952,6 +15956,7 @@ function AgentChatPanel({
|
|
|
15952
15956
|
fastMode,
|
|
15953
15957
|
onFastModeChange,
|
|
15954
15958
|
moreModels,
|
|
15959
|
+
modelsHeading,
|
|
15955
15960
|
narrow
|
|
15956
15961
|
}
|
|
15957
15962
|
);
|