@empoweredvote/ev-ui 0.9.4 → 0.9.6

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
@@ -68,6 +68,7 @@ __export(index_exports, {
68
68
  dataVizPalette: () => dataVizPalette,
69
69
  defaultCtaButton: () => defaultCtaButton,
70
70
  defaultNavItems: () => defaultNavItems,
71
+ detectFeature: () => detectFeature,
71
72
  duration: () => duration,
72
73
  easing: () => easing,
73
74
  evAppLinks: () => evAppLinks,
@@ -76,6 +77,7 @@ __export(index_exports, {
76
77
  fontSizes: () => fontSizes,
77
78
  fontWeights: () => fontWeights,
78
79
  fonts: () => fonts,
80
+ getFeedbackUrl: () => getFeedbackUrl,
79
81
  letterSpacing: () => letterSpacing,
80
82
  lineHeights: () => lineHeights,
81
83
  opacity: () => opacity,
@@ -975,7 +977,7 @@ function useMediaQuery(query) {
975
977
  function Header({
976
978
  logoSrc,
977
979
  logoAlt = "Empowered Vote",
978
- logoHref = "https://login.empowered.vote/profile",
980
+ logoHref = "https://empowered.vote",
979
981
  navItems = [],
980
982
  ctaButton,
981
983
  secondaryAction,
@@ -1158,15 +1160,23 @@ function Header({
1158
1160
  position: "relative"
1159
1161
  },
1160
1162
  mobileMenu: {
1163
+ // Compact dropdown panel anchored under the hamburger (right edge), rather
1164
+ // than a full-bleed left:0/right:0 bar across the whole viewport.
1161
1165
  display: mobileMenuOpen ? "flex" : "none",
1162
1166
  flexDirection: "column",
1163
1167
  position: "absolute",
1164
1168
  top: "100%",
1165
- left: 0,
1166
- right: 0,
1169
+ right: spacing[3],
1170
+ left: "auto",
1171
+ width: "min(300px, calc(100vw - 24px))",
1172
+ maxWidth: "calc(100vw - 24px)",
1167
1173
  backgroundColor: t.surface,
1168
- padding: spacing[4],
1169
- boxShadow: t.shadow
1174
+ padding: spacing[3],
1175
+ boxShadow: t.shadow,
1176
+ borderRadius: borderRadius.lg,
1177
+ border: `1px solid ${t.border}`,
1178
+ marginTop: spacing[2],
1179
+ zIndex: 100
1170
1180
  },
1171
1181
  mobileNavItem: {
1172
1182
  fontFamily: fonts.primary,
@@ -1588,7 +1598,7 @@ var import_react8 = __toESM(require("react"));
1588
1598
 
1589
1599
  // src/FeedbackButton.jsx
1590
1600
  var import_react7 = __toESM(require("react"));
1591
- var FEEDBACK_BASE_DEFAULT = "https://alpha.empowered.vote/feedback";
1601
+ var FEEDBACK_BASE_DEFAULT = "https://empowered.vote/feedback";
1592
1602
  var HOST_FEATURE_MAP = {
1593
1603
  "compass.empowered.vote": "compass",
1594
1604
  "essentials.empowered.vote": "essentials",
@@ -1598,7 +1608,8 @@ var HOST_FEATURE_MAP = {
1598
1608
  "ctc.empowered.vote": "trivia",
1599
1609
  "alpha.empowered.vote": "landing",
1600
1610
  "ev-landing.empowered.vote": "landing",
1601
- "ev-landing.onrender.com": "landing"
1611
+ "ev-landing.onrender.com": "landing",
1612
+ "empowered.vote": "landing"
1602
1613
  };
1603
1614
  function detectFeature() {
1604
1615
  if (typeof window === "undefined") return void 0;
@@ -1613,9 +1624,10 @@ function detectFeature() {
1613
1624
  }
1614
1625
  return "other";
1615
1626
  }
1616
- function buildHref({ baseUrl, feature, includeUrl }) {
1627
+ function getFeedbackUrl({ feature, baseUrl = FEEDBACK_BASE_DEFAULT, includeUrl = true } = {}) {
1628
+ const resolvedFeature = feature != null ? feature : detectFeature();
1617
1629
  const params = new URLSearchParams();
1618
- if (feature) params.set("feature", feature);
1630
+ if (resolvedFeature) params.set("feature", resolvedFeature);
1619
1631
  if (includeUrl && typeof window !== "undefined") {
1620
1632
  params.set("url", window.location.href);
1621
1633
  }
@@ -1631,8 +1643,7 @@ function FeedbackButton({
1631
1643
  className = "",
1632
1644
  style = {}
1633
1645
  }) {
1634
- const feature = featureProp != null ? featureProp : detectFeature();
1635
- const href = buildHref({ baseUrl, feature, includeUrl });
1646
+ const href = getFeedbackUrl({ feature: featureProp, baseUrl, includeUrl });
1636
1647
  const pillStyle = {
1637
1648
  display: "inline-flex",
1638
1649
  alignItems: "center",
@@ -6849,6 +6860,7 @@ function StanceAccordion({
6849
6860
  dataVizPalette,
6850
6861
  defaultCtaButton,
6851
6862
  defaultNavItems,
6863
+ detectFeature,
6852
6864
  duration,
6853
6865
  easing,
6854
6866
  evAppLinks,
@@ -6857,6 +6869,7 @@ function StanceAccordion({
6857
6869
  fontSizes,
6858
6870
  fontWeights,
6859
6871
  fonts,
6872
+ getFeedbackUrl,
6860
6873
  letterSpacing,
6861
6874
  lineHeights,
6862
6875
  opacity,