@empoweredvote/ev-ui 0.8.10 → 0.8.12

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
@@ -24,7 +24,8 @@ function RadarChartCore({
24
24
  // replacedSpokes: short_titles of substitute spokes (not the user's original defaults)
25
25
  replacedSpokes = {},
26
26
  // boldOriginalSpokes: when true, bold spokes that are NOT replacements
27
- boldOriginalSpokes = false
27
+ boldOriginalSpokes = false,
28
+ highlightedSpoke = null
28
29
  }) {
29
30
  var _a;
30
31
  const radius = size / 2 - 40;
@@ -217,7 +218,7 @@ function RadarChartCore({
217
218
  textAnchor: "middle",
218
219
  dominantBaseline: isBottom ? "hanging" : "auto",
219
220
  onClick: () => onReplaceTopic(shortTitle),
220
- fill: isActive ? "#E85D26" : isUnansweredLabel ? "#9ca3af" : darkMode ? "#D3D7DE" : "#555",
221
+ fill: isActive ? "#E85D26" : shortTitle === highlightedSpoke ? darkMode ? "#7DD4E8" : "#59B0C4" : isUnansweredLabel ? "#9ca3af" : darkMode ? "#D3D7DE" : "#555",
221
222
  fontWeight: isActive || shouldBold ? "bold" : "normal",
222
223
  style: { cursor: "pointer", userSelect: "none", fontSize: fSize, fontFamily: "sans-serif" }
223
224
  },
@@ -252,10 +253,10 @@ function RadarChartCore({
252
253
  key: `user-dot-${i}`,
253
254
  cx,
254
255
  cy,
255
- r: matches ? 8 : 7,
256
+ r: matches ? 6 : 5,
256
257
  fill: matches ? "#fed12e" : "#7C6B9E",
257
258
  stroke: "#FFFFFF",
258
- strokeWidth: 3,
259
+ strokeWidth: 2,
259
260
  style: { pointerEvents: "none" }
260
261
  }
261
262
  );
@@ -297,10 +298,10 @@ function RadarChartCore({
297
298
  key: `compare-dot-${i}`,
298
299
  cx,
299
300
  cy,
300
- r: matches ? 8 : 7,
301
+ r: matches ? 6 : 5,
301
302
  fill: matches ? "#fed12e" : darkMode ? "#6DD28C" : "#5A9A6E",
302
303
  stroke: "#FFFFFF",
303
- strokeWidth: 3,
304
+ strokeWidth: 2,
304
305
  style: { pointerEvents: "none" }
305
306
  }
306
307
  );
@@ -3936,7 +3937,8 @@ function CommitteeTable({
3936
3937
  committees = [],
3937
3938
  title = "Committee Memberships",
3938
3939
  maxVisible = 6,
3939
- style = {}
3940
+ style = {},
3941
+ darkMode = false
3940
3942
  }) {
3941
3943
  const [showAll, setShowAll] = useState11(false);
3942
3944
  if (committees.length === 0) {
@@ -3956,7 +3958,7 @@ function CommitteeTable({
3956
3958
  fontFamily: fonts.primary,
3957
3959
  fontWeight: fontWeights.semibold,
3958
3960
  fontSize: "18px",
3959
- color: "#101828",
3961
+ color: darkMode ? "#f3f4f6" : "#101828",
3960
3962
  margin: 0,
3961
3963
  marginBottom: spacing[3]
3962
3964
  },
@@ -3965,7 +3967,7 @@ function CommitteeTable({
3965
3967
  borderCollapse: "collapse"
3966
3968
  },
3967
3969
  row: {
3968
- borderBottom: "1px solid #F3F4F6"
3970
+ borderBottom: `1px solid ${darkMode ? "#374151" : "#F3F4F6"}`
3969
3971
  },
3970
3972
  cell: {
3971
3973
  padding: `${spacing[2]} 0`,
@@ -3974,16 +3976,16 @@ function CommitteeTable({
3974
3976
  verticalAlign: "top"
3975
3977
  },
3976
3978
  nameCell: {
3977
- color: "#364153",
3979
+ color: darkMode ? "#d1d5db" : "#364153",
3978
3980
  paddingRight: spacing[4]
3979
3981
  },
3980
3982
  positionCell: {
3981
- color: "#6A7282",
3983
+ color: darkMode ? "#9ca3af" : "#6A7282",
3982
3984
  textAlign: "right",
3983
3985
  whiteSpace: "nowrap"
3984
3986
  },
3985
3987
  link: {
3986
- color: "#364153",
3988
+ color: darkMode ? "#d1d5db" : "#364153",
3987
3989
  textDecoration: "none"
3988
3990
  },
3989
3991
  toggle: {
@@ -3993,7 +3995,7 @@ function CommitteeTable({
3993
3995
  fontFamily: fonts.primary,
3994
3996
  fontSize: "14px",
3995
3997
  fontWeight: fontWeights.medium,
3996
- color: "#6A7282",
3998
+ color: darkMode ? "#9ca3af" : "#6A7282",
3997
3999
  background: "none",
3998
4000
  border: "none",
3999
4001
  padding: `${spacing[2]} 0`,
@@ -4889,7 +4891,7 @@ function PoliticianProfile({
4889
4891
  darkMode,
4890
4892
  style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
4891
4893
  }
4892
- )))), committees.length > 0 && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", { style: divider }), /* @__PURE__ */ React22.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ React22.createElement(
4894
+ )))), committees.length > 0 && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", { style: divider }), /* @__PURE__ */ React22.createElement(CommitteeTable, { committees, darkMode })), pol.is_judicial ? /* @__PURE__ */ React22.createElement(
4893
4895
  JudicialScorecard,
4894
4896
  {
4895
4897
  judicialRecord,