@flytedan/flytebot-design-system 0.12.4 → 0.12.5

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
@@ -1632,9 +1632,11 @@ function DataTable({
1632
1632
  // src/components/data/FilterBar.tsx
1633
1633
  var React8 = __toESM(require("react"), 1);
1634
1634
  var import_jsx_runtime28 = require("react/jsx-runtime");
1635
+ var FILTER_BAR_BASE = 120;
1635
1636
  var isSet = (v) => !(v == null || v === "" || v === false);
1636
1637
  function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align = "left", className = "", ...rest }) {
1637
1638
  const [panel, setPanel] = React8.useState(null);
1639
+ const zIndex = useOverlayLayer(FILTER_BAR_BASE);
1638
1640
  const rootRef = React8.useRef(null);
1639
1641
  const textInputRef = React8.useRef(null);
1640
1642
  const optionsRef = React8.useRef(null);
@@ -1725,11 +1727,11 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
1725
1727
  field.label,
1726
1728
  chosen ? ": " + chosen.label : ""
1727
1729
  ] }),
1728
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1730
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1729
1731
  "span",
1730
1732
  {
1731
1733
  className: "fd-view-enter",
1732
- style: { position: "absolute", top: "calc(100% + 6px)", left: 0, zIndex: 120, minWidth: 200, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 },
1734
+ style: { position: "absolute", top: "calc(100% + 6px)", left: 0, zIndex, minWidth: 200, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 },
1733
1735
  children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "fd-stack", role: "listbox", "aria-label": field.label, ref: optionsRef, style: { gap: 2 }, children: field.options.map((o) => {
1734
1736
  const on = o.value === value;
1735
1737
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
@@ -1750,7 +1752,7 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
1750
1752
  );
1751
1753
  }) })
1752
1754
  }
1753
- )
1755
+ ) })
1754
1756
  ] }, field.key);
1755
1757
  }
1756
1758
  if (isSet(value)) {
@@ -1777,11 +1779,11 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
1777
1779
  children: "Filter"
1778
1780
  }
1779
1781
  ),
1780
- panel?.kind === "add" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1782
+ panel?.kind === "add" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1781
1783
  "span",
1782
1784
  {
1783
1785
  className: "fd-view-enter",
1784
- style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex: 120, width: 220, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 },
1786
+ style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex, width: 220, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 },
1785
1787
  children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "fd-stack", role: "menu", "aria-label": "Add filter", style: { gap: 2 }, children: [
1786
1788
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Add filter" }),
1787
1789
  addableFields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
@@ -1798,7 +1800,7 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
1798
1800
  ))
1799
1801
  ] })
1800
1802
  }
1801
- ) : null
1803
+ ) }) : null
1802
1804
  ] }) : null
1803
1805
  ] });
1804
1806
  }
@@ -2824,8 +2826,10 @@ function ScoreMeter({
2824
2826
  // src/components/data/SortMenu.tsx
2825
2827
  var React14 = __toESM(require("react"), 1);
2826
2828
  var import_jsx_runtime37 = require("react/jsx-runtime");
2829
+ var SORT_MENU_BASE = 120;
2827
2830
  function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", className = "", ...rest }) {
2828
2831
  const [open, setOpen] = React14.useState(false);
2832
+ const zIndex = useOverlayLayer(SORT_MENU_BASE);
2829
2833
  const ref = React14.useRef(null);
2830
2834
  React14.useEffect(() => {
2831
2835
  if (!open) return;
@@ -2874,7 +2878,7 @@ function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", cla
2874
2878
  cur ? cur.label : "Unsorted",
2875
2879
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("i", { className: "ph ph-" + (dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
2876
2880
  ] }),
2877
- open ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "fd-view-enter", style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex: 120, width: 280, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "fd-stack", style: { gap: 2 }, children: [
2881
+ open ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "fd-view-enter", style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex, width: 280, maxWidth: "calc(100vw - 32px)", display: "block", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, boxShadow: "0 16px 44px rgba(11,13,17,.18)", padding: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "fd-stack", style: { gap: 2 }, children: [
2878
2882
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
2879
2883
  fields.map((f) => {
2880
2884
  const active = cur && cur.key === f.key;
@@ -2884,7 +2888,7 @@ function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", cla
2884
2888
  arrow(f, "desc")
2885
2889
  ] }, f.key);
2886
2890
  })
2887
- ] }) }) : null
2891
+ ] }) }) }) : null
2888
2892
  ] });
2889
2893
  }
2890
2894
 
@@ -7745,6 +7749,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
7745
7749
  var React35 = __toESM(require("react"), 1);
7746
7750
  var import_react_dom5 = require("react-dom");
7747
7751
  var import_jsx_runtime62 = require("react/jsx-runtime");
7752
+ var SOON_HOVERCARD_BASE = 220;
7748
7753
  var BYPASS_STORE = "fd.soon.bypass.v1";
7749
7754
  function readBypassed() {
7750
7755
  try {
@@ -7939,6 +7944,7 @@ function ComingSoon({
7939
7944
  function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass, blur, tip, className, rest, children }) {
7940
7945
  const [open, setOpen] = React35.useState(false);
7941
7946
  const [anchor, pos] = useHoverCard(open);
7947
+ const zIndex = useOverlayLayer(SOON_HOVERCARD_BASE);
7942
7948
  const close = React35.useRef(null);
7943
7949
  const show = () => {
7944
7950
  if (close.current) {
@@ -7985,12 +7991,12 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
7985
7991
  }
7986
7992
  ),
7987
7993
  open && pos ? (0, import_react_dom5.createPortal)(
7988
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
7994
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
7989
7995
  "div",
7990
7996
  {
7991
7997
  className: "fd-soon-note fd-soon-hovercard",
7992
7998
  role: "tooltip",
7993
- style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width },
7999
+ style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width, zIndex },
7994
8000
  onMouseEnter: show,
7995
8001
  onMouseLeave: hide,
7996
8002
  children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
@@ -8007,7 +8013,7 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
8007
8013
  }
8008
8014
  )
8009
8015
  }
8010
- ),
8016
+ ) }),
8011
8017
  document.body
8012
8018
  ) : null
8013
8019
  ]
@@ -8126,9 +8132,11 @@ function PermissionHint({ perm, children }) {
8126
8132
  // src/components/platform/ModeSwitch.tsx
8127
8133
  var React36 = __toESM(require("react"), 1);
8128
8134
  var import_jsx_runtime64 = require("react/jsx-runtime");
8135
+ var MODE_SWITCH_BASE = 140;
8129
8136
  function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog, onOpenSpec, summary }) {
8130
8137
  const mode2 = useRuntimeMode();
8131
8138
  const [open, setOpen] = React36.useState(false);
8139
+ const zIndex = useOverlayLayer(MODE_SWITCH_BASE);
8132
8140
  const ref = React36.useRef(null);
8133
8141
  React36.useEffect(() => {
8134
8142
  if (!open) return;
@@ -8168,7 +8176,7 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
8168
8176
  ]
8169
8177
  }
8170
8178
  ),
8171
- open ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "fd-view-enter fd-mode-pop", children: [
8179
+ open ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "fd-view-enter fd-mode-pop", style: { zIndex }, children: [
8172
8180
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
8173
8181
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "fd-badge " + (test ? "fd-badge-warning" : "fd-badge-neutral"), children: [
8174
8182
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
@@ -8226,7 +8234,7 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
8226
8234
  ] })
8227
8235
  ] }),
8228
8236
  test && renderLog ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
8229
- ] }) : null
8237
+ ] }) }) : null
8230
8238
  ] });
8231
8239
  }
8232
8240
  function TestModeBar({ onExit }) {