@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.js
CHANGED
|
@@ -1069,6 +1069,9 @@ var BANDS = {
|
|
|
1069
1069
|
strong: { n: 3, label: "Strong" },
|
|
1070
1070
|
dominant: { n: 4, label: "Dominant" }
|
|
1071
1071
|
};
|
|
1072
|
+
function formatCrp(crp) {
|
|
1073
|
+
return crp.toFixed(1);
|
|
1074
|
+
}
|
|
1072
1075
|
function CsiMeter({ band = "weak", size = 4, width = 5, gap = 2 }) {
|
|
1073
1076
|
const n = (BANDS[band] || BANDS.weak).n;
|
|
1074
1077
|
return /* @__PURE__ */ jsx26("span", { className: "fd-meter", style: { gap: gap + "px" }, "aria-hidden": "true", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx26(
|
|
@@ -1091,7 +1094,7 @@ function CsiBadge({ band = "weak", crp, size = "compact", preview = false, alert
|
|
|
1091
1094
|
alert ? /* @__PURE__ */ jsx26("span", { className: "fd-badge-dot", style: { background: "var(--csi-alert)" }, "aria-label": "Fixable" }) : null,
|
|
1092
1095
|
/* @__PURE__ */ jsx26(CsiMeter, { band, size: size === "medium" ? 11 : 9, width: size === "medium" ? 4 : 3 }),
|
|
1093
1096
|
b.label,
|
|
1094
|
-
crp !== void 0 && crp !== null ? /* @__PURE__ */ jsx26("span", { className: "fd-csi-crp", children: crp }) : null
|
|
1097
|
+
crp !== void 0 && crp !== null ? /* @__PURE__ */ jsx26("span", { className: "fd-csi-crp", children: formatCrp(crp) }) : null
|
|
1095
1098
|
]
|
|
1096
1099
|
}
|
|
1097
1100
|
);
|
|
@@ -1100,7 +1103,7 @@ function CsiHero({ band = "weak", crp, label, className = "" }) {
|
|
|
1100
1103
|
const b = BANDS[band] || BANDS.weak;
|
|
1101
1104
|
const mark = "var(--csi-" + b.n + "-mark)";
|
|
1102
1105
|
return /* @__PURE__ */ jsxs21("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 10 }, children: [
|
|
1103
|
-
/* @__PURE__ */ jsx26("span", { className: "fd-csi-hero-num", style: { color: mark }, children: crp }),
|
|
1106
|
+
/* @__PURE__ */ jsx26("span", { className: "fd-csi-hero-num", style: { color: mark }, children: crp !== void 0 && crp !== null ? formatCrp(crp) : "" }),
|
|
1104
1107
|
/* @__PURE__ */ jsx26("span", { className: "fd-label-lg", style: { color: "var(--text-2)" }, children: label || b.label }),
|
|
1105
1108
|
/* @__PURE__ */ jsx26("span", { className: "fd-meter", style: { gap: 3, color: mark, width: 120 }, children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx26("span", { className: "fd-meter-seg" + (i <= b.n ? " is-on" : ""), style: { height: 6, flex: 1 } }, i)) })
|
|
1106
1109
|
] });
|
|
@@ -2719,7 +2722,7 @@ function TransferList({
|
|
|
2719
2722
|
] }) : null,
|
|
2720
2723
|
/* @__PURE__ */ jsxs36("span", { className: "fd-row", style: { gap: 8 }, children: [
|
|
2721
2724
|
/* @__PURE__ */ jsx41(SearchField, { value: cfg.search, onChange: cfg.onSearchChange, placeholder: "Search", "aria-label": (cfg.label || side) + " search", style: { flex: 1 } }),
|
|
2722
|
-
/* @__PURE__ */ jsx41(SortMenu, { fields: cfg.sortFields, sort: cfg.sort, onSort: cfg.onSort })
|
|
2725
|
+
/* @__PURE__ */ jsx41(SortMenu, { fields: cfg.sortFields, sort: cfg.sort, onSort: cfg.onSort, align: side === "left" ? "left" : "right" })
|
|
2723
2726
|
] }),
|
|
2724
2727
|
/* @__PURE__ */ jsx41(
|
|
2725
2728
|
VirtualList,
|
|
@@ -7981,10 +7984,10 @@ function BudgetReallocator({
|
|
|
7981
7984
|
children: [
|
|
7982
7985
|
/* @__PURE__ */ jsxs61("div", { className: "fd-row", style: { gap: 12, flexWrap: "wrap" }, children: [
|
|
7983
7986
|
/* @__PURE__ */ jsx66("span", { className: "fd-h4", style: { flex: 1, minWidth: 140 }, children: campus }),
|
|
7984
|
-
/* @__PURE__ */ jsx66(CsiBadge, { band: nowBand, crp
|
|
7987
|
+
/* @__PURE__ */ jsx66(CsiBadge, { band: nowBand, crp, size: "medium" }),
|
|
7985
7988
|
dirty ? /* @__PURE__ */ jsxs61(Fragment16, { children: [
|
|
7986
7989
|
/* @__PURE__ */ jsx66("i", { className: "ph ph-arrow-right fd-muted", "aria-hidden": "true" }),
|
|
7987
|
-
/* @__PURE__ */ jsx66(CsiBadge, { band: nextBand, crp:
|
|
7990
|
+
/* @__PURE__ */ jsx66(CsiBadge, { band: nextBand, crp: nextCrp, size: "medium", preview: true })
|
|
7988
7991
|
] }) : null
|
|
7989
7992
|
] }),
|
|
7990
7993
|
/* @__PURE__ */ jsxs61("div", { className: "fd-slider", children: [
|