@flytedan/flytebot-design-system 0.24.0 → 0.25.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 +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3129,12 +3129,14 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
|
|
|
3129
3129
|
|
|
3130
3130
|
// src/components/data/StatTile.tsx
|
|
3131
3131
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3132
|
-
function StatTile({ label, value, sub, delta, loading = false, compact: compact3 = false, className = "", ...rest }) {
|
|
3132
|
+
function StatTile({ label, value, sub, delta, invert = false, loading = false, compact: compact3 = false, className = "", ...rest }) {
|
|
3133
|
+
const isDecrease = delta?.startsWith("-") ?? false;
|
|
3134
|
+
const isGood = invert ? isDecrease : !isDecrease;
|
|
3133
3135
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: ["fd-stat", compact3 ? "fd-stat-compact" : "", className].filter(Boolean).join(" "), ...rest, children: [
|
|
3134
3136
|
loading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: compact3 ? 20 : 28, width: "62%" } }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "fd-stat-top", children: [
|
|
3135
3137
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "fd-stat-figure", children: value }),
|
|
3136
|
-
delta ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className:
|
|
3137
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("i", { className: "ph ph-arrow-" + (
|
|
3138
|
+
delta ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: isGood ? "fd-stat-delta-up" : "fd-stat-delta-down", style: { fontWeight: 600, fontSize: "var(--body-sm-size)", flex: "none" }, children: [
|
|
3139
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("i", { className: "ph ph-arrow-" + (isDecrease ? "down" : "up") + "-right", "aria-hidden": "true" }),
|
|
3138
3140
|
" ",
|
|
3139
3141
|
delta
|
|
3140
3142
|
] }) : null
|