@flytedan/flytebot-design-system 0.11.2 → 0.11.4

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 CHANGED
@@ -3036,7 +3036,7 @@ function EntityRowMetrics({ metrics, className = "", style }) {
3036
3036
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: ["fd-erow-metrics", className].filter(Boolean).join(" "), style, children: metrics.map((m, i) => {
3037
3037
  const key = m.id || m.label || i;
3038
3038
  const className2 = ["fd-erow-metric", m.tone && m.tone !== "default" ? "is-" + m.tone : "", m.tooltip != null ? "is-described" : ""].filter(Boolean).join(" ");
3039
- const cellStyle = { width: (m.width || ENTITY_ROW_METRIC_WIDTH) + "px", color: METRIC_TONE_COLOR[m.tone || "default"] };
3039
+ const cellStyle = { "--erow-metric-w": (m.width || ENTITY_ROW_METRIC_WIDTH) + "px", color: METRIC_TONE_COLOR[m.tone || "default"] };
3040
3040
  const content = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(React17.Fragment, { children: [
3041
3041
  m.icon ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("i", { className: "ph ph-" + m.icon, "aria-hidden": "true" }) : null,
3042
3042
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-erow-metric-value fd-tabular", children: m.value }),
@@ -3338,18 +3338,7 @@ function TransferList({
3338
3338
  ref: (el) => {
3339
3339
  sideRefs.current[side] = el;
3340
3340
  },
3341
- style: {
3342
- flex: 1,
3343
- minWidth: 0,
3344
- display: "flex",
3345
- flexDirection: "column",
3346
- gap: 8,
3347
- padding: 10,
3348
- borderRadius: 10,
3349
- border: "1px solid " + (dragOverSide === side ? "var(--brand)" : "var(--border)"),
3350
- background: "var(--surface)",
3351
- position: "relative"
3352
- },
3341
+ className: ["fd-tlist-side", dragOverSide === side ? "is-drop-target" : ""].filter(Boolean).join(" "),
3353
3342
  children: [
3354
3343
  cfg.label ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "fd-overline fd-muted", children: [
3355
3344
  cfg.label,
@@ -3380,15 +3369,20 @@ function TransferList({
3380
3369
  if (isBeingDragged) {
3381
3370
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "fd-erow-placeholder", "aria-hidden": "true" });
3382
3371
  }
3372
+ const content = renderRow(item);
3373
+ const destination = (side === "left" ? right : left).label || "the other list";
3383
3374
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3384
3375
  EntityRow,
3385
3376
  {
3386
- ...renderRow(item),
3377
+ ...content,
3387
3378
  draggable: true,
3388
3379
  onPointerDown: (e) => beginDrag(e, item, side),
3389
3380
  action: {
3390
3381
  icon: side === "left" ? "plus" : "minus",
3391
- label: (side === "left" ? "Move to " : "Move from ") + (side === "left" ? right.label || "the other list" : left.label || "the other list"),
3382
+ // Names the row AND where it goes. A list repeats this button on every
3383
+ // row, so a name without the row's title is the same word fifty times
3384
+ // over to a screen reader, with nothing to tell one button from the next.
3385
+ label: "Move " + content.title + " to " + destination,
3392
3386
  tone: side === "left" ? "add" : "remove",
3393
3387
  onClick: () => onMove(item, side, opposite)
3394
3388
  }
@@ -3406,7 +3400,7 @@ function TransferList({
3406
3400
  }
3407
3401
  );
3408
3402
  };
3409
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: ["fd-tlist", className].filter(Boolean).join(" "), style: { display: "flex", gap: 16, alignItems: "flex-start" }, children: [
3403
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: ["fd-tlist", className].filter(Boolean).join(" "), children: [
3410
3404
  renderSide("left", left, "right"),
3411
3405
  renderSide("right", right, "left"),
3412
3406
  drag ? (0, import_react_dom4.createPortal)(