@flytedan/flytebot-design-system 0.87.1 → 0.87.3

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
@@ -2784,33 +2784,36 @@ var React19 = __toESM(require("react"), 1);
2784
2784
  var React18 = __toESM(require("react"), 1);
2785
2785
  var import_react_dom5 = require("react-dom");
2786
2786
  var CORNER_STACK_INSET_PROPERTY = "--fd-corner-stack-inset";
2787
+ var JOBS_LAYER = ROOT_STEP - 1;
2787
2788
  var SLOTS = ["jobs", "toasts"];
2788
2789
  var references = /* @__PURE__ */ new Map();
2789
2790
  var host = null;
2790
2791
  var hostObserver = null;
2791
2792
  var slotElements = /* @__PURE__ */ new Map();
2793
+ var SLOT_LAYERS = { jobs: JOBS_LAYER, toasts: OVERLAY_CEILING };
2792
2794
  function createHost() {
2793
2795
  const stack = document.createElement("div");
2794
2796
  stack.className = "fd-corner-stack";
2795
- stack.style.zIndex = String(OVERLAY_CEILING);
2796
2797
  for (const slot of SLOTS) {
2797
2798
  const element = document.createElement("div");
2798
2799
  element.className = "fd-corner-stack-slot";
2799
2800
  element.dataset.cornerStackSlot = slot;
2801
+ element.style.zIndex = String(SLOT_LAYERS[slot]);
2800
2802
  stack.appendChild(element);
2801
2803
  slotElements.set(slot, element);
2802
2804
  }
2803
2805
  document.body.appendChild(stack);
2804
- publishInset(stack);
2806
+ const jobs2 = slotElements.get("jobs");
2807
+ publishInset(jobs2);
2805
2808
  if (typeof ResizeObserver === "function") {
2806
- hostObserver = new ResizeObserver(() => publishInset(stack));
2807
- hostObserver.observe(stack);
2809
+ hostObserver = new ResizeObserver(() => publishInset(jobs2));
2810
+ hostObserver.observe(jobs2);
2808
2811
  }
2809
2812
  return stack;
2810
2813
  }
2811
- function publishInset(stack) {
2812
- const height = stack.offsetHeight;
2813
- const inset = height > 0 ? height + parseFloat(getComputedStyle(stack).bottom) : 0;
2814
+ function publishInset(jobs2) {
2815
+ const height = jobs2.offsetHeight;
2816
+ const inset = height > 0 ? height + parseFloat(getComputedStyle(jobs2).bottom) : 0;
2814
2817
  document.documentElement.style.setProperty(CORNER_STACK_INSET_PROPERTY, `${inset}px`);
2815
2818
  }
2816
2819
  function acquire(slot) {
@@ -4474,7 +4477,15 @@ function DonutChart({
4474
4477
  const pct = total ? Math.round(Number(s.value) / total * 100) : 0;
4475
4478
  return {
4476
4479
  key: s.id,
4477
- label: `${s.label} ${formatPercent(pct)} \xB7 ${valueFormat(s.value)}`,
4480
+ label: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4481
+ s.label,
4482
+ " ",
4483
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "fd-donut-legend-value", children: [
4484
+ formatPercent(pct),
4485
+ " \xB7 ",
4486
+ valueFormat(s.value)
4487
+ ] })
4488
+ ] }),
4478
4489
  color: segmentColor(i, s),
4479
4490
  // The row's accessible name (ChartLegend bubble={false}): it must contain the row's visible
4480
4491
  // text, label then percent, so a person who speaks what they see reaches the row.
@@ -6412,7 +6423,7 @@ function FieldHelpButton({ field, onFieldHelp }) {
6412
6423
  label: "Help: " + field.label,
6413
6424
  title: void 0,
6414
6425
  className: "fd-filterbar-help",
6415
- onClick: () => onFieldHelp?.(field.key)
6426
+ onClick: (e) => onFieldHelp?.(field.key, e.currentTarget)
6416
6427
  }
6417
6428
  ) });
6418
6429
  }
@@ -17501,7 +17512,10 @@ function useExportJobs({ list, acknowledge }) {
17501
17512
  }, [anyLive, reload]);
17502
17513
  const refresh2 = React95.useCallback(() => void reload(), [reload]);
17503
17514
  const ackExport = React95.useCallback(
17504
- (id) => void acknowledgeRef.current(id).then(reload),
17515
+ (id) => {
17516
+ setRows((current2) => current2.filter((row) => row.id !== id));
17517
+ void acknowledgeRef.current(id).then(reload, reload);
17518
+ },
17505
17519
  [acknowledgeRef, reload]
17506
17520
  );
17507
17521
  return { exports: rows, ackExport, refresh: refresh2 };