@manamerge/mana-atomic-ui 1.0.198 → 1.0.199

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
@@ -718,7 +718,7 @@ const NavBar = styled.nav `
718
718
  width: auto;
719
719
  right: 0;
720
720
  left: 0;
721
- z-index: 20;
721
+ z-index: 1;
722
722
 
723
723
  ${({ theme, moleculeVariant }) => {
724
724
  var _a;
@@ -772,30 +772,15 @@ const NavLinks = styled.div `
772
772
  flex-direction: column;
773
773
  text-align: right;
774
774
  align-items: flex-end;
775
- display: flex;
776
-
775
+ display: ${({ isOpen }) => (isOpen ? "flex" : "none")};
777
776
  width: 100%;
778
777
 
779
- overflow: hidden;
780
- transition:
781
- max-height 0.55s ease,
782
- opacity 0.55s ease,
783
- transform 0.55s ease;
784
-
785
- max-height: ${({ isOpen }) => (isOpen ? "400px" : "0px")};
786
- opacity: ${({ isOpen }) => (isOpen ? 1 : 0)};
787
- transform: ${({ isOpen }) => isOpen ? "translateY(0)" : "translateY(-10px)"};
788
-
789
778
  ${({ theme, moleculeVariant }) => {
790
779
  var _a, _b, _c, _d;
791
780
  const thisTheme = ((_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.navigation) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.navLinks) === null || _c === void 0 ? void 0 : _c.responsive) === null || _d === void 0 ? void 0 : _d.largeMobileUp) || {};
792
781
  const { largeMobileUp } = theme.media;
793
782
  return css `
794
783
  ${largeMobileUp} {
795
- max-height: none;
796
- opacity: 1;
797
- transform: none;
798
-
799
784
  margin: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.margin};
800
785
  display: flex;
801
786
  flex-direction: row;
@@ -859,17 +844,6 @@ const StyledLink$1 = styled(Link).attrs(({ theme, moleculeVariant }) => {
859
844
  `;
860
845
  }};
861
846
  `;
862
- const Backdrop = styled.div `
863
- position: fixed;
864
- inset: 0;
865
- background: rgba(0, 0, 0, 0.3);
866
-
867
- opacity: ${({ isOpen }) => (isOpen ? 1 : 0)};
868
- pointer-events: ${({ isOpen }) => (isOpen ? "auto" : "none")};
869
-
870
- transition: opacity 0.25s ease;
871
- z-index: 10;
872
- `;
873
847
 
874
848
  const Navigation = ({ moleculeVariant = "primary", logo, onLogoClick, iconBurger, tabs }) => {
875
849
  const location = useLocation();
@@ -879,9 +853,9 @@ const Navigation = ({ moleculeVariant = "primary", logo, onLogoClick, iconBurger
879
853
  setIsOpen(!isOpen);
880
854
  };
881
855
  const compVariant = `Navigation-${moleculeVariant}`;
882
- return (jsxs(Fragment, { children: [jsx(Backdrop, { isOpen: isOpen, onClick: () => setIsOpen(false) }), jsxs(NavBar, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, { children: [logo && (jsx(AtomIcon$3, { moleculeVariant: compVariant, svg: logo, onClick: onLogoClick, onKeyDown: onLogoClick, "aria-label": "Logo", tabIndex: 0, role: "button" })), jsxs("div", Object.assign({ style: { width: "100%" } }, { children: [jsx(BurgerWrapper, { children: jsx(AtomIcon$3, { moleculeVariant: compVariant, svg: iconBurger, onClick: handleToggle, onKeyDown: handleToggle, "aria-pressed": isOpen, "aria-label": "Burger", tabIndex: 0, role: "button" }) }), jsx(NavLinks, Object.assign({ isOpen: isOpen, moleculeVariant: compVariant }, { children: tabs.length > 0
883
- ? tabs.map((tab) => (jsx(StyledLink$1, Object.assign({ moleculeVariant: compVariant, to: tab.to, currentPath: tab.to === currentPath, onClick: () => setIsOpen(false) }, { children: tab.label }), tab.label)))
884
- : "no tabs available" }))] }))] }))] }));
856
+ return (jsxs(NavBar, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, { children: [logo && (jsx(AtomIcon$3, { moleculeVariant: compVariant, svg: logo, onClick: onLogoClick, onKeyDown: onLogoClick, "aria-label": "Logo", tabIndex: 0, role: "button" })), jsxs("div", Object.assign({ style: { width: "100%" } }, { children: [jsx(BurgerWrapper, { children: jsx(AtomIcon$3, { moleculeVariant: compVariant, svg: iconBurger, onClick: handleToggle, onKeyDown: handleToggle, "aria-pressed": isOpen, "aria-label": "Burger", tabIndex: 0, role: "button" }) }), jsx(NavLinks, Object.assign({ isOpen: isOpen, moleculeVariant: compVariant }, { children: tabs.length > 0
857
+ ? tabs.map((tab) => (jsx(StyledLink$1, Object.assign({ moleculeVariant: compVariant, to: tab.to, currentPath: tab.to === currentPath }, { children: tab.label }), tab.label)))
858
+ : "no tabs available" }))] }))] })));
885
859
  };
886
860
 
887
861
  // Wrapper for the footer
@@ -1511,7 +1485,6 @@ const AccordionTitle = styled.button `
1511
1485
  const thisTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) || {};
1512
1486
  return css `
1513
1487
  all: unset;
1514
- user-select: text;
1515
1488
  width: 100%;
1516
1489
  display: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.display) || "flex"};
1517
1490
  align-items: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.alignItems) || "center"};
@@ -1560,16 +1533,13 @@ const AtomHeading = styled(Heading).attrs(({ theme, moleculeVariant }) => {
1560
1533
  });
1561
1534
  }) ``;
1562
1535
  const AtomIcon = styled(Icon).attrs(({ theme, moleculeVariant }) => {
1563
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
1536
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1564
1537
  return ({
1565
1538
  variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomIcon) === null || _c === void 0 ? void 0 : _c.variant,
1566
1539
  size: (_f = (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _d === void 0 ? void 0 : _d[moleculeVariant]) === null || _e === void 0 ? void 0 : _e.atomIcon) === null || _f === void 0 ? void 0 : _f.size,
1567
1540
  color: (_j = (_h = (_g = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _g === void 0 ? void 0 : _g[moleculeVariant]) === null || _h === void 0 ? void 0 : _h.atomIcon) === null || _j === void 0 ? void 0 : _j.color,
1568
1541
  fill: (_m = (_l = (_k = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _k === void 0 ? void 0 : _k[moleculeVariant]) === null || _l === void 0 ? void 0 : _l.atomIcon) === null || _m === void 0 ? void 0 : _m.fill,
1569
- stroke: (_q = (_p = (_o = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _o === void 0 ? void 0 : _o[moleculeVariant]) === null || _p === void 0 ? void 0 : _p.atomIcon) === null || _q === void 0 ? void 0 : _q.stroke,
1570
- hoverColor: (_u = (_t = (_s = (_r = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _r === void 0 ? void 0 : _r[moleculeVariant]) === null || _s === void 0 ? void 0 : _s.atomIcon) === null || _t === void 0 ? void 0 : _t.hover) === null || _u === void 0 ? void 0 : _u.color,
1571
- hoverFill: (_y = (_x = (_w = (_v = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _v === void 0 ? void 0 : _v[moleculeVariant]) === null || _w === void 0 ? void 0 : _w.atomIcon) === null || _x === void 0 ? void 0 : _x.hover) === null || _y === void 0 ? void 0 : _y.fill,
1572
- hoverStroke: (_2 = (_1 = (_0 = (_z = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _z === void 0 ? void 0 : _z[moleculeVariant]) === null || _0 === void 0 ? void 0 : _0.atomIcon) === null || _1 === void 0 ? void 0 : _1.hover) === null || _2 === void 0 ? void 0 : _2.stroke
1542
+ stroke: (_q = (_p = (_o = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _o === void 0 ? void 0 : _o[moleculeVariant]) === null || _p === void 0 ? void 0 : _p.atomIcon) === null || _q === void 0 ? void 0 : _q.stroke
1573
1543
  });
1574
1544
  }) `
1575
1545
  min-width: fit-content;