@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.d.cts CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'react';
2
- export { s as CdlDiagramView, o as CdlDiagramViewProps } from './render-Dk8_6ua6.cjs';
2
+ export { s as CdlDiagramView, o as CdlDiagramViewProps } from './render-DfXCs3Eh.cjs';
package/dist/react.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'react';
2
- export { s as CdlDiagramView, o as CdlDiagramViewProps } from './render-Dk8_6ua6.js';
2
+ export { s as CdlDiagramView, o as CdlDiagramViewProps } from './render-DfXCs3Eh.js';
package/dist/react.js CHANGED
@@ -21184,16 +21184,12 @@ function ReadoutWidget({
21184
21184
  colors: readout.colors ?? ["#e0e6ef", "#2d6a8f"]
21185
21185
  }
21186
21186
  );
21187
- case "badge":
21188
- return /* @__PURE__ */ jsx(
21189
- BadgeReadout,
21190
- {
21191
- id: readout.id,
21192
- label,
21193
- value: typeof rawValue === "string" ? rawValue : String(rawValue ?? ""),
21194
- map: readout.map
21195
- }
21196
- );
21187
+ case "badge": {
21188
+ const value = typeof rawValue === "string" ? rawValue : String(rawValue ?? "");
21189
+ const colorRaw = readout.colorSource === void 0 ? void 0 : stateOverrides[readout.colorSource];
21190
+ const colorKey = readout.colorSource === void 0 ? value : colorRaw === void 0 ? void 0 : String(colorRaw);
21191
+ return /* @__PURE__ */ jsx(BadgeReadout, { id: readout.id, label, value, colorKey, map: readout.map });
21192
+ }
21197
21193
  case "status-dot":
21198
21194
  return /* @__PURE__ */ jsx(
21199
21195
  StatusDotReadout,
@@ -22915,9 +22911,10 @@ function BadgeReadout({
22915
22911
  id,
22916
22912
  label,
22917
22913
  value,
22914
+ colorKey,
22918
22915
  map
22919
22916
  }) {
22920
- const entry = map?.find((m) => m.value === value);
22917
+ const entry = colorKey === void 0 ? void 0 : map?.find((m) => m.value === colorKey);
22921
22918
  const color = entry?.color;
22922
22919
  return /* @__PURE__ */ jsxs("div", { className: "cdl-ip-item cdl-ip-readout-badge", "data-cdl-readout": id, children: [
22923
22920
  /* @__PURE__ */ jsx("span", { className: "cdl-ip-label", children: label }),