@empoweredvote/ev-ui 0.8.7 → 0.8.8

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.mjs CHANGED
@@ -20,7 +20,11 @@ function RadarChartCore({
20
20
  writeIns = {},
21
21
  darkMode = false,
22
22
  lineColor,
23
- ringColor
23
+ ringColor,
24
+ // replacedSpokes: short_titles of substitute spokes (not the user's original defaults)
25
+ replacedSpokes = {},
26
+ // boldOriginalSpokes: when true, bold spokes that are NOT replacements
27
+ boldOriginalSpokes = false
24
28
  }) {
25
29
  var _a;
26
30
  const radius = size / 2 - 40;
@@ -201,6 +205,8 @@ function RadarChartCore({
201
205
  if (isTop && lines.length > 1) labelY -= (lines.length - 1) * lineHeight;
202
206
  const isActive = shortTitle === activeSpoke;
203
207
  const isUnansweredLabel = !!unansweredSpokes[shortTitle];
208
+ const isReplaced = !!replacedSpokes[shortTitle];
209
+ const shouldBold = boldOriginalSpokes && !isReplaced;
204
210
  const fSize = labelFontSize;
205
211
  return /* @__PURE__ */ React.createElement(
206
212
  "text",
@@ -212,7 +218,7 @@ function RadarChartCore({
212
218
  dominantBaseline: isBottom ? "hanging" : "auto",
213
219
  onClick: () => onReplaceTopic(shortTitle),
214
220
  fill: isActive ? "#E85D26" : isUnansweredLabel ? "#9ca3af" : darkMode ? "#D3D7DE" : "#555",
215
- fontWeight: isActive ? "bold" : "normal",
221
+ fontWeight: isActive || shouldBold ? "bold" : "normal",
216
222
  style: { cursor: "pointer", userSelect: "none", fontSize: fSize, fontFamily: "sans-serif" }
217
223
  },
218
224
  isUnansweredLabel && /* @__PURE__ */ React.createElement("title", null, "No stance on file for this topic."),
@@ -259,14 +265,14 @@ function RadarChartCore({
259
265
  {
260
266
  key: "compare-static",
261
267
  points: comparePoints,
262
- style: { fill: "rgba(90, 154, 110, 0.3)", stroke: "#5A9A6E", strokeWidth: 2 }
268
+ style: { fill: "rgba(90, 154, 110, 0.45)", stroke: "#5A9A6E", strokeWidth: 2, mixBlendMode: "multiply" }
263
269
  }
264
270
  ) : /* @__PURE__ */ React.createElement(
265
271
  animated.polygon,
266
272
  {
267
273
  key: "compare-animated",
268
274
  points: compareSpring.points,
269
- style: { fill: "rgba(90, 154, 110, 0.3)", stroke: "#5A9A6E", strokeWidth: 2 }
275
+ style: { fill: "rgba(90, 154, 110, 0.45)", stroke: "#5A9A6E", strokeWidth: 2, mixBlendMode: "multiply" }
270
276
  }
271
277
  ) : null,
272
278
  hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => {