@manamerge/mana-atomic-ui 1.0.226 → 1.0.228

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.d.ts CHANGED
@@ -157,7 +157,7 @@ interface CardTeaserTypes {
157
157
  title?: string;
158
158
  buttonName?: string;
159
159
  onClick?: React.MouseEventHandler<HTMLElement>;
160
- checks?: string[];
160
+ checks?: string[] | ReactNode[];
161
161
  svg?: FunctionComponent<SVGProps<SVGSVGElement>>;
162
162
  backgroundSvg?: FunctionComponent<SVGProps<SVGSVGElement>>;
163
163
  cardImageSrc?: string;
package/dist/index.js CHANGED
@@ -705,9 +705,10 @@ const WrapperTextTitle = styled.div `
705
705
  }}
706
706
  `;
707
707
 
708
- const Header = ({ moleculeVariant = "primary", iconTop, iconDot, buttonLeftIcon, buttonRightIcon, textBanner, headingTitle, textTitle, buttonLeftText, buttonLeftClick, buttonRightText, buttonRightClick, imageURLBackground, withOverlay }) => {
708
+ const Header = (_a) => {
709
+ var { moleculeVariant = "primary", iconTop, iconDot, buttonLeftIcon, buttonRightIcon, textBanner, headingTitle, textTitle, buttonLeftText, buttonLeftClick, buttonRightText, buttonRightClick, imageURLBackground, withOverlay } = _a, props = __rest(_a, ["moleculeVariant", "iconTop", "iconDot", "buttonLeftIcon", "buttonRightIcon", "textBanner", "headingTitle", "textTitle", "buttonLeftText", "buttonLeftClick", "buttonRightText", "buttonRightClick", "imageURLBackground", "withOverlay"]);
709
710
  const compVariant = `Header-${moleculeVariant}`;
710
- return (jsx(WrapperBackground, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, imageURLBackground: imageURLBackground, withOverlay: withOverlay }, { children: jsxs(WrapperHeader, Object.assign({ moleculeVariant: compVariant }, { children: [jsxs("div", { children: [iconTop && (jsx(AtomIconTop, { moleculeVariant: compVariant, svg: iconTop })), textBanner && (jsxs(WrapperLineTop, Object.assign({ moleculeVariant: compVariant }, { children: [iconDot && (jsx(AtomIconDot, { moleculeVariant: compVariant, svg: iconDot })), jsx(AtomTextBanner, Object.assign({ moleculeVariant: compVariant }, { children: textBanner }))] })))] }), headingTitle && (jsx(AtomHeading$3, Object.assign({ moleculeVariant: compVariant }, { children: headingTitle }))), jsx(WrapperTextTitle, Object.assign({ moleculeVariant: compVariant }, { children: textTitle &&
711
+ return (jsx(WrapperBackground, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, imageURLBackground: imageURLBackground, withOverlay: withOverlay }, props, { children: jsxs(WrapperHeader, Object.assign({ moleculeVariant: compVariant }, { children: [jsxs("div", { children: [iconTop && (jsx(AtomIconTop, { moleculeVariant: compVariant, svg: iconTop })), textBanner && (jsxs(WrapperLineTop, Object.assign({ moleculeVariant: compVariant }, { children: [iconDot && (jsx(AtomIconDot, { moleculeVariant: compVariant, svg: iconDot })), jsx(AtomTextBanner, Object.assign({ moleculeVariant: compVariant }, { children: textBanner }))] })))] }), headingTitle && (jsx(AtomHeading$3, Object.assign({ moleculeVariant: compVariant }, { children: headingTitle }))), jsx(WrapperTextTitle, Object.assign({ moleculeVariant: compVariant }, { children: textTitle &&
711
712
  (textTitle === null || textTitle === void 0 ? void 0 : textTitle.map((text, i) => (jsx(AtomTextTitle, Object.assign({ moleculeVariant: compVariant }, { children: text }), i)))) })), jsxs(WrapperLineBottom, { children: [(buttonLeftIcon || buttonLeftText) && (jsxs(AtomButtonLeft, Object.assign({ moleculeVariant: compVariant, onClick: buttonLeftClick }, { children: [buttonLeftIcon && (jsx(AtomIconLeft, { moleculeVariant: compVariant, svg: buttonLeftIcon })), buttonLeftText] }))), (buttonRightIcon || buttonRightText) && (jsxs(AtomButtonRight, Object.assign({ moleculeVariant: compVariant, onClick: buttonRightClick }, { children: [buttonRightText, buttonRightIcon && (jsx(AtomIconRight, { moleculeVariant: compVariant, svg: buttonRightIcon }))] })))] })] })) })));
712
713
  };
713
714
 
@@ -873,7 +874,8 @@ const Backdrop = styled.div `
873
874
  z-index: 0;
874
875
  `;
875
876
 
876
- const Navigation = ({ moleculeVariant = "primary", logo, onLogoClick, iconBurger, tabs }) => {
877
+ const Navigation = (_a) => {
878
+ var { moleculeVariant = "primary", logo, onLogoClick, iconBurger, tabs } = _a, props = __rest(_a, ["moleculeVariant", "logo", "onLogoClick", "iconBurger", "tabs"]);
877
879
  const location = useLocation();
878
880
  const currentPath = location.pathname;
879
881
  const [isOpen, setIsOpen] = useState(false);
@@ -881,7 +883,7 @@ const Navigation = ({ moleculeVariant = "primary", logo, onLogoClick, iconBurger
881
883
  setIsOpen(!isOpen);
882
884
  };
883
885
  const compVariant = `Navigation-${moleculeVariant}`;
884
- 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
886
+ return (jsxs(Fragment, { children: [jsx(Backdrop, { isOpen: isOpen, onClick: () => setIsOpen(false) }), jsxs(NavBar, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, props, { 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
885
887
  ? 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)))
886
888
  : "no tabs available" }))] }))] }))] }));
887
889
  };
@@ -976,7 +978,8 @@ const FooterChildren = styled(Text).attrs(({ theme, moleculeVariant }) => {
976
978
  }}
977
979
  `;
978
980
 
979
- const Footer = ({ moleculeVariant = "primary", children, svg, routes }) => {
981
+ const Footer = (_a) => {
982
+ var { moleculeVariant = "primary", children, svg, routes } = _a, props = __rest(_a, ["moleculeVariant", "children", "svg", "routes"]);
980
983
  // Memoize sorted routes to prevent redundant sorting
981
984
  const sortedRoutes = useMemo(() => [...routes].sort((a, b) => a.order - b.order), [routes]);
982
985
  const compVariant = "Footer-" + moleculeVariant;
@@ -987,7 +990,7 @@ const Footer = ({ moleculeVariant = "primary", children, svg, routes }) => {
987
990
  const target = route.blank ? "_blank" : undefined;
988
991
  return (jsxs(StyledLink, Object.assign({ moleculeVariant: compVariant, href: href, to: to, target: target }, { children: [route.label, svg && jsx(IconFooter, { moleculeVariant: compVariant, svg: svg })] }), route.order));
989
992
  };
990
- return (jsxs(FooterWrapper, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, { children: [children && (jsx(StyledGradient, Object.assign({ moleculeVariant: compVariant }, { children: jsx(FooterChildren, Object.assign({ moleculeVariant: compVariant }, { children: children })) }))), jsx(FooterNav, Object.assign({ moleculeVariant: compVariant }, { children: sortedRoutes.map(renderRouteLink) }))] })));
993
+ return (jsxs(FooterWrapper, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, props, { children: [children && (jsx(StyledGradient, Object.assign({ moleculeVariant: compVariant }, { children: jsx(FooterChildren, Object.assign({ moleculeVariant: compVariant }, { children: children })) }))), jsx(FooterNav, Object.assign({ moleculeVariant: compVariant }, { children: sortedRoutes.map(renderRouteLink) }))] })));
991
994
  };
992
995
 
993
996
  const CardContainer = styled.div `
@@ -1325,11 +1328,12 @@ const TextBreakerTape = styled(Text).attrs(({ theme, moleculeVariant }) => {
1325
1328
  }}
1326
1329
  `;
1327
1330
 
1328
- const BreakerTape = ({ moleculeVariant = "primary", words, svg }) => {
1331
+ const BreakerTape = (_a) => {
1332
+ var { moleculeVariant = "primary", words, svg } = _a, props = __rest(_a, ["moleculeVariant", "words", "svg"]);
1329
1333
  // Duplicate words to ensure continuous flow
1330
1334
  const repeatedWords = [...words, ...words];
1331
1335
  const compVariant = `BreakerTape-${moleculeVariant}`;
1332
- return (jsx(TapeContainer, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, { children: jsx(FadeOverlay, { children: jsx(TapeContent, Object.assign({ moleculeVariant: compVariant }, { children: repeatedWords.map((word, index) => (jsxs(Fragment, { children: [svg && (jsx(IconBreakerTape, { moleculeVariant: compVariant, svg: svg })), jsx(TextBreakerTape, Object.assign({ moleculeVariant: compVariant }, { children: word }), index)] }))) })) }) })));
1336
+ return (jsx(TapeContainer, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, props, { children: jsx(FadeOverlay, { children: jsx(TapeContent, Object.assign({ moleculeVariant: compVariant }, { children: repeatedWords.map((word, index) => (jsxs(Fragment, { children: [svg && (jsx(IconBreakerTape, { moleculeVariant: compVariant, svg: svg })), jsx(TextBreakerTape, Object.assign({ moleculeVariant: compVariant }, { children: word }), index)] }))) })) }) })));
1333
1337
  };
1334
1338
 
1335
1339
  const Card$1 = styled.div `
@@ -1447,9 +1451,10 @@ const BackgroundSvg = styled(Icon) `
1447
1451
  height: 100%;
1448
1452
  `;
1449
1453
 
1450
- const CardSimpleRender = ({ moleculeVariant = "primary", icon, backgroundSvg, title, description, gradientPosition, children, onClick }) => {
1454
+ const CardSimpleRender = (_a) => {
1455
+ var { moleculeVariant = "primary", icon, backgroundSvg, title, description, gradientPosition, children, onClick } = _a, props = __rest(_a, ["moleculeVariant", "icon", "backgroundSvg", "title", "description", "gradientPosition", "children", "onClick"]);
1451
1456
  const compVariant = `CardSimpleRender-${moleculeVariant}`;
1452
- return (jsxs(Card$1, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, as: onClick ? "button" : "div", onClick: onClick, cardHover: !!onClick, gradientPosition: gradientPosition }, { children: [backgroundSvg && (jsx(BackgroundSvg, { moleculeVariant: compVariant, svg: backgroundSvg })), (icon || title || description) && (jsxs("div", { children: [(icon || title) && (jsxs(WrapperLine, Object.assign({ moleculeVariant: compVariant }, { children: [icon && (jsx(AtomIcon$2, { moleculeVariant: compVariant, svg: icon })), title && (jsx(AtomHeading$2, Object.assign({ moleculeVariant: compVariant }, { children: title })))] }))), description && (jsx(AtomText$2, Object.assign({ moleculeVariant: compVariant }, { children: description })))] })), children] })));
1457
+ return (jsxs(Card$1, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, as: onClick ? "button" : "div", onClick: onClick, cardHover: !!onClick, gradientPosition: gradientPosition }, props, { children: [backgroundSvg && (jsx(BackgroundSvg, { moleculeVariant: compVariant, svg: backgroundSvg })), (icon || title || description) && (jsxs("div", { children: [(icon || title) && (jsxs(WrapperLine, Object.assign({ moleculeVariant: compVariant }, { children: [icon && (jsx(AtomIcon$2, { moleculeVariant: compVariant, svg: icon })), title && (jsx(AtomHeading$2, Object.assign({ moleculeVariant: compVariant }, { children: title })))] }))), description && (jsx(AtomText$2, Object.assign({ moleculeVariant: compVariant }, { children: description })))] })), children] })));
1453
1458
  };
1454
1459
 
1455
1460
  const Card = styled.div `
@@ -1510,8 +1515,9 @@ const AtomIcon$1 = styled(Icon).attrs(({ theme, moleculeVariant }) => {
1510
1515
  });
1511
1516
  }) ``;
1512
1517
 
1513
- const CardBanner = ({ moleculeVariant = "primary", icon, title, description, buttonText, buttonClick }) => {
1514
- return (jsxs(Card, Object.assign({ className: classNames("CardBanner-", moleculeVariant), moleculeVariant: "CardBanner-" + moleculeVariant }, { children: [jsxs("div", { children: [jsx(AtomHeading$1, Object.assign({ moleculeVariant: "CardBanner-" + moleculeVariant }, { children: title })), jsx(AtomText$1, Object.assign({ moleculeVariant: "CardBanner-" + moleculeVariant }, { children: description }))] }), buttonClick && (jsxs(AtomButton, Object.assign({ moleculeVariant: "CardBanner-" + moleculeVariant, onClick: buttonClick }, { children: [buttonText, icon && (jsx(AtomIcon$1, { moleculeVariant: "CardBanner-" + moleculeVariant, svg: icon }))] })))] })));
1518
+ const CardBanner = (_a) => {
1519
+ var { moleculeVariant = "primary", icon, title, description, buttonText, buttonClick } = _a, props = __rest(_a, ["moleculeVariant", "icon", "title", "description", "buttonText", "buttonClick"]);
1520
+ return (jsxs(Card, Object.assign({ className: classNames("CardBanner-", moleculeVariant), moleculeVariant: "CardBanner-" + moleculeVariant }, props, { children: [jsxs("div", { children: [jsx(AtomHeading$1, Object.assign({ moleculeVariant: "CardBanner-" + moleculeVariant }, { children: title })), jsx(AtomText$1, Object.assign({ moleculeVariant: "CardBanner-" + moleculeVariant }, { children: description }))] }), buttonClick && (jsxs(AtomButton, Object.assign({ moleculeVariant: "CardBanner-" + moleculeVariant, onClick: buttonClick }, { children: [buttonText, icon && (jsx(AtomIcon$1, { moleculeVariant: "CardBanner-" + moleculeVariant, svg: icon }))] })))] })));
1515
1521
  };
1516
1522
 
1517
1523
  const AccordionContainer = styled.div `
@@ -1610,7 +1616,8 @@ const AtomText = styled(Text).attrs(({ theme, moleculeVariant }) => {
1610
1616
  }};
1611
1617
  `;
1612
1618
 
1613
- const Accordion = ({ moleculeVariant = "primary", iconPlus, iconMinus, content = [] }) => {
1619
+ const Accordion = (_a) => {
1620
+ var { moleculeVariant = "primary", iconPlus, iconMinus, content = [] } = _a, props = __rest(_a, ["moleculeVariant", "iconPlus", "iconMinus", "content"]);
1614
1621
  const [openIndices, setOpenIndices] = useState([]);
1615
1622
  const toggleAccordion = (index) => {
1616
1623
  setOpenIndices((prev) => {
@@ -1620,7 +1627,7 @@ const Accordion = ({ moleculeVariant = "primary", iconPlus, iconMinus, content =
1620
1627
  });
1621
1628
  };
1622
1629
  const compVariant = `Accordion-${moleculeVariant}`;
1623
- return (jsx(AccordionContainer, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, { children: content === null || content === void 0 ? void 0 : content.map((item, index) => (jsxs("div", { children: [jsxs(AccordionTitle, Object.assign({ moleculeVariant: compVariant, onClick: () => toggleAccordion(index), "aria-pressed": openIndices[index] }, { children: [jsx(AtomHeading, Object.assign({ moleculeVariant: compVariant }, { children: item.title })), iconPlus && iconMinus && (jsx(AtomIcon, { moleculeVariant: compVariant, svg: openIndices[index] ? iconMinus : iconPlus }))] })), jsx(AccordionDescription, Object.assign({ moleculeVariant: compVariant, isOpen: openIndices[index], onTransitionEnd: () => !openIndices[index] }, { children: jsx(AtomText, Object.assign({ moleculeVariant: compVariant }, { children: item.description })) }))] }, index))) })));
1630
+ return (jsx(AccordionContainer, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant }, props, { children: content === null || content === void 0 ? void 0 : content.map((item, index) => (jsxs("div", { children: [jsxs(AccordionTitle, Object.assign({ moleculeVariant: compVariant, onClick: () => toggleAccordion(index), "aria-pressed": openIndices[index] }, { children: [jsx(AtomHeading, Object.assign({ moleculeVariant: compVariant }, { children: item.title })), iconPlus && iconMinus && (jsx(AtomIcon, { moleculeVariant: compVariant, svg: openIndices[index] ? iconMinus : iconPlus }))] })), jsx(AccordionDescription, Object.assign({ moleculeVariant: compVariant, isOpen: openIndices[index], onTransitionEnd: () => !openIndices[index] }, { children: jsx(AtomText, Object.assign({ moleculeVariant: compVariant }, { children: item.description })) }))] }, index))) })));
1624
1631
  };
1625
1632
 
1626
1633
  const Layout = styled.div `