@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.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111,7 +111,11 @@ function RadarChartCore({
|
|
|
111
111
|
writeIns = {},
|
|
112
112
|
darkMode = false,
|
|
113
113
|
lineColor,
|
|
114
|
-
ringColor
|
|
114
|
+
ringColor,
|
|
115
|
+
// replacedSpokes: short_titles of substitute spokes (not the user's original defaults)
|
|
116
|
+
replacedSpokes = {},
|
|
117
|
+
// boldOriginalSpokes: when true, bold spokes that are NOT replacements
|
|
118
|
+
boldOriginalSpokes = false
|
|
115
119
|
}) {
|
|
116
120
|
var _a;
|
|
117
121
|
const radius = size / 2 - 40;
|
|
@@ -292,6 +296,8 @@ function RadarChartCore({
|
|
|
292
296
|
if (isTop && lines.length > 1) labelY -= (lines.length - 1) * lineHeight;
|
|
293
297
|
const isActive = shortTitle === activeSpoke;
|
|
294
298
|
const isUnansweredLabel = !!unansweredSpokes[shortTitle];
|
|
299
|
+
const isReplaced = !!replacedSpokes[shortTitle];
|
|
300
|
+
const shouldBold = boldOriginalSpokes && !isReplaced;
|
|
295
301
|
const fSize = labelFontSize;
|
|
296
302
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
297
303
|
"text",
|
|
@@ -303,7 +309,7 @@ function RadarChartCore({
|
|
|
303
309
|
dominantBaseline: isBottom ? "hanging" : "auto",
|
|
304
310
|
onClick: () => onReplaceTopic(shortTitle),
|
|
305
311
|
fill: isActive ? "#E85D26" : isUnansweredLabel ? "#9ca3af" : darkMode ? "#D3D7DE" : "#555",
|
|
306
|
-
fontWeight: isActive ? "bold" : "normal",
|
|
312
|
+
fontWeight: isActive || shouldBold ? "bold" : "normal",
|
|
307
313
|
style: { cursor: "pointer", userSelect: "none", fontSize: fSize, fontFamily: "sans-serif" }
|
|
308
314
|
},
|
|
309
315
|
isUnansweredLabel && /* @__PURE__ */ import_react.default.createElement("title", null, "No stance on file for this topic."),
|
|
@@ -350,14 +356,14 @@ function RadarChartCore({
|
|
|
350
356
|
{
|
|
351
357
|
key: "compare-static",
|
|
352
358
|
points: comparePoints,
|
|
353
|
-
style: { fill: "rgba(90, 154, 110, 0.
|
|
359
|
+
style: { fill: "rgba(90, 154, 110, 0.45)", stroke: "#5A9A6E", strokeWidth: 2, mixBlendMode: "multiply" }
|
|
354
360
|
}
|
|
355
361
|
) : /* @__PURE__ */ import_react.default.createElement(
|
|
356
362
|
import_web.animated.polygon,
|
|
357
363
|
{
|
|
358
364
|
key: "compare-animated",
|
|
359
365
|
points: compareSpring.points,
|
|
360
|
-
style: { fill: "rgba(90, 154, 110, 0.
|
|
366
|
+
style: { fill: "rgba(90, 154, 110, 0.45)", stroke: "#5A9A6E", strokeWidth: 2, mixBlendMode: "multiply" }
|
|
361
367
|
}
|
|
362
368
|
) : null,
|
|
363
369
|
hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => {
|