@flytedan/flytebot-design-system 0.57.0 → 0.58.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 +18 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +7 -0
package/dist/index.cjs
CHANGED
|
@@ -49,6 +49,7 @@ __export(index_exports, {
|
|
|
49
49
|
CHANNEL_WEIGHTS: () => CHANNEL_WEIGHTS,
|
|
50
50
|
CHAT_UNAVAILABLE: () => CHAT_UNAVAILABLE,
|
|
51
51
|
COPIED_FEEDBACK_MS: () => COPIED_FEEDBACK_MS,
|
|
52
|
+
CORNER_STACK_INSET_PROPERTY: () => CORNER_STACK_INSET_PROPERTY,
|
|
52
53
|
Calendar: () => Calendar,
|
|
53
54
|
Card: () => Card,
|
|
54
55
|
CardGrid: () => CardGrid,
|
|
@@ -1386,9 +1387,11 @@ var React10 = __toESM(require("react"), 1);
|
|
|
1386
1387
|
// src/kits/cornerStack.tsx
|
|
1387
1388
|
var React9 = __toESM(require("react"), 1);
|
|
1388
1389
|
var import_react_dom5 = require("react-dom");
|
|
1390
|
+
var CORNER_STACK_INSET_PROPERTY = "--fd-corner-stack-inset";
|
|
1389
1391
|
var SLOTS = ["jobs", "toasts"];
|
|
1390
1392
|
var references = /* @__PURE__ */ new Map();
|
|
1391
1393
|
var host = null;
|
|
1394
|
+
var hostObserver = null;
|
|
1392
1395
|
var slotElements = /* @__PURE__ */ new Map();
|
|
1393
1396
|
function createHost() {
|
|
1394
1397
|
const stack = document.createElement("div");
|
|
@@ -1402,8 +1405,18 @@ function createHost() {
|
|
|
1402
1405
|
slotElements.set(slot, element);
|
|
1403
1406
|
}
|
|
1404
1407
|
document.body.appendChild(stack);
|
|
1408
|
+
publishInset(stack);
|
|
1409
|
+
if (typeof ResizeObserver === "function") {
|
|
1410
|
+
hostObserver = new ResizeObserver(() => publishInset(stack));
|
|
1411
|
+
hostObserver.observe(stack);
|
|
1412
|
+
}
|
|
1405
1413
|
return stack;
|
|
1406
1414
|
}
|
|
1415
|
+
function publishInset(stack) {
|
|
1416
|
+
const height = stack.offsetHeight;
|
|
1417
|
+
const inset = height > 0 ? height + parseFloat(getComputedStyle(stack).bottom) : 0;
|
|
1418
|
+
document.documentElement.style.setProperty(CORNER_STACK_INSET_PROPERTY, `${inset}px`);
|
|
1419
|
+
}
|
|
1407
1420
|
function acquire(slot) {
|
|
1408
1421
|
host ??= createHost();
|
|
1409
1422
|
references.set(slot, (references.get(slot) ?? 0) + 1);
|
|
@@ -1414,6 +1427,9 @@ function release(slot) {
|
|
|
1414
1427
|
if (remaining > 0) references.set(slot, remaining);
|
|
1415
1428
|
else references.delete(slot);
|
|
1416
1429
|
if (references.size === 0 && host) {
|
|
1430
|
+
hostObserver?.disconnect();
|
|
1431
|
+
hostObserver = null;
|
|
1432
|
+
document.documentElement.style.removeProperty(CORNER_STACK_INSET_PROPERTY);
|
|
1417
1433
|
host.remove();
|
|
1418
1434
|
host = null;
|
|
1419
1435
|
slotElements.clear();
|
|
@@ -1852,7 +1868,7 @@ function AppShell({
|
|
|
1852
1868
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1853
1869
|
"div",
|
|
1854
1870
|
{
|
|
1855
|
-
className: contentClassName,
|
|
1871
|
+
className: ["fd-app-shell-content", contentClassName].filter(Boolean).join(" "),
|
|
1856
1872
|
style: {
|
|
1857
1873
|
flex: 1,
|
|
1858
1874
|
minWidth: 0,
|
|
@@ -1860,7 +1876,6 @@ function AppShell({
|
|
|
1860
1876
|
// table) is contained and clipped by this scroller, never stretching the document.
|
|
1861
1877
|
position: "relative",
|
|
1862
1878
|
overflowY: "auto",
|
|
1863
|
-
padding: 24,
|
|
1864
1879
|
maxWidth: contentMaxWidth,
|
|
1865
1880
|
margin: "0 auto",
|
|
1866
1881
|
width: "100%",
|
|
@@ -14713,6 +14728,7 @@ function useDocumentTitle(routeTitle, appName) {
|
|
|
14713
14728
|
CHANNEL_WEIGHTS,
|
|
14714
14729
|
CHAT_UNAVAILABLE,
|
|
14715
14730
|
COPIED_FEEDBACK_MS,
|
|
14731
|
+
CORNER_STACK_INSET_PROPERTY,
|
|
14716
14732
|
Calendar,
|
|
14717
14733
|
Card,
|
|
14718
14734
|
CardGrid,
|