@empoweredvote/ev-ui 0.8.8 → 0.8.10

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 CHANGED
@@ -356,14 +356,24 @@ function RadarChartCore({
356
356
  {
357
357
  key: "compare-static",
358
358
  points: comparePoints,
359
- style: { fill: "rgba(90, 154, 110, 0.45)", stroke: "#5A9A6E", strokeWidth: 2, mixBlendMode: "multiply" }
359
+ style: {
360
+ fill: darkMode ? "rgba(110, 210, 140, 0.55)" : "rgba(90, 154, 110, 0.45)",
361
+ stroke: darkMode ? "#6DD28C" : "#5A9A6E",
362
+ strokeWidth: 2,
363
+ mixBlendMode: darkMode ? "normal" : "multiply"
364
+ }
360
365
  }
361
366
  ) : /* @__PURE__ */ import_react.default.createElement(
362
367
  import_web.animated.polygon,
363
368
  {
364
369
  key: "compare-animated",
365
370
  points: compareSpring.points,
366
- style: { fill: "rgba(90, 154, 110, 0.45)", stroke: "#5A9A6E", strokeWidth: 2, mixBlendMode: "multiply" }
371
+ style: {
372
+ fill: darkMode ? "rgba(110, 210, 140, 0.55)" : "rgba(90, 154, 110, 0.45)",
373
+ stroke: darkMode ? "#6DD28C" : "#5A9A6E",
374
+ strokeWidth: 2,
375
+ mixBlendMode: darkMode ? "normal" : "multiply"
376
+ }
367
377
  }
368
378
  ) : null,
369
379
  hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => {
@@ -379,7 +389,7 @@ function RadarChartCore({
379
389
  cx,
380
390
  cy,
381
391
  r: matches ? 8 : 7,
382
- fill: matches ? "#fed12e" : "#5A9A6E",
392
+ fill: matches ? "#fed12e" : darkMode ? "#6DD28C" : "#5A9A6E",
383
393
  stroke: "#FFFFFF",
384
394
  strokeWidth: 3,
385
395
  style: { pointerEvents: "none" }
@@ -3740,6 +3750,7 @@ function SocialLinks({
3740
3750
  linkedin,
3741
3751
  extraLinks = [],
3742
3752
  size = "md",
3753
+ darkMode = false,
3743
3754
  style = {}
3744
3755
  }) {
3745
3756
  const iconSizes = {
@@ -3763,14 +3774,14 @@ function SocialLinks({
3763
3774
  ...style
3764
3775
  },
3765
3776
  link: {
3766
- color: "#6A7282",
3777
+ color: darkMode ? "#9ca3af" : "#6A7282",
3767
3778
  transition: "color 0.2s ease, border-color 0.2s ease",
3768
3779
  display: "flex",
3769
3780
  alignItems: "center",
3770
3781
  justifyContent: "center",
3771
3782
  width: boxSize,
3772
3783
  height: boxSize,
3773
- border: "1px solid #E5E7EB",
3784
+ border: `1px solid ${darkMode ? "rgba(255,255,255,0.15)" : "#E5E7EB"}`,
3774
3785
  borderRadius: "10px"
3775
3786
  },
3776
3787
  icon: {
@@ -3896,8 +3907,8 @@ function SocialLinks({
3896
3907
  e.currentTarget.style.borderColor = colors.evTeal;
3897
3908
  },
3898
3909
  onMouseLeave: (e) => {
3899
- e.currentTarget.style.color = "#6A7282";
3900
- e.currentTarget.style.borderColor = "#E5E7EB";
3910
+ e.currentTarget.style.color = darkMode ? "#9ca3af" : "#6A7282";
3911
+ e.currentTarget.style.borderColor = darkMode ? "rgba(255,255,255,0.15)" : "#E5E7EB";
3901
3912
  }
3902
3913
  },
3903
3914
  link.icon
@@ -4444,7 +4455,17 @@ function getTierLabel(districtType, officeTitle) {
4444
4455
  }
4445
4456
  return "LOCAL";
4446
4457
  }
4447
- function getTierColors(tier) {
4458
+ function getTierColors(tier, darkMode) {
4459
+ if (darkMode) {
4460
+ switch (tier) {
4461
+ case "FEDERAL":
4462
+ return { bg: "rgba(30,64,175,0.25)", text: "#93c5fd" };
4463
+ case "STATE":
4464
+ return { bg: "rgba(22,101,52,0.25)", text: "#86efac" };
4465
+ default:
4466
+ return { bg: "rgba(126,34,206,0.25)", text: "#d8b4fe" };
4467
+ }
4468
+ }
4448
4469
  switch (tier) {
4449
4470
  case "FEDERAL":
4450
4471
  return { bg: "#EFF6FF", text: "#1E40AF" };
@@ -4539,7 +4560,8 @@ function PoliticianProfile({
4539
4560
  judicialRecord,
4540
4561
  politicianId,
4541
4562
  onNavigateToRecord,
4542
- imageFocalPoint
4563
+ imageFocalPoint,
4564
+ darkMode = false
4543
4565
  }) {
4544
4566
  const isMobile = useMediaQuery("(max-width: 768px)");
4545
4567
  const pol = politician;
@@ -4572,7 +4594,7 @@ function PoliticianProfile({
4572
4594
  const instagram = getSocialHandle("INSTAGRAM");
4573
4595
  const { linkedinUrl, personWebsites } = extractLinkedIn(pol);
4574
4596
  const tier = getTierLabel(pol.district_type, pol.office_title);
4575
- const tierColors2 = tier ? getTierColors(tier) : null;
4597
+ const tierColors2 = tier ? getTierColors(tier, darkMode) : null;
4576
4598
  const { title: roleTitle, subtitle: roleSubtitle } = buildTitleAndSubtitle(pol);
4577
4599
  const roleLine = [roleTitle, roleSubtitle].filter(Boolean).join(" \u2013 ");
4578
4600
  const termLine = getTermLine(pol);
@@ -4634,7 +4656,7 @@ function PoliticianProfile({
4634
4656
  const hasContactInfo = hasAddresses || hasPhones || hasEmails || hasWebsitesCol;
4635
4657
  const hasSocial = twitter || facebook || instagram || linkedinUrl;
4636
4658
  const divider = {
4637
- borderTop: "1px solid #E5E7EB",
4659
+ borderTop: `1px solid ${darkMode ? "#374151" : "#E5E7EB"}`,
4638
4660
  margin: `${spacing[6]} 0`
4639
4661
  };
4640
4662
  const sectionHeading = {
@@ -4644,7 +4666,7 @@ function PoliticianProfile({
4644
4666
  fontFamily: fonts.primary,
4645
4667
  fontWeight: fontWeights.semibold,
4646
4668
  fontSize: "18px",
4647
- color: "#101828",
4669
+ color: darkMode ? "#f3f4f6" : "#101828",
4648
4670
  margin: 0,
4649
4671
  marginBottom: spacing[4]
4650
4672
  };
@@ -4669,7 +4691,7 @@ function PoliticianProfile({
4669
4691
  padding: 0
4670
4692
  },
4671
4693
  card: {
4672
- background: colors.bgWhite,
4694
+ background: darkMode ? "#1a2235" : colors.bgWhite,
4673
4695
  borderRadius: borderRadius.lg,
4674
4696
  boxShadow: shadows.lg,
4675
4697
  padding: isMobile ? spacing[4] : spacing[8],
@@ -4728,7 +4750,7 @@ function PoliticianProfile({
4728
4750
  fontFamily: fonts.primary,
4729
4751
  fontWeight: fontWeights.bold,
4730
4752
  fontSize: isMobile ? fontSizes["2xl"] : "30px",
4731
- color: "#101828",
4753
+ color: darkMode ? "#f3f4f6" : "#101828",
4732
4754
  margin: 0,
4733
4755
  marginBottom: spacing[1],
4734
4756
  lineHeight: 1.2
@@ -4737,14 +4759,14 @@ function PoliticianProfile({
4737
4759
  fontFamily: fonts.primary,
4738
4760
  fontWeight: fontWeights.regular,
4739
4761
  fontSize: isMobile ? fontSizes.base : fontSizes.lg,
4740
- color: "#364153",
4762
+ color: darkMode ? "#d1d5db" : "#364153",
4741
4763
  margin: 0,
4742
4764
  marginBottom: spacing[1]
4743
4765
  },
4744
4766
  officeDesc: {
4745
4767
  fontFamily: fonts.primary,
4746
4768
  fontSize: fontSizes.base,
4747
- color: "#6A7282",
4769
+ color: darkMode ? "#9ca3af" : "#6A7282",
4748
4770
  margin: 0,
4749
4771
  marginBottom: spacing[3],
4750
4772
  lineHeight: 1.5
@@ -4752,7 +4774,7 @@ function PoliticianProfile({
4752
4774
  bioText: {
4753
4775
  fontFamily: fonts.primary,
4754
4776
  fontSize: fontSizes.sm,
4755
- color: "#6A7282",
4777
+ color: darkMode ? "#9ca3af" : "#6A7282",
4756
4778
  margin: 0,
4757
4779
  marginTop: spacing[1],
4758
4780
  marginBottom: spacing[3],
@@ -4772,7 +4794,7 @@ function PoliticianProfile({
4772
4794
  gap: spacing[1],
4773
4795
  fontFamily: fonts.primary,
4774
4796
  fontSize: fontSizes.sm,
4775
- color: "#6A7282"
4797
+ color: darkMode ? "#9ca3af" : "#6A7282"
4776
4798
  },
4777
4799
  submitBtn: {
4778
4800
  display: "inline-flex",
@@ -4813,7 +4835,7 @@ function PoliticianProfile({
4813
4835
  fontSize: "11px",
4814
4836
  letterSpacing: "0.05em",
4815
4837
  textTransform: "uppercase",
4816
- color: "#6A7282",
4838
+ color: darkMode ? "#9ca3af" : "#6A7282",
4817
4839
  margin: 0,
4818
4840
  marginBottom: spacing[1],
4819
4841
  display: "flex",
@@ -4823,13 +4845,13 @@ function PoliticianProfile({
4823
4845
  contactValue: {
4824
4846
  fontFamily: fonts.primary,
4825
4847
  fontSize: fontSizes.sm,
4826
- color: "#364153",
4848
+ color: darkMode ? "#d1d5db" : "#364153",
4827
4849
  lineHeight: 1.6,
4828
4850
  margin: 0,
4829
4851
  marginBottom: spacing[2]
4830
4852
  },
4831
4853
  contactLink: {
4832
- color: "#364153",
4854
+ color: darkMode ? "#59b0c4" : "#364153",
4833
4855
  textDecoration: "none",
4834
4856
  wordBreak: "break-all"
4835
4857
  },
@@ -4837,7 +4859,7 @@ function PoliticianProfile({
4837
4859
  fontFamily: fonts.primary,
4838
4860
  fontWeight: fontWeights.medium,
4839
4861
  fontSize: "12px",
4840
- color: "#9CA3AF",
4862
+ color: darkMode ? "#6b7280" : "#9CA3AF",
4841
4863
  margin: 0,
4842
4864
  marginBottom: spacing[1]
4843
4865
  },
@@ -4943,6 +4965,7 @@ function PoliticianProfile({
4943
4965
  linkedin: linkedinUrl,
4944
4966
  extraLinks: socialWebsiteUrls,
4945
4967
  size: "sm",
4968
+ darkMode,
4946
4969
  style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
4947
4970
  }
4948
4971
  )))), committees.length > 0 && /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", { style: divider }), /* @__PURE__ */ import_react24.default.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ import_react24.default.createElement(