@ubnt/store.core 10.20.0-alpha.13 → 10.20.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib/assets/ai-360.jpg +0 -0
  3. package/lib/assets/ai-3602.jpg +0 -0
  4. package/lib/assets/ai-lpr.jpg +0 -0
  5. package/lib/assets/ai-lpr2.jpg +0 -0
  6. package/lib/assets/attention.svg +5 -5
  7. package/lib/assets/attention2.svg +5 -5
  8. package/lib/assets/door-hub-mini.jpg +0 -0
  9. package/lib/assets/door-hub-mini2.jpg +0 -0
  10. package/lib/assets/express.jpg +0 -0
  11. package/lib/assets/express2.jpg +0 -0
  12. package/lib/assets/floodlight.svg +2 -9
  13. package/lib/assets/floodlight2.svg +9 -2
  14. package/lib/assets/g2-reader-pro.jpg +0 -0
  15. package/lib/assets/g2-reader-pro2.jpg +0 -0
  16. package/lib/assets/g3-reader-pro.jpg +0 -0
  17. package/lib/assets/g3-reader-pro2.jpg +0 -0
  18. package/lib/assets/g3-reader.jpg +0 -0
  19. package/lib/assets/g3-reader2.jpg +0 -0
  20. package/lib/assets/g3-starter-kit-pro.jpg +0 -0
  21. package/lib/assets/g3-starter-kit-pro2.jpg +0 -0
  22. package/lib/assets/g4-ptz.jpg +0 -0
  23. package/lib/assets/g4-ptz2.jpg +0 -0
  24. package/lib/assets/g5-bullet.jpg +0 -0
  25. package/lib/assets/g5-bullet2.jpg +0 -0
  26. package/lib/assets/globe.svg +2 -9
  27. package/lib/assets/globe2.svg +9 -2
  28. package/lib/assets/interior-design.svg +2 -2
  29. package/lib/assets/interior-design2.svg +2 -2
  30. package/lib/assets/pause.svg +3 -3
  31. package/lib/assets/pause2.svg +3 -3
  32. package/lib/assets/power.svg +1 -4
  33. package/lib/assets/power2.svg +4 -1
  34. package/lib/assets/ptz2.svg +2 -2
  35. package/lib/assets/ptz3.svg +2 -2
  36. package/lib/assets/rack.svg +1 -4
  37. package/lib/assets/rack2.svg +4 -1
  38. package/lib/components/Header/Header.js +1 -1
  39. package/lib/components/Header/Header.mjs +1 -1
  40. package/lib/components/Header/ProHeader/ProHeader.js +1 -1
  41. package/lib/components/Header/ProHeader/ProHeader.mjs +1 -1
  42. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js +6 -6
  43. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js.map +1 -1
  44. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs +8 -8
  45. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs.map +1 -1
  46. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.d.ts +1 -0
  47. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.js +6 -0
  48. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.js.map +1 -1
  49. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.mjs +7 -2
  50. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.mjs.map +1 -1
  51. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  52. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  53. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  54. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  55. package/lib/components/ModelCompareV4/ProductList/ProductList.js +19 -5
  56. package/lib/components/ModelCompareV4/ProductList/ProductList.js.map +1 -1
  57. package/lib/components/ModelCompareV4/ProductList/ProductList.mjs +19 -5
  58. package/lib/components/ModelCompareV4/ProductList/ProductList.mjs.map +1 -1
  59. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  60. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  61. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
  62. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
  63. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
  64. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
  65. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
  66. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
  67. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  68. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  69. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  70. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  71. package/lib/constants/icons/header/globe.svg.js +1 -1
  72. package/lib/constants/icons/header/globe.svg.mjs +2 -2
  73. package/lib/constants/icons/header/index.js +1 -1
  74. package/lib/constants/icons/header/index.mjs +1 -1
  75. package/lib/constants/icons/menu/floodlight.svg.js +5 -5
  76. package/lib/constants/icons/menu/floodlight.svg.mjs +2 -2
  77. package/lib/constants/icons/menu/index.js +9 -9
  78. package/lib/constants/icons/menu/index.mjs +3 -3
  79. package/lib/constants/icons/menu/power.svg.js +5 -5
  80. package/lib/constants/icons/menu/power.svg.mjs +2 -2
  81. package/lib/constants/icons/menu/rack.svg.js +5 -5
  82. package/lib/constants/icons/menu/rack.svg.mjs +2 -2
  83. package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.js +1 -1
  84. package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.mjs +2 -2
  85. package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.js +1 -1
  86. package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.mjs +2 -2
  87. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.js +5 -5
  88. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.mjs +2 -2
  89. package/lib/constants/modelCompareData/assets/Consoles/express.jpg.js +1 -1
  90. package/lib/constants/modelCompareData/assets/Consoles/express.jpg.mjs +2 -2
  91. package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.js +1 -1
  92. package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.mjs +2 -2
  93. package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.js +1 -1
  94. package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.mjs +2 -2
  95. package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.js +1 -1
  96. package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.mjs +2 -2
  97. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-pro.jpg.js +1 -1
  98. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-pro.jpg.mjs +2 -2
  99. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader.jpg.js +1 -1
  100. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader.jpg.mjs +2 -2
  101. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.js +1 -1
  102. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.mjs +2 -2
  103. package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.js +1 -1
  104. package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.mjs +2 -2
  105. package/lib/constants/modelCompareData/assets/floodlight.svg.js +1 -1
  106. package/lib/constants/modelCompareData/assets/floodlight.svg.mjs +2 -2
  107. package/lib/constants/modelCompareData/assets/globe.svg.js +1 -1
  108. package/lib/constants/modelCompareData/assets/globe.svg.mjs +2 -2
  109. package/lib/constants/modelCompareData/assets/interior-design.svg.js +1 -1
  110. package/lib/constants/modelCompareData/assets/interior-design.svg.mjs +2 -2
  111. package/lib/constants/modelCompareData/assets/power.svg.js +1 -1
  112. package/lib/constants/modelCompareData/assets/power.svg.mjs +2 -2
  113. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.js +1 -1
  114. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.mjs +2 -2
  115. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.js +1 -1
  116. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.mjs +2 -2
  117. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.js +1 -1
  118. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.mjs +2 -2
  119. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.js +1 -1
  120. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.mjs +2 -2
  121. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.js +1 -1
  122. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.mjs +2 -2
  123. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-pro.jpg.js +1 -1
  124. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-pro.jpg.mjs +2 -2
  125. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader.jpg.js +1 -1
  126. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader.jpg.mjs +2 -2
  127. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.js +1 -1
  128. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.mjs +2 -2
  129. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g4-ptz.jpg.js +1 -1
  130. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g4-ptz.jpg.mjs +2 -2
  131. package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.js +1 -1
  132. package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.mjs +2 -2
  133. package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.js +1 -1
  134. package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.mjs +2 -2
  135. package/lib/constants/modelCompareData/assets/ptz.svg.js +1 -1
  136. package/lib/constants/modelCompareData/assets/ptz.svg.mjs +2 -2
  137. package/lib/constants/modelCompareData/assets/rack.svg.js +1 -1
  138. package/lib/constants/modelCompareData/assets/rack.svg.mjs +2 -2
  139. package/lib/constants/modelCompareData/data/DreamMachineConsolev4.js +3 -3
  140. package/lib/constants/modelCompareData/data/DreamMachineConsolev4.mjs +2 -2
  141. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.js +1 -1
  142. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.mjs +1 -1
  143. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Ptz.js +1 -1
  144. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Ptz.mjs +1 -1
  145. package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.js +1 -1
  146. package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.mjs +1 -1
  147. package/lib/constants/modelCompareData/data/product-list-groups/ptz.js +1 -1
  148. package/lib/constants/modelCompareData/data/product-list-groups/ptz.mjs +1 -1
  149. package/lib/constants/modelCompareData/data/products/ai360.js +2 -2
  150. package/lib/constants/modelCompareData/data/products/ai360.mjs +2 -2
  151. package/lib/constants/modelCompareData/data/products/aiLpr.js +2 -2
  152. package/lib/constants/modelCompareData/data/products/aiLpr.mjs +2 -2
  153. package/lib/constants/modelCompareData/data/products/doorHubMini.js +2 -2
  154. package/lib/constants/modelCompareData/data/products/doorHubMini.mjs +2 -2
  155. package/lib/constants/modelCompareData/data/products/express.js +1 -1
  156. package/lib/constants/modelCompareData/data/products/express.mjs +1 -1
  157. package/lib/constants/modelCompareData/data/products/g2ReaderPro.js +2 -2
  158. package/lib/constants/modelCompareData/data/products/g2ReaderPro.mjs +2 -2
  159. package/lib/constants/modelCompareData/data/products/g3Reader.js +2 -2
  160. package/lib/constants/modelCompareData/data/products/g3Reader.mjs +2 -2
  161. package/lib/constants/modelCompareData/data/products/g3ReaderPro.js +2 -2
  162. package/lib/constants/modelCompareData/data/products/g3ReaderPro.mjs +2 -2
  163. package/lib/constants/modelCompareData/data/products/g3StarterKitPro.js +2 -2
  164. package/lib/constants/modelCompareData/data/products/g3StarterKitPro.mjs +2 -2
  165. package/lib/constants/modelCompareData/data/products/g4Ptz.js +2 -2
  166. package/lib/constants/modelCompareData/data/products/g4Ptz.mjs +2 -2
  167. package/lib/constants/modelCompareData/data/products/g5Bullet.js +2 -2
  168. package/lib/constants/modelCompareData/data/products/g5Bullet.mjs +2 -2
  169. package/lib/constants/modelCompareData/data/properties/accessPowerMethod.js +1 -1
  170. package/lib/constants/modelCompareData/data/properties/accessPowerMethod.mjs +1 -1
  171. package/lib/constants/modelCompareData/data/properties/availability.js +1 -1
  172. package/lib/constants/modelCompareData/data/properties/availability.mjs +1 -1
  173. package/lib/constants/modelCompareData/data/properties/builtInFloodlight.js +1 -1
  174. package/lib/constants/modelCompareData/data/properties/builtInFloodlight.mjs +1 -1
  175. package/lib/constants/modelCompareData/data/properties/dcPowerOutput.js +1 -1
  176. package/lib/constants/modelCompareData/data/properties/dcPowerOutput.mjs +1 -1
  177. package/lib/constants/modelCompareData/data/properties/mounting.js +1 -1
  178. package/lib/constants/modelCompareData/data/properties/mounting.mjs +1 -1
  179. package/lib/constants/modelCompareData/data/properties/webMode.js +1 -1
  180. package/lib/constants/modelCompareData/data/properties/webMode.mjs +1 -1
  181. package/lib/contexts/MenuContext/mapping.js +3 -3
  182. package/lib/contexts/MenuContext/mapping.mjs +2 -2
  183. package/lib/contexts/MicrositeMenuContext/mapping.js +3 -3
  184. package/lib/contexts/MicrositeMenuContext/mapping.mjs +2 -2
  185. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderContent.styles.js","sources":["../../../../../src/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.tsx"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../../constants/layout\";\nimport { theme } from \"../../../../constants/theme\";\nimport { ModalId } from \"../../../../contexts/MicrositeMenuContext/types\";\nimport { Container } from \"../../../Container\";\nimport { MenuButtonWrap } from \"../../../Header/MenuItem/MenuItem.styles\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { withCssTransition } from \"../DropdownMenu/DropdownMenu.styles\";\nimport { HeaderMotif } from \"./HeaderContent.types\";\n\nconst FIRST_LEVEL_MENU_HEIGHT = 48;\nexport const ANIMATION_TRANSITION = 0.3;\n\nconst addOpacity = keyframes`\n 0%{\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\nconst removeOverflowHidden = keyframes`\n100% {\n overflow: unset;\n }\n`;\nconst removeZeroHeight = keyframes`\n 100% {\n max-height: 100%;\n }\n`;\nexport const Content = styled.div`\n position: absolute;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n`;\n\nexport const ContentContainer = styled.div<{ $isCollapsed: boolean }>`\n transition: grid-template-rows ${ANIMATION_TRANSITION}s;\n display: grid;\n grid-template-rows: 1fr;\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n background-color: ${theme.colors.white};\n width: 100%;\n padding: 0;\n max-width: 100%;\n\n ${({ $isCollapsed }) =>\n $isCollapsed &&\n css`\n grid-template-rows: 0fr;\n opacity: 0;\n\n ${Content} {\n overflow: hidden;\n max-height: 0;\n }\n `}\n\n ${({ $isCollapsed }) =>\n !$isCollapsed &&\n css`\n ${Content} {\n overflow: hidden;\n animation:\n ${ANIMATION_TRANSITION}s ${removeOverflowHidden} linear forwards,\n ${ANIMATION_TRANSITION}s ${addOpacity} ease-in-out forwards,\n ${ANIMATION_TRANSITION}s ${removeZeroHeight} ease-in-out forwards;\n }\n `}\n`;\n\nexport const StyledContainer = styled.header`\n width: 100%;\n position: absolute;\n padding-bottom: 48px;\n top: env(safe-area-inset-top);\n`;\n\nexport const Wrap = styled.nav<{\n $isLastMenu: boolean;\n $hasWhiteBackground: boolean;\n $transitionFade: boolean;\n $isActive?: boolean;\n $shouldAnimateBackground?: boolean;\n}>`\n ${({ $shouldAnimateBackground }) =>\n $shouldAnimateBackground && withCssTransition([\"background\"])}\n\n align-items: center;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n display: flex;\n justify-content: center;\n position: fixed;\n padding: 0 16px;\n top: env(safe-area-inset-top);\n width: 100%;\n\n ${({ $hasWhiteBackground }) =>\n $hasWhiteBackground &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n background-color: ${theme.colors.white} !important;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n ${({ $isActive }) =>\n $isActive &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n `}\n }\n`;\n\nexport const LeftWrap = styled.div`\n align-items: center;\n display: flex;\n gap: 5px;\n height: 100%;\n`;\n\nexport const LogoAnchor = styled.a<{ $motif: HeaderMotif }>`\n -webkit-tap-highlight-color: transparent;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.menu.active[\"light\"]};\n ${withCssTransition([\"color\"])};\n }\n }\n\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText ? theme.colors.white : theme.colors.black};\n outline: none;\n\n &:active,\n &:focus {\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText\n ? theme.colors.white\n : theme.colors.black};\n }\n\n @media (hover: none) {\n &:focus,\n &:active {\n box-shadow: none;\n background: inherit;\n color: ${theme.colors.black};\n }\n }\n\n margin-right: 35px;\n height: 100%;\n display: flex;\n align-items: center;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n transform: translateX(100%);\n margin-right: 0;\n }\n`;\n\nexport const ItemsWrap = styled.nav`\n display: flex;\n align-items: center;\n gap: 2px;\n height: 100%;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ItemLabel = styled.span<{\n $active: boolean;\n $isStartItem?: boolean;\n $isHovered?: boolean;\n $motif: HeaderMotif;\n $menuIsClosed: boolean;\n}>`\n display: flex;\n align-items: center;\n gap: 7.5px;\n color: ${theme.colors.white};\n border-radius: 6px;\n padding: 7px 10px;\n\n ${withCssTransition([\"color\", \"background\"])};\n\n @media (hover: hover) {\n &:hover {\n background: rgb(244 245 246 / 0.2);\n color: ${theme.colors.white};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $active, $motif }) =>\n $active &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.primaryBlue\n : theme.colors.white};\n background: ${$motif === HeaderMotif.DarkText\n ? \"#f4f5f6\"\n : \"rgba(244, 245, 246, 0.2)\"};\n `}\n\n ${({ $isStartItem }) =>\n $isStartItem &&\n css`\n background: transparent !important;\n padding: 7px 0;\n `}\n\n ${({ $isHovered }) =>\n $isHovered &&\n css`\n background: transparent !important;\n color: ${theme.colors.primaryBlue};\n `}\n\n ${({ $menuIsClosed, $motif }) =>\n $menuIsClosed &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.black\n : theme.colors.white};\n `}\n`;\n\nexport const ArrowDownIcon = styled(StyleableSvgImage)<{ $isOpen?: boolean }>`\n margin-right: 6px;\n transition: transform 0.2s linear;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n transform: rotate(180deg);\n `}\n`;\n\nexport const Item = styled.button`\n font-size: 14px;\n text-align: center;\n height: 100%;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${ItemLabel} {\n &:focus {\n color: ${theme.colors.primaryBlue};\n }\n }\n`;\n\nexport const RightWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 10.5px;\n`;\n\nexport const ActionIcon = styled.div<{ $motif: HeaderMotif }>`\n cursor: pointer;\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n .header-icon {\n width: 21px;\n height: 25px;\n }\n }\n`;\n\nexport const RightItem = styled.a<{\n $active?: boolean;\n $motif: HeaderMotif;\n $withMarginRight?: boolean;\n}>`\n font-size: 14px;\n text-align: center;\n height: 100%;\n\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n @media (hover: hover) {\n :hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n `}\n\n ${({ $withMarginRight }) =>\n $withMarginRight &&\n css`\n margin-right: 4px;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ModalWrap = styled(Container)`\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n /* replace with theme of motif? */\n background-color: white;\n`;\n\nexport const ModalMenuWrap = styled(Container)<{ $activeModal?: boolean }>`\n padding: 0 0 24px;\n max-width: 100%;\n margin: 24px auto;\n`;\n\nexport const OverflowWrapper = styled.div`\n flex: 1;\n overflow-y: auto;\n padding: 16px 16px 48px;\n background-color: ${theme.colors.white};\n /* Safari view height changes depending on user interaction and url bar */\n height: calc(var(--vh, 1vh) * 100);\n &::-webkit-scrollbar {\n /* @TODO should hide scrollbar? test outside of storybook */\n display: none;\n }\n`;\n\nexport const ModalMenuInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n top: 24px;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.MobileMenu &&\n css`\n margin: 0 auto;\n `\n );\n }}\n`;\n\nexport const ModalInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n position: absolute;\n top: 34px;\n z-index: ${theme.zIndex.modal};\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.Account &&\n css`\n right: 32px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n right: 10px;\n }\n `\n );\n }}\n`;\n\nexport const Divider = styled.div`\n width: 1px;\n height: 22px;\n background: rgb(0 0 0 / 0.15);\n margin: 0 8px 0 9px;\n`;\n\nexport const InnerWrap = styled.div<{ $motif: HeaderMotif }>`\n align-items: center;\n display: flex;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n justify-content: space-between;\n max-width: 1200px;\n width: 100vw;\n\n ${ItemLabel}, ${LogoAnchor}, ${ActionIcon}, ${RightItem}, ${MenuButtonWrap}, ${Divider} {\n z-index: ${theme.zIndex.header} !important;\n }\n\n .hamburger-icon {\n ${withCssTransition([\"color\"])};\n color: ${theme.colors.white};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n }\n`;\n\nexport const TransparentButton = styled.button<{\n $shouldHideOnDesktop?: boolean;\n}>`\n background: transparent;\n outline: none;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n height: 100%;\n\n ${({ $shouldHideOnDesktop }) =>\n $shouldHideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n"],"names":["FIRST_LEVEL_MENU_HEIGHT","ANIMATION_TRANSITION","addOpacity","keyframes","removeOverflowHidden","removeZeroHeight","Content","styled","div","theme","zIndex","modal","ContentContainer","header","colors","white","$isCollapsed","css","StyledContainer","Wrap","nav","$shouldAnimateBackground","withCssTransition","$hasWhiteBackground","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","$isActive","LeftWrap","LogoAnchor","a","menu","active","$motif","HeaderMotif","LightText","black","ItemsWrap","ItemLabel","span","DarkText","primaryBlue","$active","$isStartItem","$isHovered","$menuIsClosed","ArrowDownIcon","StyleableSvgImage","$isOpen","Item","button","RightWrap","ActionIcon","RightItem","$withMarginRight","ModalWrap","Container","ModalMenuWrap","OverflowWrapper","ModalMenuInnerWrap","$modal","ModalId","MobileMenu","ModalInnerWrap","Account","Divider","InnerWrap","MenuButtonWrap","TransparentButton","$shouldHideOnDesktop","TOP_NAV_MOBILE_UP"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,MAAMA,uBAA0B,GAAA,EAAA;AACzB,MAAMC,oBAAuB,GAAA,GAAA;AAEpC,MAAMC,UAAa,GAAAC,MAAA,CAAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAWnB,MAAMC,oBAAuB,GAAAD,MAAA,CAAAA,SAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAK7B,MAAME,gBAAmB,GAAAF,MAAA,CAAAA,SAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAKlB,MAAMG,UAAUC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA,aAEjBC,KAAA,CAAAA,KAAA,CAAMC,OAAOC,KAAK;AAAA;AAAA,CAAA;AAIxB,MAAMC,mBAAmBL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;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A;AAAA,OAAA;AAKlD,CAAC;AAAA,CAAA;AAGI,MAAMuC,UAAUzD,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOvB,MAAMyD,YAAY1D,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,YAGpBR,uBAAuB;AAAA;AAAA;AAAA;;AAAA,IAK/BqC,SAAS,KAAKT,UAAU,KAAKuB,UAAU,KAAKC,SAAS,KAAKc,8BAAc,KAAKF,OAAO;AAAA,eACzEvD,KAAA,CAAAA,KAAA,CAAMC,OAAOG,MAAM;AAAA;;AAAA;AAAA,MAI5BS,mBAAkB,CAAAA,iBAAA,CAAA,CAAC,OAAO,CAAC,CAAC;AAAA,aACrBb,KAAA,CAAAA,KAAA,CAAMK,OAAOC,KAAK;;AAAA,MAEzB,CAAC;EAAEiB;AACH,CAAA,KAAAA,MAAA,KAAWC,gCAAYM,QACvB,IAAAtB,MAAA,CAAAA,GAAA;AAAA;AAAA,OAEC;AAAA;AAAA,CAAA;AAIA,MAAMkD,oBAAoB5D,eAAO,CAAA,SAAA,CAAA,CAAA0C,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA,IAapC,CAAC;EAAEmB;CAAqB,KACxBA,oBACA,IAAAnD,MAAA,CAAAA,GAAA;AAAA,eACWO,MAAAA,CAAAA,YAAY6C,iBAAiB;AAAA;AAAA;AAAA,KAGvC;AAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"HeaderContent.styles.js","sources":["../../../../../src/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.tsx"],"sourcesContent":["import styled, { createGlobalStyle, css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../../constants/layout\";\nimport { theme } from \"../../../../constants/theme\";\nimport { ModalId } from \"../../../../contexts/MicrositeMenuContext/types\";\nimport { Container } from \"../../../Container\";\nimport { MenuButtonWrap } from \"../../../Header/MenuItem/MenuItem.styles\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { withCssTransition } from \"../DropdownMenu/DropdownMenu.styles\";\nimport { HeaderMotif } from \"./HeaderContent.types\";\n\nconst FIRST_LEVEL_MENU_HEIGHT = 48;\nexport const ANIMATION_TRANSITION = 0.3;\n\nconst addOpacity = keyframes`\n 0%{\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\n\nconst removeOverflowHidden = keyframes`\n100% {\n overflow: unset;\n }\n`;\n\nconst removeZeroHeight = keyframes`\n 100% {\n max-height: 100%;\n }\n`;\n\nexport const StableGutterGlobalStyles = createGlobalStyle`\n html {\n scrollbar-gutter: stable;\n }\n`;\n\nexport const Content = styled.div`\n position: absolute;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n`;\n\nexport const ContentContainer = styled.div<{ $isCollapsed: boolean }>`\n transition: grid-template-rows ${ANIMATION_TRANSITION}s;\n display: grid;\n grid-template-rows: 1fr;\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n background-color: ${theme.colors.white};\n width: 100%;\n padding: 0;\n max-width: 100%;\n\n ${({ $isCollapsed }) =>\n $isCollapsed &&\n css`\n grid-template-rows: 0fr;\n opacity: 0;\n\n ${Content} {\n overflow: hidden;\n max-height: 0;\n }\n `}\n\n ${({ $isCollapsed }) =>\n !$isCollapsed &&\n css`\n ${Content} {\n overflow: hidden;\n animation:\n ${ANIMATION_TRANSITION}s ${removeOverflowHidden} linear forwards,\n ${ANIMATION_TRANSITION}s ${addOpacity} ease-in-out forwards,\n ${ANIMATION_TRANSITION}s ${removeZeroHeight} ease-in-out forwards;\n }\n `}\n`;\n\nexport const StyledContainer = styled.header`\n width: 100%;\n position: absolute;\n padding-bottom: 48px;\n top: env(safe-area-inset-top);\n`;\n\nexport const Wrap = styled.nav<{\n $isLastMenu: boolean;\n $hasWhiteBackground: boolean;\n $transitionFade: boolean;\n $isActive?: boolean;\n $shouldAnimateBackground?: boolean;\n}>`\n ${({ $shouldAnimateBackground }) =>\n $shouldAnimateBackground && withCssTransition([\"background\"])}\n\n align-items: center;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n display: flex;\n justify-content: center;\n position: fixed;\n padding: 0 16px;\n top: env(safe-area-inset-top);\n width: 100%;\n\n ${({ $hasWhiteBackground }) =>\n $hasWhiteBackground &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n background-color: ${theme.colors.white} !important;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n ${({ $isActive }) =>\n $isActive &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n `}\n }\n`;\n\nexport const LeftWrap = styled.div`\n align-items: center;\n display: flex;\n gap: 5px;\n height: 100%;\n`;\n\nexport const LogoAnchor = styled.a<{ $motif: HeaderMotif }>`\n -webkit-tap-highlight-color: transparent;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.menu.active[\"light\"]};\n ${withCssTransition([\"color\"])};\n }\n }\n\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText ? theme.colors.white : theme.colors.black};\n outline: none;\n\n &:active,\n &:focus {\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText\n ? theme.colors.white\n : theme.colors.black};\n }\n\n @media (hover: none) {\n &:focus,\n &:active {\n box-shadow: none;\n background: inherit;\n color: ${theme.colors.black};\n }\n }\n\n margin-right: 35px;\n height: 100%;\n display: flex;\n align-items: center;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n transform: translateX(100%);\n margin-right: 0;\n }\n`;\n\nexport const ItemsWrap = styled.nav`\n display: flex;\n align-items: center;\n gap: 2px;\n height: 100%;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ItemLabel = styled.span<{\n $active: boolean;\n $isStartItem?: boolean;\n $isHovered?: boolean;\n $motif: HeaderMotif;\n $menuIsClosed: boolean;\n}>`\n display: flex;\n align-items: center;\n gap: 7.5px;\n color: ${theme.colors.white};\n border-radius: 6px;\n padding: 7px 10px;\n\n ${withCssTransition([\"color\", \"background\"])};\n\n @media (hover: hover) {\n &:hover {\n background: rgb(244 245 246 / 0.2);\n color: ${theme.colors.white};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $active, $motif }) =>\n $active &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.primaryBlue\n : theme.colors.white};\n background: ${$motif === HeaderMotif.DarkText\n ? \"#f4f5f6\"\n : \"rgba(244, 245, 246, 0.2)\"};\n `}\n\n ${({ $isStartItem }) =>\n $isStartItem &&\n css`\n background: transparent !important;\n padding: 7px 0;\n `}\n\n ${({ $isHovered }) =>\n $isHovered &&\n css`\n background: transparent !important;\n color: ${theme.colors.primaryBlue};\n `}\n\n ${({ $menuIsClosed, $motif }) =>\n $menuIsClosed &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.black\n : theme.colors.white};\n `}\n`;\n\nexport const ArrowDownIcon = styled(StyleableSvgImage)<{ $isOpen?: boolean }>`\n margin-right: 6px;\n transition: transform 0.2s linear;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n transform: rotate(180deg);\n `}\n`;\n\nexport const Item = styled.button`\n font-size: 14px;\n text-align: center;\n height: 100%;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${ItemLabel} {\n &:focus {\n color: ${theme.colors.primaryBlue};\n }\n }\n`;\n\nexport const RightWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 10.5px;\n`;\n\nexport const ActionIcon = styled.div<{ $motif: HeaderMotif }>`\n cursor: pointer;\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n .header-icon {\n width: 21px;\n height: 25px;\n }\n }\n`;\n\nexport const RightItem = styled.a<{\n $active?: boolean;\n $motif: HeaderMotif;\n $withMarginRight?: boolean;\n}>`\n font-size: 14px;\n text-align: center;\n height: 100%;\n\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n @media (hover: hover) {\n :hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n `}\n\n ${({ $withMarginRight }) =>\n $withMarginRight &&\n css`\n margin-right: 4px;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ModalWrap = styled(Container)`\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n /* replace with theme of motif? */\n background-color: white;\n`;\n\nexport const ModalMenuWrap = styled(Container)<{ $activeModal?: boolean }>`\n padding: 0 0 24px;\n max-width: 100%;\n margin: 24px auto;\n`;\n\nexport const OverflowWrapper = styled.div`\n flex: 1;\n overflow-y: auto;\n padding: 16px 16px 48px;\n background-color: ${theme.colors.white};\n /* Safari view height changes depending on user interaction and url bar */\n height: calc(var(--vh, 1vh) * 100);\n &::-webkit-scrollbar {\n /* @TODO should hide scrollbar? test outside of storybook */\n display: none;\n }\n`;\n\nexport const ModalMenuInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n top: 24px;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.MobileMenu &&\n css`\n margin: 0 auto;\n `\n );\n }}\n`;\n\nexport const ModalInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n position: absolute;\n top: 34px;\n z-index: ${theme.zIndex.modal};\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.Account &&\n css`\n right: 32px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n right: 10px;\n }\n `\n );\n }}\n`;\n\nexport const Divider = styled.div`\n width: 1px;\n height: 22px;\n background: rgb(0 0 0 / 0.15);\n margin: 0 8px 0 9px;\n`;\n\nexport const InnerWrap = styled.div<{ $motif: HeaderMotif }>`\n align-items: center;\n display: flex;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n justify-content: space-between;\n max-width: 1200px;\n width: 100vw;\n\n ${ItemLabel}, ${LogoAnchor}, ${ActionIcon}, ${RightItem}, ${MenuButtonWrap}, ${Divider} {\n z-index: ${theme.zIndex.header} !important;\n }\n\n .hamburger-icon {\n ${withCssTransition([\"color\"])};\n color: ${theme.colors.white};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n }\n`;\n\nexport const TransparentButton = styled.button<{\n $shouldHideOnDesktop?: boolean;\n}>`\n background: transparent;\n outline: none;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n height: 100%;\n\n ${({ $shouldHideOnDesktop }) =>\n $shouldHideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n"],"names":["FIRST_LEVEL_MENU_HEIGHT","ANIMATION_TRANSITION","addOpacity","keyframes","removeOverflowHidden","removeZeroHeight","StableGutterGlobalStyles","createGlobalStyle","Content","styled","div","theme","zIndex","modal","ContentContainer","header","colors","white","$isCollapsed","css","StyledContainer","Wrap","nav","$shouldAnimateBackground","withCssTransition","$hasWhiteBackground","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","$isActive","LeftWrap","LogoAnchor","a","menu","active","$motif","HeaderMotif","LightText","black","ItemsWrap","ItemLabel","span","DarkText","primaryBlue","$active","$isStartItem","$isHovered","$menuIsClosed","ArrowDownIcon","StyleableSvgImage","$isOpen","Item","button","RightWrap","ActionIcon","RightItem","$withMarginRight","ModalWrap","Container","ModalMenuWrap","OverflowWrapper","ModalMenuInnerWrap","$modal","ModalId","MobileMenu","ModalInnerWrap","Account","Divider","InnerWrap","MenuButtonWrap","TransparentButton","$shouldHideOnDesktop","TOP_NAV_MOBILE_UP"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,MAAMA,uBAA0B,GAAA,EAAA;AACzB,MAAMC,oBAAuB,GAAA,GAAA;AAEpC,MAAMC,UAAa,GAAAC,MAAA,CAAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAYnB,MAAMC,oBAAuB,GAAAD,MAAA,CAAAA,SAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM7B,MAAME,gBAAmB,GAAAF,MAAA,CAAAA,SAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMlB,MAAMG,wBAA2B,GAAAC,MAAA,CAAAA,iBAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMjC,MAAMC,UAAUC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA,aAEjBC,KAAA,CAAAA,KAAA,CAAMC,OAAOC,KAAK;AAAA;AAAA,CAAA;AAIxB,MAAMC,mBAAmBL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA,mCACJT,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAM1CU,WAAA,CAAMC,MAAO,CAAAG,MAAA,GAAS,CAAC;AAAA,sBACdJ,KAAA,CAAAA,KAAA,CAAMK,OAAOC,KAAK;AAAA;AAAA;AAAA;;AAAA,IAKpC,CAAC;EAAEC;C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A,YAGpBV,uBAAuB;AAAA;AAAA;AAAA;;AAAA,IAK/BuC,SAAS,KAAKT,UAAU,KAAKuB,UAAU,KAAKC,SAAS,KAAKc,8BAAc,KAAKF,OAAO;AAAA,eACzEvD,KAAA,CAAAA,KAAA,CAAMC,OAAOG,MAAM;AAAA;;AAAA;AAAA,MAI5BS,mBAAkB,CAAAA,iBAAA,CAAA,CAAC,OAAO,CAAC,CAAC;AAAA,aACrBb,KAAA,CAAAA,KAAA,CAAMK,OAAOC,KAAK;;AAAA,MAEzB,CAAC;EAAEiB;AACH,CAAA,KAAAA,MAAA,KAAWC,gCAAYM,QACvB,IAAAtB,MAAA,CAAAA,GAAA;AAAA;AAAA,OAEC;AAAA;AAAA,CAAA;AAIA,MAAMkD,oBAAoB5D,eAAO,CAAA,SAAA,CAAA,CAAA0C,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA,IAapC,CAAC;EAAEmB;CAAqB,KACxBA,oBACA,IAAAnD,MAAA,CAAAA,GAAA;AAAA,eACWO,MAAAA,CAAAA,YAAY6C,iBAAiB;AAAA;AAAA;AAAA,KAGvC;AAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import styled, { keyframes, css } from 'styled-components';
1
+ import styled, { keyframes, createGlobalStyle, css } from 'styled-components';
2
2
  import { BREAKPOINTS } from '../../../../constants/layout.mjs';
3
3
  import { theme } from '../../../../constants/theme.mjs';
4
4
  import { ModalId } from '../../../../contexts/MicrositeMenuContext/types.mjs';
@@ -33,6 +33,11 @@ const removeZeroHeight = keyframes`
33
33
  max-height: 100%;
34
34
  }
35
35
  `;
36
+ const StableGutterGlobalStyles = createGlobalStyle`
37
+ html {
38
+ scrollbar-gutter: stable;
39
+ }
40
+ `;
36
41
  const Content = styled.div`
37
42
  position: absolute;
38
43
  z-index: ${theme.zIndex.modal};
@@ -424,5 +429,5 @@ const TransparentButton = styled.button`
424
429
  }
425
430
  `}
426
431
  `;
427
- export { ANIMATION_TRANSITION, ActionIcon, ArrowDownIcon, Content, ContentContainer, Divider, InnerWrap, Item, ItemLabel, ItemsWrap, LeftWrap, LogoAnchor, ModalInnerWrap, ModalMenuInnerWrap, ModalMenuWrap, ModalWrap, OverflowWrapper, RightItem, RightWrap, StyledContainer, TransparentButton, Wrap };
432
+ export { ANIMATION_TRANSITION, ActionIcon, ArrowDownIcon, Content, ContentContainer, Divider, InnerWrap, Item, ItemLabel, ItemsWrap, LeftWrap, LogoAnchor, ModalInnerWrap, ModalMenuInnerWrap, ModalMenuWrap, ModalWrap, OverflowWrapper, RightItem, RightWrap, StableGutterGlobalStyles, StyledContainer, TransparentButton, Wrap };
428
433
  //# sourceMappingURL=HeaderContent.styles.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderContent.styles.mjs","sources":["../../../../../src/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.tsx"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../../constants/layout\";\nimport { theme } from \"../../../../constants/theme\";\nimport { ModalId } from \"../../../../contexts/MicrositeMenuContext/types\";\nimport { Container } from \"../../../Container\";\nimport { MenuButtonWrap } from \"../../../Header/MenuItem/MenuItem.styles\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { withCssTransition } from \"../DropdownMenu/DropdownMenu.styles\";\nimport { HeaderMotif } from \"./HeaderContent.types\";\n\nconst FIRST_LEVEL_MENU_HEIGHT = 48;\nexport const ANIMATION_TRANSITION = 0.3;\n\nconst addOpacity = keyframes`\n 0%{\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\nconst removeOverflowHidden = keyframes`\n100% {\n overflow: unset;\n }\n`;\nconst removeZeroHeight = keyframes`\n 100% {\n max-height: 100%;\n }\n`;\nexport const Content = styled.div`\n position: absolute;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n`;\n\nexport const ContentContainer = styled.div<{ $isCollapsed: boolean }>`\n transition: grid-template-rows ${ANIMATION_TRANSITION}s;\n display: grid;\n grid-template-rows: 1fr;\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n background-color: ${theme.colors.white};\n width: 100%;\n padding: 0;\n max-width: 100%;\n\n ${({ $isCollapsed }) =>\n $isCollapsed &&\n css`\n grid-template-rows: 0fr;\n opacity: 0;\n\n ${Content} {\n overflow: hidden;\n max-height: 0;\n }\n `}\n\n ${({ $isCollapsed }) =>\n !$isCollapsed &&\n css`\n ${Content} {\n overflow: hidden;\n animation:\n ${ANIMATION_TRANSITION}s ${removeOverflowHidden} linear forwards,\n ${ANIMATION_TRANSITION}s ${addOpacity} ease-in-out forwards,\n ${ANIMATION_TRANSITION}s ${removeZeroHeight} ease-in-out forwards;\n }\n `}\n`;\n\nexport const StyledContainer = styled.header`\n width: 100%;\n position: absolute;\n padding-bottom: 48px;\n top: env(safe-area-inset-top);\n`;\n\nexport const Wrap = styled.nav<{\n $isLastMenu: boolean;\n $hasWhiteBackground: boolean;\n $transitionFade: boolean;\n $isActive?: boolean;\n $shouldAnimateBackground?: boolean;\n}>`\n ${({ $shouldAnimateBackground }) =>\n $shouldAnimateBackground && withCssTransition([\"background\"])}\n\n align-items: center;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n display: flex;\n justify-content: center;\n position: fixed;\n padding: 0 16px;\n top: env(safe-area-inset-top);\n width: 100%;\n\n ${({ $hasWhiteBackground }) =>\n $hasWhiteBackground &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n background-color: ${theme.colors.white} !important;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n ${({ $isActive }) =>\n $isActive &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n `}\n }\n`;\n\nexport const LeftWrap = styled.div`\n align-items: center;\n display: flex;\n gap: 5px;\n height: 100%;\n`;\n\nexport const LogoAnchor = styled.a<{ $motif: HeaderMotif }>`\n -webkit-tap-highlight-color: transparent;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.menu.active[\"light\"]};\n ${withCssTransition([\"color\"])};\n }\n }\n\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText ? theme.colors.white : theme.colors.black};\n outline: none;\n\n &:active,\n &:focus {\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText\n ? theme.colors.white\n : theme.colors.black};\n }\n\n @media (hover: none) {\n &:focus,\n &:active {\n box-shadow: none;\n background: inherit;\n color: ${theme.colors.black};\n }\n }\n\n margin-right: 35px;\n height: 100%;\n display: flex;\n align-items: center;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n transform: translateX(100%);\n margin-right: 0;\n }\n`;\n\nexport const ItemsWrap = styled.nav`\n display: flex;\n align-items: center;\n gap: 2px;\n height: 100%;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ItemLabel = styled.span<{\n $active: boolean;\n $isStartItem?: boolean;\n $isHovered?: boolean;\n $motif: HeaderMotif;\n $menuIsClosed: boolean;\n}>`\n display: flex;\n align-items: center;\n gap: 7.5px;\n color: ${theme.colors.white};\n border-radius: 6px;\n padding: 7px 10px;\n\n ${withCssTransition([\"color\", \"background\"])};\n\n @media (hover: hover) {\n &:hover {\n background: rgb(244 245 246 / 0.2);\n color: ${theme.colors.white};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $active, $motif }) =>\n $active &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.primaryBlue\n : theme.colors.white};\n background: ${$motif === HeaderMotif.DarkText\n ? \"#f4f5f6\"\n : \"rgba(244, 245, 246, 0.2)\"};\n `}\n\n ${({ $isStartItem }) =>\n $isStartItem &&\n css`\n background: transparent !important;\n padding: 7px 0;\n `}\n\n ${({ $isHovered }) =>\n $isHovered &&\n css`\n background: transparent !important;\n color: ${theme.colors.primaryBlue};\n `}\n\n ${({ $menuIsClosed, $motif }) =>\n $menuIsClosed &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.black\n : theme.colors.white};\n `}\n`;\n\nexport const ArrowDownIcon = styled(StyleableSvgImage)<{ $isOpen?: boolean }>`\n margin-right: 6px;\n transition: transform 0.2s linear;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n transform: rotate(180deg);\n `}\n`;\n\nexport const Item = styled.button`\n font-size: 14px;\n text-align: center;\n height: 100%;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${ItemLabel} {\n &:focus {\n color: ${theme.colors.primaryBlue};\n }\n }\n`;\n\nexport const RightWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 10.5px;\n`;\n\nexport const ActionIcon = styled.div<{ $motif: HeaderMotif }>`\n cursor: pointer;\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n .header-icon {\n width: 21px;\n height: 25px;\n }\n }\n`;\n\nexport const RightItem = styled.a<{\n $active?: boolean;\n $motif: HeaderMotif;\n $withMarginRight?: boolean;\n}>`\n font-size: 14px;\n text-align: center;\n height: 100%;\n\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n @media (hover: hover) {\n :hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n `}\n\n ${({ $withMarginRight }) =>\n $withMarginRight &&\n css`\n margin-right: 4px;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ModalWrap = styled(Container)`\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n /* replace with theme of motif? */\n background-color: white;\n`;\n\nexport const ModalMenuWrap = styled(Container)<{ $activeModal?: boolean }>`\n padding: 0 0 24px;\n max-width: 100%;\n margin: 24px auto;\n`;\n\nexport const OverflowWrapper = styled.div`\n flex: 1;\n overflow-y: auto;\n padding: 16px 16px 48px;\n background-color: ${theme.colors.white};\n /* Safari view height changes depending on user interaction and url bar */\n height: calc(var(--vh, 1vh) * 100);\n &::-webkit-scrollbar {\n /* @TODO should hide scrollbar? test outside of storybook */\n display: none;\n }\n`;\n\nexport const ModalMenuInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n top: 24px;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.MobileMenu &&\n css`\n margin: 0 auto;\n `\n );\n }}\n`;\n\nexport const ModalInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n position: absolute;\n top: 34px;\n z-index: ${theme.zIndex.modal};\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.Account &&\n css`\n right: 32px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n right: 10px;\n }\n `\n );\n }}\n`;\n\nexport const Divider = styled.div`\n width: 1px;\n height: 22px;\n background: rgb(0 0 0 / 0.15);\n margin: 0 8px 0 9px;\n`;\n\nexport const InnerWrap = styled.div<{ $motif: HeaderMotif }>`\n align-items: center;\n display: flex;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n justify-content: space-between;\n max-width: 1200px;\n width: 100vw;\n\n ${ItemLabel}, ${LogoAnchor}, ${ActionIcon}, ${RightItem}, ${MenuButtonWrap}, ${Divider} {\n z-index: ${theme.zIndex.header} !important;\n }\n\n .hamburger-icon {\n ${withCssTransition([\"color\"])};\n color: ${theme.colors.white};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n }\n`;\n\nexport const TransparentButton = styled.button<{\n $shouldHideOnDesktop?: boolean;\n}>`\n background: transparent;\n outline: none;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n height: 100%;\n\n ${({ $shouldHideOnDesktop }) =>\n $shouldHideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n"],"names":["FIRST_LEVEL_MENU_HEIGHT","ANIMATION_TRANSITION","addOpacity","keyframes","removeOverflowHidden","removeZeroHeight","Content","styled","div","theme","zIndex","modal","ContentContainer","header","colors","white","$isCollapsed","css","StyledContainer","Wrap","nav","$shouldAnimateBackground","withCssTransition","$hasWhiteBackground","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","$isActive","LeftWrap","LogoAnchor","a","menu","active","$motif","HeaderMotif","LightText","black","ItemsWrap","ItemLabel","span","DarkText","primaryBlue","$active","$isStartItem","$isHovered","$menuIsClosed","ArrowDownIcon","StyleableSvgImage","$isOpen","Item","button","RightWrap","ActionIcon","RightItem","$withMarginRight","ModalWrap","Container","ModalMenuWrap","OverflowWrapper","ModalMenuInnerWrap","$modal","ModalId","MobileMenu","ModalInnerWrap","Account","Divider","InnerWrap","MenuButtonWrap","TransparentButton","$shouldHideOnDesktop","TOP_NAV_MOBILE_UP"],"mappings":";;;;;;;;;;;;AAWA,MAAMA,uBAA0B,GAAA,EAAA;AACzB,MAAMC,oBAAuB,GAAA,GAAA;AAEpC,MAAMC,UAAa,GAAAC,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAWnB,MAAMC,oBAAuB,GAA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;AAAA,IAapC,CAAC;EAAEmB;CAAqB,KACxBA,oBACA,IAAAnD,GAAA;AAAA,eACWO,YAAY6C,iBAAiB;AAAA;AAAA;AAAA,KAGvC;AAAA,CAAA;"}
1
+ {"version":3,"file":"HeaderContent.styles.mjs","sources":["../../../../../src/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.tsx"],"sourcesContent":["import styled, { createGlobalStyle, css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../../constants/layout\";\nimport { theme } from \"../../../../constants/theme\";\nimport { ModalId } from \"../../../../contexts/MicrositeMenuContext/types\";\nimport { Container } from \"../../../Container\";\nimport { MenuButtonWrap } from \"../../../Header/MenuItem/MenuItem.styles\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { withCssTransition } from \"../DropdownMenu/DropdownMenu.styles\";\nimport { HeaderMotif } from \"./HeaderContent.types\";\n\nconst FIRST_LEVEL_MENU_HEIGHT = 48;\nexport const ANIMATION_TRANSITION = 0.3;\n\nconst addOpacity = keyframes`\n 0%{\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\n\nconst removeOverflowHidden = keyframes`\n100% {\n overflow: unset;\n }\n`;\n\nconst removeZeroHeight = keyframes`\n 100% {\n max-height: 100%;\n }\n`;\n\nexport const StableGutterGlobalStyles = createGlobalStyle`\n html {\n scrollbar-gutter: stable;\n }\n`;\n\nexport const Content = styled.div`\n position: absolute;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n`;\n\nexport const ContentContainer = styled.div<{ $isCollapsed: boolean }>`\n transition: grid-template-rows ${ANIMATION_TRANSITION}s;\n display: grid;\n grid-template-rows: 1fr;\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n background-color: ${theme.colors.white};\n width: 100%;\n padding: 0;\n max-width: 100%;\n\n ${({ $isCollapsed }) =>\n $isCollapsed &&\n css`\n grid-template-rows: 0fr;\n opacity: 0;\n\n ${Content} {\n overflow: hidden;\n max-height: 0;\n }\n `}\n\n ${({ $isCollapsed }) =>\n !$isCollapsed &&\n css`\n ${Content} {\n overflow: hidden;\n animation:\n ${ANIMATION_TRANSITION}s ${removeOverflowHidden} linear forwards,\n ${ANIMATION_TRANSITION}s ${addOpacity} ease-in-out forwards,\n ${ANIMATION_TRANSITION}s ${removeZeroHeight} ease-in-out forwards;\n }\n `}\n`;\n\nexport const StyledContainer = styled.header`\n width: 100%;\n position: absolute;\n padding-bottom: 48px;\n top: env(safe-area-inset-top);\n`;\n\nexport const Wrap = styled.nav<{\n $isLastMenu: boolean;\n $hasWhiteBackground: boolean;\n $transitionFade: boolean;\n $isActive?: boolean;\n $shouldAnimateBackground?: boolean;\n}>`\n ${({ $shouldAnimateBackground }) =>\n $shouldAnimateBackground && withCssTransition([\"background\"])}\n\n align-items: center;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n display: flex;\n justify-content: center;\n position: fixed;\n padding: 0 16px;\n top: env(safe-area-inset-top);\n width: 100%;\n\n ${({ $hasWhiteBackground }) =>\n $hasWhiteBackground &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n background-color: ${theme.colors.white} !important;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n ${({ $isActive }) =>\n $isActive &&\n css`\n box-shadow: 0 -1px 0 0 rgb(0 0 0 / 0.05) inset;\n `}\n }\n`;\n\nexport const LeftWrap = styled.div`\n align-items: center;\n display: flex;\n gap: 5px;\n height: 100%;\n`;\n\nexport const LogoAnchor = styled.a<{ $motif: HeaderMotif }>`\n -webkit-tap-highlight-color: transparent;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.menu.active[\"light\"]};\n ${withCssTransition([\"color\"])};\n }\n }\n\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText ? theme.colors.white : theme.colors.black};\n outline: none;\n\n &:active,\n &:focus {\n color: ${({ $motif }) =>\n $motif === HeaderMotif.LightText\n ? theme.colors.white\n : theme.colors.black};\n }\n\n @media (hover: none) {\n &:focus,\n &:active {\n box-shadow: none;\n background: inherit;\n color: ${theme.colors.black};\n }\n }\n\n margin-right: 35px;\n height: 100%;\n display: flex;\n align-items: center;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n transform: translateX(100%);\n margin-right: 0;\n }\n`;\n\nexport const ItemsWrap = styled.nav`\n display: flex;\n align-items: center;\n gap: 2px;\n height: 100%;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ItemLabel = styled.span<{\n $active: boolean;\n $isStartItem?: boolean;\n $isHovered?: boolean;\n $motif: HeaderMotif;\n $menuIsClosed: boolean;\n}>`\n display: flex;\n align-items: center;\n gap: 7.5px;\n color: ${theme.colors.white};\n border-radius: 6px;\n padding: 7px 10px;\n\n ${withCssTransition([\"color\", \"background\"])};\n\n @media (hover: hover) {\n &:hover {\n background: rgb(244 245 246 / 0.2);\n color: ${theme.colors.white};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $active, $motif }) =>\n $active &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.primaryBlue\n : theme.colors.white};\n background: ${$motif === HeaderMotif.DarkText\n ? \"#f4f5f6\"\n : \"rgba(244, 245, 246, 0.2)\"};\n `}\n\n ${({ $isStartItem }) =>\n $isStartItem &&\n css`\n background: transparent !important;\n padding: 7px 0;\n `}\n\n ${({ $isHovered }) =>\n $isHovered &&\n css`\n background: transparent !important;\n color: ${theme.colors.primaryBlue};\n `}\n\n ${({ $menuIsClosed, $motif }) =>\n $menuIsClosed &&\n css`\n color: ${$motif === HeaderMotif.DarkText\n ? theme.colors.black\n : theme.colors.white};\n `}\n`;\n\nexport const ArrowDownIcon = styled(StyleableSvgImage)<{ $isOpen?: boolean }>`\n margin-right: 6px;\n transition: transform 0.2s linear;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n transform: rotate(180deg);\n `}\n`;\n\nexport const Item = styled.button`\n font-size: 14px;\n text-align: center;\n height: 100%;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n ${ItemLabel} {\n &:focus {\n color: ${theme.colors.primaryBlue};\n }\n }\n`;\n\nexport const RightWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 10.5px;\n`;\n\nexport const ActionIcon = styled.div<{ $motif: HeaderMotif }>`\n cursor: pointer;\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n .header-icon {\n width: 21px;\n height: 25px;\n }\n }\n`;\n\nexport const RightItem = styled.a<{\n $active?: boolean;\n $motif: HeaderMotif;\n $withMarginRight?: boolean;\n}>`\n font-size: 14px;\n text-align: center;\n height: 100%;\n\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: ${theme.colors.white};\n ${withCssTransition([\"color\"])};\n\n @media (hover: hover) {\n :hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n\n @media (hover: hover) {\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n }\n `}\n\n ${({ $withMarginRight }) =>\n $withMarginRight &&\n css`\n margin-right: 4px;\n `}\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ModalWrap = styled(Container)`\n flex: 0;\n margin: 0 auto;\n position: absolute;\n z-index: ${theme.zIndex.header - 1};\n /* replace with theme of motif? */\n background-color: white;\n`;\n\nexport const ModalMenuWrap = styled(Container)<{ $activeModal?: boolean }>`\n padding: 0 0 24px;\n max-width: 100%;\n margin: 24px auto;\n`;\n\nexport const OverflowWrapper = styled.div`\n flex: 1;\n overflow-y: auto;\n padding: 16px 16px 48px;\n background-color: ${theme.colors.white};\n /* Safari view height changes depending on user interaction and url bar */\n height: calc(var(--vh, 1vh) * 100);\n &::-webkit-scrollbar {\n /* @TODO should hide scrollbar? test outside of storybook */\n display: none;\n }\n`;\n\nexport const ModalMenuInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n top: 24px;\n z-index: ${theme.zIndex.modal};\n width: 100%;\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.MobileMenu &&\n css`\n margin: 0 auto;\n `\n );\n }}\n`;\n\nexport const ModalInnerWrap = styled.div<{\n $modal: ModalId;\n}>`\n position: absolute;\n top: 34px;\n z-index: ${theme.zIndex.modal};\n height: 100vh;\n\n ${({ $modal }) => {\n return (\n $modal === ModalId.Account &&\n css`\n right: 32px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n right: 10px;\n }\n `\n );\n }}\n`;\n\nexport const Divider = styled.div`\n width: 1px;\n height: 22px;\n background: rgb(0 0 0 / 0.15);\n margin: 0 8px 0 9px;\n`;\n\nexport const InnerWrap = styled.div<{ $motif: HeaderMotif }>`\n align-items: center;\n display: flex;\n height: ${FIRST_LEVEL_MENU_HEIGHT}px;\n justify-content: space-between;\n max-width: 1200px;\n width: 100vw;\n\n ${ItemLabel}, ${LogoAnchor}, ${ActionIcon}, ${RightItem}, ${MenuButtonWrap}, ${Divider} {\n z-index: ${theme.zIndex.header} !important;\n }\n\n .hamburger-icon {\n ${withCssTransition([\"color\"])};\n color: ${theme.colors.white};\n\n ${({ $motif }) =>\n $motif === HeaderMotif.DarkText &&\n css`\n color: #212327;\n `}\n }\n`;\n\nexport const TransparentButton = styled.button<{\n $shouldHideOnDesktop?: boolean;\n}>`\n background: transparent;\n outline: none;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n height: 100%;\n\n ${({ $shouldHideOnDesktop }) =>\n $shouldHideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n"],"names":["FIRST_LEVEL_MENU_HEIGHT","ANIMATION_TRANSITION","addOpacity","keyframes","removeOverflowHidden","removeZeroHeight","StableGutterGlobalStyles","createGlobalStyle","Content","styled","div","theme","zIndex","modal","ContentContainer","header","colors","white","$isCollapsed","css","StyledContainer","Wrap","nav","$shouldAnimateBackground","withCssTransition","$hasWhiteBackground","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","$isActive","LeftWrap","LogoAnchor","a","menu","active","$motif","HeaderMotif","LightText","black","ItemsWrap","ItemLabel","span","DarkText","primaryBlue","$active","$isStartItem","$isHovered","$menuIsClosed","ArrowDownIcon","StyleableSvgImage","$isOpen","Item","button","RightWrap","ActionIcon","RightItem","$withMarginRight","ModalWrap","Container","ModalMenuWrap","OverflowWrapper","ModalMenuInnerWrap","$modal","ModalId","MobileMenu","ModalInnerWrap","Account","Divider","InnerWrap","MenuButtonWrap","TransparentButton","$shouldHideOnDesktop","TOP_NAV_MOBILE_UP"],"mappings":";;;;;;;;;;;;AAWA,MAAMA,uBAA0B,GAAA,EAAA;AACzB,MAAMC,oBAAuB,GAAA,GAAA;AAEpC,MAAMC,UAAa,GAAAC,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAYnB,MAAMC,oBAAuB,GAAAD,SAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM7B,MAAME,gBAAmB,GAAAF,SAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMlB,MAAMG,wBAA2B,GAAAC,iBAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMjC,MAAMC,UAAUC,MAAO,CAAAC,GAAA;AAAA;AAAA,aAEjBC,KAAA,CAAMC,OA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ideoSlideshow_styles = require('./MicrositeVideoSlideshow.styles.js');
12
12
  var MicrositeSectionWrap = require('../MicrositeSectionWrap/MicrositeSectionWrap.js');
13
13
  var PlayIcon = require("../../assets/play.svg");
14
- var PauseIcon = require("../../assets/pause2.svg");
14
+ var PauseIcon = require("../../assets/pause.svg");
15
15
  var ActiveIconBox = require("../../assets/active-icon-box.svg");
16
16
  function _interopDefault(e) {
17
17
  return e && e.__esModule ? e : {
@@ -9,7 +9,7 @@ import './assets/play.svg.mjs';
9
9
  import { VideoBlock, Video, VideoControls, VideoInnerWrap, ProgressCircle, PlayIcon, PauseIcon, SlideRow, Slide, FeatureIconWrap, FeatureIconActiveBackground, FeatureIcon, FeatureTitle, MicrositeBuyButton } from './MicrositeVideoSlideshow.styles.mjs';
10
10
  import { MicrositeSectionWrap } from '../MicrositeSectionWrap/MicrositeSectionWrap.mjs';
11
11
  import PlayIcon__default from "../../assets/play.svg";
12
- import PauseIcon__default from "../../assets/pause2.svg";
12
+ import PauseIcon__default from "../../assets/pause.svg";
13
13
  import ActiveIconBox__default from "../../assets/active-icon-box.svg";
14
14
  "use strict";
15
15
  const MicrositeVideoSlideshow = ({
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var PauseIcon = require("../../../assets/pause2.svg");
6
+ var PauseIcon = require("../../../assets/pause.svg");
7
7
  function _interopDefault(e) {
8
8
  return e && e.__esModule ? e : {
9
9
  default: e
@@ -1,3 +1,3 @@
1
- export * from "../../../assets/pause2.svg";
2
- export { default } from "../../../assets/pause2.svg";
1
+ export * from "../../../assets/pause.svg";
2
+ export { default } from "../../../assets/pause.svg";
3
3
  //# sourceMappingURL=pause.svg.mjs.map
@@ -72,6 +72,7 @@ const ProductList = ({
72
72
  setIsDragging(false);
73
73
  setEndPosition(containerRef.current?.scrollLeft);
74
74
  document.removeEventListener("mousemove", dragHandler);
75
+ document.removeEventListener("mouseup", mouseUpHandler);
75
76
  }, [dragHandler]);
76
77
  const mouseDownHandler = React.useCallback(event => {
77
78
  if (event.buttons === 1) {
@@ -81,16 +82,29 @@ const ProductList = ({
81
82
  document.addEventListener("mouseup", mouseUpHandler);
82
83
  }
83
84
  }, [dragHandler, mouseUpHandler]);
84
- reactUse.useEffectOnce(() => {
85
+ React.useEffect(() => {
86
+ const container = containerRef.current;
87
+ if (!container) return;
85
88
  let isScrolling;
86
- containerRef.current.addEventListener("scroll", function () {
89
+ const scrollHandler = () => {
87
90
  window.clearTimeout(isScrolling);
88
- isScrolling = setTimeout(function () {
91
+ isScrolling = setTimeout(() => {
89
92
  setPlayAnimation(true);
90
93
  setEndPosition(containerRef.current?.scrollLeft);
91
94
  }, checkForScrollTimeout);
92
- });
93
- });
95
+ };
96
+ container.addEventListener("scroll", scrollHandler);
97
+ return () => {
98
+ container.removeEventListener("scroll", scrollHandler);
99
+ window.clearTimeout(isScrolling);
100
+ };
101
+ }, []);
102
+ React.useEffect(() => {
103
+ return () => {
104
+ document.removeEventListener("mousemove", dragHandler);
105
+ document.removeEventListener("mouseup", mouseUpHandler);
106
+ };
107
+ }, [dragHandler, mouseUpHandler]);
94
108
  const tabClickHandler = React.useCallback(({
95
109
  groupId
96
110
  }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ProductList.js","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = groupProducts(products);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n const checkForScrollTimeout = 150;\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n }\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft as number);\n document.removeEventListener(\"mousemove\", dragHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n useEffectOnce(() => {\n let isScrolling: NodeJS.Timeout;\n (containerRef.current as HTMLDivElement).addEventListener(\n \"scroll\",\n function () {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is track in state after scrolling has completed\n isScrolling = setTimeout(function () {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, checkForScrollTimeout);\n },\n );\n });\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n },\n [containerRef, setPlayAnimation, setActiveGroup, checkForScrollTimeout],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","checkForScrollTimeout","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","setTimeout","currentPosition","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","isScrolling","window","clearTimeout","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;;;AAgBO,MAAMA,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;EACAC,iBAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAAC,aAAA,GAAgBC,4BAAcV,QAAQ,CAAA;EACtC,MAAAW,sBAAA,GAAyBF,cAAcG,MAAS,GAAA,CAAA;EAEhD,MAAAC,YAAA,GAAeC,aAAuB,IAAI,CAAA;EAC1C,MAAAC,cAAA,GAAiBD,aAAuB,IAAI,CAAA;EAElD,MAAM,CAACE,kBAAA,EAAoBC,uBAAuB,CAAA,GAAIC,KAAAA,CAAAA,SAAS,KAAK,CAAA;EACpE,MAAM,CAACC,WAAA,EAAaC,cAAc,CAAA,GAAIF,KAAAA,CAAAA,SAASb,kBAAkB,CAAA;EACjE,MAAM,CAACgB,aAAA,EAAeC,gBAAgB,CAAA,GAAIJ,KAAAA,CAAAA,SAAS,KAAK,CAAA;EAClD,MAAAK,UAAA,GAAaC,uBAAcX,YAAY,CAAA;EAC7C,MAAM,CAACY,UAAA,EAAYC,aAAa,CAAA,GAAIR,KAAAA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A,OAAA,EAAA;cACC3B,SAASA,CAAA,KACPvE,cAAA,CACE2F,QAAQzE,gBAAkB,EAAAC,EAC5B,CAAA;cAGF4E,UAAA;cACAI,aAAajF,gBAAiB,CAAA1B,MAAA;cAC9B2B,IAAIwE,OAAS,EAAAxE,EAAA;cACbuB,OAAA,EAASiD,QAAQzE,gBAAkB,EAAAC,EAAA;cACnCiF,KAAA,EAAOT,QAAQS,KAAS,IAAA;gBAAEC,KAAK,EAAI;gBAAArF,KAAA,EAAO,CAAG;gBAAAsF,MAAA,EAAQ;cAAE,CAAA;cACvDC,MAAMZ,OAAQ,CAAAa,KAAA;cACdC,aAAad,OAAQ,CAAAc,WAAA;cACrB5H,gBAAA;cACAC,mBAAA;cACAI,gBAAA;cACA2G,aAAA;cACA5F,aAAA;cACA+E,mBAAmBjG,eAAmB,IAAAa,kBAAA;cACtCZ,qBAAA;cACAG,iBAAA;cACAuH,iBAAiBd,kBAAuB,KAAA,CAAA;cACxCxG;YAAA,CAAA,EAjBKuG,OAAQ,CAAAxE,EAkBf,CAAA;UAEH,CAAA,CAAA;QAAA,CAAA,CAAA;MAEL,CAAA;IAAA,CAAA,CAAA;GAEJ,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"ProductList.js","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = groupProducts(products);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n const checkForScrollTimeout = 150;\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n }\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft as number);\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n let isScrolling: NodeJS.Timeout;\n\n const scrollHandler = () => {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is track in state after scrolling has completed\n isScrolling = setTimeout(() => {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, checkForScrollTimeout);\n };\n\n container.addEventListener(\"scroll\", scrollHandler);\n\n return () => {\n container.removeEventListener(\"scroll\", scrollHandler);\n window.clearTimeout(isScrolling);\n };\n }, []); // Empty dependency array since we want this to run once\n\n // Add cleanup for drag handlers on unmount\n useEffect(() => {\n return () => {\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n };\n }, [dragHandler, mouseUpHandler]);\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n },\n [containerRef, setPlayAnimation, setActiveGroup, checkForScrollTimeout],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","checkForScrollTimeout","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","setTimeout","currentPosition","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","container","isScrolling","scrollHandler","window","clearTimeout","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;;;AAgBO,MAAMA,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;EACAC,iBAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAAC,aAAA,GAAgBC,4BAAcV,QAAQ,CAAA;EACtC,MAAAW,sBAAA,GAAyBF,cAAcG,MAAS,GAAA,CAAA;EAEhD,MAAAC,YAAA,GAAeC,aAAuB,IAAI,CAAA;EAC1C,MAAAC,cAAA,GAAiBD,aAAuB,IAAI,CAAA;EAElD,MAAM,CAACE,kBAAA,EAAoBC,uBAAuB,CAAA,GAAIC,KAAAA,CAAAA,SAAS,KAAK,CAAA;EACpE,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A;cACrB9H,gBAAA;cACAC,mBAAA;cACAI,gBAAA;cACA6G,aAAA;cACA9F,aAAA;cACAiF,mBAAmBnG,eAAmB,IAAAa,kBAAA;cACtCZ,qBAAA;cACAG,iBAAA;cACAyH,iBAAiBd,kBAAuB,KAAA,CAAA;cACxC1G;YAAA,CAAA,EAjBKyG,OAAQ,CAAA1E,EAkBf,CAAA;UAEH,CAAA,CAAA;QAAA,CAAA,CAAA;MAEL,CAAA;IAAA,CAAA,CAAA;GAEJ,CAAA;AAEJ,CAAA;"}
@@ -70,6 +70,7 @@ const ProductList = ({
70
70
  setIsDragging(false);
71
71
  setEndPosition(containerRef.current?.scrollLeft);
72
72
  document.removeEventListener("mousemove", dragHandler);
73
+ document.removeEventListener("mouseup", mouseUpHandler);
73
74
  }, [dragHandler]);
74
75
  const mouseDownHandler = useCallback(event => {
75
76
  if (event.buttons === 1) {
@@ -79,16 +80,29 @@ const ProductList = ({
79
80
  document.addEventListener("mouseup", mouseUpHandler);
80
81
  }
81
82
  }, [dragHandler, mouseUpHandler]);
82
- useEffectOnce(() => {
83
+ useEffect(() => {
84
+ const container = containerRef.current;
85
+ if (!container) return;
83
86
  let isScrolling;
84
- containerRef.current.addEventListener("scroll", function () {
87
+ const scrollHandler = () => {
85
88
  window.clearTimeout(isScrolling);
86
- isScrolling = setTimeout(function () {
89
+ isScrolling = setTimeout(() => {
87
90
  setPlayAnimation(true);
88
91
  setEndPosition(containerRef.current?.scrollLeft);
89
92
  }, checkForScrollTimeout);
90
- });
91
- });
93
+ };
94
+ container.addEventListener("scroll", scrollHandler);
95
+ return () => {
96
+ container.removeEventListener("scroll", scrollHandler);
97
+ window.clearTimeout(isScrolling);
98
+ };
99
+ }, []);
100
+ useEffect(() => {
101
+ return () => {
102
+ document.removeEventListener("mousemove", dragHandler);
103
+ document.removeEventListener("mouseup", mouseUpHandler);
104
+ };
105
+ }, [dragHandler, mouseUpHandler]);
92
106
  const tabClickHandler = useCallback(({
93
107
  groupId
94
108
  }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ProductList.mjs","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = groupProducts(products);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n const checkForScrollTimeout = 150;\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n }\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft as number);\n document.removeEventListener(\"mousemove\", dragHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n useEffectOnce(() => {\n let isScrolling: NodeJS.Timeout;\n (containerRef.current as HTMLDivElement).addEventListener(\n \"scroll\",\n function () {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is track in state after scrolling has completed\n isScrolling = setTimeout(function () {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, checkForScrollTimeout);\n },\n );\n });\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n },\n [containerRef, setPlayAnimation, setActiveGroup, checkForScrollTimeout],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","checkForScrollTimeout","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","setTimeout","currentPosition","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","isScrolling","window","clearTimeout","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;AAgBO,MAAMA,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;EACAC,iBAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAAC,aAAA,GAAgBC,cAAcV,QAAQ,CAAA;EACtC,MAAAW,sBAAA,GAAyBF,cAAcG,MAAS,GAAA,CAAA;EAEhD,MAAAC,YAAA,GAAeC,OA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EAAAC,EAC5B,CAAA;cAGFyE,UAAA;cACAI,aAAa9E,gBAAiB,CAAA1B,MAAA;cAC9B2B,IAAIqE,OAAS,EAAArE,EAAA;cACbuB,OAAA,EAAS8C,QAAQtE,gBAAkB,EAAAC,EAAA;cACnC8E,KAAA,EAAOT,QAAQS,KAAS,IAAA;gBAAEC,KAAK,EAAI;gBAAAlF,KAAA,EAAO,CAAG;gBAAAmF,MAAA,EAAQ;cAAE,CAAA;cACvDC,MAAMZ,OAAQ,CAAAa,KAAA;cACdC,aAAad,OAAQ,CAAAc,WAAA;cACrBzH,gBAAA;cACAC,mBAAA;cACAI,gBAAA;cACAwG,aAAA;cACAzF,aAAA;cACA4E,mBAAmB9F,eAAmB,IAAAa,kBAAA;cACtCZ,qBAAA;cACAG,iBAAA;cACAoH,iBAAiBd,kBAAuB,KAAA,CAAA;cACxCrG;YAAA,CAAA,EAjBKoG,OAAQ,CAAArE,EAkBf,CAAA;UAEH,CAAA,CAAA;QAAA,CAAA,CAAA;MAEL,CAAA;IAAA,CAAA,CAAA;GAEJ,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"ProductList.mjs","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = groupProducts(products);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n const checkForScrollTimeout = 150;\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n }\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft as number);\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n let isScrolling: NodeJS.Timeout;\n\n const scrollHandler = () => {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is track in state after scrolling has completed\n isScrolling = setTimeout(() => {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, checkForScrollTimeout);\n };\n\n container.addEventListener(\"scroll\", scrollHandler);\n\n return () => {\n container.removeEventListener(\"scroll\", scrollHandler);\n window.clearTimeout(isScrolling);\n };\n }, []); // Empty dependency array since we want this to run once\n\n // Add cleanup for drag handlers on unmount\n useEffect(() => {\n return () => {\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n };\n }, [dragHandler, mouseUpHandler]);\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n },\n [containerRef, setPlayAnimation, setActiveGroup, checkForScrollTimeout],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","checkForScrollTimeout","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","setTimeout","currentPosition","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","container","isScrolling","scrollHandler","window","clearTimeout","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;AAgBO,MAAMA,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;EACAC,iBAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAAC,aAAA,GAAgBC,cAAcV,QAAQ,CAAA;EACtC,MAAAW,sBAAA,GAAyBF,cAAcG,MAAS,GAAA,CAAA;EAEhD,MAAAC,YAAA,GAAeC,OAAuB,IAAI,CAAA;EAC1C,MAAAC,cAAA,GAAiBD,OAAuB,IAAI,CAAA;EAElD,MAAM,CAACE,kBAAA,EAAoBC,uBAAuB,CAAA,GAAIC,SAAS,KAAK,CAAA;EACpE,MAAM,CAACC,WAAA,EAAaC,cAAc,CAAA,GAAIF,SAASb,kBAAkB,CAAA;EACjE,MAAM,CAACgB,aAAA,EAAeC,gBAAgB,CAAA,GAAIJ,SAAS,KAAK,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AAkB,EAAAC,EACzD,CAAA;YAEA,MAAM2E,aAAa5E,gBAAiB,CAAA6E,SAAA,CACjCC,IAAA,IAASA,IAAK,CAAA7E,EAAA,KAAOuE,OAAQ,CAAAvE,EAChC,CAAA;YAGE,sBAAA8C,GAAA,CAACgC,OAAA,EAAA;cACC1B,SAASA,CAAA,KACPvE,cAAA,CACE0F,QAAQxE,gBAAkB,EAAAC,EAC5B,CAAA;cAGF2E,UAAA;cACAI,aAAahF,gBAAiB,CAAA1B,MAAA;cAC9B2B,IAAIuE,OAAS,EAAAvE,EAAA;cACbyB,OAAA,EAAS8C,QAAQxE,gBAAkB,EAAAC,EAAA;cACnCgF,KAAA,EAAOT,QAAQS,KAAS,IAAA;gBAAEC,KAAK,EAAI;gBAAApF,KAAA,EAAO,CAAG;gBAAAqF,MAAA,EAAQ;cAAE,CAAA;cACvDC,MAAMZ,OAAQ,CAAAa,KAAA;cACdC,aAAad,OAAQ,CAAAc,WAAA;cACrB3H,gBAAA;cACAC,mBAAA;cACAI,gBAAA;cACA0G,aAAA;cACA3F,aAAA;cACA8E,mBAAmBhG,eAAmB,IAAAa,kBAAA;cACtCZ,qBAAA;cACAG,iBAAA;cACAsH,iBAAiBd,kBAAuB,KAAA,CAAA;cACxCvG;YAAA,CAAA,EAjBKsG,OAAQ,CAAAvE,EAkBf,CAAA;UAEH,CAAA,CAAA;QAAA,CAAA,CAAA;MAEL,CAAA;IAAA,CAAA,CAAA;GAEJ,CAAA;AAEJ,CAAA;"}
@@ -12,7 +12,7 @@ require('./assets/attention.svg.js');
12
12
  var InputCard_styles = require('./InputCard.styles.js');
13
13
  require('./InputSections/index.js');
14
14
  var CustomImage = require('../../../../CustomImage/CustomImage.js');
15
- var attentionIcon = require("../../../../../assets/attention.svg");
15
+ var attentionIcon = require("../../../../../assets/attention2.svg");
16
16
  var OptionSelectSection = require('./InputSections/OptionSelectSection.js');
17
17
  var SliderSection = require('./InputSections/SliderSection.js');
18
18
  var CounterSection = require('./InputSections/CounterSection.js');
@@ -10,7 +10,7 @@ import './assets/attention.svg.mjs';
10
10
  import { Card, Header, HeaderHeadingSection, HeadingIcon, HeadingTitle, HeaderActionSection, SubduedInfo, OverlayFilter, NotAvailableNoteWrap, NotAvailableNoteIcon, InputBody, InputSectionSpacing, Footer, FooterContent, FooterNote } from './InputCard.styles.mjs';
11
11
  import './InputSections/index.mjs';
12
12
  import { CustomImage } from '../../../../CustomImage/CustomImage.mjs';
13
- import attentionIcon__default from "../../../../../assets/attention.svg";
13
+ import attentionIcon__default from "../../../../../assets/attention2.svg";
14
14
  import { OptionSelectSection } from './InputSections/OptionSelectSection.mjs';
15
15
  import { SliderSection } from './InputSections/SliderSection.mjs';
16
16
  import { CounterSection } from './InputSections/CounterSection.mjs';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var attentionIcon = require("../../../../../../assets/attention.svg");
6
+ var attentionIcon = require("../../../../../../assets/attention2.svg");
7
7
  function _interopDefault(e) {
8
8
  return e && e.__esModule ? e : {
9
9
  default: e
@@ -1,3 +1,3 @@
1
- export * from "../../../../../../assets/attention.svg";
2
- export { default } from "../../../../../../assets/attention.svg";
1
+ export * from "../../../../../../assets/attention2.svg";
2
+ export { default } from "../../../../../../assets/attention2.svg";
3
3
  //# sourceMappingURL=attention.svg.mjs.map
@@ -6,7 +6,7 @@ var asset = require('../../../../../utils/asset.js');
6
6
  require('./assets/attention.svg.js');
7
7
  var Part = require('./Part.js');
8
8
  var ProgressBarChart_styles = require('./ProgressBarChart.styles.js');
9
- var attentionIcon = require("../../../../../assets/attention2.svg");
9
+ var attentionIcon = require("../../../../../assets/attention.svg");
10
10
  function _interopDefault(e) {
11
11
  return e && e.__esModule ? e : {
12
12
  default: e
@@ -4,7 +4,7 @@ import { imageSrc } from '../../../../../utils/asset.mjs';
4
4
  import './assets/attention.svg.mjs';
5
5
  import { PART_GAP_PX, PART_WIDTH_PX, Part } from './Part.mjs';
6
6
  import { ProgressBarChartContainer, ProgressBarChartHeader, ProgressBarChartTitle, ProgressBarWrapper, ProgressBarPartsContainer, ProgressBarAttentionLabel, ProgressBarAttentionLabelIcon } from './ProgressBarChart.styles.mjs';
7
- import attentionIcon__default from "../../../../../assets/attention2.svg";
7
+ import attentionIcon__default from "../../../../../assets/attention.svg";
8
8
  "use strict";
9
9
  const ProgressBarChart = ({
10
10
  title,