@cardenelabs/cdl 0.62.0 → 0.64.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/CHANGELOG.md +39 -1
- package/dist/index.cjs +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +8 -11
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +8 -11
- package/dist/react.js.map +1 -1
- package/dist/{render-Dk8_6ua6.d.cts → render-DfXCs3Eh.d.cts} +4 -1
- package/dist/{render-Dk8_6ua6.d.ts → render-DfXCs3Eh.d.ts} +4 -1
- package/package.json +12 -9
- package/src/presets.ts +13 -6
- package/src/render/interactive-panel.tsx +14 -10
- package/src/types.ts +4 -1
package/dist/react.cjs
CHANGED
|
@@ -21186,16 +21186,12 @@ function ReadoutWidget({
|
|
|
21186
21186
|
colors: readout.colors ?? ["#e0e6ef", "#2d6a8f"]
|
|
21187
21187
|
}
|
|
21188
21188
|
);
|
|
21189
|
-
case "badge":
|
|
21190
|
-
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
|
|
21194
|
-
|
|
21195
|
-
value: typeof rawValue === "string" ? rawValue : String(rawValue ?? ""),
|
|
21196
|
-
map: readout.map
|
|
21197
|
-
}
|
|
21198
|
-
);
|
|
21189
|
+
case "badge": {
|
|
21190
|
+
const value = typeof rawValue === "string" ? rawValue : String(rawValue ?? "");
|
|
21191
|
+
const colorRaw = readout.colorSource === void 0 ? void 0 : stateOverrides[readout.colorSource];
|
|
21192
|
+
const colorKey = readout.colorSource === void 0 ? value : colorRaw === void 0 ? void 0 : String(colorRaw);
|
|
21193
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BadgeReadout, { id: readout.id, label, value, colorKey, map: readout.map });
|
|
21194
|
+
}
|
|
21199
21195
|
case "status-dot":
|
|
21200
21196
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21201
21197
|
StatusDotReadout,
|
|
@@ -22917,9 +22913,10 @@ function BadgeReadout({
|
|
|
22917
22913
|
id,
|
|
22918
22914
|
label,
|
|
22919
22915
|
value,
|
|
22916
|
+
colorKey,
|
|
22920
22917
|
map
|
|
22921
22918
|
}) {
|
|
22922
|
-
const entry = map?.find((m) => m.value ===
|
|
22919
|
+
const entry = colorKey === void 0 ? void 0 : map?.find((m) => m.value === colorKey);
|
|
22923
22920
|
const color = entry?.color;
|
|
22924
22921
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cdl-ip-item cdl-ip-readout-badge", "data-cdl-readout": id, children: [
|
|
22925
22922
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "cdl-ip-label", children: label }),
|