@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,133 @@
1
+ import { __makeTemplateObject } from '../../../_virtual/_tslib.js';
2
+ import { GatsbyImage } from 'gatsby-plugin-image';
3
+ import styled, { css } from 'styled-components';
4
+ import media from '../../../styles/media.js';
5
+ var ImageCSS = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n object-fit: cover;\n height: 100%;\n"], ["\n width: 100%;\n object-fit: cover;\n height: 100%;\n"])));
6
+ var OverlayCSS = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n"], ["\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n"])));
7
+ var ShowInMobileCSS = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n\n ", "\n"], ["\n display: flex;\n flex-direction: row;\n\n ", "\n"])), media.desktop(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: none;\n "], ["\n display: none;\n "]))));
8
+ var OverlayCardContainer = styled.div.withConfig({
9
+ displayName: "OverlayCardstyles__OverlayCardContainer",
10
+ componentId: "sc-cykn5q-0"
11
+ })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: relative;\n height: ", ";\n cursor: pointer;\n"], ["\n position: relative;\n height: ", ";\n cursor: pointer;\n"])), function (_a) {
12
+ var theme = _a.theme;
13
+ return theme.components.overlayCards.cardHeight;
14
+ });
15
+ var OverlayCardContainerLink = styled.a.withConfig({
16
+ displayName: "OverlayCardstyles__OverlayCardContainerLink",
17
+ componentId: "sc-cykn5q-1"
18
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n height: ", ";\n cursor: pointer;\n\n &:hover {\n filter: unset;\n\n // needed for showing OverlayBackgroundHover\n // and OverlayTextContainerHover on hover\n div {\n display: flex;\n flex-direction: column;\n }\n }\n"], ["\n position: relative;\n height: ", ";\n cursor: pointer;\n\n &:hover {\n filter: unset;\n\n // needed for showing OverlayBackgroundHover\n // and OverlayTextContainerHover on hover\n div {\n display: flex;\n flex-direction: column;\n }\n }\n"])), function (_a) {
19
+ var theme = _a.theme;
20
+ return theme.components.overlayCards.cardHeight;
21
+ });
22
+ var DynamicImage = styled(GatsbyImage).withConfig({
23
+ displayName: "OverlayCardstyles__DynamicImage",
24
+ componentId: "sc-cykn5q-2"
25
+ })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), ImageCSS);
26
+ var StaticImage = styled.img.withConfig({
27
+ displayName: "OverlayCardstyles__StaticImage",
28
+ componentId: "sc-cykn5q-3"
29
+ })(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), ImageCSS);
30
+ var SvgImage = styled.img.withConfig({
31
+ displayName: "OverlayCardstyles__SvgImage",
32
+ componentId: "sc-cykn5q-4"
33
+ })(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n max-width: 70%;\n max-height: 70%;\n min-width: 50%;\n min-height: 50%;\n object-fit: contain;\n"], ["\n max-width: 70%;\n max-height: 70%;\n min-width: 50%;\n min-height: 50%;\n object-fit: contain;\n"])));
34
+ var OverlayBackground = styled.div.withConfig({
35
+ displayName: "OverlayCardstyles__OverlayBackground",
36
+ componentId: "sc-cykn5q-5"
37
+ })(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", "\n\n background-color: ", ";\n opacity: ", ";\n"], ["\n ", "\n\n background-color: ", ";\n opacity: ", ";\n"])), OverlayCSS, function (_a) {
38
+ var theme = _a.theme;
39
+ return theme.components.overlayCards.overlayBackgroundColor;
40
+ }, function (_a) {
41
+ var theme = _a.theme;
42
+ return theme.components.overlayCards.overlayBackgroundOpacity;
43
+ });
44
+ var OverlayBackgroundHover = styled.div.withConfig({
45
+ displayName: "OverlayCardstyles__OverlayBackgroundHover",
46
+ componentId: "sc-cykn5q-6"
47
+ })(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n\n background-color: ", ";\n opacity: ", ";\n\n ", "\n"], ["\n ", "\n\n background-color: ", ";\n opacity: ", ";\n\n ", "\n"])), OverlayCSS, function (_a) {
48
+ var theme = _a.theme;
49
+ return theme.components.overlayCards.overlayBackgroundColor;
50
+ }, function (_a) {
51
+ var theme = _a.theme;
52
+ return theme.components.overlayCards.overlayBackgroundOpacity;
53
+ }, function (_a) {
54
+ var alwaysShowInMobile = _a.alwaysShowInMobile;
55
+ return alwaysShowInMobile ? css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), ShowInMobileCSS) : css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: none;\n "], ["\n display: none;\n "])));
56
+ });
57
+ var OverlayLink = styled.a.withConfig({
58
+ displayName: "OverlayCardstyles__OverlayLink",
59
+ componentId: "sc-cykn5q-7"
60
+ })(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", "\n\n text-decoration: none;\n\n &:hover {\n filter: unset;\n }\n"], ["\n ", "\n\n text-decoration: none;\n\n &:hover {\n filter: unset;\n }\n"])), OverlayCSS);
61
+ var OverlayTextContainerHover = styled.div.withConfig({
62
+ displayName: "OverlayCardstyles__OverlayTextContainerHover",
63
+ componentId: "sc-cykn5q-8"
64
+ })(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), OverlayCSS, function (_a) {
65
+ var alwaysShowInMobile = _a.alwaysShowInMobile;
66
+ return alwaysShowInMobile ? css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), ShowInMobileCSS) : css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: none;\n "], ["\n display: none;\n "])));
67
+ });
68
+ var SvgContainer = styled.div.withConfig({
69
+ displayName: "OverlayCardstyles__SvgContainer",
70
+ componentId: "sc-cykn5q-9"
71
+ })(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n ", "\n\n display:flex;\n align-items: center;\n justify-content: center;\n\n width: 100%;\n height: 100%;\n"], ["\n ", "\n\n display:flex;\n align-items: center;\n justify-content: center;\n\n width: 100%;\n height: 100%;\n"])), OverlayCSS);
72
+ var TextContainer = styled.div.withConfig({
73
+ displayName: "OverlayCardstyles__TextContainer",
74
+ componentId: "sc-cykn5q-10"
75
+ })(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n text-align: ", ";\n\n\n margin: ", ";\n\n padding: ", ";\n"], ["\n text-align: ", ";\n\n\n margin: ", ";\n\n padding: ", ";\n"])), function (_a) {
76
+ var theme = _a.theme;
77
+ return theme.components.overlayCards.centerText ? 'center' : 'left';
78
+ }, function (_a) {
79
+ var theme = _a.theme;
80
+ return theme.components.overlayCards.centerText ? '0 auto' : '0';
81
+ }, function (_a) {
82
+ var theme = _a.theme;
83
+ return theme.spacings.spacing32;
84
+ });
85
+ var Title = styled.p.withConfig({
86
+ displayName: "OverlayCardstyles__Title",
87
+ componentId: "sc-cykn5q-11"
88
+ })(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n color: ", ";\n word-break: break-word;\n margin-bottom: ", ";\n\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n\n ", "\n\n ", "\n"], ["\n color: ", ";\n word-break: break-word;\n margin-bottom: ", ";\n\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
89
+ var theme = _a.theme;
90
+ return theme.components.overlayCards.title.color;
91
+ }, function (_a) {
92
+ var theme = _a.theme;
93
+ return theme.spacings.spacing24;
94
+ }, function (_a) {
95
+ var theme = _a.theme;
96
+ return theme.components.overlayCards.title.fontFamily;
97
+ }, function (_a) {
98
+ var theme = _a.theme;
99
+ return theme.components.overlayCards.title.fontWeight;
100
+ }, function (_a) {
101
+ var theme = _a.theme;
102
+ return theme.components.overlayCards.title.fontSizes.mobile.fontSize;
103
+ }, function (_a) {
104
+ var theme = _a.theme;
105
+ return theme.components.overlayCards.title.fontSizes.mobile.lineHeight;
106
+ }, media.tablet(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
107
+ var theme = _a.theme;
108
+ return theme.components.overlayCards.title.fontSizes.tablet.fontSize;
109
+ }, function (_a) {
110
+ var theme = _a.theme;
111
+ return theme.components.overlayCards.title.fontSizes.tablet.lineHeight;
112
+ }), media.desktop(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
113
+ var theme = _a.theme;
114
+ return theme.components.overlayCards.title.fontSizes.desktop.fontSize;
115
+ }, function (_a) {
116
+ var theme = _a.theme;
117
+ return theme.components.overlayCards.title.fontSizes.desktop.lineHeight;
118
+ }));
119
+ var Description = styled.p.withConfig({
120
+ displayName: "OverlayCardstyles__Description",
121
+ componentId: "sc-cykn5q-12"
122
+ })(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n color: ", ";\n word-break: break-word;\n\n p {\n color: ", ";\n word-break: break-word;\n margin: 0;\n margin-bottom: ", ";\n }\n"], ["\n color: ", ";\n word-break: break-word;\n\n p {\n color: ", ";\n word-break: break-word;\n margin: 0;\n margin-bottom: ", ";\n }\n"])), function (_a) {
123
+ var theme = _a.theme;
124
+ return theme.components.overlayCards.description.color;
125
+ }, function (_a) {
126
+ var theme = _a.theme;
127
+ return theme.components.overlayCards.description.color;
128
+ }, function (_a) {
129
+ var theme = _a.theme;
130
+ return theme.spacings.spacing16;
131
+ });
132
+ 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;
133
+ export { Description, DynamicImage, OverlayBackground, OverlayBackgroundHover, OverlayCardContainer, OverlayCardContainerLink, OverlayLink, OverlayTextContainerHover, StaticImage, SvgContainer, SvgImage, TextContainer, Title };
@@ -0,0 +1,46 @@
1
+ import { __rest, __read, __assign } from '../../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { forwardRef, useState } from 'react';
4
+ import OverlayCard from './OverlayCard/OverlayCard.js';
5
+ import { MainContainer } from './OverlayCards.styles.js';
6
+ /*
7
+ If there is a need later on for adding a link in the description, then there should be
8
+ another field e.g. "Html Description" in WP acf fields, that is shown ONLY WHEN
9
+ "Enable links" is false.The "Description" acf field should be hidden when "Html Description"
10
+ field is shown. This is to prevent adding links inside links.
11
+ */
12
+
13
+ var OverlayCards = forwardRef(function (_a, ref) {
14
+ var overlayCardsItems = _a.overlayCardsItems,
15
+ enableLinks = _a.enableLinks,
16
+ anchor = _a.anchor,
17
+ overlayLogic = _a.overlayLogic,
18
+ rest = __rest(_a, ["overlayCardsItems", "enableLinks", "anchor", "overlayLogic"]);
19
+
20
+ var _b = __read(useState(undefined), 2),
21
+ visibleIndex = _b[0],
22
+ setVisibleIndex = _b[1];
23
+
24
+ var handleClick = function handleClick(i) {
25
+ setVisibleIndex(i);
26
+ };
27
+
28
+ return jsx(MainContainer, __assign({
29
+ ref: ref
30
+ }, rest, {
31
+ id: anchor ? anchor : undefined
32
+ }, {
33
+ children: overlayCardsItems && overlayCardsItems.map(function (item, i) {
34
+ return jsx(OverlayCard, {
35
+ overlayLogic: overlayLogic,
36
+ onClick: function onClick() {
37
+ return handleClick(i);
38
+ },
39
+ showLink: !!(visibleIndex === i),
40
+ item: item,
41
+ enableLinks: enableLinks
42
+ }, "overlay-card-" + i + "-" + item.title);
43
+ })
44
+ }), void 0);
45
+ });
46
+ export { OverlayCards, OverlayCards as default };
@@ -0,0 +1,14 @@
1
+ import { __makeTemplateObject } from '../../_virtual/_tslib.js';
2
+ import styled from 'styled-components';
3
+ var MainContainer = styled.div.withConfig({
4
+ displayName: "OverlayCardsstyles__MainContainer",
5
+ componentId: "sc-6xe5ku-0"
6
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n --scalableCardWidth: 380px;\n\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--scalableCardWidth)), max-content));\n grid-gap: ", ";\n grid-row-gap: ", ";\n justify-content: center;\n margin: 0px;\n width: 100%;\n flex-flow: row wrap;\n"], ["\n --scalableCardWidth: 380px;\n\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--scalableCardWidth)), max-content));\n grid-gap: ", ";\n grid-row-gap: ", ";\n justify-content: center;\n margin: 0px;\n width: 100%;\n flex-flow: row wrap;\n"])), function (_a) {
7
+ var theme = _a.theme;
8
+ return theme.components.overlayCards.gap;
9
+ }, function (_a) {
10
+ var theme = _a.theme;
11
+ return theme.components.overlayCards.gap;
12
+ });
13
+ var templateObject_1;
14
+ export { MainContainer };
@@ -0,0 +1,9 @@
1
+ var OverlayLogicOptions;
2
+
3
+ (function (OverlayLogicOptions) {
4
+ OverlayLogicOptions["SHOW_DESCRIPTION_ON_HOVER"] = "show_description_on_hover";
5
+ OverlayLogicOptions["SHOW_DESCRIPTION_ON_CLICK"] = "show_description_on_click";
6
+ OverlayLogicOptions["ALWAYS_SHOW_DESCRIPTION_IN_MOBILE"] = "always_show_description_in_mobile";
7
+ })(OverlayLogicOptions || (OverlayLogicOptions = {}));
8
+
9
+ export { OverlayLogicOptions };
@@ -0,0 +1,29 @@
1
+ import { __rest, __assign } from '../../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
4
+ import { StyledParagraph } from './Paragraph.styles.js';
5
+ import { parseHtmlContent } from '../utils.js';
6
+ /*
7
+ NB! textColor from WordPress is likely not working due to global p styles overriding the color.
8
+ Todo: fix or remove
9
+ */
10
+
11
+ var Paragraph = forwardRef(function (_a, ref) {
12
+ var align = _a.align,
13
+ textColor = _a.textColor,
14
+ content = _a.content,
15
+ anchor = _a.anchor,
16
+ rest = __rest(_a, ["align", "textColor", "content", "anchor"]);
17
+
18
+ return jsx(StyledParagraph, __assign({
19
+ id: anchor,
20
+ align: align,
21
+ textColor: textColor,
22
+ dangerouslySetInnerHTML: {
23
+ __html: parseHtmlContent(content)
24
+ }
25
+ }, rest, {
26
+ ref: ref
27
+ }), void 0);
28
+ });
29
+ export { Paragraph, Paragraph as default };
@@ -0,0 +1,14 @@
1
+ import { __makeTemplateObject } from '../../_virtual/_tslib.js';
2
+ import styled from 'styled-components';
3
+ var StyledParagraph = styled.p.withConfig({
4
+ displayName: "Paragraphstyles__StyledParagraph",
5
+ componentId: "sc-kt6swv-0"
6
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: ", ";\n margin: 0;\n"], ["\n color: ", ";\n text-align: ", ";\n margin: 0;\n"])), function (_a) {
7
+ var textColor = _a.textColor;
8
+ return textColor ? textColor : '';
9
+ }, function (_a) {
10
+ var align = _a.align;
11
+ return align;
12
+ });
13
+ var templateObject_1;
14
+ export { StyledParagraph };
@@ -0,0 +1,45 @@
1
+ import { __assign } from '../../../_virtual/_tslib.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { ContactInfoContainer, Title } from './ContactInformation.styles.js';
4
+ import translationJSON from '../../../locales/translations.json.js';
5
+
6
+ var ContactInformation = function ContactInformation(_a) {
7
+ var _b, _c;
8
+
9
+ var location = _a.location,
10
+ contactInfo = _a.contactInfo,
11
+ website = _a.website,
12
+ lang = _a.lang;
13
+ var fullAddress = (location === null || location === void 0 ? void 0 : location.address) ? (location.address.street ? location.address.street + "," : '') + " " + location.address.postcode + " " + location.address.postcodeName : undefined;
14
+ return jsxs(ContactInfoContainer, {
15
+ children: [jsx(Title, {
16
+ children: translationJSON.placeOfBusiness.placeOfBusinessInfo.contactInfo[lang]
17
+ }, void 0), fullAddress && jsxs("div", {
18
+ children: [jsx("p", {
19
+ children: fullAddress
20
+ }, void 0), jsx("a", __assign({
21
+ href: "https://www.google.com/maps/place/" + fullAddress,
22
+ rel: "noopener noreferrer",
23
+ target: "_blank"
24
+ }, {
25
+ children: translationJSON.placeOfBusiness.getRoute[lang]
26
+ }), void 0)]
27
+ }, void 0), ((_b = contactInfo === null || contactInfo === void 0 ? void 0 : contactInfo.phoneNumber) === null || _b === void 0 ? void 0 : _b.number) && jsxs("div", {
28
+ children: [jsx("p", {
29
+ children: translationJSON.placeOfBusiness.phone[lang] + ": " + contactInfo.phoneNumber.number
30
+ }, void 0), ((_c = contactInfo === null || contactInfo === void 0 ? void 0 : contactInfo.phoneNumber) === null || _c === void 0 ? void 0 : _c.callCharge) && jsx("p", {
31
+ children: contactInfo.phoneNumber.callCharge
32
+ }, void 0)]
33
+ }, void 0), jsx("a", __assign({
34
+ href: "https://s-ryhma.fi/yhteystiedot"
35
+ }, {
36
+ children: translationJSON.placeOfBusiness.placeOfBusinessInfo.reclamationsAndInvoicing[lang]
37
+ }), void 0), (website === null || website === void 0 ? void 0 : website.url) && jsx("a", __assign({
38
+ href: website.url
39
+ }, {
40
+ children: translationJSON.placeOfBusiness.placeOfBusinessInfo.ownWebsite[lang]
41
+ }), void 0)]
42
+ }, void 0);
43
+ };
44
+
45
+ export { ContactInformation, ContactInformation as default };
@@ -0,0 +1,37 @@
1
+ import { __makeTemplateObject } from '../../../_virtual/_tslib.js';
2
+ import styled from 'styled-components';
3
+ import media from '../../../styles/media.js';
4
+ var ContactInfoContainer = styled.div.withConfig({
5
+ displayName: "ContactInformationstyles__ContactInfoContainer",
6
+ componentId: "sc-1lxjdtv-0"
7
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n row-gap: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n row-gap: ", ";\n"])), function (_a) {
8
+ var theme = _a.theme;
9
+ return theme.spacings.spacing16;
10
+ });
11
+ var Title = styled.div.withConfig({
12
+ displayName: "ContactInformationstyles__Title",
13
+ componentId: "sc-1lxjdtv-1"
14
+ })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n\n ", "\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n\n ", "\n"])), function (_a) {
15
+ var theme = _a.theme;
16
+ return theme.components.placeOfBusiness.contactInformation.title.fontFamily;
17
+ }, function (_a) {
18
+ var theme = _a.theme;
19
+ return theme.components.placeOfBusiness.contactInformation.title.fontWeight;
20
+ }, function (_a) {
21
+ var theme = _a.theme;
22
+ return theme.components.placeOfBusiness.contactInformation.title.fontSizes.mobile.fontSize;
23
+ }, function (_a) {
24
+ var theme = _a.theme;
25
+ return theme.components.placeOfBusiness.contactInformation.title.fontSizes.mobile.lineHeight;
26
+ }, function (_a) {
27
+ var theme = _a.theme;
28
+ return theme.components.placeOfBusiness.contactInformation.title.color;
29
+ }, media.desktop(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
30
+ var theme = _a.theme;
31
+ return theme.components.placeOfBusiness.contactInformation.title.fontSizes.desktop.fontSize;
32
+ }, function (_a) {
33
+ var theme = _a.theme;
34
+ return theme.components.placeOfBusiness.contactInformation.title.fontSizes.desktop.lineHeight;
35
+ }));
36
+ var templateObject_1, templateObject_2, templateObject_3;
37
+ export { ContactInfoContainer, Title };
@@ -0,0 +1,16 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { LogoTitleContainer, Logo, Title } from './LogoTitle.styles.js';
3
+
4
+ var LogoTitle = function LogoTitle(_a) {
5
+ var name = _a.name,
6
+ logoUrl = _a.logoUrl;
7
+ return jsxs(LogoTitleContainer, {
8
+ children: [jsx(Logo, {
9
+ src: logoUrl
10
+ }, void 0), jsx(Title, {
11
+ children: name
12
+ }, void 0)]
13
+ }, void 0);
14
+ };
15
+
16
+ export { LogoTitle, LogoTitle as default };
@@ -0,0 +1,44 @@
1
+ import { __makeTemplateObject } from '../../../_virtual/_tslib.js';
2
+ import styled from 'styled-components';
3
+ import media from '../../../styles/media.js';
4
+ var LogoTitleContainer = styled.div.withConfig({
5
+ displayName: "LogoTitlestyles__LogoTitleContainer",
6
+ componentId: "sc-xrz176-0"
7
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n column-gap: ", ";\n"], ["\n display: flex;\n align-items: center;\n column-gap: ", ";\n"])), function (_a) {
8
+ var theme = _a.theme;
9
+ return theme.spacings.spacing16;
10
+ });
11
+ var Logo = styled.img.withConfig({
12
+ displayName: "LogoTitlestyles__Logo",
13
+ componentId: "sc-xrz176-1"
14
+ })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", ";\n"], ["\n width: ", ";\n"])), function (_a) {
15
+ var theme = _a.theme;
16
+ return theme.components.placeOfBusiness.logoTitle.logoSize;
17
+ });
18
+ var Title = styled.div.withConfig({
19
+ displayName: "LogoTitlestyles__Title",
20
+ componentId: "sc-xrz176-2"
21
+ })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n\n ", "\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n\n ", "\n"])), function (_a) {
22
+ var theme = _a.theme;
23
+ return theme.components.placeOfBusiness.logoTitle.fontFamily;
24
+ }, function (_a) {
25
+ var theme = _a.theme;
26
+ return theme.components.placeOfBusiness.logoTitle.fontWeight;
27
+ }, function (_a) {
28
+ var theme = _a.theme;
29
+ return theme.components.placeOfBusiness.logoTitle.fontSizes.mobile.fontSize;
30
+ }, function (_a) {
31
+ var theme = _a.theme;
32
+ return theme.components.placeOfBusiness.logoTitle.fontSizes.mobile.lineHeight;
33
+ }, function (_a) {
34
+ var theme = _a.theme;
35
+ return theme.components.placeOfBusiness.logoTitle.color;
36
+ }, media.desktop(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
37
+ var theme = _a.theme;
38
+ return theme.components.placeOfBusiness.logoTitle.fontSizes.desktop.fontSize;
39
+ }, function (_a) {
40
+ var theme = _a.theme;
41
+ return theme.components.placeOfBusiness.logoTitle.fontSizes.desktop.lineHeight;
42
+ }));
43
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
44
+ export { Logo, LogoTitleContainer, Title };
@@ -0,0 +1,43 @@
1
+ import { __assign } from '../../../_virtual/_tslib.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { getOpenHours, isOpenNow } from '../utils.js';
4
+ import translationJSON from '../../../locales/translations.json.js';
5
+ import { MainContainer, OpenTodayLabel, OpeningHoursContainer, StatusCircleContainer } from './OpenToday.styles.js';
6
+ import { GreenCircle, RedCircle } from '../../../assets/icons/Icons.js';
7
+ import { format } from 'date-fns';
8
+
9
+ var OpenToday = function OpenToday(_a) {
10
+ var _b, _c;
11
+
12
+ var weeklyOpeningTimes = _a.weeklyOpeningTimes,
13
+ large = _a.large,
14
+ lang = _a.lang;
15
+ var formattedCurrentDate = format(new Date(), 'yyyy-MM-dd');
16
+ var openingTimesToday = (_c = (_b = weeklyOpeningTimes === null || weeklyOpeningTimes === void 0 ? void 0 : weeklyOpeningTimes[0]) === null || _b === void 0 ? void 0 : _b.openingTimes) === null || _c === void 0 ? void 0 : _c.find(function (day) {
17
+ return day.date === formattedCurrentDate;
18
+ });
19
+ var openHours = getOpenHours(lang, openingTimesToday);
20
+ return jsxs(MainContainer, __assign({
21
+ "data-testid": "pob-open-today"
22
+ }, {
23
+ children: [jsx(OpenTodayLabel, __assign({
24
+ large: !!large
25
+ }, {
26
+ children: translationJSON.placeOfBusiness.openToday[lang]
27
+ }), void 0), jsxs(OpeningHoursContainer, {
28
+ children: [isOpenNow(formattedCurrentDate, openingTimesToday) ? jsx(StatusCircleContainer, {
29
+ children: jsx(GreenCircle, {}, void 0)
30
+ }, void 0) : jsx(StatusCircleContainer, {
31
+ children: jsx(RedCircle, {}, void 0)
32
+ }, void 0), jsx("div", {
33
+ children: openHours.map(function (time, i) {
34
+ return jsx("p", {
35
+ children: time
36
+ }, i);
37
+ })
38
+ }, void 0)]
39
+ }, void 0)]
40
+ }), void 0);
41
+ };
42
+
43
+ export { OpenToday, OpenToday as default };
@@ -0,0 +1,63 @@
1
+ import { __makeTemplateObject } from '../../../_virtual/_tslib.js';
2
+ import styled, { css } from 'styled-components';
3
+ import media from '../../../styles/media.js';
4
+ var MainContainer = styled.div.withConfig({
5
+ displayName: "OpenTodaystyles__MainContainer",
6
+ componentId: "sc-d29eug-0"
7
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
8
+ var StatusCircleContainer = styled.div.withConfig({
9
+ displayName: "OpenTodaystyles__StatusCircleContainer",
10
+ componentId: "sc-d29eug-1"
11
+ })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-right: ", ";\n"], ["\n display: flex;\n align-items: center;\n margin-right: ", ";\n"])), function (_a) {
12
+ var theme = _a.theme;
13
+ return theme.spacings.spacing8;
14
+ });
15
+ var OpeningHoursContainer = styled.div.withConfig({
16
+ displayName: "OpenTodaystyles__OpeningHoursContainer",
17
+ componentId: "sc-d29eug-2"
18
+ })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n word-break: break-word;\n"], ["\n display: flex;\n align-items: center;\n word-break: break-word;\n"])));
19
+ var OpenTodayLabel = styled.div.withConfig({
20
+ displayName: "OpenTodaystyles__OpenTodayLabel",
21
+ componentId: "sc-d29eug-3"
22
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n\n ", "\n"], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n\n ", "\n"])), function (_a) {
23
+ var theme = _a.theme;
24
+ return theme.components.placeOfBusiness.openToday.title.fontFamily;
25
+ }, function (_a) {
26
+ var theme = _a.theme;
27
+ return theme.components.placeOfBusiness.openToday.title.fontSizes.mobile.fontSize;
28
+ }, function (_a) {
29
+ var theme = _a.theme;
30
+ return theme.components.placeOfBusiness.openToday.title.fontSizes.mobile.lineHeight;
31
+ }, function (_a) {
32
+ var theme = _a.theme;
33
+ return theme.components.placeOfBusiness.openToday.title.fontWeight;
34
+ }, function (_a) {
35
+ var theme = _a.theme;
36
+ return theme.components.placeOfBusiness.listItem.labelColor;
37
+ }, function (_a) {
38
+ var large = _a.large;
39
+ return large && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n\n ", "\n "], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n\n ", "\n "])), function (_a) {
40
+ var theme = _a.theme;
41
+ return theme.components.placeOfBusiness.openToday.large.title.fontFamily;
42
+ }, function (_a) {
43
+ var theme = _a.theme;
44
+ return theme.components.placeOfBusiness.openToday.large.title.fontWeight;
45
+ }, function (_a) {
46
+ var theme = _a.theme;
47
+ return theme.components.placeOfBusiness.openToday.large.title.fontSizes.mobile.fontSize;
48
+ }, function (_a) {
49
+ var theme = _a.theme;
50
+ return theme.components.placeOfBusiness.openToday.large.title.fontSizes.mobile.lineHeight;
51
+ }, function (_a) {
52
+ var theme = _a.theme;
53
+ return theme.components.placeOfBusiness.openToday.large.title.color;
54
+ }, media.desktop(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), function (_a) {
55
+ var theme = _a.theme;
56
+ return theme.components.placeOfBusiness.openToday.large.title.fontSizes.desktop.fontSize;
57
+ }, function (_a) {
58
+ var theme = _a.theme;
59
+ return theme.components.placeOfBusiness.openToday.large.title.fontSizes.desktop.lineHeight;
60
+ }));
61
+ });
62
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
63
+ export { MainContainer, OpenTodayLabel, OpeningHoursContainer, StatusCircleContainer };
@@ -0,0 +1,77 @@
1
+ import { __read, __assign } from '../../../_virtual/_tslib.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useState } from 'react';
4
+ import { OpeningHoursContainer, OpeningHoursList, HoursRow, Day, Hours, ButtonsContainer, Button } from './OpeningHours.styles.js';
5
+ import { getOpenHours } from '../utils.js';
6
+ import translationJSON from '../../../locales/translations.json.js';
7
+ import { getISOWeek, startOfWeek, endOfWeek, format, addDays } from 'date-fns';
8
+
9
+ var OpeningHours = function OpeningHours(_a) {
10
+ var weeklyOpeningTimes = _a.weeklyOpeningTimes,
11
+ lang = _a.lang;
12
+
13
+ var _b = __read(useState(0), 2),
14
+ selectedWeekIndex = _b[0],
15
+ setSelectedWeekIndex = _b[1];
16
+
17
+ var translationsCommon = translationJSON.common;
18
+ var translationsDays = translationsCommon.dayAbbreviations;
19
+ var today = new Date();
20
+ var currentWeekNumber = getISOWeek(today);
21
+ var startOfThisWeek = startOfWeek(today, {
22
+ weekStartsOn: 1
23
+ });
24
+ var endOfThisWeek = endOfWeek(today, {
25
+ weekStartsOn: 1
26
+ });
27
+ var dateRangesPerWeek = [0, 1, 2].map(function (week) {
28
+ var startDate = format(addDays(startOfThisWeek, 7 * week), 'd.M.yyyy');
29
+ var endDate = format(addDays(endOfThisWeek, 7 * week), 'd.M.yyyy');
30
+ return startDate + " - " + endDate;
31
+ });
32
+ var weekDays = [translationsDays.monday[lang], translationsDays.tuesday[lang], translationsDays.wednesday[lang], translationsDays.thursday[lang], translationsDays.friday[lang], translationsDays.saturday[lang], translationsDays.sunday[lang]];
33
+ return jsxs(OpeningHoursContainer, __assign({
34
+ "data-testid": "pob-opening-hours"
35
+ }, {
36
+ children: [jsx("p", {
37
+ children: dateRangesPerWeek[selectedWeekIndex]
38
+ }, void 0), jsx(OpeningHoursList, {
39
+ children: weekDays.map(function (day, i) {
40
+ var _a, _b;
41
+
42
+ return jsxs(HoursRow, {
43
+ children: [jsx(Day, {
44
+ children: jsx("p", {
45
+ children: jsx("strong", {
46
+ children: day
47
+ }, void 0)
48
+ }, void 0)
49
+ }, void 0), jsx(Hours, {
50
+ children: getOpenHours(lang, (_b = (_a = weeklyOpeningTimes === null || weeklyOpeningTimes === void 0 ? void 0 : weeklyOpeningTimes[selectedWeekIndex]) === null || _a === void 0 ? void 0 : _a.openingTimes) === null || _b === void 0 ? void 0 : _b[i]).map(function (time, i) {
51
+ return jsx("p", {
52
+ children: time
53
+ }, i);
54
+ })
55
+ }, void 0)]
56
+ }, day);
57
+ })
58
+ }, void 0), jsxs(ButtonsContainer, {
59
+ children: [jsx("p", {
60
+ children: jsx("strong", {
61
+ children: translationsCommon.week[lang]
62
+ }, void 0)
63
+ }, void 0), [0, 1, 2].map(function (i) {
64
+ return jsx(Button, __assign({
65
+ active: selectedWeekIndex === i,
66
+ onClick: function onClick() {
67
+ return setSelectedWeekIndex(i);
68
+ }
69
+ }, {
70
+ children: currentWeekNumber + i
71
+ }), i);
72
+ })]
73
+ }, void 0)]
74
+ }), void 0);
75
+ };
76
+
77
+ export { OpeningHours, OpeningHours as default };