@manamerge/mana-atomic-ui 1.0.194 → 1.0.195

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 -0
  2. package/dist/index.js +41 -59
  3. package/dist/index.js.map +1 -1
  4. package/dist/themes/themes/davidWeb/fonts/Gilmer-Bold.woff2 +0 -0
  5. package/dist/themes/themes/davidWeb/fonts/Gilmer-Heavy.woff2 +0 -0
  6. package/dist/themes/themes/davidWeb/fonts/Gilmer-Light.woff2 +0 -0
  7. package/dist/themes/themes/davidWeb/fonts/Gilmer-Medium.woff2 +0 -0
  8. package/dist/themes/themes/davidWeb/fonts/Gilmer-Regular.woff2 +0 -0
  9. package/dist/themes/themes/davidWeb/fonts/Springwood/SpringwoodBrush-Italic.woff2 +0 -0
  10. package/dist/themes/themes/davidWeb/fonts/Springwood/SpringwoodBrush-Regular.woff2 +0 -0
  11. package/dist/themes/themes/davidWeb/molecules/cardTeaser.ts +3 -2
  12. package/dist/themes/themes/manamerge/atoms/button.ts +3 -3
  13. package/dist/themes/themes/manamerge/molecules/accordion.ts +1 -6
  14. package/dist/themes/themes/manamerge/molecules/cardTeaser.ts +11 -21
  15. package/dist/themes/themes/manamerge/molecules/footer.ts +6 -1
  16. package/dist/themes/themes/manamerge/molecules/header.ts +1 -1
  17. package/dist/themes/themes/manamerge/molecules/navigation.ts +6 -1
  18. package/dist/types/components/Molecules/CardTeaser/CardTeaser.css.d.ts +6 -0
  19. package/dist/types/components/Molecules/CardTeaser/CardTeaser.d.ts +1 -0
  20. package/dist/types/themes/DavidWebTheme.d.ts +1 -5
  21. package/dist/types/themes/ManamergeTheme.d.ts +5 -9
  22. package/dist/types/themes/davidWeb/molecules/cardTeaser.d.ts +1 -0
  23. package/dist/types/themes/manamerge/molecules/accordion.d.ts +0 -5
  24. package/dist/types/themes/manamerge/molecules/cardTeaser.d.ts +5 -4
  25. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -160,6 +160,7 @@ interface CardTeaserTypes {
160
160
  onClick?: React.MouseEventHandler<HTMLElement>;
161
161
  checks?: string[];
162
162
  svg?: FunctionComponent<SVGProps<SVGSVGElement>>;
163
+ backgroundSvg?: FunctionComponent<SVGProps<SVGSVGElement>>;
163
164
  cardImageSrc?: string;
164
165
  separator?: boolean;
165
166
  }
package/dist/index.js CHANGED
@@ -772,26 +772,9 @@ 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
- @media (min-width: 768px) {
790
- max-height: none;
791
- opacity: 1;
792
- transform: none;
793
- }
794
-
795
778
  ${({ theme, moleculeVariant }) => {
796
779
  var _a, _b, _c, _d;
797
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) || {};
@@ -866,26 +849,12 @@ const Navigation = ({ moleculeVariant = "primary", logo, onLogoClick, iconBurger
866
849
  const location = useLocation();
867
850
  const currentPath = location.pathname;
868
851
  const [isOpen, setIsOpen] = useState(false);
869
- const navRef = useRef(null);
870
- useEffect(() => {
871
- const handleClickOutside = (event) => {
872
- if (isOpen &&
873
- navRef.current &&
874
- !navRef.current.contains(event.target)) {
875
- setIsOpen(false);
876
- }
877
- };
878
- document.addEventListener("mousedown", handleClickOutside);
879
- return () => {
880
- document.removeEventListener("mousedown", handleClickOutside);
881
- };
882
- }, [isOpen]);
883
852
  const handleToggle = () => {
884
853
  setIsOpen(!isOpen);
885
854
  };
886
855
  const compVariant = `Navigation-${moleculeVariant}`;
887
- return (jsxs(NavBar, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, ref: navRef }, { 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
888
- ? 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)))
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)))
889
858
  : "no tabs available" }))] }))] })));
890
859
  };
891
860
 
@@ -1011,21 +980,20 @@ const CardContainer = styled.div `
1011
980
  var _a;
1012
981
  const thisTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) || {};
1013
982
  return css `
1014
- background-image: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.background};
1015
983
  border-radius: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.borderRadius};
1016
984
  max-width: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.maxWidth};
1017
985
  `;
1018
986
  }}
1019
-
1020
987
  display: flex;
1021
988
  flex-direction: row;
1022
989
  flex-wrap: nowrap;
1023
990
  justify-content: space-between;
1024
991
  `;
1025
992
  const HeadingCompanyDate = styled(Heading).attrs(({ theme, moleculeVariant }) => {
1026
- var _a, _b, _c;
993
+ var _a, _b, _c, _d, _e, _f;
1027
994
  return ({
1028
- variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.headingCompanyDate) === null || _c === void 0 ? void 0 : _c.variant
995
+ variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.headingCompanyDate) === null || _c === void 0 ? void 0 : _c.variant,
996
+ asTag: (_f = (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _d === void 0 ? void 0 : _d[moleculeVariant]) === null || _e === void 0 ? void 0 : _e.headingCompanyDate) === null || _f === void 0 ? void 0 : _f.asTag
1029
997
  });
1030
998
  }) `
1031
999
  ${({ theme, moleculeVariant }) => {
@@ -1042,19 +1010,12 @@ const HeadingCompanyDate = styled(Heading).attrs(({ theme, moleculeVariant }) =>
1042
1010
  overflow: hidden;
1043
1011
  `;
1044
1012
  const HeadingTitle = styled(Heading).attrs(({ theme, moleculeVariant }) => {
1045
- var _a, _b, _c;
1013
+ var _a, _b, _c, _d, _e, _f;
1046
1014
  return ({
1047
- variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.headingTitle) === null || _c === void 0 ? void 0 : _c.variant
1015
+ variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.headingTitle) === null || _c === void 0 ? void 0 : _c.variant,
1016
+ asTag: (_f = (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _d === void 0 ? void 0 : _d[moleculeVariant]) === null || _e === void 0 ? void 0 : _e.headingTitle) === null || _f === void 0 ? void 0 : _f.asTag
1048
1017
  });
1049
- }) `
1050
- ${({ theme, moleculeVariant }) => {
1051
- var _a, _b;
1052
- const headingTheme = ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.headingTitle) || {};
1053
- return css `
1054
- color: ${headingTheme === null || headingTheme === void 0 ? void 0 : headingTheme.color};
1055
- `;
1056
- }}
1057
- `;
1018
+ }) ``;
1058
1019
  const TextListItem = styled(Text).attrs(({ theme, moleculeVariant }) => {
1059
1020
  var _a, _b, _c;
1060
1021
  return ({
@@ -1065,7 +1026,6 @@ const TextListItem = styled(Text).attrs(({ theme, moleculeVariant }) => {
1065
1026
  var _a, _b;
1066
1027
  const thisTheme = ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.text) || {};
1067
1028
  return css `
1068
- color: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.color};
1069
1029
  margin: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.margin};
1070
1030
  `;
1071
1031
  }}
@@ -1084,6 +1044,7 @@ const List = styled.ul `
1084
1044
  `;
1085
1045
  const ButtonCardContainer = styled.div `
1086
1046
  align-self: center;
1047
+ margin-top: 15px;
1087
1048
  ${({ theme }) => theme.media.mobileUp} {
1088
1049
  align-self: flex-start;
1089
1050
  }
@@ -1126,6 +1087,7 @@ const LeftCardContainer = styled.div `
1126
1087
  display: flex;
1127
1088
  flex-direction: column;
1128
1089
  width: 100%;
1090
+ z-index: 1;
1129
1091
  ${({ theme, moleculeVariant }) => {
1130
1092
  var _a, _b, _c, _d, _e;
1131
1093
  const leftCardContainer = ((_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.leftCardContainer) === null || _c === void 0 ? void 0 : _c.responsive) || {};
@@ -1198,18 +1160,42 @@ const CardBackgroundColor = styled.div `
1198
1160
  ${({ theme, moleculeVariant }) => {
1199
1161
  var _a;
1200
1162
  const thisTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) || {};
1163
+ const { largeMobileUp } = theme.media;
1201
1164
  return css `
1202
- width: 100%;
1165
+ position: relative;
1166
+ width: 500px;
1203
1167
  border-radius: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.borderRadius};
1204
1168
  max-width: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.maxWidth};
1205
1169
  background: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.gradientBackground};
1170
+ ${largeMobileUp} {
1171
+ width: 100%;
1172
+ }
1206
1173
  `;
1207
1174
  }}
1208
1175
  `;
1176
+ const GradientStyle = styled(Gradient).attrs(({ theme, moleculeVariant }) => {
1177
+ var _a, _b, _c;
1178
+ return ({
1179
+ variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.gradient) === null || _c === void 0 ? void 0 : _c.variant
1180
+ });
1181
+ }) ``;
1182
+ const BackgroundSvg = styled(Icon).attrs(({ theme, moleculeVariant }) => {
1183
+ var _a, _b, _c;
1184
+ return ({
1185
+ variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.svgBackground) === null || _c === void 0 ? void 0 : _c.variant
1186
+ });
1187
+ }) `
1188
+ position: absolute;
1189
+ inset: 0;
1190
+ z-index: 0;
1191
+ width: 100%;
1192
+ height: 100%;
1193
+ border-radius: 25px;
1194
+ `;
1209
1195
 
1210
- const CardTeaser = ({ moleculeVariant = "primary", company, year, title, checks, onClick, buttonName, svg, cardImageSrc, separator }) => {
1196
+ const CardTeaser = ({ moleculeVariant = "primary", company, year, title, checks, onClick, buttonName, svg, backgroundSvg, cardImageSrc, separator }) => {
1211
1197
  const compVariant = "CardTeaser-" + moleculeVariant;
1212
- return (jsx(CardBackgroundColor, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, { children: jsxs(CardContainer, Object.assign({ moleculeVariant: compVariant }, { children: [jsxs(LeftCardContainer, Object.assign({ moleculeVariant: compVariant }, { children: [(company || year) && (jsxs(HeadingCompanyDate, Object.assign({ moleculeVariant: compVariant }, { children: [company, " ", company && year && "•", " ", year] }))), jsx(HeadingTitle, Object.assign({ moleculeVariant: compVariant }, { children: title })), separator && jsx(Separator, { moleculeVariant: compVariant }), jsx(List, Object.assign({ moleculeVariant: compVariant }, { children: checks === null || checks === void 0 ? void 0 : checks.map((check, index) => (jsxs(ListItem, Object.assign({ moleculeVariant: compVariant }, { children: [svg && (jsx(IconCard, { moleculeVariant: compVariant, svg: svg })), jsx(TextListItem, Object.assign({ moleculeVariant: compVariant }, { children: check }))] }), index))) })), buttonName && buttonName.length > 0 && (jsx(ButtonCardContainer, { children: jsx(ButtonCard, Object.assign({ moleculeVariant: compVariant, onClick: onClick }, { children: buttonName })) }))] })), jsx(ImageContainer, { children: jsx(Image, { moleculeVariant: compVariant, src: cardImageSrc, alt: "Experience" }) })] })) })));
1198
+ return (jsxs(CardBackgroundColor, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, { children: [backgroundSvg && (jsx(BackgroundSvg, { moleculeVariant: compVariant, svg: backgroundSvg })), jsxs(CardContainer, Object.assign({ moleculeVariant: compVariant }, { children: [jsxs(LeftCardContainer, Object.assign({ moleculeVariant: compVariant }, { children: [(company || year) && (jsx(GradientStyle, Object.assign({ moleculeVariant: "primary" }, { children: jsxs(HeadingCompanyDate, Object.assign({ moleculeVariant: compVariant }, { children: [company, " ", company && year && "•", " ", year] })) }))), jsx(HeadingTitle, Object.assign({ moleculeVariant: compVariant }, { children: title })), separator && jsx(Separator, { moleculeVariant: compVariant }), jsx(List, Object.assign({ moleculeVariant: compVariant }, { children: checks === null || checks === void 0 ? void 0 : checks.map((check, index) => (jsxs(ListItem, Object.assign({ moleculeVariant: compVariant }, { children: [svg && (jsx(IconCard, { moleculeVariant: compVariant, svg: svg })), jsx(TextListItem, Object.assign({ moleculeVariant: compVariant }, { children: check }))] }), index))) })), buttonName && buttonName.length > 0 && (jsx(ButtonCardContainer, { children: jsx(ButtonCard, Object.assign({ moleculeVariant: compVariant, onClick: onClick }, { children: buttonName })) }))] })), jsx(ImageContainer, { children: jsx(Image, { moleculeVariant: compVariant, src: cardImageSrc, alt: "Experience" }) })] }))] })));
1213
1199
  };
1214
1200
 
1215
1201
  const scroll = keyframes `
@@ -1485,7 +1471,6 @@ const AccordionTitle = styled.button `
1485
1471
  const thisTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.accordion) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) || {};
1486
1472
  return css `
1487
1473
  all: unset;
1488
- user-select: text;
1489
1474
  width: 100%;
1490
1475
  display: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.display) || "flex"};
1491
1476
  align-items: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.alignItems) || "center"};
@@ -1534,16 +1519,13 @@ const AtomHeading = styled(Heading).attrs(({ theme, moleculeVariant }) => {
1534
1519
  });
1535
1520
  }) ``;
1536
1521
  const AtomIcon = styled(Icon).attrs(({ theme, moleculeVariant }) => {
1537
- 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;
1522
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1538
1523
  return ({
1539
1524
  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,
1540
1525
  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,
1541
1526
  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,
1542
1527
  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,
1543
- 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,
1544
- 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,
1545
- 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,
1546
- 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
1528
+ 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
1547
1529
  });
1548
1530
  }) `
1549
1531
  min-width: fit-content;