@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.d.cts CHANGED
@@ -1296,6 +1296,9 @@ type DataTableColumn = DataTableColumnLabel & {
1296
1296
  key: string;
1297
1297
  /** Right-aligned tabular figures. Never center a number. */
1298
1298
  numeric?: boolean;
1299
+ /** Keeps this column's values on one line, in the table cell and in the phone card's meta line, so a value
1300
+ * like "FOIA 2025-26" never breaks at its hyphen. A table too narrow for it scrolls sideways in its own wrapper. */
1301
+ noWrap?: boolean;
1299
1302
  /** Set widths explicitly; auto layout shifts as data arrives. */
1300
1303
  width?: string;
1301
1304
  sortable?: boolean;
package/dist/index.d.ts CHANGED
@@ -1296,6 +1296,9 @@ type DataTableColumn = DataTableColumnLabel & {
1296
1296
  key: string;
1297
1297
  /** Right-aligned tabular figures. Never center a number. */
1298
1298
  numeric?: boolean;
1299
+ /** Keeps this column's values on one line, in the table cell and in the phone card's meta line, so a value
1300
+ * like "FOIA 2025-26" never breaks at its hyphen. A table too narrow for it scrolls sideways in its own wrapper. */
1301
+ noWrap?: boolean;
1299
1302
  /** Set widths explicitly; auto layout shifts as data arrives. */
1300
1303
  width?: string;
1301
1304
  sortable?: boolean;
package/dist/index.js CHANGED
@@ -3292,6 +3292,7 @@ function RowActionCell({ action }) {
3292
3292
  return /* @__PURE__ */ jsx46("td", { className: "fd-table-action", children: action ? /* @__PURE__ */ jsx46(RowActionButton, { action, size: "sm" }) : null });
3293
3293
  }
3294
3294
  var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
3295
+ var cellClassOf = (c) => [c.numeric ? "is-num" : "", c.noWrap ? "fd-table-nowrap" : ""].filter(Boolean).join(" ") || void 0;
3295
3296
  var cardCellOf = (c, row) => c.phoneRender ? c.phoneRender(row) : cellOf(c, row);
3296
3297
  function rowInteraction(row, onRowClick) {
3297
3298
  if (!onRowClick) return {};
@@ -3375,7 +3376,7 @@ function DataTable({
3375
3376
  rowAction ? /* @__PURE__ */ jsx46("th", { scope: "col", className: "fd-table-action-head", children: /* @__PURE__ */ jsx46("span", { className: "fd-sr-only", children: "Actions" }) }) : null
3376
3377
  ] }) }),
3377
3378
  /* @__PURE__ */ jsx46("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsxs37("tr", { children: [
3378
- columns.map((c) => /* @__PURE__ */ jsx46("td", { className: c.numeric ? "is-num" : "", children: /* @__PURE__ */ jsx46("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)),
3379
+ columns.map((c) => /* @__PURE__ */ jsx46("td", { className: cellClassOf(c), children: /* @__PURE__ */ jsx46("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)),
3379
3380
  rowAction ? /* @__PURE__ */ jsx46("td", { className: "fd-table-action" }) : null
3380
3381
  ] }, i)) : rows.map((r) => /* @__PURE__ */ jsxs37(
3381
3382
  "tr",
@@ -3384,7 +3385,7 @@ function DataTable({
3384
3385
  title: rowTitle ? rowTitle(r) : void 0,
3385
3386
  ...rowInteraction(r, onRowClick),
3386
3387
  children: [
3387
- columns.map((c) => /* @__PURE__ */ jsx46("td", { className: c.numeric ? "is-num" : "", children: cellOf(c, r) }, c.key)),
3388
+ columns.map((c) => /* @__PURE__ */ jsx46("td", { className: cellClassOf(c), children: cellOf(c, r) }, c.key)),
3388
3389
  rowAction ? /* @__PURE__ */ jsx46(RowActionCell, { action: rowAction(r) }) : null
3389
3390
  ]
3390
3391
  },
@@ -3436,7 +3437,7 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
3436
3437
  ...rowInteraction(r, onRowClick),
3437
3438
  children: [
3438
3439
  /* @__PURE__ */ jsx46("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx46("span", { className: c.numeric ? "is-num" : void 0, children: cardCellOf(c, r) }, c.key)) }),
3439
- secondary.length ? /* @__PURE__ */ jsx46("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs37("span", { className: c.numeric ? "is-num" : void 0, children: [
3440
+ secondary.length ? /* @__PURE__ */ jsx46("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs37("span", { className: cellClassOf(c), children: [
3440
3441
  /* @__PURE__ */ jsx46("span", { className: "fd-dt-card-label", children: c.label }),
3441
3442
  " ",
3442
3443
  cardCellOf(c, r)
@@ -8415,6 +8416,7 @@ function CodeEditor({
8415
8416
  const onChangeRef = React56.useRef(onChange);
8416
8417
  onChangeRef.current = onChange;
8417
8418
  const editableCompartment = React56.useRef(new Compartment()).current;
8419
+ const readOnlyCompartment = React56.useRef(new Compartment()).current;
8418
8420
  const attributesCompartment = React56.useRef(new Compartment()).current;
8419
8421
  const errorRef = React56.useRef(error);
8420
8422
  errorRef.current = error;
@@ -8457,7 +8459,7 @@ function CodeEditor({
8457
8459
  ...historyKeymap
8458
8460
  ]),
8459
8461
  editableCompartment.of(EditorView.editable.of(!disabled)),
8460
- EditorState.readOnly.of(readOnly),
8462
+ readOnlyCompartment.of(EditorState.readOnly.of(readOnly)),
8461
8463
  updateListener,
8462
8464
  attributesCompartment.of(EditorView.contentAttributes.of(contentAttributes()))
8463
8465
  ]
@@ -8484,6 +8486,11 @@ function CodeEditor({
8484
8486
  if (!view) return;
8485
8487
  view.dispatch({ effects: editableCompartment.reconfigure(EditorView.editable.of(!disabled)) });
8486
8488
  }, [disabled, editableCompartment]);
8489
+ React56.useEffect(() => {
8490
+ const view = viewRef.current;
8491
+ if (!view) return;
8492
+ view.dispatch({ effects: readOnlyCompartment.reconfigure(EditorState.readOnly.of(readOnly)) });
8493
+ }, [readOnly, readOnlyCompartment]);
8487
8494
  React56.useEffect(() => {
8488
8495
  const view = viewRef.current;
8489
8496
  if (!view) return;