@empoweredvote/ev-ui 0.9.3 → 0.9.5
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 +14 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -279,7 +279,7 @@ function RadarChartCore({
|
|
|
279
279
|
cy,
|
|
280
280
|
r: matches ? dotRadius * (8 / 7) : dotRadius,
|
|
281
281
|
fill: matches ? "#fed12e" : "#7C6B9E",
|
|
282
|
-
stroke: "#
|
|
282
|
+
stroke: matches ? "#fed12e" : "#7C6B9E",
|
|
283
283
|
strokeWidth: 3
|
|
284
284
|
}
|
|
285
285
|
);
|
|
@@ -321,7 +321,7 @@ function RadarChartCore({
|
|
|
321
321
|
cy,
|
|
322
322
|
r: matches ? dotRadius * (8 / 7) : dotRadius,
|
|
323
323
|
fill: matches ? "#fed12e" : "#5A9A6E",
|
|
324
|
-
stroke: "#
|
|
324
|
+
stroke: matches ? "#fed12e" : "#5A9A6E",
|
|
325
325
|
strokeWidth: 3
|
|
326
326
|
}
|
|
327
327
|
);
|
|
@@ -882,7 +882,7 @@ function useMediaQuery(query) {
|
|
|
882
882
|
function Header({
|
|
883
883
|
logoSrc,
|
|
884
884
|
logoAlt = "Empowered Vote",
|
|
885
|
-
logoHref = "https://
|
|
885
|
+
logoHref = "https://empowered.vote",
|
|
886
886
|
navItems = [],
|
|
887
887
|
ctaButton,
|
|
888
888
|
secondaryAction,
|
|
@@ -1495,7 +1495,7 @@ import React5 from "react";
|
|
|
1495
1495
|
|
|
1496
1496
|
// src/FeedbackButton.jsx
|
|
1497
1497
|
import React4 from "react";
|
|
1498
|
-
var FEEDBACK_BASE_DEFAULT = "https://
|
|
1498
|
+
var FEEDBACK_BASE_DEFAULT = "https://empowered.vote/feedback";
|
|
1499
1499
|
var HOST_FEATURE_MAP = {
|
|
1500
1500
|
"compass.empowered.vote": "compass",
|
|
1501
1501
|
"essentials.empowered.vote": "essentials",
|
|
@@ -1505,7 +1505,8 @@ var HOST_FEATURE_MAP = {
|
|
|
1505
1505
|
"ctc.empowered.vote": "trivia",
|
|
1506
1506
|
"alpha.empowered.vote": "landing",
|
|
1507
1507
|
"ev-landing.empowered.vote": "landing",
|
|
1508
|
-
"ev-landing.onrender.com": "landing"
|
|
1508
|
+
"ev-landing.onrender.com": "landing",
|
|
1509
|
+
"empowered.vote": "landing"
|
|
1509
1510
|
};
|
|
1510
1511
|
function detectFeature() {
|
|
1511
1512
|
if (typeof window === "undefined") return void 0;
|
|
@@ -1520,9 +1521,10 @@ function detectFeature() {
|
|
|
1520
1521
|
}
|
|
1521
1522
|
return "other";
|
|
1522
1523
|
}
|
|
1523
|
-
function
|
|
1524
|
+
function getFeedbackUrl({ feature, baseUrl = FEEDBACK_BASE_DEFAULT, includeUrl = true } = {}) {
|
|
1525
|
+
const resolvedFeature = feature != null ? feature : detectFeature();
|
|
1524
1526
|
const params = new URLSearchParams();
|
|
1525
|
-
if (
|
|
1527
|
+
if (resolvedFeature) params.set("feature", resolvedFeature);
|
|
1526
1528
|
if (includeUrl && typeof window !== "undefined") {
|
|
1527
1529
|
params.set("url", window.location.href);
|
|
1528
1530
|
}
|
|
@@ -1538,8 +1540,7 @@ function FeedbackButton({
|
|
|
1538
1540
|
className = "",
|
|
1539
1541
|
style = {}
|
|
1540
1542
|
}) {
|
|
1541
|
-
const
|
|
1542
|
-
const href = buildHref({ baseUrl, feature, includeUrl });
|
|
1543
|
+
const href = getFeedbackUrl({ feature: featureProp, baseUrl, includeUrl });
|
|
1543
1544
|
const pillStyle = {
|
|
1544
1545
|
display: "inline-flex",
|
|
1545
1546
|
alignItems: "center",
|
|
@@ -6767,6 +6768,7 @@ export {
|
|
|
6767
6768
|
dataVizPalette,
|
|
6768
6769
|
defaultCtaButton,
|
|
6769
6770
|
defaultNavItems,
|
|
6771
|
+
detectFeature,
|
|
6770
6772
|
duration,
|
|
6771
6773
|
easing,
|
|
6772
6774
|
evAppLinks,
|
|
@@ -6775,6 +6777,7 @@ export {
|
|
|
6775
6777
|
fontSizes,
|
|
6776
6778
|
fontWeights,
|
|
6777
6779
|
fonts,
|
|
6780
|
+
getFeedbackUrl,
|
|
6778
6781
|
letterSpacing,
|
|
6779
6782
|
lineHeights,
|
|
6780
6783
|
opacity,
|