@manamerge/mana-atomic-ui 1.0.199 → 1.0.202

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.
Files changed (25) hide show
  1. package/dist/index.d.ts +1 -2
  2. package/dist/index.js +46 -15
  3. package/dist/index.js.map +1 -1
  4. package/dist/themes/themes/manamerge/atoms/icon.ts +49 -13
  5. package/dist/themes/themes/manamerge/miscellaneous/colorpalette.ts +2 -1
  6. package/dist/themes/themes/manamerge/molecules/accordion.ts +6 -1
  7. package/dist/themes/themes/manamerge/molecules/footer.ts +2 -7
  8. package/dist/themes/themes/manamerge/molecules/navigation.ts +2 -6
  9. package/dist/types/components/Atoms/Icon/Icon.css.d.ts +1 -2
  10. package/dist/types/components/Atoms/Icon/Icon.d.ts +1 -2
  11. package/dist/types/components/Molecules/Navigation/Navigation.css.d.ts +3 -0
  12. package/dist/types/themes/DavidWebTheme.d.ts +5 -0
  13. package/dist/types/themes/ManamergeTheme.d.ts +44 -4
  14. package/dist/types/themes/manamerge/atoms/icon.d.ts +37 -4
  15. package/dist/types/themes/manamerge/miscellaneous/colorpalette.d.ts +1 -0
  16. package/dist/types/themes/manamerge/molecules/accordion.d.ts +5 -0
  17. package/dist/types/themes/manamerge/molecules/navigation.d.ts +1 -0
  18. package/package.json +1 -1
  19. package/dist/themes/themes/davidWeb/fonts/Gilmer-Bold.woff2 +0 -0
  20. package/dist/themes/themes/davidWeb/fonts/Gilmer-Heavy.woff2 +0 -0
  21. package/dist/themes/themes/davidWeb/fonts/Gilmer-Light.woff2 +0 -0
  22. package/dist/themes/themes/davidWeb/fonts/Gilmer-Medium.woff2 +0 -0
  23. package/dist/themes/themes/davidWeb/fonts/Gilmer-Regular.woff2 +0 -0
  24. package/dist/themes/themes/davidWeb/fonts/Springwood/SpringwoodBrush-Italic.woff2 +0 -0
  25. package/dist/themes/themes/davidWeb/fonts/Springwood/SpringwoodBrush-Regular.woff2 +0 -0
package/dist/index.d.ts CHANGED
@@ -38,10 +38,9 @@ interface IconTypes {
38
38
  variant?: string;
39
39
  svg: FunctionComponent<SVGProps<SVGSVGElement>>;
40
40
  size?: string;
41
- color?: string;
42
41
  fill?: string;
43
42
  stroke?: string;
44
- hoverColor?: string;
43
+ opacity?: string;
45
44
  hoverFill?: string;
46
45
  hoverStroke?: string;
47
46
  hoverOpacity?: string;
package/dist/index.js CHANGED
@@ -243,32 +243,31 @@ const Heading = (_a) => {
243
243
 
244
244
  const StyledSvg = styled.svg `
245
245
  ${(_a) => {
246
- var _b, _c, _d, _e;
246
+ var _b, _c, _d;
247
247
  var { variant, theme } = _a, props = __rest(_a, ["variant", "theme"]);
248
248
  const iconStyles = (theme === null || theme === void 0 ? void 0 : theme.icon[variant]) || {};
249
249
  return css `
250
250
  width: ${(props === null || props === void 0 ? void 0 : props.size) || (iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.size) || "auto"};
251
251
  height: ${(props === null || props === void 0 ? void 0 : props.size) || (iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.size) || "auto"};
252
- color: ${(props === null || props === void 0 ? void 0 : props.color) || (iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.color)};
253
252
  fill: ${(props === null || props === void 0 ? void 0 : props.fill) || (iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.fill)};
254
253
  stroke: ${(props === null || props === void 0 ? void 0 : props.stroke) || (iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.stroke)};
254
+ opacity: ${(props === null || props === void 0 ? void 0 : props.opacity) || (iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.opacity)};
255
255
  &:hover {
256
- color: ${(props === null || props === void 0 ? void 0 : props.hoverColor) || ((_b = iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.hover) === null || _b === void 0 ? void 0 : _b.color)};
257
- fill: ${(props === null || props === void 0 ? void 0 : props.hoverFill) || ((_c = iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.hover) === null || _c === void 0 ? void 0 : _c.fill)};
258
- stroke: ${(props === null || props === void 0 ? void 0 : props.hoverStroke) || ((_d = iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.hover) === null || _d === void 0 ? void 0 : _d.stroke)};
259
- opacity: ${(props === null || props === void 0 ? void 0 : props.hoverOpacity) || ((_e = iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.hover) === null || _e === void 0 ? void 0 : _e.opacity)};
256
+ fill: ${(props === null || props === void 0 ? void 0 : props.hoverFill) || ((_b = iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.hover) === null || _b === void 0 ? void 0 : _b.fill)};
257
+ stroke: ${(props === null || props === void 0 ? void 0 : props.hoverStroke) || ((_c = iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.hover) === null || _c === void 0 ? void 0 : _c.stroke)};
258
+ opacity: ${(props === null || props === void 0 ? void 0 : props.hoverOpacity) || ((_d = iconStyles === null || iconStyles === void 0 ? void 0 : iconStyles.hover) === null || _d === void 0 ? void 0 : _d.opacity)};
260
259
  }
261
260
  `;
262
261
  }}
263
262
  `;
264
263
 
265
264
  const Icon = (_a) => {
266
- var { variant = "md", svg: SvgIcon, size, color, fill, stroke, hoverColor, hoverFill, hoverStroke, hoverOpacity, onClick, onKeyDown, tabIndex, role } = _a, props = __rest(_a, ["variant", "svg", "size", "color", "fill", "stroke", "hoverColor", "hoverFill", "hoverStroke", "hoverOpacity", "onClick", "onKeyDown", "tabIndex", "role"]);
265
+ var { variant = "md", svg: SvgIcon, size, fill, stroke, opacity, hoverFill, hoverStroke, hoverOpacity, onClick, onKeyDown, tabIndex, role } = _a, props = __rest(_a, ["variant", "svg", "size", "fill", "stroke", "opacity", "hoverFill", "hoverStroke", "hoverOpacity", "onClick", "onKeyDown", "tabIndex", "role"]);
267
266
  if (!SvgIcon) {
268
267
  console.error("No SVG provided to the Icon component.");
269
268
  return null;
270
269
  }
271
- return (jsx(StyledSvg, Object.assign({ className: classNames("Icon-" + variant), variant: "Icon-" + variant, as: SvgIcon, size: size, color: color, fill: fill, stroke: stroke, hoverColor: hoverColor, hoverFill: hoverFill, hoverStroke: hoverStroke, hoverOpacity: hoverOpacity, onClick: onClick, onKeyDown: onKeyDown, tabIndex: tabIndex, role: role }, props)));
270
+ return (jsx(StyledSvg, Object.assign({ className: classNames("Icon-" + variant), variant: "Icon-" + variant, as: SvgIcon, size: size, fill: fill, stroke: stroke, opacity: opacity, hoverFill: hoverFill, hoverStroke: hoverStroke, hoverOpacity: hoverOpacity, onClick: onClick, onKeyDown: onKeyDown, tabIndex: tabIndex, role: role }, props)));
272
271
  };
273
272
 
274
273
  const StyledLink$2 = styled.a `
@@ -772,15 +771,32 @@ const NavLinks = styled.div `
772
771
  flex-direction: column;
773
772
  text-align: right;
774
773
  align-items: flex-end;
775
- display: ${({ isOpen }) => (isOpen ? "flex" : "none")};
774
+ display: flex;
775
+
776
776
  width: 100%;
777
777
 
778
+ overflow: hidden;
779
+ transition:
780
+ max-height 0.55s ease,
781
+ opacity 0.55s ease,
782
+ transform 0.55s ease,
783
+ margin-top 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
+ margin-top: ${({ isOpen }) => (isOpen ? "20px" : 0)};
789
+
778
790
  ${({ theme, moleculeVariant }) => {
779
- var _a, _b, _c, _d;
791
+ var _a, _b, _c, _d, _e, _f, _g;
780
792
  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) || {};
781
793
  const { largeMobileUp } = theme.media;
782
794
  return css `
795
+ gap: ${(_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.navigation) === null || _e === void 0 ? void 0 : _e[moleculeVariant]) === null || _f === void 0 ? void 0 : _f.navLinks) === null || _g === void 0 ? void 0 : _g.mobileGap};
783
796
  ${largeMobileUp} {
797
+ max-height: none;
798
+ opacity: 1;
799
+ transform: none;
784
800
  margin: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.margin};
785
801
  display: flex;
786
802
  flex-direction: row;
@@ -844,6 +860,17 @@ const StyledLink$1 = styled(Link).attrs(({ theme, moleculeVariant }) => {
844
860
  `;
845
861
  }};
846
862
  `;
863
+ const Backdrop = styled.div `
864
+ position: fixed;
865
+ inset: 0;
866
+ background: rgba(0, 0, 0, 0.3);
867
+
868
+ opacity: ${({ isOpen }) => (isOpen ? 1 : 0)};
869
+ pointer-events: ${({ isOpen }) => (isOpen ? "auto" : "none")};
870
+
871
+ transition: opacity 0.25s ease;
872
+ z-index: 0;
873
+ `;
847
874
 
848
875
  const Navigation = ({ moleculeVariant = "primary", logo, onLogoClick, iconBurger, tabs }) => {
849
876
  const location = useLocation();
@@ -853,9 +880,9 @@ const Navigation = ({ moleculeVariant = "primary", logo, onLogoClick, iconBurger
853
880
  setIsOpen(!isOpen);
854
881
  };
855
882
  const compVariant = `Navigation-${moleculeVariant}`;
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" }))] }))] })));
883
+ 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
884
+ ? 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)))
885
+ : "no tabs available" }))] }))] }))] }));
859
886
  };
860
887
 
861
888
  // Wrapper for the footer
@@ -1485,6 +1512,7 @@ const AccordionTitle = styled.button `
1485
1512
  const thisTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) || {};
1486
1513
  return css `
1487
1514
  all: unset;
1515
+ user-select: text;
1488
1516
  width: 100%;
1489
1517
  display: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.display) || "flex"};
1490
1518
  align-items: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.alignItems) || "center"};
@@ -1533,13 +1561,16 @@ const AtomHeading = styled(Heading).attrs(({ theme, moleculeVariant }) => {
1533
1561
  });
1534
1562
  }) ``;
1535
1563
  const AtomIcon = styled(Icon).attrs(({ theme, moleculeVariant }) => {
1536
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1564
+ 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;
1537
1565
  return ({
1538
1566
  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,
1539
1567
  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,
1540
1568
  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,
1541
1569
  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,
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
1570
+ 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,
1571
+ 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,
1572
+ 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,
1573
+ 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
1543
1574
  });
1544
1575
  }) `
1545
1576
  min-width: fit-content;