@flytedan/flytebot-design-system 0.7.0 → 0.7.2
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 +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1260,6 +1260,9 @@ var BANDS = {
|
|
|
1260
1260
|
strong: { n: 3, label: "Strong" },
|
|
1261
1261
|
dominant: { n: 4, label: "Dominant" }
|
|
1262
1262
|
};
|
|
1263
|
+
function formatCrp(crp) {
|
|
1264
|
+
return crp.toFixed(1);
|
|
1265
|
+
}
|
|
1263
1266
|
function CsiMeter({ band = "weak", size = 4, width = 5, gap = 2 }) {
|
|
1264
1267
|
const n = (BANDS[band] || BANDS.weak).n;
|
|
1265
1268
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-meter", style: { gap: gap + "px" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -1282,7 +1285,7 @@ function CsiBadge({ band = "weak", crp, size = "compact", preview = false, alert
|
|
|
1282
1285
|
alert ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-badge-dot", style: { background: "var(--csi-alert)" }, "aria-label": "Fixable" }) : null,
|
|
1283
1286
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CsiMeter, { band, size: size === "medium" ? 11 : 9, width: size === "medium" ? 4 : 3 }),
|
|
1284
1287
|
b.label,
|
|
1285
|
-
crp !== void 0 && crp !== null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-csi-crp", children: crp }) : null
|
|
1288
|
+
crp !== void 0 && crp !== null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-csi-crp", children: formatCrp(crp) }) : null
|
|
1286
1289
|
]
|
|
1287
1290
|
}
|
|
1288
1291
|
);
|
|
@@ -1291,7 +1294,7 @@ function CsiHero({ band = "weak", crp, label, className = "" }) {
|
|
|
1291
1294
|
const b = BANDS[band] || BANDS.weak;
|
|
1292
1295
|
const mark = "var(--csi-" + b.n + "-mark)";
|
|
1293
1296
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 10 }, children: [
|
|
1294
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-csi-hero-num", style: { color: mark }, children: crp }),
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-csi-hero-num", style: { color: mark }, children: crp !== void 0 && crp !== null ? formatCrp(crp) : "" }),
|
|
1295
1298
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-label-lg", style: { color: "var(--text-2)" }, children: label || b.label }),
|
|
1296
1299
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-meter", style: { gap: 3, color: mark, width: 120 }, children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fd-meter-seg" + (i <= b.n ? " is-on" : ""), style: { height: 6, flex: 1 } }, i)) })
|
|
1297
1300
|
] });
|
|
@@ -2910,7 +2913,7 @@ function TransferList({
|
|
|
2910
2913
|
] }) : null,
|
|
2911
2914
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "fd-row", style: { gap: 8 }, children: [
|
|
2912
2915
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchField, { value: cfg.search, onChange: cfg.onSearchChange, placeholder: "Search", "aria-label": (cfg.label || side) + " search", style: { flex: 1 } }),
|
|
2913
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SortMenu, { fields: cfg.sortFields, sort: cfg.sort, onSort: cfg.onSort })
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SortMenu, { fields: cfg.sortFields, sort: cfg.sort, onSort: cfg.onSort, align: side === "left" ? "left" : "right" })
|
|
2914
2917
|
] }),
|
|
2915
2918
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2916
2919
|
VirtualList,
|
|
@@ -8172,10 +8175,10 @@ function BudgetReallocator({
|
|
|
8172
8175
|
children: [
|
|
8173
8176
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
|
|
8174
8177
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "fd-h4", style: { flex: 1, minWidth: 140 }, children: campus }),
|
|
8175
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CsiBadge, { band: nowBand, crp
|
|
8178
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CsiBadge, { band: nowBand, crp, size: "medium" }),
|
|
8176
8179
|
dirty ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
8177
8180
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("i", { className: "ph ph-arrow-right fd-muted", "aria-hidden": "true" }),
|
|
8178
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CsiBadge, { band: nextBand, crp:
|
|
8181
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CsiBadge, { band: nextBand, crp: nextCrp, size: "medium", preview: true })
|
|
8179
8182
|
] }) : null
|
|
8180
8183
|
] }),
|
|
8181
8184
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "fd-slider", children: [
|