@ubnt/store.core 9.17.0-alpha.5 → 9.18.0-alpha.0

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 (253) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib/apis/smartcat.js +1 -4
  3. package/lib/apis/smartcat.js.map +1 -1
  4. package/lib/apis/smartcat.mjs +1 -4
  5. package/lib/apis/smartcat.mjs.map +1 -1
  6. package/lib/assets/attention.svg +5 -5
  7. package/lib/assets/attention2.svg +5 -5
  8. package/lib/assets/close2.svg +2 -3
  9. package/lib/assets/close3.svg +3 -2
  10. package/lib/components/CategoryTabs/CategoryTabs.types.d.ts +1 -1
  11. package/lib/components/CloserLookSection/CloserLookSection.js.map +1 -1
  12. package/lib/components/CloserLookSection/CloserLookSection.mjs.map +1 -1
  13. package/lib/components/CustomImage/CustomImage.js.map +1 -1
  14. package/lib/components/CustomImage/CustomImage.mjs.map +1 -1
  15. package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
  16. package/lib/components/FeaturesSection_deprecated/FeaturesSection.js.map +1 -1
  17. package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
  18. package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs.map +1 -1
  19. package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
  20. package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
  21. package/lib/components/Footer/hooks/useFooterContent.d.ts +3 -1
  22. package/lib/components/Footer/hooks/useFooterContent.js +8 -1
  23. package/lib/components/Footer/hooks/useFooterContent.js.map +1 -1
  24. package/lib/components/Footer/hooks/useFooterContent.mjs +8 -1
  25. package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -1
  26. package/lib/components/Footer/translations/ar.json.js +1 -1
  27. package/lib/components/Footer/translations/ar.json.mjs +1 -1
  28. package/lib/components/Footer/translations/de.json.js +1 -1
  29. package/lib/components/Footer/translations/de.json.mjs +1 -1
  30. package/lib/components/Footer/translations/el.json.js +1 -1
  31. package/lib/components/Footer/translations/el.json.mjs +1 -1
  32. package/lib/components/Footer/translations/en.json.js +1 -0
  33. package/lib/components/Footer/translations/en.json.js.map +1 -1
  34. package/lib/components/Footer/translations/en.json.mjs +1 -0
  35. package/lib/components/Footer/translations/en.json.mjs.map +1 -1
  36. package/lib/components/Footer/translations/es.json.js +1 -1
  37. package/lib/components/Footer/translations/es.json.mjs +1 -1
  38. package/lib/components/Footer/translations/fr.json.js +4 -4
  39. package/lib/components/Footer/translations/fr.json.mjs +4 -4
  40. package/lib/components/Footer/translations/it.json.js +1 -1
  41. package/lib/components/Footer/translations/it.json.mjs +1 -1
  42. package/lib/components/Footer/translations/ja.json.js +2 -2
  43. package/lib/components/Footer/translations/ja.json.mjs +2 -2
  44. package/lib/components/Footer/translations/pt-BR.json.js +1 -1
  45. package/lib/components/Footer/translations/pt-BR.json.mjs +1 -1
  46. package/lib/components/Footer/translations/zh-Hans.json.js +4 -4
  47. package/lib/components/Footer/translations/zh-Hans.json.mjs +4 -4
  48. package/lib/components/Footer/translations/zh-Hant-TW.json.js +1 -1
  49. package/lib/components/Footer/translations/zh-Hant-TW.json.mjs +1 -1
  50. package/lib/components/GridGallery/GridGallery.js.map +1 -1
  51. package/lib/components/GridGallery/GridGallery.mjs.map +1 -1
  52. package/lib/components/Header/AccountMenu/AccountMenu.js +22 -20
  53. package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
  54. package/lib/components/Header/AccountMenu/AccountMenu.mjs +22 -20
  55. package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
  56. package/lib/components/Header/AccountMenu/megaphone.http.service.js +1 -4
  57. package/lib/components/Header/AccountMenu/megaphone.http.service.js.map +1 -1
  58. package/lib/components/Header/AccountMenu/megaphone.http.service.mjs +1 -4
  59. package/lib/components/Header/AccountMenu/megaphone.http.service.mjs.map +1 -1
  60. package/lib/components/Header/CartModalV2/CartModal.js.map +1 -1
  61. package/lib/components/Header/CartModalV2/CartModal.mjs.map +1 -1
  62. package/lib/components/Header/Header.js.map +1 -1
  63. package/lib/components/Header/Header.mjs.map +1 -1
  64. package/lib/components/Header/Header.types.d.ts +6 -2
  65. package/lib/components/Header/Header.types.js.map +1 -1
  66. package/lib/components/Header/Header.types.mjs.map +1 -1
  67. package/lib/components/Header/LanguageFrame/LanguageFrame.js.map +1 -1
  68. package/lib/components/Header/LanguageFrame/LanguageFrame.mjs.map +1 -1
  69. package/lib/components/Header/LanguageFrame/Mobile/Mobile.js.map +1 -1
  70. package/lib/components/Header/LanguageFrame/Mobile/Mobile.mjs.map +1 -1
  71. package/lib/components/Header/MenuItem/MenuItem.styles.js +2 -2
  72. package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
  73. package/lib/components/Header/MenuItem/MenuItem.styles.mjs +2 -2
  74. package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
  75. package/lib/components/Header/MenuItem/MenuItem.types.d.ts +1 -0
  76. package/lib/components/Header/Navigation/ProMenu/ProMenu.d.ts +1 -1
  77. package/lib/components/Header/Navigation/ProMenu/ProMenu.js +24 -30
  78. package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +1 -1
  79. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +26 -32
  80. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +1 -1
  81. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +6 -7
  82. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +8 -41
  83. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +1 -1
  84. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +9 -41
  85. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +1 -1
  86. package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +0 -1
  87. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
  88. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +67 -92
  89. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
  90. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +68 -93
  91. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
  92. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +3 -0
  93. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +4 -0
  94. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
  95. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +5 -2
  96. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
  97. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +7 -6
  98. package/lib/components/Header/Overlay/Overlay.js.map +1 -1
  99. package/lib/components/Header/Overlay/Overlay.mjs.map +1 -1
  100. package/lib/components/Header/ProHeader/ProHeader.d.ts +2 -1
  101. package/lib/components/Header/ProHeader/ProHeader.js +132 -119
  102. package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
  103. package/lib/components/Header/ProHeader/ProHeader.mjs +134 -121
  104. package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
  105. package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +5 -2
  106. package/lib/components/Header/ProHeader/ProHeader.styles.js +8 -2
  107. package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
  108. package/lib/components/Header/ProHeader/ProHeader.styles.mjs +8 -2
  109. package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
  110. package/lib/components/Header/translations/ar.json.js +4 -1
  111. package/lib/components/Header/translations/ar.json.js.map +1 -1
  112. package/lib/components/Header/translations/ar.json.mjs +4 -2
  113. package/lib/components/Header/translations/ar.json.mjs.map +1 -1
  114. package/lib/components/Header/translations/de.json.js +4 -1
  115. package/lib/components/Header/translations/de.json.js.map +1 -1
  116. package/lib/components/Header/translations/de.json.mjs +4 -2
  117. package/lib/components/Header/translations/de.json.mjs.map +1 -1
  118. package/lib/components/Header/translations/el.json.js +4 -1
  119. package/lib/components/Header/translations/el.json.js.map +1 -1
  120. package/lib/components/Header/translations/el.json.mjs +4 -2
  121. package/lib/components/Header/translations/el.json.mjs.map +1 -1
  122. package/lib/components/Header/translations/es.json.js +4 -1
  123. package/lib/components/Header/translations/es.json.js.map +1 -1
  124. package/lib/components/Header/translations/es.json.mjs +4 -2
  125. package/lib/components/Header/translations/es.json.mjs.map +1 -1
  126. package/lib/components/Header/translations/fr.json.js +4 -1
  127. package/lib/components/Header/translations/fr.json.js.map +1 -1
  128. package/lib/components/Header/translations/fr.json.mjs +4 -2
  129. package/lib/components/Header/translations/fr.json.mjs.map +1 -1
  130. package/lib/components/Header/translations/it.json.js +4 -1
  131. package/lib/components/Header/translations/it.json.js.map +1 -1
  132. package/lib/components/Header/translations/it.json.mjs +4 -2
  133. package/lib/components/Header/translations/it.json.mjs.map +1 -1
  134. package/lib/components/Header/translations/ja.json.js +4 -1
  135. package/lib/components/Header/translations/ja.json.js.map +1 -1
  136. package/lib/components/Header/translations/ja.json.mjs +4 -2
  137. package/lib/components/Header/translations/ja.json.mjs.map +1 -1
  138. package/lib/components/Header/translations/pt-BR.json.js +4 -1
  139. package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
  140. package/lib/components/Header/translations/pt-BR.json.mjs +4 -2
  141. package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
  142. package/lib/components/Header/translations/zh-Hans.json.js +4 -1
  143. package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
  144. package/lib/components/Header/translations/zh-Hans.json.mjs +4 -2
  145. package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
  146. package/lib/components/Header/translations/zh-Hant-TW.json.js +4 -1
  147. package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
  148. package/lib/components/Header/translations/zh-Hant-TW.json.mjs +4 -2
  149. package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
  150. package/lib/components/ImageSequence/ImageSequence.js.map +1 -1
  151. package/lib/components/ImageSequence/ImageSequence.mjs.map +1 -1
  152. package/lib/components/LandingPage/Cards/Card/Card.js.map +1 -1
  153. package/lib/components/LandingPage/Cards/Card/Card.mjs.map +1 -1
  154. package/lib/components/LandingPage/Cards/Cards.js.map +1 -1
  155. package/lib/components/LandingPage/Cards/Cards.mjs.map +1 -1
  156. package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js.map +1 -1
  157. package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.mjs.map +1 -1
  158. package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js.map +1 -1
  159. package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.mjs.map +1 -1
  160. package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js.map +1 -1
  161. package/lib/components/MicrositeProductGrid/MicrositeProductGrid.mjs.map +1 -1
  162. package/lib/components/Microsites/MicrositeProductPage.js +39 -0
  163. package/lib/components/Microsites/MicrositeProductPage.js.map +1 -1
  164. package/lib/components/Microsites/MicrositeProductPage.mjs +39 -0
  165. package/lib/components/Microsites/MicrositeProductPage.mjs.map +1 -1
  166. package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js.map +1 -1
  167. package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.mjs.map +1 -1
  168. package/lib/components/ProductCompare/ProductCompare.js.map +1 -1
  169. package/lib/components/ProductCompare/ProductCompare.mjs.map +1 -1
  170. package/lib/components/QuantityControls/QuantityControls.js.map +1 -1
  171. package/lib/components/QuantityControls/QuantityControls.mjs.map +1 -1
  172. package/lib/components/RelatedProducts/RelatedProducts.js.map +1 -1
  173. package/lib/components/RelatedProducts/RelatedProducts.mjs.map +1 -1
  174. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  175. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  176. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
  177. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
  178. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
  179. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
  180. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
  181. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
  182. package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js.map +1 -1
  183. package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.mjs.map +1 -1
  184. package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
  185. package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
  186. package/lib/components/StorageSliders/Slider/Slider.js.map +1 -1
  187. package/lib/components/StorageSliders/Slider/Slider.mjs.map +1 -1
  188. package/lib/components/StorageSliders/StorageSliders.context.js.map +1 -1
  189. package/lib/components/StorageSliders/StorageSliders.context.mjs.map +1 -1
  190. package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js.map +1 -1
  191. package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.mjs.map +1 -1
  192. package/lib/components/VariantSelector/Variant/Variant.js.map +1 -1
  193. package/lib/components/VariantSelector/Variant/Variant.mjs.map +1 -1
  194. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  195. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  196. package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
  197. package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
  198. package/lib/constants/icons/options/colors/black.svg.js +5 -5
  199. package/lib/constants/icons/options/colors/index.js +3 -3
  200. package/lib/constants/icons/options/styles/black.svg.js +5 -5
  201. package/lib/constants/icons/options/styles/index.js +3 -3
  202. package/lib/constants/optionIcons.js +6 -6
  203. package/lib/constants/optionIcons.mjs +4 -4
  204. package/lib/constants/theme.js +4 -0
  205. package/lib/constants/theme.js.map +1 -1
  206. package/lib/constants/theme.mjs +4 -0
  207. package/lib/constants/theme.mjs.map +1 -1
  208. package/lib/constants/url.d.ts +2 -1
  209. package/lib/constants/url.js +1 -0
  210. package/lib/constants/url.js.map +1 -1
  211. package/lib/constants/url.mjs +1 -0
  212. package/lib/constants/url.mjs.map +1 -1
  213. package/lib/contexts/MenuContext/utils.js +1 -0
  214. package/lib/contexts/MenuContext/utils.js.map +1 -1
  215. package/lib/contexts/MenuContext/utils.mjs +1 -0
  216. package/lib/contexts/MenuContext/utils.mjs.map +1 -1
  217. package/lib/helpers/product.js.map +1 -1
  218. package/lib/helpers/product.mjs.map +1 -1
  219. package/lib/helpers/ux.js.map +1 -1
  220. package/lib/helpers/ux.mjs.map +1 -1
  221. package/lib/hooks/useHasTouch.js.map +1 -1
  222. package/lib/hooks/useHasTouch.mjs.map +1 -1
  223. package/lib/hooks/useHorizontalScroll.js.map +1 -1
  224. package/lib/hooks/useHorizontalScroll.mjs.map +1 -1
  225. package/lib/utils/money/allocators/fixedAmount.js +1 -4
  226. package/lib/utils/money/allocators/fixedAmount.js.map +1 -1
  227. package/lib/utils/money/allocators/fixedAmount.mjs +1 -4
  228. package/lib/utils/money/allocators/fixedAmount.mjs.map +1 -1
  229. package/lib/utils/money/allocators/productAmount.js +15 -27
  230. package/lib/utils/money/allocators/productAmount.js.map +1 -1
  231. package/lib/utils/money/allocators/productAmount.mjs +15 -27
  232. package/lib/utils/money/allocators/productAmount.mjs.map +1 -1
  233. package/lib/utils/productSort.js +1 -0
  234. package/lib/utils/productSort.js.map +1 -1
  235. package/lib/utils/productSort.mjs +1 -0
  236. package/lib/utils/productSort.mjs.map +1 -1
  237. package/lib/utils/validations/postalCodeSuperRefinement.js +3 -0
  238. package/lib/utils/validations/postalCodeSuperRefinement.js.map +1 -1
  239. package/lib/utils/validations/postalCodeSuperRefinement.mjs +3 -0
  240. package/lib/utils/validations/postalCodeSuperRefinement.mjs.map +1 -1
  241. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.js +2 -0
  242. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.js.map +1 -1
  243. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.mjs +2 -0
  244. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.mjs.map +1 -1
  245. package/lib/utils/validations/taxIdSuperRefinement.js +2 -0
  246. package/lib/utils/validations/taxIdSuperRefinement.js.map +1 -1
  247. package/lib/utils/validations/taxIdSuperRefinement.mjs +2 -0
  248. package/lib/utils/validations/taxIdSuperRefinement.mjs.map +1 -1
  249. package/lib/utils/variant.js.map +1 -1
  250. package/lib/utils/variant.mjs.map +1 -1
  251. package/lib/utils/wattage.js.map +1 -1
  252. package/lib/utils/wattage.mjs.map +1 -1
  253. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { LineLoader } from '@ubnt/ui-components/LineLoader';
3
3
  import merge from 'lodash/merge';
4
4
  import { memo, useRef, useState, useMemo, useEffect, useCallback } from 'react';
5
- import { useMedia, useHoverDirty, useClickAway } from 'react-use';
5
+ import { useMedia, useHoverDirty, useEffectOnce, useClickAway } from 'react-use';
6
6
  import '../../../assets/account/no-user-avatar.png.mjs';
7
7
  import '../../../assets/icons/menu/icon-ea.svg.mjs';
8
8
  import '../../../assets/icons/menu/icon-history.svg.mjs';
@@ -13,6 +13,7 @@ import { SiteId } from '../../../contexts/MenuContext/mapping.mjs';
13
13
  import { ModalId } from '../../../contexts/MenuContext/types.mjs';
14
14
  import { getTrueSize } from '../../../helpers/ux.mjs';
15
15
  import '../../../hooks/index.mjs';
16
+ import { useHasTouch } from '../../../hooks/useHasTouch.mjs';
16
17
  import '../../../types/index.mjs';
17
18
  import { imageSrc } from '../../../utils/asset.mjs';
18
19
  import { checkUnreachable } from '../../../utils/errors.mjs';
@@ -59,7 +60,9 @@ import { AccountFrame } from '../AccountFrame/AccountFrame.mjs';
59
60
  import { NavigationProMobileMenu } from '../Navigation/ProMobileMenu/ProMobileMenu.mjs';
60
61
  import { NavigationProMenu } from '../Navigation/ProMenu/ProMenu.mjs';
61
62
  "use strict";
62
- const defaultProductLineOptions = [{
63
+ const MOBILE_BREAKPOINT_UP = BREAKPOINTS.TABLET_UP;
64
+ const MOBILE_BREAKPOINT_AND_DOWN = BREAKPOINTS.TABLET_AND_DOWN;
65
+ const DEFAULT_PRODUCT_LINE_OPTIONS = [{
63
66
  value: ProductLine.Unifi,
64
67
  label: "UniFi"
65
68
  }, {
@@ -85,16 +88,17 @@ const ProHeader = memo(function ProHeader2({
85
88
  handleProductLineChange,
86
89
  handleMobileMenuClick,
87
90
  productLineValue,
88
- inlineCategoryTabs,
91
+ categories,
92
+ useInlineCategories,
89
93
  embedConfig,
90
94
  onSearchFocus,
91
95
  onSearchBlur,
92
96
  onSearchClick,
93
- productLineOptions = defaultProductLineOptions,
97
+ productLineOptions = DEFAULT_PRODUCT_LINE_OPTIONS,
94
98
  accountMenu,
95
99
  onLanguageChange
96
100
  }) {
97
- const isMobile = useMedia(BREAKPOINTS.MOBILE_AND_DOWN, false);
101
+ const isMobile = useMedia(MOBILE_BREAKPOINT_AND_DOWN, false);
98
102
  const rootRef = useRef(null);
99
103
  const wrapRef = useRef(null);
100
104
  const containerRef = useRef(null);
@@ -162,7 +166,6 @@ const ProHeader = memo(function ProHeader2({
162
166
  );
163
167
  }, [activeModal]);
164
168
  const [showTouchProMenu, setShowTouchProMenu] = useState(false);
165
- const hasProMenu = !!inlineCategoryTabs;
166
169
  const logoRef = useRef(null);
167
170
  const logoHover = useHoverDirty(logoRef);
168
171
  const showProMenu = useMemo(() => {
@@ -174,6 +177,11 @@ const ProHeader = memo(function ProHeader2({
174
177
  onSearchClick?.();
175
178
  }
176
179
  }, [activeModal, onSearchClick, setActiveModal]);
180
+ useEffectOnce(() => {
181
+ if (searchValue) {
182
+ setActiveModal(ModalId.Search);
183
+ }
184
+ });
177
185
  const blurSearchInput = useCallback(() => {
178
186
  if (!searchInputRef || activeModal !== ModalId.Search) {
179
187
  return;
@@ -208,7 +216,7 @@ const ProHeader = memo(function ProHeader2({
208
216
  }
209
217
  }, [handleModalOpen, onSearchClick, searchInputRef]);
210
218
  useEffect(() => {
211
- if (!inlineCategoryTabs || activeModal !== ModalId.Search) return;
219
+ if (!useInlineCategories || activeModal !== ModalId.Search) return;
212
220
  if (desktopSearchInputRef) {
213
221
  const interval = setInterval(() => {
214
222
  if (document.activeElement === desktopSearchInputRef) {
@@ -217,7 +225,7 @@ const ProHeader = memo(function ProHeader2({
217
225
  desktopSearchInputRef.focus();
218
226
  }, 0);
219
227
  }
220
- }, [activeModal, desktopSearchInputRef, inlineCategoryTabs]);
228
+ }, [activeModal, desktopSearchInputRef, useInlineCategories]);
221
229
  const handleSearchValueChange = useCallback(e => {
222
230
  onSearch?.(e.target.value);
223
231
  }, [onSearch]);
@@ -258,22 +266,23 @@ const ProHeader = memo(function ProHeader2({
258
266
  const cartQuantity = useMemo(() => {
259
267
  return cart?.items.reduce((sum, item) => sum + item.quantity, 0) ?? 0;
260
268
  }, [cart?.items]);
269
+ const hasTouch = useHasTouch();
261
270
  const logoSiteUrl = useMemo(() => {
262
- if (inlineCategoryTabs) {
271
+ if (useInlineCategories) {
263
272
  return createSiteUrl([SiteId.Store, "/"]);
264
273
  }
265
274
  return createSiteUrl([SiteId.Ui, "/"]);
266
- }, [createSiteUrl, inlineCategoryTabs]);
267
- const onLogoAnchorTouchEnd = useCallback(e => {
275
+ }, [createSiteUrl, useInlineCategories]);
276
+ const onLogoAnchorClick = useCallback(e => {
268
277
  if (embedConfig?.homeLinkClickHandler) {
269
278
  e.preventDefault();
270
279
  embedConfig.homeLinkClickHandler();
271
280
  }
272
- if (hasProMenu && !showProMenu) {
281
+ if (useInlineCategories && !showProMenu && !hasTouch) {
273
282
  e.preventDefault();
274
283
  setShowTouchProMenu(true);
275
284
  }
276
- }, [embedConfig, hasProMenu, showProMenu]);
285
+ }, [embedConfig, useInlineCategories, hasTouch, showProMenu]);
277
286
  useEffect(() => {
278
287
  const containerEl = containerRef.current;
279
288
  if (!containerEl) return;
@@ -331,26 +340,26 @@ const ProHeader = memo(function ProHeader2({
331
340
  width: 17,
332
341
  height: 20
333
342
  });
334
- if (!inlineCategoryTabs) {
343
+ if (!useInlineCategories) {
335
344
  return defaultIcon;
336
345
  }
337
346
  switch (productLineValue) {
338
347
  case ProductLine.Unifi:
339
348
  return /* @__PURE__ */jsx(StyleableSvgImage, {
340
349
  src: _externalAssets_BH7iT_0Q__default,
341
- width: 46,
342
- height: 14
350
+ width: 58.5,
351
+ height: 18
343
352
  });
344
353
  case ProductLine.Uisp:
345
354
  return /* @__PURE__ */jsx(StyleableSvgImage, {
346
355
  src: _externalAssets_TKrekyEi__default,
347
- width: 44,
348
- height: 14
356
+ width: 56.5,
357
+ height: 18
349
358
  });
350
359
  default:
351
360
  return defaultIcon;
352
361
  }
353
- }, [inlineCategoryTabs, productLineValue]);
362
+ }, [productLineValue, useInlineCategories]);
354
363
  return /* @__PURE__ */jsxs(ProHeaderWrap, {
355
364
  ref: rootRef,
356
365
  $sticky: !!embedConfig,
@@ -368,30 +377,33 @@ const ProHeader = memo(function ProHeader2({
368
377
  ref: containerRef,
369
378
  children: [/* @__PURE__ */jsxs(Wrap, {
370
379
  ref: wrapRef,
371
- children: [/* @__PURE__ */jsxs(LeftWrap, {
380
+ children: [/* @__PURE__ */jsx(LeftWrap, {
372
381
  $addSpaceOnDesktop: !!embedConfig?.fullWidthHeader,
373
- children: [!embedConfig?.hideLogo && /* @__PURE__ */jsx(Anchor, {
374
- href: logoSiteUrl,
375
- onTouchEnd: onLogoAnchorTouchEnd,
376
- children: embedConfig?.siteTitle ? /* @__PURE__ */jsx(SiteTitleWrap, {
377
- children: embedConfig.siteTitle
378
- }) : /* @__PURE__ */jsx(LogoIconWrap, {
379
- motif,
380
- ref: logoRef,
381
- children: logoIconHtml
382
- })
383
- }), embedConfig?.moveAvatarIconToLeft && avatarHtml, !inlineCategoryTabs && /* @__PURE__ */jsx(BreakpointsWrap, {
384
- hideBreakpoint: BREAKPOINTS.TABLET_AND_DOWN,
385
- children: currentCountryName && /* @__PURE__ */jsx(CountryButton, {
386
- "data-test-id": "country-select-btn",
387
- type: "button",
388
- onClick: handleStorePickerClick,
389
- children: currentCountryName
390
- })
391
- })]
382
+ children: activeModal !== ModalId.ProMobileMenu && /* @__PURE__ */jsxs(Fragment, {
383
+ children: [!embedConfig?.hideLogo && /* @__PURE__ */jsx(Anchor, {
384
+ href: logoSiteUrl,
385
+ onClick: onLogoAnchorClick,
386
+ children: embedConfig?.siteTitle ? /* @__PURE__ */jsx(SiteTitleWrap, {
387
+ children: embedConfig.siteTitle
388
+ }) : /* @__PURE__ */jsx(LogoIconWrap, {
389
+ motif,
390
+ ref: logoRef,
391
+ children: logoIconHtml
392
+ })
393
+ }), embedConfig?.moveAvatarIconToLeft && avatarHtml, !useInlineCategories && /* @__PURE__ */jsx(BreakpointsWrap, {
394
+ hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
395
+ children: currentCountryName && /* @__PURE__ */jsx(CountryButton, {
396
+ "data-test-id": "country-select-btn",
397
+ type: "button",
398
+ onClick: handleStorePickerClick,
399
+ children: currentCountryName
400
+ })
401
+ })]
402
+ })
392
403
  }), /* @__PURE__ */jsxs(CenterWrap, {
393
- hideBreakpoint: BREAKPOINTS.TABLET_AND_DOWN,
394
- children: [!inlineCategoryTabs || activeModal === ModalId.Search ? /* @__PURE__ */jsx(Search, {
404
+ hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
405
+ justifyRight: useInlineCategories && (activeModal === ModalId.Search || !!searchValue),
406
+ children: [!useInlineCategories || activeModal === ModalId.Search ? /* @__PURE__ */jsx(Search, {
395
407
  setInputRef: setDesktopSearchInputRef,
396
408
  onValueChange: handleSearchValueChange,
397
409
  placeholder: searchPlaceholder,
@@ -411,25 +423,25 @@ const ProHeader = memo(function ProHeader2({
411
423
  fillType: "gradient",
412
424
  gradientSize: WRAP_GAP * 4,
413
425
  gap: CATEGORY_ITEMS_GAP,
414
- activeIndex: inlineCategoryTabs?.activeIndex,
415
- items: inlineCategoryTabs?.categories.map((category, i) => ({
426
+ activeIndex: categories.activeIndex,
427
+ items: categories.items.map((category, i) => ({
416
428
  id: category.id,
417
429
  render() {
418
- const active = inlineCategoryTabs.activeIndex === i;
419
- const item = /* @__PURE__ */jsx(MenuItem, {
430
+ const active = categories.activeIndex === i;
431
+ return /* @__PURE__ */jsx(MenuItem, {
420
432
  "data-test-id": `inline-category${active ? "-selected" : ""}`,
421
433
  as: "a",
434
+ href: category.url ?? "#",
422
435
  active,
423
436
  motif,
424
437
  children: /* @__PURE__ */jsx(MenuItemLabel, {
425
438
  children: category.label
426
439
  })
427
440
  }, category.id);
428
- return inlineCategoryTabs.renderLink?.(item, category.href) ?? item;
429
441
  }
430
442
  })) ?? []
431
443
  })
432
- }), !inlineCategoryTabs && /* @__PURE__ */jsx(ProductLineSelectorWrap, {
444
+ }), !useInlineCategories && /* @__PURE__ */jsx(ProductLineSelectorWrap, {
433
445
  children: productLineOptions.map(option => /* @__PURE__ */jsx(ProductLineSelectorItem, {
434
446
  onClick: () => handleProductLineChange?.(option.value),
435
447
  $active: option.value === productLineValue,
@@ -439,83 +451,85 @@ const ProHeader = memo(function ProHeader2({
439
451
  })]
440
452
  }), /* @__PURE__ */jsxs(RightWrap, {
441
453
  $addSpaceOnDesktop: !!embedConfig?.fullWidthHeader,
442
- children: [/* @__PURE__ */jsx(ProIconWrap, {
443
- "data-test-id": "search-btn",
444
- hideBreakpoint: !inlineCategoryTabs ? BREAKPOINTS.TABLET_UP : void 0,
445
- motif,
446
- onClick: handleShowSearchTab,
447
- children: /* @__PURE__ */jsx(ProIconInnerFillWrap, {
448
- $active: activeModal === ModalId.Search || !!searchValue?.length,
449
- $transparent: !!embedConfig || !!inlineCategoryTabs,
454
+ children: [activeModal !== ModalId.ProMobileMenu && /* @__PURE__ */jsxs(Fragment, {
455
+ children: [/* @__PURE__ */jsx(ProIconWrap, {
456
+ "data-test-id": "search-btn",
457
+ hideBreakpoint: !useInlineCategories ? MOBILE_BREAKPOINT_UP : void 0,
458
+ motif,
459
+ onClick: handleShowSearchTab,
460
+ children: /* @__PURE__ */jsx(ProIconInnerFillWrap, {
461
+ $active: activeModal === ModalId.Search || !!searchValue,
462
+ $transparent: !!embedConfig || useInlineCategories,
463
+ children: /* @__PURE__ */jsx(SvgIcon, {
464
+ src: _externalAssets_g50k1DIN__default,
465
+ width: HEADER_ICON_SIZE,
466
+ height: HEADER_ICON_SIZE
467
+ })
468
+ })
469
+ }), cart && /* @__PURE__ */jsx(ProIconWrap, {
470
+ motif,
471
+ "data-test-id": "cart-btn",
472
+ onClick: e => cartQuantity > 0 && handleModalOpen(e, ModalId.Cart),
473
+ $isDefaultCursor: cartQuantity < 1,
474
+ children: cart?.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
475
+ diameter: HEADER_ICON_SIZE
476
+ }) : cartQuantity > 0 ? /* @__PURE__ */jsx(CartIcon, {
477
+ itemCount: cartQuantity,
478
+ motif,
479
+ width: HEADER_ICON_SIZE,
480
+ height: HEADER_ICON_SIZE
481
+ }) : /* @__PURE__ */jsx(Tooltip, {
482
+ description: translations.cart.empty,
483
+ motif: "light",
484
+ isInteractive: true,
485
+ position: "bottom",
486
+ style: {
487
+ height: `${HEADER_ICON_SIZE}px`
488
+ },
489
+ children: /* @__PURE__ */jsx(CartIcon, {
490
+ itemCount: cartQuantity,
491
+ motif,
492
+ width: HEADER_ICON_SIZE,
493
+ height: HEADER_ICON_SIZE
494
+ })
495
+ })
496
+ }), !embedConfig && !handlePurchaseHistoryClick && /* @__PURE__ */jsx(VerticalDivider, {
497
+ hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN
498
+ }), isMultiLanguage && !embedConfig?.hideLanguagePicker && /* @__PURE__ */jsx(ProIconWrap, {
499
+ motif,
500
+ "data-test-id": "language-picker-btn",
501
+ onClick: e => handleModalOpen(e, ModalId.Language),
450
502
  children: /* @__PURE__ */jsx(SvgIcon, {
451
- src: _externalAssets_g50k1DIN__default,
503
+ src: _externalAssets_DJH57LL8__default,
452
504
  width: HEADER_ICON_SIZE,
453
505
  height: HEADER_ICON_SIZE
454
506
  })
455
- })
456
- }), cart && /* @__PURE__ */jsx(ProIconWrap, {
457
- motif,
458
- "data-test-id": "cart-btn",
459
- onClick: e => cartQuantity > 0 && handleModalOpen(e, ModalId.Cart),
460
- $isDefaultCursor: cartQuantity < 1,
461
- children: cart?.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
462
- diameter: HEADER_ICON_SIZE
463
- }) : cartQuantity > 0 ? /* @__PURE__ */jsx(CartIcon, {
464
- itemCount: cartQuantity,
507
+ }), handlePurchaseHistoryClick && /* @__PURE__ */jsx(ProIconWrap, {
508
+ hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
465
509
  motif,
466
- width: HEADER_ICON_SIZE,
467
- height: HEADER_ICON_SIZE
468
- }) : /* @__PURE__ */jsx(Tooltip, {
469
- description: translations.cart.empty,
470
- motif: "light",
471
- isInteractive: true,
472
- position: "bottom",
473
- style: {
474
- height: `${HEADER_ICON_SIZE}px`
475
- },
476
- children: /* @__PURE__ */jsx(CartIcon, {
477
- itemCount: cartQuantity,
478
- motif,
510
+ onClick: handlePurchaseHistoryClick,
511
+ children: /* @__PURE__ */jsx(SvgIcon, {
512
+ src: HistoryIcon__default,
479
513
  width: HEADER_ICON_SIZE,
480
514
  height: HEADER_ICON_SIZE
481
515
  })
482
- })
483
- }), !embedConfig && !handlePurchaseHistoryClick && /* @__PURE__ */jsx(VerticalDivider, {
484
- hideBreakpoint: BREAKPOINTS.TABLET_AND_DOWN
485
- }), isMultiLanguage && !embedConfig?.hideLanguagePicker && /* @__PURE__ */jsx(ProIconWrap, {
486
- motif,
487
- "data-test-id": "language-picker-btn",
488
- onClick: e => handleModalOpen(e, ModalId.Language),
489
- children: /* @__PURE__ */jsx(SvgIcon, {
490
- src: _externalAssets_DJH57LL8__default,
491
- width: HEADER_ICON_SIZE,
492
- height: HEADER_ICON_SIZE
493
- })
494
- }), handlePurchaseHistoryClick && /* @__PURE__ */jsx(ProIconWrap, {
495
- hideBreakpoint: BREAKPOINTS.TABLET_AND_DOWN,
496
- motif,
497
- onClick: handlePurchaseHistoryClick,
498
- children: /* @__PURE__ */jsx(SvgIcon, {
499
- src: HistoryIcon__default,
500
- width: HEADER_ICON_SIZE,
501
- height: HEADER_ICON_SIZE
502
- })
503
- }), earlyAccess && /* @__PURE__ */jsx(ProIconWrap, {
504
- hideBreakpoint: BREAKPOINTS.TABLET_AND_DOWN,
505
- motif,
506
- onClick: earlyAccess.onClick,
507
- children: earlyAccess.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
508
- diameter: HEADER_ICON_SIZE
509
- }) : /* @__PURE__ */jsx(SvgIcon, {
510
- src: EAIcon__default,
511
- width: HEADER_ICON_SIZE,
512
- height: HEADER_ICON_SIZE * 0.8,
513
- renderedHeight: HEADER_ICON_SIZE * 0.8
514
- })
515
- }), !embedConfig?.moveAvatarIconToLeft ? !accountMenu ? avatarHtml : accountMenu : null, /* @__PURE__ */jsx(VerticalDivider, {
516
- hideBreakpoint: BREAKPOINTS.TABLET_UP
516
+ }), earlyAccess && /* @__PURE__ */jsx(ProIconWrap, {
517
+ hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
518
+ motif,
519
+ onClick: earlyAccess.onClick,
520
+ children: earlyAccess.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
521
+ diameter: HEADER_ICON_SIZE
522
+ }) : /* @__PURE__ */jsx(SvgIcon, {
523
+ src: EAIcon__default,
524
+ width: HEADER_ICON_SIZE,
525
+ height: HEADER_ICON_SIZE * 0.8,
526
+ renderedHeight: HEADER_ICON_SIZE * 0.8
527
+ })
528
+ }), !embedConfig?.moveAvatarIconToLeft ? !accountMenu ? avatarHtml : accountMenu : null, /* @__PURE__ */jsx(VerticalDivider, {
529
+ hideBreakpoint: MOBILE_BREAKPOINT_UP
530
+ })]
517
531
  }), /* @__PURE__ */jsx(ProIconWrap, {
518
- hideBreakpoint: BREAKPOINTS.TABLET_UP,
532
+ hideBreakpoint: MOBILE_BREAKPOINT_UP,
519
533
  motif,
520
534
  onClick: handleHamburgerClick,
521
535
  children: activeModal === ModalId.ProMobileMenu ? /* @__PURE__ */jsx(SvgIcon, {
@@ -589,12 +603,11 @@ const ProHeader = memo(function ProHeader2({
589
603
  handleProductLineChange,
590
604
  productLineValue,
591
605
  productLineOptions,
592
- extraSectionItems: embedConfig?.mobileMenuExtraSectionItems,
593
- inlineCategoryTabs
606
+ categories,
607
+ hideExtraSection: !!embedConfig
594
608
  })]
595
- }), !!hasProMenu && !embedConfig && /* @__PURE__ */jsx(NavigationProMenu, {
609
+ }), useInlineCategories && !embedConfig && /* @__PURE__ */jsx(NavigationProMenu, {
596
610
  show: showProMenu,
597
- onClose: () => setShowTouchProMenu(false),
598
611
  currentCountryName,
599
612
  handleStorePickerClick,
600
613
  productLineValue,
@@ -604,7 +617,7 @@ const ProHeader = memo(function ProHeader2({
604
617
  }), /* @__PURE__ */jsx(SearchTabWrap, {
605
618
  $show: activeModal === ModalId.Search,
606
619
  $isStickyEmbed: !!embedConfig,
607
- hideBreakpoint: BREAKPOINTS.MOBILE_UP,
620
+ hideBreakpoint: MOBILE_BREAKPOINT_UP,
608
621
  children: /* @__PURE__ */jsx(Search, {
609
622
  setInputRef: setSearchInputRef,
610
623
  onValueChange: handleSearchValueChange,