@empoweredvote/ev-ui 0.9.7 → 0.9.8

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.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: logoHref,
1224
- onClick: (e) => handleNavClick(e, logoHref),
1239
+ href: leftLogoHref,
1240
+ onClick: (e) => handleNavClick(e, leftLogoHref),
1225
1241
  style: { display: "flex", alignItems: "center", flexShrink: 0 }
1226
1242
  },
1227
- logoSrc ? /* @__PURE__ */ React3.createElement("img", { src: logoSrc, alt: logoAlt, style: styles2.logo }) : /* @__PURE__ */ React3.createElement(
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
  {