@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 +21 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +21 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +18 -1
package/dist/index.d.cts
CHANGED
|
@@ -500,8 +500,13 @@ declare function AvatarStack({ people, size, max, className }: AvatarStackProps)
|
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
502
|
* A pill of state. Badges never carry actions — if it is clickable it is a Tag.
|
|
503
|
+
*
|
|
504
|
+
* Extends HTMLAttributes so a consumer can pass `title`, `aria-*`, `style` or any other
|
|
505
|
+
* plain span attribute straight through, the same rest-prop passthrough every other kit
|
|
506
|
+
* component follows — a caller that needs one of those never has reason to hand-roll the
|
|
507
|
+
* markup instead of using the component.
|
|
503
508
|
*/
|
|
504
|
-
interface BadgeProps {
|
|
509
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
505
510
|
children?: React.ReactNode;
|
|
506
511
|
/** live = the site's blue gradient "Active". approved = its mint pill. count = the blue number chip. */
|
|
507
512
|
tone?: "neutral" | "info" | "success" | "warning" | "danger" | "live" | "approved" | "count";
|
package/dist/index.d.ts
CHANGED
|
@@ -500,8 +500,13 @@ declare function AvatarStack({ people, size, max, className }: AvatarStackProps)
|
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
502
|
* A pill of state. Badges never carry actions — if it is clickable it is a Tag.
|
|
503
|
+
*
|
|
504
|
+
* Extends HTMLAttributes so a consumer can pass `title`, `aria-*`, `style` or any other
|
|
505
|
+
* plain span attribute straight through, the same rest-prop passthrough every other kit
|
|
506
|
+
* component follows — a caller that needs one of those never has reason to hand-roll the
|
|
507
|
+
* markup instead of using the component.
|
|
503
508
|
*/
|
|
504
|
-
interface BadgeProps {
|
|
509
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
505
510
|
children?: React.ReactNode;
|
|
506
511
|
/** live = the site's blue gradient "Active". approved = its mint pill. count = the blue number chip. */
|
|
507
512
|
tone?: "neutral" | "info" | "success" | "warning" | "danger" | "live" | "approved" | "count";
|
package/dist/index.js
CHANGED
|
@@ -1429,9 +1429,11 @@ function DataTable({
|
|
|
1429
1429
|
// src/components/data/FilterBar.tsx
|
|
1430
1430
|
import * as React8 from "react";
|
|
1431
1431
|
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1432
|
+
var FILTER_BAR_BASE = 120;
|
|
1432
1433
|
var isSet = (v) => !(v == null || v === "" || v === false);
|
|
1433
1434
|
function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align = "left", className = "", ...rest }) {
|
|
1434
1435
|
const [panel, setPanel] = React8.useState(null);
|
|
1436
|
+
const zIndex = useOverlayLayer(FILTER_BAR_BASE);
|
|
1435
1437
|
const rootRef = React8.useRef(null);
|
|
1436
1438
|
const textInputRef = React8.useRef(null);
|
|
1437
1439
|
const optionsRef = React8.useRef(null);
|
|
@@ -1522,11 +1524,11 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
|
|
|
1522
1524
|
field.label,
|
|
1523
1525
|
chosen ? ": " + chosen.label : ""
|
|
1524
1526
|
] }),
|
|
1525
|
-
/* @__PURE__ */ jsx28(
|
|
1527
|
+
/* @__PURE__ */ jsx28(LayerProvider, { zIndex, children: /* @__PURE__ */ jsx28(
|
|
1526
1528
|
"span",
|
|
1527
1529
|
{
|
|
1528
1530
|
className: "fd-view-enter",
|
|
1529
|
-
style: { position: "absolute", top: "calc(100% + 6px)", left: 0, zIndex
|
|
1531
|
+
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 },
|
|
1530
1532
|
children: /* @__PURE__ */ jsx28("span", { className: "fd-stack", role: "listbox", "aria-label": field.label, ref: optionsRef, style: { gap: 2 }, children: field.options.map((o) => {
|
|
1531
1533
|
const on = o.value === value;
|
|
1532
1534
|
return /* @__PURE__ */ jsx28(
|
|
@@ -1547,7 +1549,7 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
|
|
|
1547
1549
|
);
|
|
1548
1550
|
}) })
|
|
1549
1551
|
}
|
|
1550
|
-
)
|
|
1552
|
+
) })
|
|
1551
1553
|
] }, field.key);
|
|
1552
1554
|
}
|
|
1553
1555
|
if (isSet(value)) {
|
|
@@ -1574,11 +1576,11 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
|
|
|
1574
1576
|
children: "Filter"
|
|
1575
1577
|
}
|
|
1576
1578
|
),
|
|
1577
|
-
panel?.kind === "add" ? /* @__PURE__ */ jsx28(
|
|
1579
|
+
panel?.kind === "add" ? /* @__PURE__ */ jsx28(LayerProvider, { zIndex, children: /* @__PURE__ */ jsx28(
|
|
1578
1580
|
"span",
|
|
1579
1581
|
{
|
|
1580
1582
|
className: "fd-view-enter",
|
|
1581
|
-
style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex
|
|
1583
|
+
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 },
|
|
1582
1584
|
children: /* @__PURE__ */ jsxs23("span", { className: "fd-stack", role: "menu", "aria-label": "Add filter", style: { gap: 2 }, children: [
|
|
1583
1585
|
/* @__PURE__ */ jsx28("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Add filter" }),
|
|
1584
1586
|
addableFields.map((f) => /* @__PURE__ */ jsx28(
|
|
@@ -1595,7 +1597,7 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
|
|
|
1595
1597
|
))
|
|
1596
1598
|
] })
|
|
1597
1599
|
}
|
|
1598
|
-
) : null
|
|
1600
|
+
) }) : null
|
|
1599
1601
|
] }) : null
|
|
1600
1602
|
] });
|
|
1601
1603
|
}
|
|
@@ -2621,8 +2623,10 @@ function ScoreMeter({
|
|
|
2621
2623
|
// src/components/data/SortMenu.tsx
|
|
2622
2624
|
import * as React14 from "react";
|
|
2623
2625
|
import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2626
|
+
var SORT_MENU_BASE = 120;
|
|
2624
2627
|
function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", className = "", ...rest }) {
|
|
2625
2628
|
const [open, setOpen] = React14.useState(false);
|
|
2629
|
+
const zIndex = useOverlayLayer(SORT_MENU_BASE);
|
|
2626
2630
|
const ref = React14.useRef(null);
|
|
2627
2631
|
React14.useEffect(() => {
|
|
2628
2632
|
if (!open) return;
|
|
@@ -2671,7 +2675,7 @@ function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", cla
|
|
|
2671
2675
|
cur ? cur.label : "Unsorted",
|
|
2672
2676
|
/* @__PURE__ */ jsx36("i", { className: "ph ph-" + (dir === "asc" ? "arrow-up" : "arrow-down"), style: { fontSize: 12, marginLeft: 6, opacity: 0.75 } })
|
|
2673
2677
|
] }),
|
|
2674
|
-
open ? /* @__PURE__ */ jsx36("span", { className: "fd-view-enter", style: { position: "absolute", top: "calc(100% + 6px)", [align]: 0, zIndex
|
|
2678
|
+
open ? /* @__PURE__ */ jsx36(LayerProvider, { zIndex, children: /* @__PURE__ */ jsx36("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__ */ jsxs32("span", { className: "fd-stack", style: { gap: 2 }, children: [
|
|
2675
2679
|
/* @__PURE__ */ jsx36("span", { className: "fd-overline fd-muted", style: { padding: "4px 8px 6px" }, children: "Sort by" }),
|
|
2676
2680
|
fields.map((f) => {
|
|
2677
2681
|
const active = cur && cur.key === f.key;
|
|
@@ -2681,7 +2685,7 @@ function SortMenu({ fields = [], sort, onSort, align = "right", size = "md", cla
|
|
|
2681
2685
|
arrow(f, "desc")
|
|
2682
2686
|
] }, f.key);
|
|
2683
2687
|
})
|
|
2684
|
-
] }) }) : null
|
|
2688
|
+
] }) }) }) : null
|
|
2685
2689
|
] });
|
|
2686
2690
|
}
|
|
2687
2691
|
|
|
@@ -7542,6 +7546,7 @@ function RoadmapTimeline({ onOpenFlag, title = "Roadmap", lede }) {
|
|
|
7542
7546
|
import * as React35 from "react";
|
|
7543
7547
|
import { createPortal as createPortal5 } from "react-dom";
|
|
7544
7548
|
import { Fragment as Fragment16, jsx as jsx61, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
7549
|
+
var SOON_HOVERCARD_BASE = 220;
|
|
7545
7550
|
var BYPASS_STORE = "fd.soon.bypass.v1";
|
|
7546
7551
|
function readBypassed() {
|
|
7547
7552
|
try {
|
|
@@ -7736,6 +7741,7 @@ function ComingSoon({
|
|
|
7736
7741
|
function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass, blur, tip, className, rest, children }) {
|
|
7737
7742
|
const [open, setOpen] = React35.useState(false);
|
|
7738
7743
|
const [anchor, pos] = useHoverCard(open);
|
|
7744
|
+
const zIndex = useOverlayLayer(SOON_HOVERCARD_BASE);
|
|
7739
7745
|
const close = React35.useRef(null);
|
|
7740
7746
|
const show = () => {
|
|
7741
7747
|
if (close.current) {
|
|
@@ -7782,12 +7788,12 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
|
|
|
7782
7788
|
}
|
|
7783
7789
|
),
|
|
7784
7790
|
open && pos ? createPortal5(
|
|
7785
|
-
/* @__PURE__ */ jsx61(
|
|
7791
|
+
/* @__PURE__ */ jsx61(LayerProvider, { zIndex, children: /* @__PURE__ */ jsx61(
|
|
7786
7792
|
"div",
|
|
7787
7793
|
{
|
|
7788
7794
|
className: "fd-soon-note fd-soon-hovercard",
|
|
7789
7795
|
role: "tooltip",
|
|
7790
|
-
style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width },
|
|
7796
|
+
style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width, zIndex },
|
|
7791
7797
|
onMouseEnter: show,
|
|
7792
7798
|
onMouseLeave: hide,
|
|
7793
7799
|
children: /* @__PURE__ */ jsx61(
|
|
@@ -7804,7 +7810,7 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
|
|
|
7804
7810
|
}
|
|
7805
7811
|
)
|
|
7806
7812
|
}
|
|
7807
|
-
),
|
|
7813
|
+
) }),
|
|
7808
7814
|
document.body
|
|
7809
7815
|
) : null
|
|
7810
7816
|
]
|
|
@@ -7923,9 +7929,11 @@ function PermissionHint({ perm, children }) {
|
|
|
7923
7929
|
// src/components/platform/ModeSwitch.tsx
|
|
7924
7930
|
import * as React36 from "react";
|
|
7925
7931
|
import { Fragment as Fragment17, jsx as jsx63, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
7932
|
+
var MODE_SWITCH_BASE = 140;
|
|
7926
7933
|
function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog, onOpenSpec, summary }) {
|
|
7927
7934
|
const mode2 = useRuntimeMode();
|
|
7928
7935
|
const [open, setOpen] = React36.useState(false);
|
|
7936
|
+
const zIndex = useOverlayLayer(MODE_SWITCH_BASE);
|
|
7929
7937
|
const ref = React36.useRef(null);
|
|
7930
7938
|
React36.useEffect(() => {
|
|
7931
7939
|
if (!open) return;
|
|
@@ -7965,7 +7973,7 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
|
|
|
7965
7973
|
]
|
|
7966
7974
|
}
|
|
7967
7975
|
),
|
|
7968
|
-
open ? /* @__PURE__ */ jsxs58("span", { className: "fd-view-enter fd-mode-pop", children: [
|
|
7976
|
+
open ? /* @__PURE__ */ jsx63(LayerProvider, { zIndex, children: /* @__PURE__ */ jsxs58("span", { className: "fd-view-enter fd-mode-pop", style: { zIndex }, children: [
|
|
7969
7977
|
/* @__PURE__ */ jsxs58("span", { className: "fd-row", style: { gap: 10, padding: "12px 14px", borderBottom: "1px solid var(--border)" }, children: [
|
|
7970
7978
|
/* @__PURE__ */ jsxs58("span", { className: "fd-badge " + (test ? "fd-badge-warning" : "fd-badge-neutral"), children: [
|
|
7971
7979
|
/* @__PURE__ */ jsx63("i", { className: "ph " + (test ? "ph-flask" : "ph-lightning"), "aria-hidden": "true" }),
|
|
@@ -8023,7 +8031,7 @@ function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog
|
|
|
8023
8031
|
] })
|
|
8024
8032
|
] }),
|
|
8025
8033
|
test && renderLog ? /* @__PURE__ */ jsx63("span", { style: { display: "block", maxHeight: 340, overflowY: "auto", borderTop: "1px solid var(--border)" }, children: renderLog() }) : null
|
|
8026
|
-
] }) : null
|
|
8034
|
+
] }) }) : null
|
|
8027
8035
|
] });
|
|
8028
8036
|
}
|
|
8029
8037
|
function TestModeBar({ onExit }) {
|