@sok-brand-sites/common-frontend-components 0.0.1-security → 1.643.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @sok-brand-sites/common-frontend-components might be problematic. Click here for more details.

Files changed (211) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -3
  3. package/dist/_virtual/_tslib.js +234 -0
  4. package/dist/assets/icons/Icons.js +118 -0
  5. package/dist/assets/logos/logos.js +19 -0
  6. package/dist/components/Accordion/Accordion.js +36 -0
  7. package/dist/components/Accordion/Accordion.styles.js +75 -0
  8. package/dist/components/AnimationWrapper/AnimationWrapper.js +35 -0
  9. package/dist/components/AnimationWrapper/AnimationWrapper.styles.js +26 -0
  10. package/dist/components/BlockGenerator/BlockContent.js +139 -0
  11. package/dist/components/BlockGenerator/BlockGenerator.js +62 -0
  12. package/dist/components/BlockGenerator/BlockGenerator.styles.js +44 -0
  13. package/dist/components/Button/Button.js +49 -0
  14. package/dist/components/Button/Button.styles.js +46 -0
  15. package/dist/components/Card/Card.js +79 -0
  16. package/dist/components/Card/Card.styles.js +137 -0
  17. package/dist/components/Carousel/Carousel.js +153 -0
  18. package/dist/components/Carousel/Carousel.styles.js +261 -0
  19. package/dist/components/CarouselNarrow/CarouselNarrow.js +120 -0
  20. package/dist/components/CarouselNarrow/CarouselNarrow.styles.js +281 -0
  21. package/dist/components/Column/Column.js +31 -0
  22. package/dist/components/Column/Column.styles.js +34 -0
  23. package/dist/components/Columns/Columns.js +38 -0
  24. package/dist/components/Columns/Columns.styles.js +21 -0
  25. package/dist/components/Embed/Embed.js +54 -0
  26. package/dist/components/Embed/Embed.styles.js +12 -0
  27. package/dist/components/Footer/Footer.js +63 -0
  28. package/dist/components/Footer/Footer.styles.js +67 -0
  29. package/dist/components/FormBuilder/FormBuilder.js +364 -0
  30. package/dist/components/FormBuilder/FormBuilder.styles.js +224 -0
  31. package/dist/components/FormBuilder/FormBuilderCheckboxes.js +39 -0
  32. package/dist/components/FormBuilder/FormBuilderInput.js +29 -0
  33. package/dist/components/FormBuilder/FormBuilderParagraph.js +15 -0
  34. package/dist/components/FormBuilder/FormBuilderSelect.js +39 -0
  35. package/dist/components/FormBuilder/FormBuilderTextAreaInput.js +29 -0
  36. package/dist/components/FormBuilder/utiles.js +13 -0
  37. package/dist/components/FullBgHero/FullBgHero.js +93 -0
  38. package/dist/components/FullBgHero/FullBgHero.styles.js +180 -0
  39. package/dist/components/GlobalStyle/GlobalStyle.js +285 -0
  40. package/dist/components/Header/Header.js +290 -0
  41. package/dist/components/Header/Header.styles.js +314 -0
  42. package/dist/components/Heading/Heading.js +29 -0
  43. package/dist/components/Heading/Heading.styles.js +21 -0
  44. package/dist/components/Hero/Hero.js +76 -0
  45. package/dist/components/Hero/Hero.styles.js +128 -0
  46. package/dist/components/IconLinks/IconLinks.js +118 -0
  47. package/dist/components/IconLinks/IconLinks.styles.js +259 -0
  48. package/dist/components/ImageCarousel/ImageCarousel.js +102 -0
  49. package/dist/components/ImageCarousel/ImageCarousel.styles.js +96 -0
  50. package/dist/components/LanguageSelector/LanguageSelector.js +72 -0
  51. package/dist/components/LanguageSelector/LanguageSelector.styles.js +72 -0
  52. package/dist/components/Layout/Layout.js +15 -0
  53. package/dist/components/Layout/Layout.styles.js +8 -0
  54. package/dist/components/List/List.js +25 -0
  55. package/dist/components/List/List.styles.js +11 -0
  56. package/dist/components/MarginWrapper/MarginWrapper.js +17 -0
  57. package/dist/components/MarginWrapper/MarginWrapper.styles.js +38 -0
  58. package/dist/components/OverlayCards/OverlayCard/OverlayCard.js +132 -0
  59. package/dist/components/OverlayCards/OverlayCard/OverlayCard.styles.js +133 -0
  60. package/dist/components/OverlayCards/OverlayCards.js +46 -0
  61. package/dist/components/OverlayCards/OverlayCards.styles.js +14 -0
  62. package/dist/components/OverlayCards/OverlayCards.types.js +9 -0
  63. package/dist/components/Paragraph/Paragraph.js +29 -0
  64. package/dist/components/Paragraph/Paragraph.styles.js +14 -0
  65. package/dist/components/PlaceOfBusiness/ContactInformation/ContactInformation.js +45 -0
  66. package/dist/components/PlaceOfBusiness/ContactInformation/ContactInformation.styles.js +37 -0
  67. package/dist/components/PlaceOfBusiness/LogoTitle/LogoTitle.js +16 -0
  68. package/dist/components/PlaceOfBusiness/LogoTitle/LogoTitle.styles.js +44 -0
  69. package/dist/components/PlaceOfBusiness/OpenToday/OpenToday.js +43 -0
  70. package/dist/components/PlaceOfBusiness/OpenToday/OpenToday.styles.js +63 -0
  71. package/dist/components/PlaceOfBusiness/OpeningHours/OpeningHours.js +77 -0
  72. package/dist/components/PlaceOfBusiness/OpeningHours/OpeningHours.styles.js +68 -0
  73. package/dist/components/PlaceOfBusiness/PlaceOfBusinessInfo/PlaceOfBusinessInfo.js +125 -0
  74. package/dist/components/PlaceOfBusiness/PlaceOfBusinessInfo/PlaceOfBusinessInfo.styles.js +32 -0
  75. package/dist/components/PlaceOfBusiness/PlaceOfBusinessListItem/PlaceOfBusinessListItem.js +85 -0
  76. package/dist/components/PlaceOfBusiness/PlaceOfBusinessListItem/PlaceOfBusinessListItem.styles.js +134 -0
  77. package/dist/components/PlaceOfBusiness/PlaceOfBusinessSearch/PlaceOfBusinessSearch.js +142 -0
  78. package/dist/components/PlaceOfBusiness/PlaceOfBusinessSearch/PlaceOfBusinessSearch.styles.js +43 -0
  79. package/dist/components/PlaceOfBusiness/Services/Services.js +30 -0
  80. package/dist/components/PlaceOfBusiness/Services/Services.styles.js +61 -0
  81. package/dist/components/PlaceOfBusiness/utils.js +177 -0
  82. package/dist/components/Promotion/Promotion.js +66 -0
  83. package/dist/components/Promotion/Promotion.styles.js +124 -0
  84. package/dist/components/RestrictedWidthContainer/RestrictedWidthContainer.js +63 -0
  85. package/dist/components/Seo/Seo.js +58 -0
  86. package/dist/components/SideBySide/SideBySide.js +81 -0
  87. package/dist/components/SideBySide/SideBySide.styles.js +179 -0
  88. package/dist/components/SocialMediaLinks/SocialMediaLinks.js +28 -0
  89. package/dist/components/SocialMediaLinks/SocialMediaLinks.styles.js +22 -0
  90. package/dist/components/SubHero/SubHero.js +22 -0
  91. package/dist/components/SubHero/SubHero.styles.js +52 -0
  92. package/dist/components/Table/Table.js +23 -0
  93. package/dist/components/Table/Table.styles.js +121 -0
  94. package/dist/components/Table/WpTable.styles.js +5 -0
  95. package/dist/components/constants.js +34 -0
  96. package/dist/components/utils.js +160 -0
  97. package/dist/fonts/Agrandir/Agrandir-Bold.woff.js +2 -0
  98. package/dist/fonts/Agrandir/Agrandir-Bold.woff2.js +2 -0
  99. package/dist/fonts/Agrandir/Agrandir-Light.woff.js +2 -0
  100. package/dist/fonts/Agrandir/Agrandir-Light.woff2.js +2 -0
  101. package/dist/fonts/Agrandir/index.js +16 -0
  102. package/dist/fonts/Brule/Brule-Bold.woff.js +2 -0
  103. package/dist/fonts/Brule/Brule-Bold.woff2.js +2 -0
  104. package/dist/fonts/Brule/Brule-Medium.woff.js +2 -0
  105. package/dist/fonts/Brule/Brule-Medium.woff2.js +2 -0
  106. package/dist/fonts/Brule/Brule-Regular.woff.js +2 -0
  107. package/dist/fonts/Brule/Brule-Regular.woff2.js +2 -0
  108. package/dist/fonts/Brule/index.js +18 -0
  109. package/dist/fonts/Domaine/Domaine-Text-Medium.woff.js +2 -0
  110. package/dist/fonts/Domaine/Domaine-Text-Medium.woff2.js +2 -0
  111. package/dist/fonts/Domaine/index.js +14 -0
  112. package/dist/fonts/FranklinGothic/FranklinGothic-LT-Com-Bk.woff.js +2 -0
  113. package/dist/fonts/FranklinGothic/FranklinGothic-LT-Com-Bk.woff2.js +2 -0
  114. package/dist/fonts/FranklinGothic/FranklinGothic-LT-Com-DmCn.woff.js +2 -0
  115. package/dist/fonts/FranklinGothic/FranklinGothic-LT-Com-DmCn.woff2.js +2 -0
  116. package/dist/fonts/FranklinGothic/FranklinGothic-LT-Com-MdCn.woff.js +2 -0
  117. package/dist/fonts/FranklinGothic/FranklinGothic-LT-Com-MdCn.woff2.js +2 -0
  118. package/dist/fonts/FranklinGothic/index.js +18 -0
  119. package/dist/fonts/MinionPro/MinionPro-Regular.woff.js +2 -0
  120. package/dist/fonts/MinionPro/MinionPro-Regular.woff2.js +2 -0
  121. package/dist/fonts/MinionPro/index.js +14 -0
  122. package/dist/fonts/Montserrat/Montserrat-Bold.woff.js +2 -0
  123. package/dist/fonts/Montserrat/Montserrat-Bold.woff2.js +2 -0
  124. package/dist/fonts/Montserrat/Montserrat-BoldItalic.woff.js +2 -0
  125. package/dist/fonts/Montserrat/Montserrat-BoldItalic.woff2.js +2 -0
  126. package/dist/fonts/Montserrat/Montserrat-ExtraBold.woff.js +2 -0
  127. package/dist/fonts/Montserrat/Montserrat-ExtraBold.woff2.js +2 -0
  128. package/dist/fonts/Montserrat/Montserrat-ExtraBoldItalic.woff.js +2 -0
  129. package/dist/fonts/Montserrat/Montserrat-ExtraBoldItalic.woff2.js +2 -0
  130. package/dist/fonts/Montserrat/Montserrat-Italic.woff.js +2 -0
  131. package/dist/fonts/Montserrat/Montserrat-Italic.woff2.js +2 -0
  132. package/dist/fonts/Montserrat/Montserrat-Light.woff.js +2 -0
  133. package/dist/fonts/Montserrat/Montserrat-Light.woff2.js +2 -0
  134. package/dist/fonts/Montserrat/Montserrat-LightItalic.woff.js +2 -0
  135. package/dist/fonts/Montserrat/Montserrat-LightItalic.woff2.js +2 -0
  136. package/dist/fonts/Montserrat/Montserrat-Medium.woff.js +2 -0
  137. package/dist/fonts/Montserrat/Montserrat-Medium.woff2.js +2 -0
  138. package/dist/fonts/Montserrat/Montserrat-MediumItalic.woff.js +2 -0
  139. package/dist/fonts/Montserrat/Montserrat-MediumItalic.woff2.js +2 -0
  140. package/dist/fonts/Montserrat/Montserrat-Regular.woff.js +2 -0
  141. package/dist/fonts/Montserrat/Montserrat-Regular.woff2.js +2 -0
  142. package/dist/fonts/Montserrat/index.js +90 -0
  143. package/dist/fonts/SBonus/SBonusUX-BoldItalic.woff.js +2 -0
  144. package/dist/fonts/SBonus/SBonusUX-BoldItalic.woff2.js +2 -0
  145. package/dist/fonts/SBonus/SBonusUX-ExtraboldItalic.woff.js +2 -0
  146. package/dist/fonts/SBonus/SBonusUX-ExtraboldItalic.woff2.js +2 -0
  147. package/dist/fonts/SBonus/SBonusUX-LightItalic.woff.js +2 -0
  148. package/dist/fonts/SBonus/SBonusUX-LightItalic.woff2.js +2 -0
  149. package/dist/fonts/SBonus/SBonusUX-MediumItalic.woff.js +2 -0
  150. package/dist/fonts/SBonus/SBonusUX-MediumItalic.woff2.js +2 -0
  151. package/dist/fonts/SBonus/SBonusUX-RegularItalic.woff.js +2 -0
  152. package/dist/fonts/SBonus/SBonusUX-RegularItalic.woff2.js +2 -0
  153. package/dist/fonts/SBonus/SBonusUXWEB-Bold.woff.js +2 -0
  154. package/dist/fonts/SBonus/SBonusUXWEB-Bold.woff2.js +2 -0
  155. package/dist/fonts/SBonus/SBonusUXWEB-Extrabold.woff.js +2 -0
  156. package/dist/fonts/SBonus/SBonusUXWEB-Extrabold.woff2.js +2 -0
  157. package/dist/fonts/SBonus/SBonusUXWEB-Light.woff.js +2 -0
  158. package/dist/fonts/SBonus/SBonusUXWEB-Light.woff2.js +2 -0
  159. package/dist/fonts/SBonus/SBonusUXWEB-Medium.woff.js +2 -0
  160. package/dist/fonts/SBonus/SBonusUXWEB-Medium.woff2.js +2 -0
  161. package/dist/fonts/SBonus/SBonusUXWEB-Regular.woff.js +2 -0
  162. package/dist/fonts/SBonus/SBonusUXWEB-Regular.woff2.js +2 -0
  163. package/dist/fonts/SBonus/index.js +95 -0
  164. package/dist/fonts/SBonusDisplay/SBonusDisplay-Bold.woff.js +2 -0
  165. package/dist/fonts/SBonusDisplay/SBonusDisplay-Bold.woff2.js +2 -0
  166. package/dist/fonts/SBonusDisplay/SBonusDisplay-Light.woff.js +2 -0
  167. package/dist/fonts/SBonusDisplay/SBonusDisplay-Light.woff2.js +2 -0
  168. package/dist/fonts/SBonusDisplay/SBonusDisplay-Medium.woff.js +2 -0
  169. package/dist/fonts/SBonusDisplay/SBonusDisplay-Medium.woff2.js +2 -0
  170. package/dist/fonts/SBonusDisplay/SBonusDisplay-Regular.woff.js +2 -0
  171. package/dist/fonts/SBonusDisplay/SBonusDisplay-Regular.woff2.js +2 -0
  172. package/dist/fonts/SBonusDisplay/SBonusDisplay-SemiBold.woff.js +2 -0
  173. package/dist/fonts/SBonusDisplay/SBonusDisplay-SemiBold.woff2.js +2 -0
  174. package/dist/fonts/SBonusDisplay/index.js +22 -0
  175. package/dist/fonts/SuomiGrumpy/SuomiGrumpy-Black.woff.js +2 -0
  176. package/dist/fonts/SuomiGrumpy/SuomiGrumpy-Black.woff2.js +2 -0
  177. package/dist/fonts/SuomiGrumpy/index.js +14 -0
  178. package/dist/fonts/utils.js +5 -0
  179. package/dist/hooks/useElementRect.js +65 -0
  180. package/dist/hooks/windowsize.js +31 -0
  181. package/dist/locales/constants.js +6 -0
  182. package/dist/locales/translations.json.js +153 -0
  183. package/dist/styles/media.js +40 -0
  184. package/dist/themes/neutral/breakpoints.js +11 -0
  185. package/dist/themes/neutral/colors.js +3 -0
  186. package/dist/themes/neutral/components.js +940 -0
  187. package/dist/themes/neutral/fonts.js +7 -0
  188. package/dist/themes/neutral/index.js +10 -0
  189. package/dist/themes/neutral/spacings.js +21 -0
  190. package/dist/themes/ravintolakonseptit/breakpoints.js +11 -0
  191. package/dist/themes/ravintolakonseptit/colors.js +17 -0
  192. package/dist/themes/ravintolakonseptit/components.js +936 -0
  193. package/dist/themes/ravintolakonseptit/fonts.js +5 -0
  194. package/dist/themes/ravintolakonseptit/index.js +10 -0
  195. package/dist/themes/ravintolakonseptit/spacings.js +21 -0
  196. package/dist/themes/sokos/breakpoints.js +11 -0
  197. package/dist/themes/sokos/colors.js +3 -0
  198. package/dist/themes/sokos/components.js +936 -0
  199. package/dist/themes/sokos/index.js +10 -0
  200. package/dist/themes/sokospalvelut/breakpoints.js +11 -0
  201. package/dist/themes/sokospalvelut/colors.js +3 -0
  202. package/dist/themes/sokospalvelut/components.js +936 -0
  203. package/dist/themes/sokospalvelut/fonts.js +11 -0
  204. package/dist/themes/sokospalvelut/index.js +10 -0
  205. package/dist/themes/theme.types.js +12 -0
  206. package/dist/themes/tykkimakiresort/colors.js +35 -0
  207. package/dist/themes/tykkimakiresort/components.js +936 -0
  208. package/dist/themes/tykkimakiresort/fonts.js +7 -0
  209. package/dist/themes/tykkimakiresort/index.js +10 -0
  210. package/package.json +33 -3
  211. package/scripts/build.js +132 -0
@@ -0,0 +1,153 @@
1
+ import { __rest, __assign } from '../../_virtual/_tslib.js';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import 'react-multi-carousel/lib/styles.css';
4
+ import { forwardRef } from 'react';
5
+ import { useTheme } from 'styled-components';
6
+ import { parseHtmlContent } from '../utils.js';
7
+ import Button from '../Button/Button.js';
8
+ import { CarouselContainer, StyledCarousel, CarouselItem, ImageContainer, StyledSVG, DynamicImage, StaticImage, ContentContainer, Category, Title, Description, ButtonContainer, ImageInTextContainer, DynamicImageInText, StaticImageInText } from './Carousel.styles.js';
9
+ import { useWindowSize } from '../../hooks/windowsize.js';
10
+ var Carousel = forwardRef(function (_a, ref) {
11
+ var carouselItems = _a.carouselItems,
12
+ anchor = _a.anchor,
13
+ rest = __rest(_a, ["carouselItems", "anchor"]);
14
+
15
+ if (!carouselItems) return null;
16
+ var theme = useTheme();
17
+ var windowSize = useWindowSize();
18
+
19
+ var hasImage = function hasImage(item) {
20
+ var _a, _b, _c, _d;
21
+
22
+ return ((_a = item === null || item === void 0 ? void 0 : item.image) === null || _a === void 0 ? void 0 : _a.mediaItemUrl) || ((_d = (_c = (_b = item.image) === null || _b === void 0 ? void 0 : _b.localFile) === null || _c === void 0 ? void 0 : _c.childImageSharp) === null || _d === void 0 ? void 0 : _d.gatsbyImageData) ? true : false;
23
+ };
24
+
25
+ var hasMainContent = function hasMainContent(item) {
26
+ var _a, _b, _c, _d, _e;
27
+
28
+ return !(item === null || item === void 0 ? void 0 : item.category) && !(item === null || item === void 0 ? void 0 : item.title) && !(item === null || item === void 0 ? void 0 : item.description) && !((_a = item === null || item === void 0 ? void 0 : item.button) === null || _a === void 0 ? void 0 : _a.buttonText) && !((_b = item === null || item === void 0 ? void 0 : item.imageInText) === null || _b === void 0 ? void 0 : _b.mediaItemUrl) && !((_e = (_d = (_c = item === null || item === void 0 ? void 0 : item.imageInText) === null || _c === void 0 ? void 0 : _c.localFile) === null || _d === void 0 ? void 0 : _d.childImageSharp) === null || _e === void 0 ? void 0 : _e.gatsbyImageData) ? false : true;
29
+ };
30
+
31
+ var hasOnlyImages = !carouselItems.some(function (item) {
32
+ return hasMainContent(item);
33
+ });
34
+ var responsive = {
35
+ ultraWide: {
36
+ breakpoint: {
37
+ max: 8000,
38
+ min: 2560
39
+ },
40
+ items: hasOnlyImages ? 5 : 2,
41
+ partialVisibilityGutter: hasOnlyImages ? 0 : 100
42
+ },
43
+ desktopLarge: {
44
+ breakpoint: {
45
+ max: 2560,
46
+ min: 2000
47
+ },
48
+ items: hasOnlyImages ? 4 : 2,
49
+ partialVisibilityGutter: hasOnlyImages ? 0 : 100
50
+ },
51
+ desktopMedium: {
52
+ breakpoint: {
53
+ max: 2000,
54
+ min: parseFloat(theme.breakpoints.desktop)
55
+ },
56
+ items: hasOnlyImages ? 3 : 1,
57
+ partialVisibilityGutter: hasOnlyImages ? 0 : 500
58
+ },
59
+ desktopSmall: {
60
+ breakpoint: {
61
+ max: parseFloat(theme.breakpoints.desktop),
62
+ min: parseFloat(theme.breakpoints.tablet)
63
+ },
64
+ items: hasOnlyImages ? 2 : 1,
65
+ partialVisibilityGutter: hasOnlyImages ? 0 : 100
66
+ },
67
+ tablet: {
68
+ breakpoint: {
69
+ max: parseFloat(theme.breakpoints.tablet),
70
+ min: parseFloat(theme.breakpoints.mobile)
71
+ },
72
+ items: hasOnlyImages ? 2 : 1,
73
+ partialVisibilityGutter: hasOnlyImages ? 0 : 100
74
+ },
75
+ mobile: {
76
+ breakpoint: {
77
+ max: parseFloat(theme.breakpoints.mobile),
78
+ min: 0
79
+ },
80
+ items: hasOnlyImages ? 1 : 1,
81
+ partialVisibilityGutter: hasOnlyImages ? 0 : 40
82
+ }
83
+ };
84
+ return jsx(CarouselContainer, __assign({
85
+ id: anchor
86
+ }, {
87
+ children: jsx(StyledCarousel, __assign({
88
+ responsive: responsive,
89
+ centerMode: hasOnlyImages && windowSize.width > 480 ? true : undefined,
90
+ partialVisbile: windowSize.width <= 480 || !hasOnlyImages ? true : false,
91
+ showDots: !hasOnlyImages
92
+ }, rest, {
93
+ children: carouselItems.map(function (item, i) {
94
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
95
+
96
+ return jsxs(CarouselItem, __assign({
97
+ ref: ref,
98
+ i: i,
99
+ hasOnlyImages: hasOnlyImages
100
+ }, {
101
+ children: [jsx(ImageContainer, __assign({
102
+ hasImage: hasImage(item),
103
+ hasMainContent: hasMainContent(item),
104
+ hasOnlyImages: hasOnlyImages
105
+ }, {
106
+ children: ((_b = (_a = item.image) === null || _a === void 0 ? void 0 : _a.mimeType) === null || _b === void 0 ? void 0 : _b.includes('svg')) ? jsx(StyledSVG, {
107
+ src: (_c = item === null || item === void 0 ? void 0 : item.image) === null || _c === void 0 ? void 0 : _c.mediaItemUrl
108
+ }, void 0) : ((_e = (_d = item.image) === null || _d === void 0 ? void 0 : _d.localFile) === null || _e === void 0 ? void 0 : _e.childImageSharp) ? jsx(DynamicImage, {
109
+ image: (_h = (_g = (_f = item === null || item === void 0 ? void 0 : item.image) === null || _f === void 0 ? void 0 : _f.localFile) === null || _g === void 0 ? void 0 : _g.childImageSharp) === null || _h === void 0 ? void 0 : _h.gatsbyImageData,
110
+ alt: ""
111
+ }, void 0) : jsx(StaticImage, {
112
+ src: (_j = item === null || item === void 0 ? void 0 : item.image) === null || _j === void 0 ? void 0 : _j.mediaItemUrl
113
+ }, void 0)
114
+ }), void 0), jsxs(ContentContainer, __assign({
115
+ hasImage: hasImage(item),
116
+ hasMainContent: hasMainContent(item)
117
+ }, {
118
+ children: [item.category && jsx(Category, {
119
+ children: item.category
120
+ }, void 0), item.title && jsx(Title, {
121
+ dangerouslySetInnerHTML: {
122
+ __html: item.title
123
+ }
124
+ }, void 0), item.description && jsx(Description, {
125
+ dangerouslySetInnerHTML: {
126
+ __html: parseHtmlContent(item.description)
127
+ }
128
+ }, void 0), ((_k = item.button) === null || _k === void 0 ? void 0 : _k.buttonText) && jsx(ButtonContainer, {
129
+ children: jsx(Button, {
130
+ linkToPage: (_l = item.button) === null || _l === void 0 ? void 0 : _l.linkToPage,
131
+ fill: theme.components.carousel.buttonfill,
132
+ externalLink: (_m = item.button) === null || _m === void 0 ? void 0 : _m.externalLink,
133
+ openWithNewTab: (_o = item.button) === null || _o === void 0 ? void 0 : _o.openInNewTab,
134
+ buttonText: (_p = item.button) === null || _p === void 0 ? void 0 : _p.buttonText,
135
+ htmlAnchorTarget: (_q = item.button) === null || _q === void 0 ? void 0 : _q.htmlAnchorTarget
136
+ }, void 0)
137
+ }, void 0), item.imageInText && jsx(ImageInTextContainer, {
138
+ children: ((_s = (_r = item.imageInText) === null || _r === void 0 ? void 0 : _r.mimeType) === null || _s === void 0 ? void 0 : _s.includes('svg')) ? jsx(StyledSVG, {
139
+ src: (_t = item === null || item === void 0 ? void 0 : item.imageInText) === null || _t === void 0 ? void 0 : _t.mediaItemUrl
140
+ }, void 0) : ((_v = (_u = item.imageInText) === null || _u === void 0 ? void 0 : _u.localFile) === null || _v === void 0 ? void 0 : _v.childImageSharp) ? jsx(DynamicImageInText, {
141
+ image: (_y = (_x = (_w = item === null || item === void 0 ? void 0 : item.imageInText) === null || _w === void 0 ? void 0 : _w.localFile) === null || _x === void 0 ? void 0 : _x.childImageSharp) === null || _y === void 0 ? void 0 : _y.gatsbyImageData,
142
+ alt: ""
143
+ }, void 0) : jsx(StaticImageInText, {
144
+ src: item.imageInText.mediaItemUrl
145
+ }, void 0)
146
+ }, void 0)]
147
+ }), void 0)]
148
+ }), i);
149
+ })
150
+ }), void 0)
151
+ }), void 0);
152
+ });
153
+ export { Carousel, Carousel as default };
@@ -0,0 +1,261 @@
1
+ import { __makeTemplateObject } from '../../_virtual/_tslib.js';
2
+ import MultiCarousel from 'react-multi-carousel';
3
+ import styled, { css } from 'styled-components';
4
+ import { GatsbyImage } from 'gatsby-plugin-image';
5
+ import media from '../../styles/media.js';
6
+ var CarouselContainer = styled.div.withConfig({
7
+ displayName: "Carouselstyles__CarouselContainer",
8
+ componentId: "sc-1n3xpas-0"
9
+ })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n --maxWidth: ", ";\n --restrictedWidthContainerDesktopMarginLeft: ", ";\n\n overflow-x: hidden;\n margin-left: ", ";\n\n ", "\n\n ", "\n\n ", "\n"], ["\n --maxWidth: ", ";\n --restrictedWidthContainerDesktopMarginLeft: ", ";\n\n overflow-x: hidden;\n margin-left: ", ";\n\n ", "\n\n ", "\n\n ", "\n"])), function (_a) {
10
+ var theme = _a.theme;
11
+ return theme.components.restrictedWidthContainer.maxWidth;
12
+ }, function (_a) {
13
+ var theme = _a.theme;
14
+ return theme.components.restrictedWidthContainer.desktop.margin.left;
15
+ }, function (_a) {
16
+ var theme = _a.theme;
17
+ return theme.components.restrictedWidthContainer.mobile.margin.left;
18
+ }, media.tablet(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: ", ";\n "], ["\n margin-left: ", ";\n "])), function (_a) {
19
+ var theme = _a.theme;
20
+ return theme.components.restrictedWidthContainer.tablet.margin.left;
21
+ }), media.desktop(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-left: ", ";\n "], ["\n margin-left: ", ";\n "])), function (_a) {
22
+ var theme = _a.theme;
23
+ return theme.components.restrictedWidthContainer.desktop.margin.left;
24
+ }), media.widerThanRestrictedWidthContainer(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-left: max(\n calc((100vw - var(--maxWidth)) - 15px) / 2,\n calc(var(--restrictedWidthContainerDesktopMarginLeft))\n );\n "], ["\n margin-left: max(\n calc((100vw - var(--maxWidth)) - 15px) / 2,\n calc(var(--restrictedWidthContainerDesktopMarginLeft))\n );\n "]))));
25
+ var StyledCarousel = styled(MultiCarousel).withConfig({
26
+ displayName: "Carouselstyles__StyledCarousel",
27
+ componentId: "sc-1n3xpas-1"
28
+ })(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n width: 100%;\n align-items: stretch;\n padding-bottom: ", ";\n\n .react-multiple-carousel__arrow {\n top: 45%;\n z-index: 99;\n margin-right: ", ";\n overflow: overlay;\n\n ", "\n\n :before {\n color: ", ";\n }\n }\n\n .react-multiple-carousel__arrow--left {\n ", ";\n }\n\n .react-multiple-carousel__arrow--right {\n ", ";\n }\n\n .react-multi-carousel-dot-list {\n margin-right: ", ";\n\n ", "\n\n ", "\n\n ", "\n }\n\n .react-multi-carousel-dot > button {\n background-color: ", ";\n border: none;\n }\n\n .react-multi-carousel-dot--active > button {\n background-color: ", ";\n border: none;\n }\n"], ["\n width: 100%;\n align-items: stretch;\n padding-bottom: ", ";\n\n .react-multiple-carousel__arrow {\n top: 45%;\n z-index: 99;\n margin-right: ", ";\n overflow: overlay;\n\n ", "\n\n :before {\n color: ", ";\n }\n }\n\n .react-multiple-carousel__arrow--left {\n ", ";\n }\n\n .react-multiple-carousel__arrow--right {\n ", ";\n }\n\n .react-multi-carousel-dot-list {\n margin-right: ", ";\n\n ", "\n\n ", "\n\n ", "\n }\n\n .react-multi-carousel-dot > button {\n background-color: ", ";\n border: none;\n }\n\n .react-multi-carousel-dot--active > button {\n background-color: ", ";\n border: none;\n }\n"])), function (_a) {
29
+ var theme = _a.theme;
30
+ return theme.spacings.spacing32;
31
+ }, function (_a) {
32
+ var theme = _a.theme;
33
+ return theme.spacings.spacing4;
34
+ }, function (_a) {
35
+ var theme = _a.theme;
36
+ return theme.components.carousel.arrowBackgroundColor && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n filter: brightness(1);\n background-color: ", ";\n\n :hover {\n filter: brightness(0.8);\n }\n "], ["\n filter: brightness(1);\n background-color: ", ";\n\n :hover {\n filter: brightness(0.8);\n }\n "])), theme.components.carousel.arrowBackgroundColor);
37
+ }, function (_a) {
38
+ var theme = _a.theme;
39
+ return theme.components.carousel.arrowColor;
40
+ }, media.widerThanRestrictedWidthContainer(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n left: 15%;\n "], ["\n left: 15%;\n "]))), media.widerThanRestrictedWidthContainer(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n right: 15%;\n "], ["\n right: 15%;\n "]))), function (_a) {
41
+ var theme = _a.theme;
42
+ return theme.components.restrictedWidthContainer.mobile.margin.right;
43
+ }, media.tablet(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n margin-right: ", ";\n "], ["\n margin-right: ", ";\n "])), function (_a) {
44
+ var theme = _a.theme;
45
+ return theme.components.restrictedWidthContainer.tablet.margin.right;
46
+ }), media.desktop(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n margin-right: ", ";\n "], ["\n margin-right: ", ";\n "])), function (_a) {
47
+ var theme = _a.theme;
48
+ return theme.components.restrictedWidthContainer.desktop.margin.right;
49
+ }), media.widerThanRestrictedWidthContainer(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n margin-right: max(calc((100vw - var(--maxWidth)) - 15px) / 2, var(--restrictedWidthContainerDesktopMarginLeft));\n "], ["\n margin-right: max(calc((100vw - var(--maxWidth)) - 15px) / 2, var(--restrictedWidthContainerDesktopMarginLeft));\n "]))), function (_a) {
50
+ var theme = _a.theme;
51
+ return theme.components.carousel.dotColor.default;
52
+ }, function (_a) {
53
+ var theme = _a.theme;
54
+ return theme.components.carousel.dotColor.active;
55
+ });
56
+ var CarouselItem = styled.div.withConfig({
57
+ displayName: "Carouselstyles__CarouselItem",
58
+ componentId: "sc-1n3xpas-2"
59
+ })(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n height: 100%;\n min-height: 25rem;\n background: ", ";\n margin-right: ", ";\n margin-left: ", ";\n display: flex;\n flex-wrap: wrap;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"], ["\n height: 100%;\n min-height: 25rem;\n background: ", ";\n margin-right: ", ";\n margin-left: ", ";\n display: flex;\n flex-wrap: wrap;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (_a) {
60
+ var theme = _a.theme;
61
+ return theme.components.carousel.carouselItem.backgroundColor;
62
+ }, function (_a) {
63
+ var theme = _a.theme;
64
+ return theme.spacings.spacing16;
65
+ }, function (_a) {
66
+ var theme = _a.theme;
67
+ return theme.spacings.spacing16;
68
+ }, media.tablet(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n flex-wrap: unset;\n margin-right: ", ";\n margin-left: ", ";\n\n "], ["\n flex-wrap: unset;\n margin-right: ", ";\n margin-left: ", ";\n\n "])), function (_a) {
69
+ var theme = _a.theme;
70
+ return theme.spacings.spacing32;
71
+ }, function (_a) {
72
+ var theme = _a.theme;
73
+ return theme.spacings.spacing32;
74
+ }), media.desktop(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n flex-wrap: unset;\n margin-right: ", ";\n margin-left: ", ";\n "], ["\n flex-wrap: unset;\n margin-right: ", ";\n margin-left: ", ";\n "])), function (_a) {
75
+ var theme = _a.theme;
76
+ return theme.spacings.spacing32;
77
+ }, function (_a) {
78
+ var theme = _a.theme;
79
+ return theme.spacings.spacing32;
80
+ }), function (_a) {
81
+ var hasOnlyImages = _a.hasOnlyImages;
82
+ return hasOnlyImages && css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n margin: ", ";\n "], ["\n margin: ", ";\n "])), function (_a) {
83
+ var theme = _a.theme;
84
+ return "0 " + theme.spacings.spacing16 + " !important";
85
+ });
86
+ }, function (_a) {
87
+ var i = _a.i;
88
+ return i === 0 && css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n margin-left: 0 !important;\n "], ["\n margin-left: 0 !important;\n "])));
89
+ });
90
+ var ImageContainer = styled.div.withConfig({
91
+ displayName: "Carouselstyles__ImageContainer",
92
+ componentId: "sc-1n3xpas-3"
93
+ })(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: ", ";\n width: 100%;\n height: ", ";\n\n ", "\n\n ", "\n"], ["\n display: ", ";\n width: 100%;\n height: ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
94
+ var hasImage = _a.hasImage;
95
+ return hasImage ? 'block' : 'none';
96
+ }, function (_a) {
97
+ var theme = _a.theme,
98
+ hasMainContent = _a.hasMainContent;
99
+ return hasMainContent ? theme.components.carousel.imageMobileHeight : '100%';
100
+ }, media.tablet(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n max-height: unset;\n position: relative;\n "], ["\n width: ", ";\n height: 100%;\n max-height: unset;\n position: relative;\n "])), function (_a) {
101
+ var hasMainContent = _a.hasMainContent;
102
+ return hasMainContent ? '40%' : '100%';
103
+ }), media.desktop(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n max-height: unset;\n position: relative;\n "], ["\n width: ", ";\n height: 100%;\n max-height: unset;\n position: relative;\n "])), function (_a) {
104
+ var hasMainContent = _a.hasMainContent;
105
+ return hasMainContent ? '40%' : '100%';
106
+ }));
107
+ var ImageCSS = css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n pointer-events: none;\n user-select: none;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n pointer-events: none;\n user-select: none;\n"])));
108
+ var StaticImage = styled.img.withConfig({
109
+ displayName: "Carouselstyles__StaticImage",
110
+ componentId: "sc-1n3xpas-4"
111
+ })(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), ImageCSS);
112
+ var DynamicImage = styled(GatsbyImage).withConfig({
113
+ displayName: "Carouselstyles__DynamicImage",
114
+ componentId: "sc-1n3xpas-5"
115
+ })(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), ImageCSS);
116
+ var ImageInTextContainer = styled.div.withConfig({
117
+ displayName: "Carouselstyles__ImageInTextContainer",
118
+ componentId: "sc-1n3xpas-6"
119
+ })(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
120
+ var DynamicImageInText = styled(GatsbyImage).withConfig({
121
+ displayName: "Carouselstyles__DynamicImageInText",
122
+ componentId: "sc-1n3xpas-7"
123
+ })(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), ImageCSS);
124
+ var StaticImageInText = styled.img.withConfig({
125
+ displayName: "Carouselstyles__StaticImageInText",
126
+ componentId: "sc-1n3xpas-8"
127
+ })(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), ImageCSS);
128
+ var StyledSVG = styled.img.withConfig({
129
+ displayName: "Carouselstyles__StyledSVG",
130
+ componentId: "sc-1n3xpas-9"
131
+ })(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n ", ";\n object-fit: unset;\n"], ["\n ", ";\n object-fit: unset;\n"])), ImageCSS);
132
+ var ContentContainer = styled.div.withConfig({
133
+ displayName: "Carouselstyles__ContentContainer",
134
+ componentId: "sc-1n3xpas-10"
135
+ })(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n display: ", ";\n width: 100%;\n height: 100%;\n padding: ", ";\n\n ", "\n\n ", "\n"], ["\n display: ", ";\n width: 100%;\n height: 100%;\n padding: ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
136
+ var hasMainContent = _a.hasMainContent;
137
+ return hasMainContent ? 'block' : 'none';
138
+ }, function (_a) {
139
+ var theme = _a.theme;
140
+ return theme.spacings.spacing32 + " " + theme.spacings.spacing16;
141
+ }, media.tablet(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n width: ", ";\n height: unset;\n padding: ", ";\n "], ["\n width: ", ";\n height: unset;\n padding: ", ";\n "])), function (_a) {
142
+ var hasImage = _a.hasImage;
143
+ return hasImage ? '60%' : '100%';
144
+ }, function (_a) {
145
+ var theme = _a.theme;
146
+ return theme.spacings.spacing64 + " " + theme.spacings.spacing32;
147
+ }), media.desktop(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n width: ", ";\n height: unset;\n padding: ", ";\n "], ["\n width: ", ";\n height: unset;\n padding: ", ";\n "])), function (_a) {
148
+ var hasImage = _a.hasImage;
149
+ return hasImage ? '60%' : '100%';
150
+ }, function (_a) {
151
+ var theme = _a.theme;
152
+ return theme.spacings.spacing64 + " " + theme.spacings.spacing32;
153
+ }));
154
+ var Category = styled.div.withConfig({
155
+ displayName: "Carouselstyles__Category",
156
+ componentId: "sc-1n3xpas-11"
157
+ })(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-transform: ", ";\n word-wrap: break-word;\n\n ", "\n\n ", "\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-transform: ", ";\n word-wrap: break-word;\n\n ", "\n\n ", "\n"])), function (_a) {
158
+ var theme = _a.theme;
159
+ return theme.components.carousel.category.fontFamily;
160
+ }, function (_a) {
161
+ var theme = _a.theme;
162
+ return theme.components.carousel.category.fontWeight;
163
+ }, function (_a) {
164
+ var theme = _a.theme;
165
+ return theme.components.carousel.category.fontSizes.mobile.fontSize;
166
+ }, function (_a) {
167
+ var theme = _a.theme;
168
+ return theme.components.carousel.category.fontSizes.mobile.lineHeight;
169
+ }, function (_a) {
170
+ var theme = _a.theme;
171
+ return theme.components.carousel.category.color;
172
+ }, function (_a) {
173
+ var theme = _a.theme;
174
+ return theme.components.carousel.category.textTransform;
175
+ }, media.tablet(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
176
+ var theme = _a.theme;
177
+ return theme.components.carousel.category.fontSizes.tablet.fontSize;
178
+ }, function (_a) {
179
+ var theme = _a.theme;
180
+ return theme.components.carousel.category.fontSizes.tablet.lineHeight;
181
+ }), media.desktop(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
182
+ var theme = _a.theme;
183
+ return theme.components.carousel.category.fontSizes.desktop.fontSize;
184
+ }, function (_a) {
185
+ var theme = _a.theme;
186
+ return theme.components.carousel.category.fontSizes.desktop.lineHeight;
187
+ }));
188
+ var Title = styled.div.withConfig({
189
+ displayName: "Carouselstyles__Title",
190
+ componentId: "sc-1n3xpas-12"
191
+ })(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: initial;\n color: ", ";\n text-transform: ", ";\n word-wrap: break-word;\n\n margin-bottom: ", ";\n\n b {\n color: ", ";\n font-weight: inherit;\n }\n\n ", "\n\n ", "\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: initial;\n color: ", ";\n text-transform: ", ";\n word-wrap: break-word;\n\n margin-bottom: ", ";\n\n b {\n color: ", ";\n font-weight: inherit;\n }\n\n ", "\n\n ", "\n"])), function (_a) {
192
+ var theme = _a.theme;
193
+ return theme.components.carousel.title.fontFamily;
194
+ }, function (_a) {
195
+ var theme = _a.theme;
196
+ return theme.components.carousel.title.fontWeight;
197
+ }, function (_a) {
198
+ var theme = _a.theme;
199
+ return theme.components.carousel.title.fontSizes.mobile.fontSize;
200
+ }, function (_a) {
201
+ var theme = _a.theme;
202
+ return theme.components.carousel.title.color;
203
+ }, function (_a) {
204
+ var theme = _a.theme;
205
+ return theme.components.carousel.title.textTransform;
206
+ }, function (_a) {
207
+ var theme = _a.theme;
208
+ return theme.spacings.spacing16;
209
+ }, function (_a) {
210
+ var theme = _a.theme;
211
+ return theme.colors.primary900;
212
+ }, media.tablet(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n margin-bottom: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n margin-bottom: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
213
+ var theme = _a.theme;
214
+ return theme.spacings.spacing32;
215
+ }, function (_a) {
216
+ var theme = _a.theme;
217
+ return theme.components.carousel.title.fontSizes.tablet.fontSize;
218
+ }, function (_a) {
219
+ var theme = _a.theme;
220
+ return theme.components.carousel.title.fontSizes.tablet.lineHeight;
221
+ }), media.desktop(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n margin-bottom: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n margin-bottom: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
222
+ var theme = _a.theme;
223
+ return theme.spacings.spacing32;
224
+ }, function (_a) {
225
+ var theme = _a.theme;
226
+ return theme.components.carousel.title.fontSizes.desktop.fontSize;
227
+ }, function (_a) {
228
+ var theme = _a.theme;
229
+ return theme.components.carousel.title.fontSizes.desktop.lineHeight;
230
+ }));
231
+ var Description = styled.div.withConfig({
232
+ displayName: "Carouselstyles__Description",
233
+ componentId: "sc-1n3xpas-13"
234
+ })(templateObject_36 || (templateObject_36 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-bottom: ", ";\n word-wrap: break-word;\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-bottom: ", ";\n word-wrap: break-word;\n"])), function (_a) {
235
+ var theme = _a.theme;
236
+ return theme.components.carousel.description.fontFamily;
237
+ }, function (_a) {
238
+ var theme = _a.theme;
239
+ return theme.components.carousel.description.fontWeight;
240
+ }, function (_a) {
241
+ var theme = _a.theme;
242
+ return theme.components.carousel.description.fontSizes.mobile.fontSize;
243
+ }, function (_a) {
244
+ var theme = _a.theme;
245
+ return theme.components.carousel.description.fontSizes.mobile.lineHeight;
246
+ }, function (_a) {
247
+ var theme = _a.theme;
248
+ return theme.components.carousel.description.color;
249
+ }, function (_a) {
250
+ var theme = _a.theme;
251
+ return theme.spacings.spacing32;
252
+ });
253
+ var ButtonContainer = styled.div.withConfig({
254
+ displayName: "Carouselstyles__ButtonContainer",
255
+ componentId: "sc-1n3xpas-14"
256
+ })(templateObject_37 || (templateObject_37 = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), function (_a) {
257
+ var theme = _a.theme;
258
+ return theme.spacings.spacing32;
259
+ });
260
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37;
261
+ export { ButtonContainer, CarouselContainer, CarouselItem, Category, ContentContainer, Description, DynamicImage, DynamicImageInText, ImageContainer, ImageInTextContainer, StaticImage, StaticImageInText, StyledCarousel, StyledSVG, Title };
@@ -0,0 +1,120 @@
1
+ import { __rest, __assign } from '../../_virtual/_tslib.js';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import 'react-multi-carousel/lib/styles.css';
4
+ import { forwardRef } from 'react';
5
+ import { useTheme } from 'styled-components';
6
+ import { parseLink, parseInternalLink, parseHtmlContent } from '../utils.js';
7
+ import { CarouselContainer, StyledCarousel, CarouselItem, ImageContainer, StyledSVG, DynamicImage, StaticImage, ContentContainer, Title, Description, StyledLink } from './CarouselNarrow.styles.js';
8
+ var ItemsToShow = {
9
+ ultraWide: 3,
10
+ desktop: 3,
11
+ tablet: 2,
12
+ mobile: 1
13
+ };
14
+ var CarouselNarrow = forwardRef(function (_a, ref) {
15
+ var carouselItems = _a.carouselItems,
16
+ anchor = _a.anchor,
17
+ rest = __rest(_a, ["carouselItems", "anchor"]);
18
+
19
+ if (!carouselItems) return null;
20
+ var theme = useTheme();
21
+ var responsive = {
22
+ ultraWide: {
23
+ breakpoint: {
24
+ max: 4000,
25
+ min: parseFloat(theme.breakpoints.desktop)
26
+ },
27
+ items: ItemsToShow.ultraWide
28
+ },
29
+ desktop: {
30
+ breakpoint: {
31
+ max: parseFloat(theme.breakpoints.desktop),
32
+ min: parseFloat(theme.breakpoints.tablet)
33
+ },
34
+ items: ItemsToShow.desktop
35
+ },
36
+ tablet: {
37
+ breakpoint: {
38
+ max: parseFloat(theme.breakpoints.tablet),
39
+ min: parseFloat(theme.breakpoints.mobile)
40
+ },
41
+ items: ItemsToShow.tablet
42
+ },
43
+ mobile: {
44
+ breakpoint: {
45
+ max: parseFloat(theme.breakpoints.mobile),
46
+ min: 0
47
+ },
48
+ items: ItemsToShow.mobile
49
+ }
50
+ };
51
+
52
+ var hasImage = function hasImage(item) {
53
+ var _a, _b, _c, _d;
54
+
55
+ return ((_a = item === null || item === void 0 ? void 0 : item.media) === null || _a === void 0 ? void 0 : _a.mediaItemUrl) || ((_d = (_c = (_b = item.media) === null || _b === void 0 ? void 0 : _b.localFile) === null || _c === void 0 ? void 0 : _c.childImageSharp) === null || _d === void 0 ? void 0 : _d.gatsbyImageData) ? true : false;
56
+ };
57
+
58
+ var hasMainContent = function hasMainContent(item) {
59
+ var _a;
60
+
61
+ return !(item === null || item === void 0 ? void 0 : item.category) && !(item === null || item === void 0 ? void 0 : item.title) && !(item === null || item === void 0 ? void 0 : item.description) && !((_a = item === null || item === void 0 ? void 0 : item.button) === null || _a === void 0 ? void 0 : _a.buttonText) ? false : true;
62
+ };
63
+
64
+ return jsx(CarouselContainer, __assign({
65
+ ref: ref,
66
+ id: anchor
67
+ }, {
68
+ children: jsx(StyledCarousel, __assign({
69
+ responsive: responsive,
70
+ partialVisible: true,
71
+ showDots: true
72
+ }, rest, {
73
+ itemsToShow: ItemsToShow,
74
+ linkCount: carouselItems.length
75
+ }, {
76
+ children: carouselItems.map(function (item, i) {
77
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
78
+
79
+ var parsedExternalLink = parseLink((_a = item.button) === null || _a === void 0 ? void 0 : _a.externalLink);
80
+ var parsedInternalLink = parseInternalLink((_b = item.button.linkToPage) === null || _b === void 0 ? void 0 : _b.uri, (_c = item.button) === null || _c === void 0 ? void 0 : _c.htmlAnchorTarget);
81
+ return jsxs(CarouselItem, __assign({
82
+ color: item.color
83
+ }, {
84
+ children: [jsx(ImageContainer, __assign({
85
+ hasImage: hasImage(item),
86
+ hasMainContent: hasMainContent(item)
87
+ }, {
88
+ children: ((_e = (_d = item.media) === null || _d === void 0 ? void 0 : _d.mimeType) === null || _e === void 0 ? void 0 : _e.includes('svg')) ? jsx(StyledSVG, {
89
+ hasMainContent: hasMainContent(item),
90
+ src: (_f = item === null || item === void 0 ? void 0 : item.media) === null || _f === void 0 ? void 0 : _f.mediaItemUrl
91
+ }, void 0) : ((_h = (_g = item.media) === null || _g === void 0 ? void 0 : _g.localFile) === null || _h === void 0 ? void 0 : _h.childImageSharp) ? jsx(DynamicImage, {
92
+ hasMainContent: hasMainContent(item),
93
+ image: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.media) === null || _j === void 0 ? void 0 : _j.localFile) === null || _k === void 0 ? void 0 : _k.childImageSharp) === null || _l === void 0 ? void 0 : _l.gatsbyImageData,
94
+ alt: ""
95
+ }, void 0) : jsx(StaticImage, {
96
+ hasMainContent: hasMainContent(item),
97
+ src: (_m = item === null || item === void 0 ? void 0 : item.media) === null || _m === void 0 ? void 0 : _m.mediaItemUrl
98
+ }, void 0)
99
+ }), void 0), jsxs(ContentContainer, {
100
+ children: [item.title && jsx(Title, {
101
+ dangerouslySetInnerHTML: {
102
+ __html: item.title
103
+ }
104
+ }, void 0), item.description && jsx(Description, {
105
+ dangerouslySetInnerHTML: {
106
+ __html: parseHtmlContent(item.description)
107
+ }
108
+ }, void 0), jsx(StyledLink, __assign({
109
+ href: parsedInternalLink ? parsedInternalLink : parsedExternalLink,
110
+ target: ((_o = item.button) === null || _o === void 0 ? void 0 : _o.openInNewTab) ? '__blank' : '_self'
111
+ }, {
112
+ children: (_p = item.button) === null || _p === void 0 ? void 0 : _p.buttonText
113
+ }), void 0)]
114
+ }, void 0)]
115
+ }), i);
116
+ })
117
+ }), void 0)
118
+ }), void 0);
119
+ });
120
+ export { CarouselNarrow, CarouselNarrow as default };