@flytedan/flytebot-design-system 0.78.0 → 0.79.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 +11 -4
- 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 +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +3 -0
package/dist/index.cjs
CHANGED
|
@@ -4441,6 +4441,7 @@ function RowActionCell({ action }) {
|
|
|
4441
4441
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "fd-table-action", children: action ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RowActionButton, { action, size: "sm" }) : null });
|
|
4442
4442
|
}
|
|
4443
4443
|
var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
|
|
4444
|
+
var cellClassOf = (c) => [c.numeric ? "is-num" : "", c.noWrap ? "fd-table-nowrap" : ""].filter(Boolean).join(" ") || void 0;
|
|
4444
4445
|
var cardCellOf = (c, row) => c.phoneRender ? c.phoneRender(row) : cellOf(c, row);
|
|
4445
4446
|
function rowInteraction(row, onRowClick) {
|
|
4446
4447
|
if (!onRowClick) return {};
|
|
@@ -4524,7 +4525,7 @@ function DataTable({
|
|
|
4524
4525
|
rowAction ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { scope: "col", className: "fd-table-action-head", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "fd-sr-only", children: "Actions" }) }) : null
|
|
4525
4526
|
] }) }),
|
|
4526
4527
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("tr", { children: [
|
|
4527
|
-
columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: c
|
|
4528
|
+
columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: cellClassOf(c), children: /* @__PURE__ */ (0, import_jsx_runtime46.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)),
|
|
4528
4529
|
rowAction ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "fd-table-action" }) : null
|
|
4529
4530
|
] }, i)) : rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4530
4531
|
"tr",
|
|
@@ -4533,7 +4534,7 @@ function DataTable({
|
|
|
4533
4534
|
title: rowTitle ? rowTitle(r) : void 0,
|
|
4534
4535
|
...rowInteraction(r, onRowClick),
|
|
4535
4536
|
children: [
|
|
4536
|
-
columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: c
|
|
4537
|
+
columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: cellClassOf(c), children: cellOf(c, r) }, c.key)),
|
|
4537
4538
|
rowAction ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RowActionCell, { action: rowAction(r) }) : null
|
|
4538
4539
|
]
|
|
4539
4540
|
},
|
|
@@ -4585,7 +4586,7 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
|
|
|
4585
4586
|
...rowInteraction(r, onRowClick),
|
|
4586
4587
|
children: [
|
|
4587
4588
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: c.numeric ? "is-num" : void 0, children: cardCellOf(c, r) }, c.key)) }),
|
|
4588
|
-
secondary.length ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: c
|
|
4589
|
+
secondary.length ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: cellClassOf(c), children: [
|
|
4589
4590
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "fd-dt-card-label", children: c.label }),
|
|
4590
4591
|
" ",
|
|
4591
4592
|
cardCellOf(c, r)
|
|
@@ -9599,6 +9600,7 @@ function CodeEditor({
|
|
|
9599
9600
|
const onChangeRef = React56.useRef(onChange);
|
|
9600
9601
|
onChangeRef.current = onChange;
|
|
9601
9602
|
const editableCompartment = React56.useRef(new import_state.Compartment()).current;
|
|
9603
|
+
const readOnlyCompartment = React56.useRef(new import_state.Compartment()).current;
|
|
9602
9604
|
const attributesCompartment = React56.useRef(new import_state.Compartment()).current;
|
|
9603
9605
|
const errorRef = React56.useRef(error);
|
|
9604
9606
|
errorRef.current = error;
|
|
@@ -9641,7 +9643,7 @@ function CodeEditor({
|
|
|
9641
9643
|
...import_commands.historyKeymap
|
|
9642
9644
|
]),
|
|
9643
9645
|
editableCompartment.of(import_view.EditorView.editable.of(!disabled)),
|
|
9644
|
-
import_state.EditorState.readOnly.of(readOnly),
|
|
9646
|
+
readOnlyCompartment.of(import_state.EditorState.readOnly.of(readOnly)),
|
|
9645
9647
|
updateListener,
|
|
9646
9648
|
attributesCompartment.of(import_view.EditorView.contentAttributes.of(contentAttributes()))
|
|
9647
9649
|
]
|
|
@@ -9668,6 +9670,11 @@ function CodeEditor({
|
|
|
9668
9670
|
if (!view) return;
|
|
9669
9671
|
view.dispatch({ effects: editableCompartment.reconfigure(import_view.EditorView.editable.of(!disabled)) });
|
|
9670
9672
|
}, [disabled, editableCompartment]);
|
|
9673
|
+
React56.useEffect(() => {
|
|
9674
|
+
const view = viewRef.current;
|
|
9675
|
+
if (!view) return;
|
|
9676
|
+
view.dispatch({ effects: readOnlyCompartment.reconfigure(import_state.EditorState.readOnly.of(readOnly)) });
|
|
9677
|
+
}, [readOnly, readOnlyCompartment]);
|
|
9671
9678
|
React56.useEffect(() => {
|
|
9672
9679
|
const view = viewRef.current;
|
|
9673
9680
|
if (!view) return;
|