@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/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
- return /* @__PURE__ */ jsxRuntime.jsx(
21191
- BadgeReadout,
21192
- {
21193
- id: readout.id,
21194
- label,
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 === 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 }),