@cboxdk/cbox-ui 0.15.0 → 0.15.1
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.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1454,6 +1454,8 @@ type StatTileProps = {
|
|
|
1454
1454
|
/**
|
|
1455
1455
|
* Cortex-style metric tile. Coloured square icon block on the left,
|
|
1456
1456
|
* label + value on the right, optional caption below the value.
|
|
1457
|
+
* The label and caption wrap rather than end in an ellipsis: in a grid of tiles the caption is the
|
|
1458
|
+
* explanation ("live in this organization"), and a tile is never so narrow that a word breaks.
|
|
1457
1459
|
*/
|
|
1458
1460
|
declare function StatTile({ label, value, suffix, icon: Icon, tone, className, }: StatTileProps): react_jsx_runtime.JSX.Element;
|
|
1459
1461
|
|
package/dist/index.js
CHANGED
|
@@ -1442,8 +1442,9 @@ function lockScroll() {
|
|
|
1442
1442
|
body: { overflow: body.style.overflow, paddingRight: body.style.paddingRight },
|
|
1443
1443
|
regions: scrollRegions().map((element) => ({ element, overflow: element.style.overflow, top: element.scrollTop }))
|
|
1444
1444
|
};
|
|
1445
|
+
const bodyScrolls = getComputedStyle(html).overflowY !== "visible" && ["auto", "scroll"].includes(getComputedStyle(body).overflowY);
|
|
1445
1446
|
html.style.overflow = "hidden";
|
|
1446
|
-
body.style.overflow = "hidden";
|
|
1447
|
+
if (bodyScrolls) body.style.overflow = "hidden";
|
|
1447
1448
|
if (gutter > 0) body.style.paddingRight = `calc(${getComputedStyle(body).paddingRight} + ${gutter}px)`;
|
|
1448
1449
|
for (const region of saved.regions) region.element.style.overflow = "hidden";
|
|
1449
1450
|
html.setAttribute("data-cbx-scroll-locked", "");
|
|
@@ -5718,8 +5719,8 @@ function StatTile({
|
|
|
5718
5719
|
),
|
|
5719
5720
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-0.5", children: [
|
|
5720
5721
|
/* @__PURE__ */ jsx("p", { className: "tabular text-2xl leading-none font-semibold tracking-tight text-foreground", children: value }),
|
|
5721
|
-
/* @__PURE__ */ jsx("p", { className: "
|
|
5722
|
-
suffix ? /* @__PURE__ */ jsx("p", { className: "text-mono
|
|
5722
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-pretty break-words text-muted-foreground", children: label }),
|
|
5723
|
+
suffix ? /* @__PURE__ */ jsx("p", { className: "text-mono text-[10px] text-pretty break-words text-muted-foreground", children: suffix }) : null
|
|
5723
5724
|
] })
|
|
5724
5725
|
]
|
|
5725
5726
|
}
|