@empoweredvote/ev-ui 0.8.9 → 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 +32 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3671,6 +3671,7 @@ function SocialLinks({
|
|
|
3671
3671
|
linkedin,
|
|
3672
3672
|
extraLinks = [],
|
|
3673
3673
|
size = "md",
|
|
3674
|
+
darkMode = false,
|
|
3674
3675
|
style = {}
|
|
3675
3676
|
}) {
|
|
3676
3677
|
const iconSizes = {
|
|
@@ -3694,14 +3695,14 @@ function SocialLinks({
|
|
|
3694
3695
|
...style
|
|
3695
3696
|
},
|
|
3696
3697
|
link: {
|
|
3697
|
-
color: "#6A7282",
|
|
3698
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
3698
3699
|
transition: "color 0.2s ease, border-color 0.2s ease",
|
|
3699
3700
|
display: "flex",
|
|
3700
3701
|
alignItems: "center",
|
|
3701
3702
|
justifyContent: "center",
|
|
3702
3703
|
width: boxSize,
|
|
3703
3704
|
height: boxSize,
|
|
3704
|
-
border:
|
|
3705
|
+
border: `1px solid ${darkMode ? "rgba(255,255,255,0.15)" : "#E5E7EB"}`,
|
|
3705
3706
|
borderRadius: "10px"
|
|
3706
3707
|
},
|
|
3707
3708
|
icon: {
|
|
@@ -3827,8 +3828,8 @@ function SocialLinks({
|
|
|
3827
3828
|
e.currentTarget.style.borderColor = colors.evTeal;
|
|
3828
3829
|
},
|
|
3829
3830
|
onMouseLeave: (e) => {
|
|
3830
|
-
e.currentTarget.style.color = "#6A7282";
|
|
3831
|
-
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";
|
|
3832
3833
|
}
|
|
3833
3834
|
},
|
|
3834
3835
|
link.icon
|
|
@@ -4375,7 +4376,17 @@ function getTierLabel(districtType, officeTitle) {
|
|
|
4375
4376
|
}
|
|
4376
4377
|
return "LOCAL";
|
|
4377
4378
|
}
|
|
4378
|
-
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
|
+
}
|
|
4379
4390
|
switch (tier) {
|
|
4380
4391
|
case "FEDERAL":
|
|
4381
4392
|
return { bg: "#EFF6FF", text: "#1E40AF" };
|
|
@@ -4470,7 +4481,8 @@ function PoliticianProfile({
|
|
|
4470
4481
|
judicialRecord,
|
|
4471
4482
|
politicianId,
|
|
4472
4483
|
onNavigateToRecord,
|
|
4473
|
-
imageFocalPoint
|
|
4484
|
+
imageFocalPoint,
|
|
4485
|
+
darkMode = false
|
|
4474
4486
|
}) {
|
|
4475
4487
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
4476
4488
|
const pol = politician;
|
|
@@ -4503,7 +4515,7 @@ function PoliticianProfile({
|
|
|
4503
4515
|
const instagram = getSocialHandle("INSTAGRAM");
|
|
4504
4516
|
const { linkedinUrl, personWebsites } = extractLinkedIn(pol);
|
|
4505
4517
|
const tier = getTierLabel(pol.district_type, pol.office_title);
|
|
4506
|
-
const tierColors2 = tier ? getTierColors(tier) : null;
|
|
4518
|
+
const tierColors2 = tier ? getTierColors(tier, darkMode) : null;
|
|
4507
4519
|
const { title: roleTitle, subtitle: roleSubtitle } = buildTitleAndSubtitle(pol);
|
|
4508
4520
|
const roleLine = [roleTitle, roleSubtitle].filter(Boolean).join(" \u2013 ");
|
|
4509
4521
|
const termLine = getTermLine(pol);
|
|
@@ -4565,7 +4577,7 @@ function PoliticianProfile({
|
|
|
4565
4577
|
const hasContactInfo = hasAddresses || hasPhones || hasEmails || hasWebsitesCol;
|
|
4566
4578
|
const hasSocial = twitter || facebook || instagram || linkedinUrl;
|
|
4567
4579
|
const divider = {
|
|
4568
|
-
borderTop:
|
|
4580
|
+
borderTop: `1px solid ${darkMode ? "#374151" : "#E5E7EB"}`,
|
|
4569
4581
|
margin: `${spacing[6]} 0`
|
|
4570
4582
|
};
|
|
4571
4583
|
const sectionHeading = {
|
|
@@ -4575,7 +4587,7 @@ function PoliticianProfile({
|
|
|
4575
4587
|
fontFamily: fonts.primary,
|
|
4576
4588
|
fontWeight: fontWeights.semibold,
|
|
4577
4589
|
fontSize: "18px",
|
|
4578
|
-
color: "#101828",
|
|
4590
|
+
color: darkMode ? "#f3f4f6" : "#101828",
|
|
4579
4591
|
margin: 0,
|
|
4580
4592
|
marginBottom: spacing[4]
|
|
4581
4593
|
};
|
|
@@ -4600,7 +4612,7 @@ function PoliticianProfile({
|
|
|
4600
4612
|
padding: 0
|
|
4601
4613
|
},
|
|
4602
4614
|
card: {
|
|
4603
|
-
background: colors.bgWhite,
|
|
4615
|
+
background: darkMode ? "#1a2235" : colors.bgWhite,
|
|
4604
4616
|
borderRadius: borderRadius.lg,
|
|
4605
4617
|
boxShadow: shadows.lg,
|
|
4606
4618
|
padding: isMobile ? spacing[4] : spacing[8],
|
|
@@ -4659,7 +4671,7 @@ function PoliticianProfile({
|
|
|
4659
4671
|
fontFamily: fonts.primary,
|
|
4660
4672
|
fontWeight: fontWeights.bold,
|
|
4661
4673
|
fontSize: isMobile ? fontSizes["2xl"] : "30px",
|
|
4662
|
-
color: "#101828",
|
|
4674
|
+
color: darkMode ? "#f3f4f6" : "#101828",
|
|
4663
4675
|
margin: 0,
|
|
4664
4676
|
marginBottom: spacing[1],
|
|
4665
4677
|
lineHeight: 1.2
|
|
@@ -4668,14 +4680,14 @@ function PoliticianProfile({
|
|
|
4668
4680
|
fontFamily: fonts.primary,
|
|
4669
4681
|
fontWeight: fontWeights.regular,
|
|
4670
4682
|
fontSize: isMobile ? fontSizes.base : fontSizes.lg,
|
|
4671
|
-
color: "#364153",
|
|
4683
|
+
color: darkMode ? "#d1d5db" : "#364153",
|
|
4672
4684
|
margin: 0,
|
|
4673
4685
|
marginBottom: spacing[1]
|
|
4674
4686
|
},
|
|
4675
4687
|
officeDesc: {
|
|
4676
4688
|
fontFamily: fonts.primary,
|
|
4677
4689
|
fontSize: fontSizes.base,
|
|
4678
|
-
color: "#6A7282",
|
|
4690
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
4679
4691
|
margin: 0,
|
|
4680
4692
|
marginBottom: spacing[3],
|
|
4681
4693
|
lineHeight: 1.5
|
|
@@ -4683,7 +4695,7 @@ function PoliticianProfile({
|
|
|
4683
4695
|
bioText: {
|
|
4684
4696
|
fontFamily: fonts.primary,
|
|
4685
4697
|
fontSize: fontSizes.sm,
|
|
4686
|
-
color: "#6A7282",
|
|
4698
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
4687
4699
|
margin: 0,
|
|
4688
4700
|
marginTop: spacing[1],
|
|
4689
4701
|
marginBottom: spacing[3],
|
|
@@ -4703,7 +4715,7 @@ function PoliticianProfile({
|
|
|
4703
4715
|
gap: spacing[1],
|
|
4704
4716
|
fontFamily: fonts.primary,
|
|
4705
4717
|
fontSize: fontSizes.sm,
|
|
4706
|
-
color: "#6A7282"
|
|
4718
|
+
color: darkMode ? "#9ca3af" : "#6A7282"
|
|
4707
4719
|
},
|
|
4708
4720
|
submitBtn: {
|
|
4709
4721
|
display: "inline-flex",
|
|
@@ -4744,7 +4756,7 @@ function PoliticianProfile({
|
|
|
4744
4756
|
fontSize: "11px",
|
|
4745
4757
|
letterSpacing: "0.05em",
|
|
4746
4758
|
textTransform: "uppercase",
|
|
4747
|
-
color: "#6A7282",
|
|
4759
|
+
color: darkMode ? "#9ca3af" : "#6A7282",
|
|
4748
4760
|
margin: 0,
|
|
4749
4761
|
marginBottom: spacing[1],
|
|
4750
4762
|
display: "flex",
|
|
@@ -4754,13 +4766,13 @@ function PoliticianProfile({
|
|
|
4754
4766
|
contactValue: {
|
|
4755
4767
|
fontFamily: fonts.primary,
|
|
4756
4768
|
fontSize: fontSizes.sm,
|
|
4757
|
-
color: "#364153",
|
|
4769
|
+
color: darkMode ? "#d1d5db" : "#364153",
|
|
4758
4770
|
lineHeight: 1.6,
|
|
4759
4771
|
margin: 0,
|
|
4760
4772
|
marginBottom: spacing[2]
|
|
4761
4773
|
},
|
|
4762
4774
|
contactLink: {
|
|
4763
|
-
color: "#364153",
|
|
4775
|
+
color: darkMode ? "#59b0c4" : "#364153",
|
|
4764
4776
|
textDecoration: "none",
|
|
4765
4777
|
wordBreak: "break-all"
|
|
4766
4778
|
},
|
|
@@ -4768,7 +4780,7 @@ function PoliticianProfile({
|
|
|
4768
4780
|
fontFamily: fonts.primary,
|
|
4769
4781
|
fontWeight: fontWeights.medium,
|
|
4770
4782
|
fontSize: "12px",
|
|
4771
|
-
color: "#9CA3AF",
|
|
4783
|
+
color: darkMode ? "#6b7280" : "#9CA3AF",
|
|
4772
4784
|
margin: 0,
|
|
4773
4785
|
marginBottom: spacing[1]
|
|
4774
4786
|
},
|
|
@@ -4874,6 +4886,7 @@ function PoliticianProfile({
|
|
|
4874
4886
|
linkedin: linkedinUrl,
|
|
4875
4887
|
extraLinks: socialWebsiteUrls,
|
|
4876
4888
|
size: "sm",
|
|
4889
|
+
darkMode,
|
|
4877
4890
|
style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
|
|
4878
4891
|
}
|
|
4879
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(
|