@empoweredvote/ev-ui 0.9.7 → 0.9.9
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 +31 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -883,6 +883,9 @@ function Header({
|
|
|
883
883
|
logoSrc,
|
|
884
884
|
logoAlt = "Empowered Vote",
|
|
885
885
|
logoHref = "https://empowered.vote",
|
|
886
|
+
centerLogoSrc,
|
|
887
|
+
centerLogoHref,
|
|
888
|
+
centerLogoAlt,
|
|
886
889
|
navItems = [],
|
|
887
890
|
ctaButton,
|
|
888
891
|
secondaryAction,
|
|
@@ -957,6 +960,7 @@ function Header({
|
|
|
957
960
|
...style
|
|
958
961
|
},
|
|
959
962
|
container: {
|
|
963
|
+
position: "relative",
|
|
960
964
|
maxWidth: "1512px",
|
|
961
965
|
margin: "0 auto",
|
|
962
966
|
padding: isMobile ? `${spacing[3]} ${spacing[3]}` : `${spacing[4]} ${spacing[6]}`,
|
|
@@ -969,6 +973,14 @@ function Header({
|
|
|
969
973
|
height: "43px",
|
|
970
974
|
cursor: "pointer"
|
|
971
975
|
},
|
|
976
|
+
centerLogo: {
|
|
977
|
+
position: "absolute",
|
|
978
|
+
left: "50%",
|
|
979
|
+
top: "50%",
|
|
980
|
+
transform: "translate(-50%, -50%)",
|
|
981
|
+
display: "flex",
|
|
982
|
+
alignItems: "center"
|
|
983
|
+
},
|
|
972
984
|
nav: {
|
|
973
985
|
display: isMobile ? "none" : "flex",
|
|
974
986
|
flex: "1 1 auto",
|
|
@@ -1217,14 +1229,18 @@ function Header({
|
|
|
1217
1229
|
))))
|
|
1218
1230
|
);
|
|
1219
1231
|
};
|
|
1232
|
+
const featureOnLeft = isMobile && centerLogoSrc;
|
|
1233
|
+
const leftLogoSrc = featureOnLeft ? centerLogoSrc : logoSrc;
|
|
1234
|
+
const leftLogoAlt = featureOnLeft ? centerLogoAlt || logoAlt : logoAlt;
|
|
1235
|
+
const leftLogoHref = featureOnLeft ? centerLogoHref || logoHref : logoHref;
|
|
1220
1236
|
return /* @__PURE__ */ React3.createElement("header", { style: styles2.header }, /* @__PURE__ */ React3.createElement("div", { style: styles2.container }, /* @__PURE__ */ React3.createElement(
|
|
1221
1237
|
"a",
|
|
1222
1238
|
{
|
|
1223
|
-
href:
|
|
1224
|
-
onClick: (e) => handleNavClick(e,
|
|
1239
|
+
href: leftLogoHref,
|
|
1240
|
+
onClick: (e) => handleNavClick(e, leftLogoHref),
|
|
1225
1241
|
style: { display: "flex", alignItems: "center", flexShrink: 0 }
|
|
1226
1242
|
},
|
|
1227
|
-
|
|
1243
|
+
leftLogoSrc ? /* @__PURE__ */ React3.createElement("img", { src: leftLogoSrc, alt: leftLogoAlt, style: styles2.logo }) : /* @__PURE__ */ React3.createElement(
|
|
1228
1244
|
"span",
|
|
1229
1245
|
{
|
|
1230
1246
|
style: {
|
|
@@ -1236,6 +1252,15 @@ function Header({
|
|
|
1236
1252
|
},
|
|
1237
1253
|
"empowered.vote"
|
|
1238
1254
|
)
|
|
1255
|
+
), centerLogoSrc && !isMobile && /* @__PURE__ */ React3.createElement(
|
|
1256
|
+
"a",
|
|
1257
|
+
{
|
|
1258
|
+
href: centerLogoHref || logoHref,
|
|
1259
|
+
onClick: (e) => handleNavClick(e, centerLogoHref || logoHref),
|
|
1260
|
+
style: styles2.centerLogo,
|
|
1261
|
+
"aria-label": centerLogoAlt || "Feature home"
|
|
1262
|
+
},
|
|
1263
|
+
/* @__PURE__ */ React3.createElement("img", { src: centerLogoSrc, alt: centerLogoAlt || "", style: styles2.logo })
|
|
1239
1264
|
), /* @__PURE__ */ React3.createElement("nav", { style: styles2.nav, className: "ev-header-nav" }, navItems.map((item, idx) => /* @__PURE__ */ React3.createElement(NavLink, { key: idx, item }))), /* @__PURE__ */ React3.createElement("div", { style: { display: isMobile ? "none" : "flex", alignItems: "center", gap: spacing[3], flexShrink: 0 } }, secondaryAction && React3.isValidElement(secondaryAction) && secondaryAction, secondaryAction && !React3.isValidElement(secondaryAction) && /* @__PURE__ */ React3.createElement(
|
|
1240
1265
|
"a",
|
|
1241
1266
|
{
|
|
@@ -3314,13 +3339,12 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3314
3339
|
persistDismissed(false);
|
|
3315
3340
|
}
|
|
3316
3341
|
if (!loaded) return null;
|
|
3317
|
-
const Swatch = ({ color, label
|
|
3342
|
+
const Swatch = ({ color, label }) => /* @__PURE__ */ React13.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ React13.createElement("span", { style: {
|
|
3318
3343
|
display: "inline-block",
|
|
3319
|
-
width:
|
|
3320
|
-
height:
|
|
3344
|
+
width: 16,
|
|
3345
|
+
height: 16,
|
|
3321
3346
|
borderRadius: "50%",
|
|
3322
3347
|
background: color,
|
|
3323
|
-
border: `2px solid ${ring || "#fff"}`,
|
|
3324
3348
|
boxShadow: "0 0 0 1px rgba(0,0,0,0.08)"
|
|
3325
3349
|
} }), /* @__PURE__ */ React13.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, label));
|
|
3326
3350
|
if (dismissed) {
|