@manamerge/mana-atomic-ui 0.0.72 → 0.0.74

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
@@ -133,4 +133,27 @@ interface FooterTypes {
133
133
  }
134
134
  declare const Footer: React.FC<FooterTypes>;
135
135
 
136
- export { Button, Footer, Header, Heading, Icon, Link, Navigation, Text };
136
+ interface CardTeaserTypes {
137
+ company?: string;
138
+ year?: string;
139
+ title?: string;
140
+ buttonName?: string;
141
+ onClick?: React.MouseEventHandler<HTMLElement>;
142
+ checks?: string[];
143
+ svg?: FunctionComponent<SVGProps<SVGSVGElement>>;
144
+ cardImageSrc?: string;
145
+ separator?: boolean;
146
+ }
147
+ declare const CardTeaser: React.FC<CardTeaserTypes>;
148
+
149
+ interface CardBannerTypes {
150
+ icon?: FunctionComponent<SVGProps<SVGSVGElement>>;
151
+ title?: string;
152
+ description?: string;
153
+ children?: ReactNode;
154
+ buttonText?: string;
155
+ buttonClick?: React.MouseEventHandler<HTMLElement>;
156
+ }
157
+ declare const CardBanner: React.FC<CardBannerTypes>;
158
+
159
+ export { Button, CardBanner, CardTeaser, Footer, Header, Heading, Icon, Link, Navigation, Text };
package/dist/index.js CHANGED
@@ -326,18 +326,13 @@ const Link = (_a) => {
326
326
  return (React.createElement(StyledLink$2, Object.assign({ className: classNames("Link-" + variant), variant: "Link-" + variant, as: Component, fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight }, componentProps, props), children));
327
327
  };
328
328
 
329
- const WrapperHeader = styled.div `
329
+ const WrapperBackground = styled.div `
330
+ position: relative;
330
331
  display: flex;
331
- flex-direction: column;
332
332
  align-items: center;
333
333
  justify-content: center;
334
334
  height: 100vh;
335
- text-align: center;
336
- gap: 15px;
337
-
338
- border-radius: 50%;
339
- position: relative;
340
-
335
+ width: 100%;
341
336
  &::before {
342
337
  content: "";
343
338
  position: absolute;
@@ -357,30 +352,24 @@ const WrapperHeader = styled.div `
357
352
  );
358
353
  `;
359
354
  }}
360
-
361
- z-index: -1;
362
- }
363
-
364
- &::before {
365
355
  animation: glow 3s infinite alternate ease-in-out;
366
356
  }
367
-
368
- @keyframes glow {
369
- 0% {
370
- transform: scale(1);
371
- opacity: 0.5;
372
- }
373
- 100% {
374
- transform: scale(1.5);
375
- opacity: 1;
376
- }
377
- }
357
+ `;
358
+ const WrapperHeader = styled.div `
359
+ display: flex;
360
+ flex-direction: column;
361
+ align-items: center;
362
+ justify-content: center;
363
+ text-align: center;
364
+ gap: 15px;
365
+ position: relative;
378
366
  `;
379
367
  const WrapperLineTop = styled.div `
380
368
  display: flex;
381
369
  align-items: center;
382
370
  justify-content: center;
383
371
  width: fit-content;
372
+ align-items: baseline;
384
373
  border-radius: 45px;
385
374
  padding-left: 8px;
386
375
  padding-right: 8px;
@@ -430,7 +419,7 @@ const AtomIconDot = styled(Icon).attrs(({ theme }) => {
430
419
  `;
431
420
  }}
432
421
  `;
433
- const AtomHeading = styled(Heading).attrs(({ theme }) => {
422
+ const AtomHeading$1 = styled(Heading).attrs(({ theme }) => {
434
423
  var _a, _b;
435
424
  return ({
436
425
  variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.header) === null || _a === void 0 ? void 0 : _a.atomHeading) === null || _b === void 0 ? void 0 : _b.variant) || "h1"
@@ -487,22 +476,22 @@ const AtomIconRight = styled(Icon).attrs(({ theme }) => {
487
476
  }) ``;
488
477
 
489
478
  const Header = ({ iconTop, iconDot, iconLeft, iconRight, textBanner, headingTitle, textTitle, buttonLeftText, buttonLeftClick, buttonRightText, buttonRightClick }) => {
490
- return (React.createElement(WrapperHeader, null,
491
- React.createElement("div", null,
492
- iconTop && React.createElement(AtomIconTop, { svg: iconTop }),
493
- React.createElement(WrapperLineTop, null,
494
- iconDot && React.createElement(AtomIconDot, { svg: iconDot }),
495
- React.createElement(AtomTextTitle, null, textBanner))),
496
- React.createElement(AtomHeading, null, headingTitle),
497
- React.createElement("div", null, textTitle &&
498
- textTitle.map((text, i) => (React.createElement(AtomTextTitle, { key: i }, text)))),
499
- React.createElement(WrapperLineBottom, null,
500
- React.createElement(AtomButtonLeft, { onClick: buttonLeftClick },
501
- iconLeft && React.createElement(AtomIconLeft, { svg: iconLeft }),
502
- React.createElement(AtomTextLeft, null, buttonLeftText)),
503
- React.createElement(AtomButtonRight, { onClick: buttonRightClick },
504
- React.createElement(AtomTextRight, null, buttonRightText),
505
- iconRight && React.createElement(AtomIconRight, { svg: iconRight })))));
479
+ return (React.createElement(WrapperBackground, null,
480
+ React.createElement(WrapperHeader, null,
481
+ React.createElement("div", null,
482
+ iconTop && React.createElement(AtomIconTop, { svg: iconTop }),
483
+ React.createElement(WrapperLineTop, null,
484
+ iconDot && React.createElement(AtomIconDot, { svg: iconDot }),
485
+ React.createElement(AtomTextTitle, null, textBanner))),
486
+ React.createElement(AtomHeading$1, null, headingTitle),
487
+ React.createElement("div", null, textTitle === null || textTitle === void 0 ? void 0 : textTitle.map((text, i) => (React.createElement(AtomTextTitle, { key: i }, text)))),
488
+ React.createElement(WrapperLineBottom, null,
489
+ React.createElement(AtomButtonLeft, { onClick: buttonLeftClick },
490
+ iconLeft && React.createElement(AtomIconLeft, { svg: iconLeft }),
491
+ React.createElement(AtomTextLeft, null, buttonLeftText)),
492
+ React.createElement(AtomButtonRight, { onClick: buttonRightClick },
493
+ React.createElement(AtomTextRight, null, buttonRightText),
494
+ iconRight && React.createElement(AtomIconRight, { svg: iconRight }))))));
506
495
  };
507
496
 
508
497
  const NavBar = styled.nav `
@@ -727,5 +716,301 @@ const Footer = ({ children, svg, routes }) => {
727
716
  React.createElement(FooterNav, null, sortedRoutes.map(renderRouteLink))));
728
717
  };
729
718
 
730
- export { Button, Footer, Header, Heading, Icon, Link, Navigation, Text };
719
+ const CardContainer = styled.div `
720
+ overflow: hidden;
721
+
722
+ ${({ theme }) => {
723
+ const textTheme = (theme === null || theme === void 0 ? void 0 : theme.cardTeaser) || {};
724
+ return css `
725
+ background-image: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.background};
726
+ border-radius: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.borderRadius};
727
+ max-width: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.maxWidth};
728
+ `;
729
+ }}
730
+
731
+ display: flex;
732
+ flex-direction: row;
733
+ flex-wrap: nowrap;
734
+ justify-content: space-between;
735
+ `;
736
+ const HeadingCompanyDate = styled(Heading).attrs(({ theme }) => {
737
+ var _a, _b;
738
+ return ({
739
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.headingCompanyDate) === null || _b === void 0 ? void 0 : _b.variant) || "h1"
740
+ });
741
+ }) `
742
+ ${({ theme }) => {
743
+ var _a;
744
+ const headingTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.headingCompanyDate) || {};
745
+ return css `
746
+ color: ${headingTheme === null || headingTheme === void 0 ? void 0 : headingTheme.color};
747
+ text-transform: ${headingTheme === null || headingTheme === void 0 ? void 0 : headingTheme.textTransform};
748
+ `;
749
+ }}
750
+
751
+ margin-bottom: 16px;
752
+ white-space: nowrap;
753
+ overflow: hidden;
754
+ `;
755
+ const HeadingTitle = styled(Heading).attrs(({ theme }) => {
756
+ var _a, _b;
757
+ return ({
758
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.headingTitle) === null || _b === void 0 ? void 0 : _b.variant) || "h1"
759
+ });
760
+ }) `
761
+ ${({ theme }) => {
762
+ var _a;
763
+ const headingTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.headingTitle) || {};
764
+ return css `
765
+ color: ${headingTheme === null || headingTheme === void 0 ? void 0 : headingTheme.color};
766
+ `;
767
+ }}
768
+ `;
769
+ const TextListItem = styled(Text).attrs(({ theme }) => {
770
+ var _a, _b;
771
+ return ({
772
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.variant) || "regular"
773
+ });
774
+ }) `
775
+ ${({ theme }) => {
776
+ var _a;
777
+ const textTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.text) || {};
778
+ return css `
779
+ color: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.color};
780
+ margin: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.margin};
781
+ `;
782
+ }}
783
+ `;
784
+ const List = styled.ul `
785
+ list-style: none;
786
+
787
+ ${({ theme }) => {
788
+ var _a;
789
+ const textTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.list) || {};
790
+ return css `
791
+ padding: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.padding};
792
+ margin: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.margin};
793
+ `;
794
+ }}
795
+ `;
796
+ const ButtonCardContainer = styled.div `
797
+ align-self: center;
798
+ ${({ theme }) => theme.media.mobileUp} {
799
+ align-self: flex-start;
800
+ }
801
+ `;
802
+ const ImageContainer = styled.div `
803
+ position: relative;
804
+ display: flex;
805
+ justify-content: flex-end;
806
+
807
+ ${({ theme }) => {
808
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
809
+ const textTheme = ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.imageContainer) === null || _b === void 0 ? void 0 : _b.responsive) || {};
810
+ const { tinyMobileUp, largeMobileUp, desktopUp } = theme.media;
811
+ return css `
812
+ ${tinyMobileUp} {
813
+ right: ${(_c = textTheme === null || textTheme === void 0 ? void 0 : textTheme.tinyMobileUp) === null || _c === void 0 ? void 0 : _c.right};
814
+ top: ${(_d = textTheme === null || textTheme === void 0 ? void 0 : textTheme.tinyMobileUp) === null || _d === void 0 ? void 0 : _d.top};
815
+ padding: ${(_e = textTheme === null || textTheme === void 0 ? void 0 : textTheme.tinyMobileUp) === null || _e === void 0 ? void 0 : _e.padding};
816
+ }
817
+ ${largeMobileUp} {
818
+ right: ${(_f = textTheme === null || textTheme === void 0 ? void 0 : textTheme.largeMobileUp) === null || _f === void 0 ? void 0 : _f.right};
819
+ top: ${(_g = textTheme === null || textTheme === void 0 ? void 0 : textTheme.largeMobileUp) === null || _g === void 0 ? void 0 : _g.top};
820
+ padding: ${(_h = textTheme === null || textTheme === void 0 ? void 0 : textTheme.largeMobileUp) === null || _h === void 0 ? void 0 : _h.padding};
821
+ }
822
+ ${desktopUp} {
823
+ padding: ${(_j = textTheme === null || textTheme === void 0 ? void 0 : textTheme.desktopUp) === null || _j === void 0 ? void 0 : _j.padding};
824
+ }
825
+ `;
826
+ }}
827
+ `;
828
+ const Image = styled.img `
829
+ position: absolute;
830
+ width: 330px;
831
+ height: auto;
832
+ max-width: none;
833
+ display: none;
834
+ ${({ theme }) => {
835
+ var _a, _b;
836
+ return css `
837
+ border-radius: ${(_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.image) === null || _b === void 0 ? void 0 : _b.borderRadius};
838
+ `;
839
+ }}
840
+ ${({ theme }) => theme.media.desktopUp} {
841
+ width: 350px;
842
+ }
843
+ ${({ theme }) => theme.media.mobileLandscapeUp} {
844
+ display: block;
845
+ }
846
+ `;
847
+ const LeftCardContainer = styled.div `
848
+ display: flex;
849
+ flex-direction: column;
850
+ ${({ theme }) => {
851
+ var _a, _b, _c, _d, _e;
852
+ const leftCardContainer = ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.leftCardContainer) === null || _b === void 0 ? void 0 : _b.responsive) || {};
853
+ const { desktopUp, tinyMobileUp } = theme.media;
854
+ return css `
855
+ ${tinyMobileUp} {
856
+ padding: ${(_c = leftCardContainer === null || leftCardContainer === void 0 ? void 0 : leftCardContainer.tinyMobileUp) === null || _c === void 0 ? void 0 : _c.padding};
857
+ width: ${(_d = leftCardContainer === null || leftCardContainer === void 0 ? void 0 : leftCardContainer.tinyMobileUp) === null || _d === void 0 ? void 0 : _d.width};
858
+ }
859
+ ${desktopUp} {
860
+ padding: ${(_e = leftCardContainer === null || leftCardContainer === void 0 ? void 0 : leftCardContainer.desktopUp) === null || _e === void 0 ? void 0 : _e.padding};
861
+ }
862
+ `;
863
+ }}
864
+ `;
865
+ const ListItem = styled.li `
866
+ display: flex;
867
+ flex-direction: row;
868
+ align-items: center;
869
+
870
+ ${({ theme }) => {
871
+ var _a, _b, _c, _d;
872
+ const listItem = ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.listItem) === null || _b === void 0 ? void 0 : _b.responsive) || {};
873
+ const { tinyMobileUp, mobileUp } = theme.media;
874
+ return css `
875
+ ${tinyMobileUp} {
876
+ gap: ${(_c = listItem === null || listItem === void 0 ? void 0 : listItem.tinyMobileUp) === null || _c === void 0 ? void 0 : _c.gap};
877
+ }
878
+ ${mobileUp} {
879
+ gap: ${(_d = listItem === null || listItem === void 0 ? void 0 : listItem.mobileUp) === null || _d === void 0 ? void 0 : _d.gap};
880
+ }
881
+ `;
882
+ }}
883
+ `;
884
+ const Separator = styled.section `
885
+ display: flex;
886
+ flex-direction: column;
887
+ display: none;
888
+
889
+ ${({ theme }) => {
890
+ var _a;
891
+ const textTheme = ((_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.separator) || {};
892
+ return css `
893
+ padding: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.padding};
894
+ &:before {
895
+ content: "";
896
+ align-self: stretch;
897
+ border: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.border};
898
+ border-image: white 1;
899
+ }
900
+ `;
901
+ }}
902
+ ${({ theme }) => theme.media.largeMobileUp} {
903
+ display: flex;
904
+ }
905
+ `;
906
+ const IconCard = styled(Icon).attrs(({ theme }) => {
907
+ var _a, _b;
908
+ return ({
909
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.icons) === null || _b === void 0 ? void 0 : _b.variant) || "small"
910
+ });
911
+ }) ``;
912
+ const ButtonCard = styled(Button).attrs(({ theme }) => {
913
+ var _a, _b;
914
+ return ({
915
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardTeaser) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.variant) || "regular"
916
+ });
917
+ }) ``;
918
+ const CardBackgroundColor = styled.div `
919
+ ${({ theme }) => {
920
+ const textTheme = (theme === null || theme === void 0 ? void 0 : theme.cardTeaser) || {};
921
+ return css `
922
+ border-radius: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.borderRadius};
923
+ max-width: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.maxWidth};
924
+ background: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.gradientBackground};
925
+ `;
926
+ }}
927
+ `;
928
+
929
+ const CardTeaser = ({ company, year, title, checks, onClick, buttonName, svg, cardImageSrc, separator }) => {
930
+ return (React.createElement(CardBackgroundColor, null,
931
+ React.createElement(CardContainer, null,
932
+ React.createElement(LeftCardContainer, null,
933
+ React.createElement(HeadingCompanyDate, null,
934
+ company,
935
+ " \u2022 ",
936
+ year),
937
+ React.createElement(HeadingTitle, null, title),
938
+ separator && React.createElement(Separator, null),
939
+ React.createElement(List, null, checks === null || checks === void 0 ? void 0 : checks.map((check, index) => (React.createElement(ListItem, { key: index },
940
+ svg && React.createElement(IconCard, { svg: svg }),
941
+ React.createElement(TextListItem, null, check))))),
942
+ React.createElement(ButtonCardContainer, null,
943
+ React.createElement(ButtonCard, { onClick: onClick }, buttonName))),
944
+ React.createElement(ImageContainer, null,
945
+ React.createElement(Image, { src: cardImageSrc, alt: "Experience" })))));
946
+ };
947
+
948
+ const Card = styled.div `
949
+ ${(_a) => {
950
+ var { theme } = _a, props = __rest(_a, ["theme"]);
951
+ const thisTheme = (theme === null || theme === void 0 ? void 0 : theme.cardBanner) || {};
952
+ return css `
953
+ display: flex;
954
+ flex-direction: ${props.flexDirection ||
955
+ (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.flexDirection) ||
956
+ "row"};
957
+ justify-content: ${props.justifyContent ||
958
+ (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.justifyContent) ||
959
+ "space-between"};
960
+ gap: ${props.gap || (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.gap) || "20px"};
961
+ align-items: center;
962
+ background: ${props.background || (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.background) || ""};
963
+ border: ${props.border || (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.border) || ""};
964
+ border-radius: ${props.borderRadius ||
965
+ (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.borderRadius) ||
966
+ ""};
967
+ box-shadow: ${props.boxShadow || (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.boxShadow) || ""};
968
+ padding: ${props.padding || (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.padding) || ""};
969
+ height: ${props.height || (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.height) || "auto"};
970
+ max-width: ${props.maxWidth || (thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.maxWidth) || "auto"};
971
+ `;
972
+ }}
973
+ `;
974
+ const AtomHeading = styled(Heading).attrs(({ theme }) => {
975
+ var _a, _b;
976
+ return ({
977
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardBanner) === null || _a === void 0 ? void 0 : _a.atomHeading) === null || _b === void 0 ? void 0 : _b.variant) || "h3"
978
+ });
979
+ }) ``;
980
+ const AtomText = styled(Text).attrs(({ theme }) => {
981
+ var _a, _b;
982
+ return ({
983
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardBanner) === null || _a === void 0 ? void 0 : _a.atomText) === null || _b === void 0 ? void 0 : _b.variant) || "regular"
984
+ });
985
+ }) ``;
986
+ const AtomButton = styled(Button).attrs(({ theme }) => {
987
+ var _a, _b;
988
+ return ({
989
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardBanner) === null || _a === void 0 ? void 0 : _a.atomButton) === null || _b === void 0 ? void 0 : _b.variant) || "primary"
990
+ });
991
+ }) ``;
992
+ const AtomTextButton = styled(Text).attrs(({ theme }) => {
993
+ var _a, _b;
994
+ return ({
995
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardBanner) === null || _a === void 0 ? void 0 : _a.atomTextButton) === null || _b === void 0 ? void 0 : _b.variant) || "primary"
996
+ });
997
+ }) ``;
998
+ const AtomIcon = styled(Icon).attrs(({ theme }) => {
999
+ var _a, _b;
1000
+ return ({
1001
+ variant: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardBanner) === null || _a === void 0 ? void 0 : _a.atomIcon) === null || _b === void 0 ? void 0 : _b.variant) || "medium"
1002
+ });
1003
+ }) ``;
1004
+
1005
+ const CardBanner = ({ icon, title, description, buttonText, buttonClick }) => {
1006
+ return (React.createElement(Card, null,
1007
+ React.createElement("div", null,
1008
+ React.createElement(AtomHeading, null, title),
1009
+ React.createElement(AtomText, null, description)),
1010
+ buttonClick && (React.createElement(AtomButton, { onClick: buttonClick },
1011
+ React.createElement(AtomTextButton, null, buttonText),
1012
+ icon && React.createElement(AtomIcon, { svg: icon })))));
1013
+ };
1014
+
1015
+ export { Button, CardBanner, CardTeaser, Footer, Header, Heading, Icon, Link, Navigation, Text };
731
1016
  //# sourceMappingURL=index.js.map