@flytedan/flytebot-design-system 0.55.1 → 0.55.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 +26 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +8 -22
package/dist/index.js
CHANGED
|
@@ -1598,6 +1598,9 @@ function AppShell({
|
|
|
1598
1598
|
style: {
|
|
1599
1599
|
flex: 1,
|
|
1600
1600
|
minWidth: 0,
|
|
1601
|
+
// MP-298: positioned so absolutely positioned content inside (a chart's `.fd-sr` data
|
|
1602
|
+
// table) is contained and clipped by this scroller, never stretching the document.
|
|
1603
|
+
position: "relative",
|
|
1601
1604
|
overflowY: "auto",
|
|
1602
1605
|
padding: 24,
|
|
1603
1606
|
maxWidth: contentMaxWidth,
|
|
@@ -5408,27 +5411,26 @@ import { jsx as jsx56 } from "react/jsx-runtime";
|
|
|
5408
5411
|
function useInlinePanel() {
|
|
5409
5412
|
const [open2, setOpen] = React35.useState(false);
|
|
5410
5413
|
const ref = React35.useRef(null);
|
|
5411
|
-
|
|
5412
|
-
const zIndex = useLayerZIndex(layer);
|
|
5413
|
-
React35.useEffect(() => {
|
|
5414
|
-
if (!open2) return;
|
|
5415
|
-
const away = (e) => {
|
|
5416
|
-
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
5417
|
-
};
|
|
5418
|
-
document.addEventListener("pointerdown", away);
|
|
5419
|
-
return () => document.removeEventListener("pointerdown", away);
|
|
5420
|
-
}, [open2]);
|
|
5421
|
-
return { open: open2, setOpen, ref, zIndex, layer };
|
|
5414
|
+
return { open: open2, setOpen, ref };
|
|
5422
5415
|
}
|
|
5423
|
-
function
|
|
5424
|
-
return /* @__PURE__ */ jsx56(
|
|
5416
|
+
function InlinePanelSurface({ panel, align = "right", ...popover }) {
|
|
5417
|
+
return /* @__PURE__ */ jsx56(
|
|
5418
|
+
Popover,
|
|
5419
|
+
{
|
|
5420
|
+
open: panel.open,
|
|
5421
|
+
anchorRef: panel.ref,
|
|
5422
|
+
onClose: () => panel.setOpen(false),
|
|
5423
|
+
placement: align === "left" ? "bottom-start" : "bottom-end",
|
|
5424
|
+
...popover
|
|
5425
|
+
}
|
|
5426
|
+
);
|
|
5425
5427
|
}
|
|
5426
5428
|
|
|
5427
5429
|
// src/components/data/SortMenu.tsx
|
|
5428
5430
|
import { jsx as jsx57, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5429
5431
|
function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", className = "", ...rest }) {
|
|
5430
5432
|
const panel = useInlinePanel();
|
|
5431
|
-
const { open: open2, setOpen, ref
|
|
5433
|
+
const { open: open2, setOpen, ref } = panel;
|
|
5432
5434
|
const cur = fields.find((f) => f.key === (sort && sort.key));
|
|
5433
5435
|
const dir = sort && sort.dir;
|
|
5434
5436
|
const arrow = (f, d) => {
|
|
@@ -5456,12 +5458,12 @@ function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", cla
|
|
|
5456
5458
|
}
|
|
5457
5459
|
);
|
|
5458
5460
|
};
|
|
5459
|
-
return /* @__PURE__ */ jsxs49("span", { className, style: {
|
|
5461
|
+
return /* @__PURE__ */ jsxs49("span", { className, style: { display: "inline-flex" }, ref, ...rest, children: [
|
|
5460
5462
|
/* @__PURE__ */ jsxs49(Button, { size, variant: "secondary", icon: dir === "asc" ? "sort-ascending" : "sort-descending", onClick: () => setOpen(!open2), children: [
|
|
5461
5463
|
cur ? cur.label : "Unsorted",
|
|
5462
5464
|
/* @__PURE__ */ jsx57("i", { className: "ph ph-" + (dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
|
|
5463
5465
|
] }),
|
|
5464
|
-
|
|
5466
|
+
/* @__PURE__ */ jsx57(InlinePanelSurface, { panel, align, offset: 6, width: 280, label: "Sort by", children: /* @__PURE__ */ jsxs49("span", { className: "fd-stack", style: { gap: 2, padding: 8 }, children: [
|
|
5465
5467
|
/* @__PURE__ */ jsx57("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
|
|
5466
5468
|
fields.map((f) => {
|
|
5467
5469
|
const active = cur && cur.key === f.key;
|
|
@@ -5471,7 +5473,7 @@ function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", cla
|
|
|
5471
5473
|
arrow(f, "desc")
|
|
5472
5474
|
] }, f.key);
|
|
5473
5475
|
})
|
|
5474
|
-
] }) })
|
|
5476
|
+
] }) })
|
|
5475
5477
|
] });
|
|
5476
5478
|
}
|
|
5477
5479
|
|
|
@@ -11031,7 +11033,7 @@ import { Fragment as Fragment22, jsx as jsx84, jsxs as jsxs75 } from "react/jsx-
|
|
|
11031
11033
|
function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog, onOpenSpec, summary }) {
|
|
11032
11034
|
const mode2 = useRuntimeMode();
|
|
11033
11035
|
const panel = useInlinePanel();
|
|
11034
|
-
const { open: open2, setOpen, ref
|
|
11036
|
+
const { open: open2, setOpen, ref } = panel;
|
|
11035
11037
|
if (!canToggle) return null;
|
|
11036
11038
|
const test = mode2 === "test";
|
|
11037
11039
|
const s = summary || RuntimeKit.summary();
|
|
@@ -11039,7 +11041,7 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
|
|
|
11039
11041
|
RuntimeKit.setMode(next);
|
|
11040
11042
|
setOpen(false);
|
|
11041
11043
|
};
|
|
11042
|
-
return /* @__PURE__ */ jsxs75("span", { style: {
|
|
11044
|
+
return /* @__PURE__ */ jsxs75("span", { style: { display: "inline-flex" }, ref, children: [
|
|
11043
11045
|
/* @__PURE__ */ jsxs75(
|
|
11044
11046
|
"button",
|
|
11045
11047
|
{
|
|
@@ -11055,7 +11057,7 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
|
|
|
11055
11057
|
]
|
|
11056
11058
|
}
|
|
11057
11059
|
),
|
|
11058
|
-
|
|
11060
|
+
/* @__PURE__ */ jsxs75(InlinePanelSurface, { panel, align: "right", offset: 8, width: 400, className: "fd-mode-pop", label: test ? "Test mode" : "Live mode", children: [
|
|
11059
11061
|
/* @__PURE__ */ jsxs75("span", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
|
|
11060
11062
|
/* @__PURE__ */ jsxs75("span", { className: "fd-badge " + (test ? "fd-badge-warning" : "fd-badge-neutral"), children: [
|
|
11061
11063
|
/* @__PURE__ */ jsx84("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
|
|
@@ -11113,7 +11115,7 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
|
|
|
11113
11115
|
] })
|
|
11114
11116
|
] }),
|
|
11115
11117
|
test && renderLog ? /* @__PURE__ */ jsx84("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
|
|
11116
|
-
] })
|
|
11118
|
+
] })
|
|
11117
11119
|
] });
|
|
11118
11120
|
}
|
|
11119
11121
|
function TestModeBar({ onExit }) {
|
|
@@ -13506,7 +13508,7 @@ function FolderPickerMenu({
|
|
|
13506
13508
|
onPick
|
|
13507
13509
|
}) {
|
|
13508
13510
|
const panel = useInlinePanel();
|
|
13509
|
-
const { open: open2, setOpen, ref
|
|
13511
|
+
const { open: open2, setOpen, ref } = panel;
|
|
13510
13512
|
return /* @__PURE__ */ jsxs90("span", { className: "fd-fb-menu-anchor", ref, children: [
|
|
13511
13513
|
/* @__PURE__ */ jsx99(
|
|
13512
13514
|
IconButton,
|
|
@@ -13520,7 +13522,7 @@ function FolderPickerMenu({
|
|
|
13520
13522
|
onClick: () => setOpen((v) => !v)
|
|
13521
13523
|
}
|
|
13522
13524
|
),
|
|
13523
|
-
|
|
13525
|
+
/* @__PURE__ */ jsx99(InlinePanelSurface, { panel, align: "right", offset: 4, width: 220, maxHeight: 280, role: "menu", label, children: /* @__PURE__ */ jsxs90("div", { className: "fd-fb-menu", children: [
|
|
13524
13526
|
/* @__PURE__ */ jsx99("span", { className: "fd-overline fd-muted fd-fb-menu-title", children: "Move to\u2026" }),
|
|
13525
13527
|
destinations.map((d) => /* @__PURE__ */ jsxs90(
|
|
13526
13528
|
"button",
|
|
@@ -13540,7 +13542,7 @@ function FolderPickerMenu({
|
|
|
13540
13542
|
},
|
|
13541
13543
|
d.id ?? "__root__"
|
|
13542
13544
|
))
|
|
13543
|
-
] }) })
|
|
13545
|
+
] }) })
|
|
13544
13546
|
] });
|
|
13545
13547
|
}
|
|
13546
13548
|
function RowShell({ icon, name, meta, onOpen, draggableId, isDropTarget, onDropPayload, actions, className = "" }) {
|