@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 +45 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -265,14 +265,24 @@ function RadarChartCore({
|
|
|
265
265
|
{
|
|
266
266
|
key: "compare-static",
|
|
267
267
|
points: comparePoints,
|
|
268
|
-
style: {
|
|
268
|
+
style: {
|
|
269
|
+
fill: darkMode ? "rgba(110, 210, 140, 0.55)" : "rgba(90, 154, 110, 0.45)",
|
|
270
|
+
stroke: darkMode ? "#6DD28C" : "#5A9A6E",
|
|
271
|
+
strokeWidth: 2,
|
|
272
|
+
mixBlendMode: darkMode ? "normal" : "multiply"
|
|
273
|
+
}
|
|
269
274
|
}
|
|
270
275
|
) : /* @__PURE__ */ React.createElement(
|
|
271
276
|
animated.polygon,
|
|
272
277
|
{
|
|
273
278
|
key: "compare-animated",
|
|
274
279
|
points: compareSpring.points,
|
|
275
|
-
style: {
|
|
280
|
+
style: {
|
|
281
|
+
fill: darkMode ? "rgba(110, 210, 140, 0.55)" : "rgba(90, 154, 110, 0.45)",
|
|
282
|
+
stroke: darkMode ? "#6DD28C" : "#5A9A6E",
|
|
283
|
+
strokeWidth: 2,
|
|
284
|
+
mixBlendMode: darkMode ? "normal" : "multiply"
|
|
285
|
+
}
|
|
276
286
|
}
|
|
277
287
|
) : null,
|
|
278
288
|
hasCompareData && compareCoords && compareCoords.map(([cx, cy], i) => {
|
|
@@ -288,7 +298,7 @@ function RadarChartCore({
|
|
|
288
298
|
cx,
|
|
289
299
|
cy,
|
|
290
300
|
r: matches ? 8 : 7,
|
|
291
|
-
fill: matches ? "#fed12e" : "#5A9A6E",
|
|
301
|
+
fill: matches ? "#fed12e" : darkMode ? "#6DD28C" : "#5A9A6E",
|
|
292
302
|
stroke: "#FFFFFF",
|
|
293
303
|
strokeWidth: 3,
|
|
294
304
|
style: { pointerEvents: "none" }
|
|
@@ -3661,6 +3671,7 @@ function SocialLinks({
|
|
|
3661
3671
|
linkedin,
|
|
3662
3672
|
extraLinks = [],
|
|
3663
3673
|
size = "md",
|
|
3674
|
+
darkMode = false,
|
|
3664
3675
|
style = {}
|
|
3665
3676
|
}) {
|
|
3666
3677
|
const iconSizes = {
|
|
@@ -3684,14 +3695,14 @@ function SocialLinks({
|
|
|
3684
3695
|
...style
|
|
3685
3696
|
},
|
|
3686
3697
|
link: {
|
|
3687
|
-
color: "#6A7282",
|
|
3698
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
3688
3699
|
transition: "color 0.2s ease, border-color 0.2s ease",
|
|
3689
3700
|
display: "flex",
|
|
3690
3701
|
alignItems: "center",
|
|
3691
3702
|
justifyContent: "center",
|
|
3692
3703
|
width: boxSize,
|
|
3693
3704
|
height: boxSize,
|
|
3694
|
-
border:
|
|
3705
|
+
border: `1px solid ${darkMode ? "rgba(255,255,255,0.15)" : "#E5E7EB"}`,
|
|
3695
3706
|
borderRadius: "10px"
|
|
3696
3707
|
},
|
|
3697
3708
|
icon: {
|
|
@@ -3817,8 +3828,8 @@ function SocialLinks({
|
|
|
3817
3828
|
e.currentTarget.style.borderColor = colors.evTeal;
|
|
3818
3829
|
},
|
|
3819
3830
|
onMouseLeave: (e) => {
|
|
3820
|
-
e.currentTarget.style.color = "#6A7282";
|
|
3821
|
-
e.currentTarget.style.borderColor = "#E5E7EB";
|
|
3831
|
+
e.currentTarget.style.color = darkMode ? "#9ca3af" : "#6A7282";
|
|
3832
|
+
e.currentTarget.style.borderColor = darkMode ? "rgba(255,255,255,0.15)" : "#E5E7EB";
|
|
3822
3833
|
}
|
|
3823
3834
|
},
|
|
3824
3835
|
link.icon
|
|
@@ -4365,7 +4376,17 @@ function getTierLabel(districtType, officeTitle) {
|
|
|
4365
4376
|
}
|
|
4366
4377
|
return "LOCAL";
|
|
4367
4378
|
}
|
|
4368
|
-
function getTierColors(tier) {
|
|
4379
|
+
function getTierColors(tier, darkMode) {
|
|
4380
|
+
if (darkMode) {
|
|
4381
|
+
switch (tier) {
|
|
4382
|
+
case "FEDERAL":
|
|
4383
|
+
return { bg: "rgba(30,64,175,0.25)", text: "#93c5fd" };
|
|
4384
|
+
case "STATE":
|
|
4385
|
+
return { bg: "rgba(22,101,52,0.25)", text: "#86efac" };
|
|
4386
|
+
default:
|
|
4387
|
+
return { bg: "rgba(126,34,206,0.25)", text: "#d8b4fe" };
|
|
4388
|
+
}
|
|
4389
|
+
}
|
|
4369
4390
|
switch (tier) {
|
|
4370
4391
|
case "FEDERAL":
|
|
4371
4392
|
return { bg: "#EFF6FF", text: "#1E40AF" };
|
|
@@ -4460,7 +4481,8 @@ function PoliticianProfile({
|
|
|
4460
4481
|
judicialRecord,
|
|
4461
4482
|
politicianId,
|
|
4462
4483
|
onNavigateToRecord,
|
|
4463
|
-
imageFocalPoint
|
|
4484
|
+
imageFocalPoint,
|
|
4485
|
+
darkMode = false
|
|
4464
4486
|
}) {
|
|
4465
4487
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
4466
4488
|
const pol = politician;
|
|
@@ -4493,7 +4515,7 @@ function PoliticianProfile({
|
|
|
4493
4515
|
const instagram = getSocialHandle("INSTAGRAM");
|
|
4494
4516
|
const { linkedinUrl, personWebsites } = extractLinkedIn(pol);
|
|
4495
4517
|
const tier = getTierLabel(pol.district_type, pol.office_title);
|
|
4496
|
-
const tierColors2 = tier ? getTierColors(tier) : null;
|
|
4518
|
+
const tierColors2 = tier ? getTierColors(tier, darkMode) : null;
|
|
4497
4519
|
const { title: roleTitle, subtitle: roleSubtitle } = buildTitleAndSubtitle(pol);
|
|
4498
4520
|
const roleLine = [roleTitle, roleSubtitle].filter(Boolean).join(" \u2013 ");
|
|
4499
4521
|
const termLine = getTermLine(pol);
|
|
@@ -4555,7 +4577,7 @@ function PoliticianProfile({
|
|
|
4555
4577
|
const hasContactInfo = hasAddresses || hasPhones || hasEmails || hasWebsitesCol;
|
|
4556
4578
|
const hasSocial = twitter || facebook || instagram || linkedinUrl;
|
|
4557
4579
|
const divider = {
|
|
4558
|
-
borderTop:
|
|
4580
|
+
borderTop: `1px solid ${darkMode ? "#374151" : "#E5E7EB"}`,
|
|
4559
4581
|
margin: `${spacing[6]} 0`
|
|
4560
4582
|
};
|
|
4561
4583
|
const sectionHeading = {
|
|
@@ -4565,7 +4587,7 @@ function PoliticianProfile({
|
|
|
4565
4587
|
fontFamily: fonts.primary,
|
|
4566
4588
|
fontWeight: fontWeights.semibold,
|
|
4567
4589
|
fontSize: "18px",
|
|
4568
|
-
color: "#101828",
|
|
4590
|
+
color: darkMode ? "#f3f4f6" : "#101828",
|
|
4569
4591
|
margin: 0,
|
|
4570
4592
|
marginBottom: spacing[4]
|
|
4571
4593
|
};
|
|
@@ -4590,7 +4612,7 @@ function PoliticianProfile({
|
|
|
4590
4612
|
padding: 0
|
|
4591
4613
|
},
|
|
4592
4614
|
card: {
|
|
4593
|
-
background: colors.bgWhite,
|
|
4615
|
+
background: darkMode ? "#1a2235" : colors.bgWhite,
|
|
4594
4616
|
borderRadius: borderRadius.lg,
|
|
4595
4617
|
boxShadow: shadows.lg,
|
|
4596
4618
|
padding: isMobile ? spacing[4] : spacing[8],
|
|
@@ -4649,7 +4671,7 @@ function PoliticianProfile({
|
|
|
4649
4671
|
fontFamily: fonts.primary,
|
|
4650
4672
|
fontWeight: fontWeights.bold,
|
|
4651
4673
|
fontSize: isMobile ? fontSizes["2xl"] : "30px",
|
|
4652
|
-
color: "#101828",
|
|
4674
|
+
color: darkMode ? "#f3f4f6" : "#101828",
|
|
4653
4675
|
margin: 0,
|
|
4654
4676
|
marginBottom: spacing[1],
|
|
4655
4677
|
lineHeight: 1.2
|
|
@@ -4658,14 +4680,14 @@ function PoliticianProfile({
|
|
|
4658
4680
|
fontFamily: fonts.primary,
|
|
4659
4681
|
fontWeight: fontWeights.regular,
|
|
4660
4682
|
fontSize: isMobile ? fontSizes.base : fontSizes.lg,
|
|
4661
|
-
color: "#364153",
|
|
4683
|
+
color: darkMode ? "#d1d5db" : "#364153",
|
|
4662
4684
|
margin: 0,
|
|
4663
4685
|
marginBottom: spacing[1]
|
|
4664
4686
|
},
|
|
4665
4687
|
officeDesc: {
|
|
4666
4688
|
fontFamily: fonts.primary,
|
|
4667
4689
|
fontSize: fontSizes.base,
|
|
4668
|
-
color: "#6A7282",
|
|
4690
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
4669
4691
|
margin: 0,
|
|
4670
4692
|
marginBottom: spacing[3],
|
|
4671
4693
|
lineHeight: 1.5
|
|
@@ -4673,7 +4695,7 @@ function PoliticianProfile({
|
|
|
4673
4695
|
bioText: {
|
|
4674
4696
|
fontFamily: fonts.primary,
|
|
4675
4697
|
fontSize: fontSizes.sm,
|
|
4676
|
-
color: "#6A7282",
|
|
4698
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
4677
4699
|
margin: 0,
|
|
4678
4700
|
marginTop: spacing[1],
|
|
4679
4701
|
marginBottom: spacing[3],
|
|
@@ -4693,7 +4715,7 @@ function PoliticianProfile({
|
|
|
4693
4715
|
gap: spacing[1],
|
|
4694
4716
|
fontFamily: fonts.primary,
|
|
4695
4717
|
fontSize: fontSizes.sm,
|
|
4696
|
-
color: "#6A7282"
|
|
4718
|
+
color: darkMode ? "#9ca3af" : "#6A7282"
|
|
4697
4719
|
},
|
|
4698
4720
|
submitBtn: {
|
|
4699
4721
|
display: "inline-flex",
|
|
@@ -4734,7 +4756,7 @@ function PoliticianProfile({
|
|
|
4734
4756
|
fontSize: "11px",
|
|
4735
4757
|
letterSpacing: "0.05em",
|
|
4736
4758
|
textTransform: "uppercase",
|
|
4737
|
-
color: "#6A7282",
|
|
4759
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
4738
4760
|
margin: 0,
|
|
4739
4761
|
marginBottom: spacing[1],
|
|
4740
4762
|
display: "flex",
|
|
@@ -4744,13 +4766,13 @@ function PoliticianProfile({
|
|
|
4744
4766
|
contactValue: {
|
|
4745
4767
|
fontFamily: fonts.primary,
|
|
4746
4768
|
fontSize: fontSizes.sm,
|
|
4747
|
-
color: "#364153",
|
|
4769
|
+
color: darkMode ? "#d1d5db" : "#364153",
|
|
4748
4770
|
lineHeight: 1.6,
|
|
4749
4771
|
margin: 0,
|
|
4750
4772
|
marginBottom: spacing[2]
|
|
4751
4773
|
},
|
|
4752
4774
|
contactLink: {
|
|
4753
|
-
color: "#364153",
|
|
4775
|
+
color: darkMode ? "#59b0c4" : "#364153",
|
|
4754
4776
|
textDecoration: "none",
|
|
4755
4777
|
wordBreak: "break-all"
|
|
4756
4778
|
},
|
|
@@ -4758,7 +4780,7 @@ function PoliticianProfile({
|
|
|
4758
4780
|
fontFamily: fonts.primary,
|
|
4759
4781
|
fontWeight: fontWeights.medium,
|
|
4760
4782
|
fontSize: "12px",
|
|
4761
|
-
color: "#9CA3AF",
|
|
4783
|
+
color: darkMode ? "#6b7280" : "#9CA3AF",
|
|
4762
4784
|
margin: 0,
|
|
4763
4785
|
marginBottom: spacing[1]
|
|
4764
4786
|
},
|
|
@@ -4864,6 +4886,7 @@ function PoliticianProfile({
|
|
|
4864
4886
|
linkedin: linkedinUrl,
|
|
4865
4887
|
extraLinks: socialWebsiteUrls,
|
|
4866
4888
|
size: "sm",
|
|
4889
|
+
darkMode,
|
|
4867
4890
|
style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
|
|
4868
4891
|
}
|
|
4869
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(
|