@flytedan/flytebot-design-system 0.40.0 → 0.41.0
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 +34 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -5
- package/dist/index.d.ts +33 -5
- package/dist/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -102,6 +102,7 @@ __export(index_exports, {
|
|
|
102
102
|
FormatEta: () => FormatEta,
|
|
103
103
|
FunnelChart: () => FunnelChart,
|
|
104
104
|
Gate: () => Gate,
|
|
105
|
+
GatePending: () => GatePending,
|
|
105
106
|
IMPORTANCE_LEVELS: () => IMPORTANCE_LEVELS,
|
|
106
107
|
IconButton: () => IconButton,
|
|
107
108
|
ImportanceTag: () => ImportanceTag,
|
|
@@ -10614,8 +10615,38 @@ function PermissionDenied({ permission, title, detail, compact: compact3 = false
|
|
|
10614
10615
|
}
|
|
10615
10616
|
);
|
|
10616
10617
|
}
|
|
10617
|
-
function
|
|
10618
|
-
|
|
10618
|
+
function GatePending({ compact: compact3 = false, className = "" }) {
|
|
10619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
10620
|
+
"div",
|
|
10621
|
+
{
|
|
10622
|
+
className: ["fd-stack", className].filter(Boolean).join(" "),
|
|
10623
|
+
style: {
|
|
10624
|
+
gap: 10,
|
|
10625
|
+
alignItems: "flex-start",
|
|
10626
|
+
padding: compact3 ? "14px 16px" : "28px 24px",
|
|
10627
|
+
borderRadius: 10,
|
|
10628
|
+
border: "1px dashed var(--border-strong)",
|
|
10629
|
+
background: "var(--surface-2)",
|
|
10630
|
+
maxWidth: 560,
|
|
10631
|
+
textAlign: "left"
|
|
10632
|
+
},
|
|
10633
|
+
children: [
|
|
10634
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "fd-row", style: { gap: 8 }, children: [
|
|
10635
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("i", { className: "ph ph-arrows-clockwise", style: { fontSize: 16, color: "var(--text-muted)" }, "aria-hidden": "true" }),
|
|
10636
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: compact3 ? "fd-label-lg" : "fd-h3", children: "Reconnecting\u2026" })
|
|
10637
|
+
] }),
|
|
10638
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "fd-body-sm fd-secondary", style: { margin: 0, textWrap: "pretty" }, children: "Your access can't be verified right now. This will resolve on its own once the connection is back." })
|
|
10639
|
+
]
|
|
10640
|
+
}
|
|
10641
|
+
);
|
|
10642
|
+
}
|
|
10643
|
+
function Gate({ perm, anyOf, role, silent = false, fallback, pendingFallback, compact: compact3 = false, children }) {
|
|
10644
|
+
const { can: can2, canAny: canAny2, hasRole: hasRole2, pending } = useSessionContext();
|
|
10645
|
+
if (pending) {
|
|
10646
|
+
if (pendingFallback !== void 0) return pendingFallback;
|
|
10647
|
+
if (silent) return null;
|
|
10648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GatePending, { compact: compact3 });
|
|
10649
|
+
}
|
|
10619
10650
|
let ok = true;
|
|
10620
10651
|
if (perm) ok = ok && can2(perm);
|
|
10621
10652
|
if (anyOf) ok = ok && canAny2(anyOf);
|
|
@@ -14107,6 +14138,7 @@ function useDocumentTitle(routeTitle, appName) {
|
|
|
14107
14138
|
FormatEta,
|
|
14108
14139
|
FunnelChart,
|
|
14109
14140
|
Gate,
|
|
14141
|
+
GatePending,
|
|
14110
14142
|
IMPORTANCE_LEVELS,
|
|
14111
14143
|
IconButton,
|
|
14112
14144
|
ImportanceTag,
|