@doyourjob/gravity-ui-page-constructor-addons 2.1.8

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 (338) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -0
  3. package/build/cjs/components/EnrichedLink/EnrichedLink.css +94 -0
  4. package/build/cjs/components/EnrichedLink/EnrichedLink.d.ts +17 -0
  5. package/build/cjs/components/EnrichedLink/EnrichedLink.js +38 -0
  6. package/build/cjs/components/Navigation/components/ButtonsContainer/ButtonsContainer.css +12 -0
  7. package/build/cjs/components/Navigation/components/ButtonsContainer/ButtonsContainer.d.ts +15 -0
  8. package/build/cjs/components/Navigation/components/ButtonsContainer/ButtonsContainer.js +17 -0
  9. package/build/cjs/components/Navigation/components/LangSwitch/LangSwitch.css +62 -0
  10. package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.css +62 -0
  11. package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.d.ts +7 -0
  12. package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.js +23 -0
  13. package/build/cjs/components/Navigation/components/LangSwitch/index.d.ts +17 -0
  14. package/build/cjs/components/Navigation/components/LangSwitch/index.js +27 -0
  15. package/build/cjs/components/Navigation/components/Logo/Logo.css +53 -0
  16. package/build/cjs/components/Navigation/components/Logo/Logo.d.ts +9 -0
  17. package/build/cjs/components/Navigation/components/Logo/Logo.js +15 -0
  18. package/build/cjs/components/Navigation/components/Logo/i18n/en.json +4 -0
  19. package/build/cjs/components/Navigation/components/Logo/i18n/index.d.ts +2 -0
  20. package/build/cjs/components/Navigation/components/Logo/i18n/index.js +8 -0
  21. package/build/cjs/components/Navigation/components/Logo/i18n/ru.json +4 -0
  22. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigation.css +47 -0
  23. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigation.d.ts +16 -0
  24. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigation.js +26 -0
  25. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.css +75 -0
  26. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +7 -0
  27. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +45 -0
  28. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.css +55 -0
  29. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.d.ts +9 -0
  30. package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.js +47 -0
  31. package/build/cjs/components/Navigation/components/Navigation/Navigation.css +28 -0
  32. package/build/cjs/components/Navigation/components/Navigation/Navigation.d.ts +13 -0
  33. package/build/cjs/components/Navigation/components/Navigation/Navigation.js +74 -0
  34. package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.css +81 -0
  35. package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +14 -0
  36. package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +57 -0
  37. package/build/cjs/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.d.ts +12 -0
  38. package/build/cjs/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +11 -0
  39. package/build/cjs/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.css +20 -0
  40. package/build/cjs/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.d.ts +11 -0
  41. package/build/cjs/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.js +20 -0
  42. package/build/cjs/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.css +111 -0
  43. package/build/cjs/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.d.ts +12 -0
  44. package/build/cjs/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.js +46 -0
  45. package/build/cjs/components/Navigation/components/SearchNotFound/SearchNotFound.css +7 -0
  46. package/build/cjs/components/Navigation/components/SearchNotFound/SearchNotFound.d.ts +8 -0
  47. package/build/cjs/components/Navigation/components/SearchNotFound/SearchNotFound.js +22 -0
  48. package/build/cjs/components/Navigation/components/SearchNotFound/i18n/en.json +4 -0
  49. package/build/cjs/components/Navigation/components/SearchNotFound/i18n/index.d.ts +2 -0
  50. package/build/cjs/components/Navigation/components/SearchNotFound/i18n/index.js +8 -0
  51. package/build/cjs/components/Navigation/components/SearchNotFound/i18n/ru.json +4 -0
  52. package/build/cjs/components/Navigation/components/SearchResult/SearchResult.css +8 -0
  53. package/build/cjs/components/Navigation/components/SearchResult/SearchResult.d.ts +10 -0
  54. package/build/cjs/components/Navigation/components/SearchResult/SearchResult.js +25 -0
  55. package/build/cjs/components/Navigation/components/SearchResult/i18n/en.json +12 -0
  56. package/build/cjs/components/Navigation/components/SearchResult/i18n/index.d.ts +2 -0
  57. package/build/cjs/components/Navigation/components/SearchResult/i18n/index.js +8 -0
  58. package/build/cjs/components/Navigation/components/SearchResult/i18n/ru.json +11 -0
  59. package/build/cjs/components/Navigation/components/Tag/Tag.css +21 -0
  60. package/build/cjs/components/Navigation/components/Tag/Tag.d.ts +6 -0
  61. package/build/cjs/components/Navigation/components/Tag/Tag.js +22 -0
  62. package/build/cjs/components/Navigation/components/popups/LargePopup/LargePopup.css +71 -0
  63. package/build/cjs/components/Navigation/components/popups/LargePopup/LargePopup.d.ts +6 -0
  64. package/build/cjs/components/Navigation/components/popups/LargePopup/LargePopup.js +78 -0
  65. package/build/cjs/components/Navigation/components/popups/MediumPopup/MediumPopup.css +6 -0
  66. package/build/cjs/components/Navigation/components/popups/MediumPopup/MediumPopup.d.ts +7 -0
  67. package/build/cjs/components/Navigation/components/popups/MediumPopup/MediumPopup.js +16 -0
  68. package/build/cjs/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.css +37 -0
  69. package/build/cjs/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.d.ts +7 -0
  70. package/build/cjs/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.js +54 -0
  71. package/build/cjs/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.css +7 -0
  72. package/build/cjs/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.d.ts +7 -0
  73. package/build/cjs/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.js +18 -0
  74. package/build/cjs/components/Navigation/components/popups/components/PopupCategory/PopupCategory.css +43 -0
  75. package/build/cjs/components/Navigation/components/popups/components/PopupCategory/PopupCategory.d.ts +9 -0
  76. package/build/cjs/components/Navigation/components/popups/components/PopupCategory/PopupCategory.js +13 -0
  77. package/build/cjs/components/Navigation/components/popups/components/PopupGroup/PopupGroup.css +27 -0
  78. package/build/cjs/components/Navigation/components/popups/components/PopupGroup/PopupGroup.d.ts +11 -0
  79. package/build/cjs/components/Navigation/components/popups/components/PopupGroup/PopupGroup.js +21 -0
  80. package/build/cjs/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.css +17 -0
  81. package/build/cjs/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.d.ts +8 -0
  82. package/build/cjs/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.js +20 -0
  83. package/build/cjs/components/Navigation/components/popups/components/PopupTitle/PopupTitle.d.ts +4 -0
  84. package/build/cjs/components/Navigation/components/popups/components/PopupTitle/PopupTitle.js +19 -0
  85. package/build/cjs/components/Navigation/components/popups/components/Search/Search.css +38 -0
  86. package/build/cjs/components/Navigation/components/popups/components/Search/Search.d.ts +17 -0
  87. package/build/cjs/components/Navigation/components/popups/components/Search/Search.js +47 -0
  88. package/build/cjs/components/Navigation/components/popups/components/Search/i18n/en.json +5 -0
  89. package/build/cjs/components/Navigation/components/popups/components/Search/i18n/index.d.ts +2 -0
  90. package/build/cjs/components/Navigation/components/popups/components/Search/i18n/index.js +8 -0
  91. package/build/cjs/components/Navigation/components/popups/components/Search/i18n/ru.json +5 -0
  92. package/build/cjs/components/Navigation/constants.d.ts +7 -0
  93. package/build/cjs/components/Navigation/constants.js +11 -0
  94. package/build/cjs/components/Navigation/containers/Footer/Footer.css +104 -0
  95. package/build/cjs/components/Navigation/containers/Footer/Footer.d.ts +3 -0
  96. package/build/cjs/components/Navigation/containers/Footer/Footer.js +58 -0
  97. package/build/cjs/components/Navigation/containers/Footer/GroupLinks/GroupLinks.css +68 -0
  98. package/build/cjs/components/Navigation/containers/Footer/GroupLinks/GroupLinks.d.ts +12 -0
  99. package/build/cjs/components/Navigation/containers/Footer/GroupLinks/GroupLinks.js +15 -0
  100. package/build/cjs/components/Navigation/containers/Footer/index.d.ts +3 -0
  101. package/build/cjs/components/Navigation/containers/Footer/index.js +6 -0
  102. package/build/cjs/components/Navigation/containers/Footer/models.d.ts +23 -0
  103. package/build/cjs/components/Navigation/containers/Footer/models.js +2 -0
  104. package/build/cjs/components/Navigation/containers/Footer/variables.css +7 -0
  105. package/build/cjs/components/Navigation/containers/Header/Header.css +172 -0
  106. package/build/cjs/components/Navigation/containers/Header/Header.d.ts +18 -0
  107. package/build/cjs/components/Navigation/containers/Header/Header.js +116 -0
  108. package/build/cjs/components/Navigation/containers/Header/index.d.ts +15 -0
  109. package/build/cjs/components/Navigation/containers/Header/index.js +25 -0
  110. package/build/cjs/components/Navigation/contexts/analytics.d.ts +6 -0
  111. package/build/cjs/components/Navigation/contexts/analytics.js +6 -0
  112. package/build/cjs/components/Navigation/contexts/device.d.ts +5 -0
  113. package/build/cjs/components/Navigation/contexts/device.js +6 -0
  114. package/build/cjs/components/Navigation/contexts/location.d.ts +9 -0
  115. package/build/cjs/components/Navigation/contexts/location.js +6 -0
  116. package/build/cjs/components/Navigation/contexts/mobile.d.ts +3 -0
  117. package/build/cjs/components/Navigation/contexts/mobile.js +6 -0
  118. package/build/cjs/components/Navigation/contexts/navigation-section.d.ts +3 -0
  119. package/build/cjs/components/Navigation/contexts/navigation-section.js +6 -0
  120. package/build/cjs/components/Navigation/contexts/route-change.d.ts +3 -0
  121. package/build/cjs/components/Navigation/contexts/route-change.js +6 -0
  122. package/build/cjs/components/Navigation/contexts/theme.d.ts +4 -0
  123. package/build/cjs/components/Navigation/contexts/theme.js +7 -0
  124. package/build/cjs/components/Navigation/index.d.ts +4 -0
  125. package/build/cjs/components/Navigation/index.js +7 -0
  126. package/build/cjs/components/Navigation/models.d.ts +89 -0
  127. package/build/cjs/components/Navigation/models.js +22 -0
  128. package/build/cjs/components/Navigation/styles/mixins.css +0 -0
  129. package/build/cjs/components/Navigation/styles/variables.css +14 -0
  130. package/build/cjs/components/Navigation/utils.d.ts +18 -0
  131. package/build/cjs/components/Navigation/utils.js +32 -0
  132. package/build/cjs/components/index.d.ts +2 -0
  133. package/build/cjs/components/index.js +5 -0
  134. package/build/cjs/constants.d.ts +3 -0
  135. package/build/cjs/constants.js +6 -0
  136. package/build/cjs/context/mobileContext/MobileContext.d.ts +2 -0
  137. package/build/cjs/context/mobileContext/MobileContext.js +6 -0
  138. package/build/cjs/context/mobileContext/index.d.ts +1 -0
  139. package/build/cjs/context/mobileContext/index.js +4 -0
  140. package/build/cjs/context/theme/ThemeContext.d.ts +10 -0
  141. package/build/cjs/context/theme/ThemeContext.js +15 -0
  142. package/build/cjs/context/theme/index.d.ts +3 -0
  143. package/build/cjs/context/theme/index.js +6 -0
  144. package/build/cjs/context/theme/useTheme.d.ts +2 -0
  145. package/build/cjs/context/theme/useTheme.js +11 -0
  146. package/build/cjs/context/theme/withTheme.d.ts +6 -0
  147. package/build/cjs/context/theme/withTheme.js +19 -0
  148. package/build/cjs/hooks/useIsCurrentPage.d.ts +1 -0
  149. package/build/cjs/hooks/useIsCurrentPage.js +13 -0
  150. package/build/cjs/hooks/useIsIPhone.d.ts +1 -0
  151. package/build/cjs/hooks/useIsIPhone.js +10 -0
  152. package/build/cjs/i18n.d.ts +2 -0
  153. package/build/cjs/i18n.js +12 -0
  154. package/build/cjs/index.d.ts +2 -0
  155. package/build/cjs/index.js +8 -0
  156. package/build/cjs/models/index.d.ts +3 -0
  157. package/build/cjs/models/index.js +2 -0
  158. package/build/cjs/utils/FocusTrap.d.ts +10 -0
  159. package/build/cjs/utils/FocusTrap.js +105 -0
  160. package/build/cjs/utils/cn.d.ts +5 -0
  161. package/build/cjs/utils/cn.js +9 -0
  162. package/build/cjs/utils/configure.d.ts +12 -0
  163. package/build/cjs/utils/configure.js +26 -0
  164. package/build/cjs/utils/registerKeyset.d.ts +5 -0
  165. package/build/cjs/utils/registerKeyset.js +9 -0
  166. package/build/esm/components/EnrichedLink/EnrichedLink.css +94 -0
  167. package/build/esm/components/EnrichedLink/EnrichedLink.d.ts +18 -0
  168. package/build/esm/components/EnrichedLink/EnrichedLink.js +34 -0
  169. package/build/esm/components/Navigation/components/ButtonsContainer/ButtonsContainer.css +12 -0
  170. package/build/esm/components/Navigation/components/ButtonsContainer/ButtonsContainer.d.ts +16 -0
  171. package/build/esm/components/Navigation/components/ButtonsContainer/ButtonsContainer.js +13 -0
  172. package/build/esm/components/Navigation/components/LangSwitch/LangSwitch.css +62 -0
  173. package/build/esm/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.css +62 -0
  174. package/build/esm/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.d.ts +8 -0
  175. package/build/esm/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.js +19 -0
  176. package/build/esm/components/Navigation/components/LangSwitch/index.d.ts +18 -0
  177. package/build/esm/components/Navigation/components/LangSwitch/index.js +23 -0
  178. package/build/esm/components/Navigation/components/Logo/Logo.css +53 -0
  179. package/build/esm/components/Navigation/components/Logo/Logo.d.ts +10 -0
  180. package/build/esm/components/Navigation/components/Logo/Logo.js +13 -0
  181. package/build/esm/components/Navigation/components/Logo/i18n/en.json +4 -0
  182. package/build/esm/components/Navigation/components/Logo/i18n/index.d.ts +2 -0
  183. package/build/esm/components/Navigation/components/Logo/i18n/index.js +5 -0
  184. package/build/esm/components/Navigation/components/Logo/i18n/ru.json +4 -0
  185. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigation.css +47 -0
  186. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigation.d.ts +17 -0
  187. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigation.js +22 -0
  188. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.css +75 -0
  189. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +8 -0
  190. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +41 -0
  191. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.css +55 -0
  192. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.d.ts +10 -0
  193. package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.js +43 -0
  194. package/build/esm/components/Navigation/components/Navigation/Navigation.css +28 -0
  195. package/build/esm/components/Navigation/components/Navigation/Navigation.d.ts +14 -0
  196. package/build/esm/components/Navigation/components/Navigation/Navigation.js +70 -0
  197. package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.css +81 -0
  198. package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +15 -0
  199. package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +53 -0
  200. package/build/esm/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.d.ts +12 -0
  201. package/build/esm/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +6 -0
  202. package/build/esm/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.css +20 -0
  203. package/build/esm/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.d.ts +12 -0
  204. package/build/esm/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.js +16 -0
  205. package/build/esm/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.css +111 -0
  206. package/build/esm/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.d.ts +13 -0
  207. package/build/esm/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.js +42 -0
  208. package/build/esm/components/Navigation/components/SearchNotFound/SearchNotFound.css +7 -0
  209. package/build/esm/components/Navigation/components/SearchNotFound/SearchNotFound.d.ts +9 -0
  210. package/build/esm/components/Navigation/components/SearchNotFound/SearchNotFound.js +18 -0
  211. package/build/esm/components/Navigation/components/SearchNotFound/i18n/en.json +4 -0
  212. package/build/esm/components/Navigation/components/SearchNotFound/i18n/index.d.ts +2 -0
  213. package/build/esm/components/Navigation/components/SearchNotFound/i18n/index.js +5 -0
  214. package/build/esm/components/Navigation/components/SearchNotFound/i18n/ru.json +4 -0
  215. package/build/esm/components/Navigation/components/SearchResult/SearchResult.css +8 -0
  216. package/build/esm/components/Navigation/components/SearchResult/SearchResult.d.ts +11 -0
  217. package/build/esm/components/Navigation/components/SearchResult/SearchResult.js +21 -0
  218. package/build/esm/components/Navigation/components/SearchResult/i18n/en.json +12 -0
  219. package/build/esm/components/Navigation/components/SearchResult/i18n/index.d.ts +2 -0
  220. package/build/esm/components/Navigation/components/SearchResult/i18n/index.js +5 -0
  221. package/build/esm/components/Navigation/components/SearchResult/i18n/ru.json +11 -0
  222. package/build/esm/components/Navigation/components/Tag/Tag.css +21 -0
  223. package/build/esm/components/Navigation/components/Tag/Tag.d.ts +7 -0
  224. package/build/esm/components/Navigation/components/Tag/Tag.js +18 -0
  225. package/build/esm/components/Navigation/components/popups/LargePopup/LargePopup.css +71 -0
  226. package/build/esm/components/Navigation/components/popups/LargePopup/LargePopup.d.ts +7 -0
  227. package/build/esm/components/Navigation/components/popups/LargePopup/LargePopup.js +74 -0
  228. package/build/esm/components/Navigation/components/popups/MediumPopup/MediumPopup.css +6 -0
  229. package/build/esm/components/Navigation/components/popups/MediumPopup/MediumPopup.d.ts +8 -0
  230. package/build/esm/components/Navigation/components/popups/MediumPopup/MediumPopup.js +12 -0
  231. package/build/esm/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.css +37 -0
  232. package/build/esm/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.d.ts +8 -0
  233. package/build/esm/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.js +50 -0
  234. package/build/esm/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.css +7 -0
  235. package/build/esm/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.d.ts +8 -0
  236. package/build/esm/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.js +14 -0
  237. package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.css +43 -0
  238. package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.d.ts +10 -0
  239. package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.js +9 -0
  240. package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.css +27 -0
  241. package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.d.ts +12 -0
  242. package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.js +18 -0
  243. package/build/esm/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.css +17 -0
  244. package/build/esm/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.d.ts +9 -0
  245. package/build/esm/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.js +17 -0
  246. package/build/esm/components/Navigation/components/popups/components/PopupTitle/PopupTitle.d.ts +4 -0
  247. package/build/esm/components/Navigation/components/popups/components/PopupTitle/PopupTitle.js +14 -0
  248. package/build/esm/components/Navigation/components/popups/components/Search/Search.css +38 -0
  249. package/build/esm/components/Navigation/components/popups/components/Search/Search.d.ts +18 -0
  250. package/build/esm/components/Navigation/components/popups/components/Search/Search.js +45 -0
  251. package/build/esm/components/Navigation/components/popups/components/Search/i18n/en.json +5 -0
  252. package/build/esm/components/Navigation/components/popups/components/Search/i18n/index.d.ts +2 -0
  253. package/build/esm/components/Navigation/components/popups/components/Search/i18n/index.js +5 -0
  254. package/build/esm/components/Navigation/components/popups/components/Search/i18n/ru.json +5 -0
  255. package/build/esm/components/Navigation/constants.d.ts +7 -0
  256. package/build/esm/components/Navigation/constants.js +8 -0
  257. package/build/esm/components/Navigation/containers/Footer/Footer.css +104 -0
  258. package/build/esm/components/Navigation/containers/Footer/Footer.d.ts +4 -0
  259. package/build/esm/components/Navigation/containers/Footer/Footer.js +54 -0
  260. package/build/esm/components/Navigation/containers/Footer/GroupLinks/GroupLinks.css +68 -0
  261. package/build/esm/components/Navigation/containers/Footer/GroupLinks/GroupLinks.d.ts +13 -0
  262. package/build/esm/components/Navigation/containers/Footer/GroupLinks/GroupLinks.js +13 -0
  263. package/build/esm/components/Navigation/containers/Footer/index.d.ts +3 -0
  264. package/build/esm/components/Navigation/containers/Footer/index.js +3 -0
  265. package/build/esm/components/Navigation/containers/Footer/models.d.ts +23 -0
  266. package/build/esm/components/Navigation/containers/Footer/models.js +1 -0
  267. package/build/esm/components/Navigation/containers/Footer/variables.css +7 -0
  268. package/build/esm/components/Navigation/containers/Header/Header.css +172 -0
  269. package/build/esm/components/Navigation/containers/Header/Header.d.ts +19 -0
  270. package/build/esm/components/Navigation/containers/Header/Header.js +113 -0
  271. package/build/esm/components/Navigation/containers/Header/index.d.ts +15 -0
  272. package/build/esm/components/Navigation/containers/Header/index.js +21 -0
  273. package/build/esm/components/Navigation/contexts/analytics.d.ts +6 -0
  274. package/build/esm/components/Navigation/contexts/analytics.js +2 -0
  275. package/build/esm/components/Navigation/contexts/device.d.ts +5 -0
  276. package/build/esm/components/Navigation/contexts/device.js +2 -0
  277. package/build/esm/components/Navigation/contexts/location.d.ts +9 -0
  278. package/build/esm/components/Navigation/contexts/location.js +2 -0
  279. package/build/esm/components/Navigation/contexts/mobile.d.ts +3 -0
  280. package/build/esm/components/Navigation/contexts/mobile.js +2 -0
  281. package/build/esm/components/Navigation/contexts/navigation-section.d.ts +3 -0
  282. package/build/esm/components/Navigation/contexts/navigation-section.js +2 -0
  283. package/build/esm/components/Navigation/contexts/route-change.d.ts +3 -0
  284. package/build/esm/components/Navigation/contexts/route-change.js +2 -0
  285. package/build/esm/components/Navigation/contexts/theme.d.ts +4 -0
  286. package/build/esm/components/Navigation/contexts/theme.js +3 -0
  287. package/build/esm/components/Navigation/index.d.ts +4 -0
  288. package/build/esm/components/Navigation/index.js +4 -0
  289. package/build/esm/components/Navigation/models.d.ts +89 -0
  290. package/build/esm/components/Navigation/models.js +19 -0
  291. package/build/esm/components/Navigation/styles/mixins.css +0 -0
  292. package/build/esm/components/Navigation/styles/variables.css +14 -0
  293. package/build/esm/components/Navigation/utils.d.ts +18 -0
  294. package/build/esm/components/Navigation/utils.js +25 -0
  295. package/build/esm/components/index.d.ts +2 -0
  296. package/build/esm/components/index.js +2 -0
  297. package/build/esm/constants.d.ts +3 -0
  298. package/build/esm/constants.js +3 -0
  299. package/build/esm/context/mobileContext/MobileContext.d.ts +2 -0
  300. package/build/esm/context/mobileContext/MobileContext.js +2 -0
  301. package/build/esm/context/mobileContext/index.d.ts +1 -0
  302. package/build/esm/context/mobileContext/index.js +1 -0
  303. package/build/esm/context/theme/ThemeContext.d.ts +10 -0
  304. package/build/esm/context/theme/ThemeContext.js +11 -0
  305. package/build/esm/context/theme/index.d.ts +3 -0
  306. package/build/esm/context/theme/index.js +3 -0
  307. package/build/esm/context/theme/useTheme.d.ts +2 -0
  308. package/build/esm/context/theme/useTheme.js +6 -0
  309. package/build/esm/context/theme/withTheme.d.ts +6 -0
  310. package/build/esm/context/theme/withTheme.js +14 -0
  311. package/build/esm/hooks/useIsCurrentPage.d.ts +1 -0
  312. package/build/esm/hooks/useIsCurrentPage.js +8 -0
  313. package/build/esm/hooks/useIsIPhone.d.ts +1 -0
  314. package/build/esm/hooks/useIsIPhone.js +6 -0
  315. package/build/esm/i18n.d.ts +2 -0
  316. package/build/esm/i18n.js +9 -0
  317. package/build/esm/index.d.ts +2 -0
  318. package/build/esm/index.js +3 -0
  319. package/build/esm/models/index.d.ts +3 -0
  320. package/build/esm/models/index.js +1 -0
  321. package/build/esm/utils/FocusTrap.d.ts +10 -0
  322. package/build/esm/utils/FocusTrap.js +99 -0
  323. package/build/esm/utils/cn.d.ts +5 -0
  324. package/build/esm/utils/cn.js +6 -0
  325. package/build/esm/utils/configure.d.ts +12 -0
  326. package/build/esm/utils/configure.js +20 -0
  327. package/build/esm/utils/registerKeyset.d.ts +5 -0
  328. package/build/esm/utils/registerKeyset.js +5 -0
  329. package/package.json +152 -0
  330. package/styles/.gitkeep +0 -0
  331. package/styles/mixins.scss +1 -0
  332. package/styles/storybook/common.scss +37 -0
  333. package/styles/storybook/index.scss +20 -0
  334. package/styles/storybook/palette.scss +75 -0
  335. package/styles/storybook/typography.scss +139 -0
  336. package/styles/styles.css +1 -0
  337. package/styles/styles.scss +1 -0
  338. package/styles/variables.scss +3 -0
@@ -0,0 +1,68 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ :root {
4
+ --footer-margin-xs: 12px;
5
+ --footer-margin-s: 16px;
6
+ --footer-margin-m: 24px;
7
+ --footer-margin-l: 32px;
8
+ --footer-margin-xl: 48px;
9
+ }
10
+
11
+ .pc-addons-group-links {
12
+ display: flex;
13
+ }
14
+
15
+ .pc-addons-group-links__group {
16
+ margin: 0;
17
+ padding: 0;
18
+ list-style: none;
19
+ flex: 1;
20
+ width: 100%;
21
+ }
22
+
23
+ .pc-addons-group-links__group:not(:first-child) {
24
+ margin-left: 8px;
25
+ }
26
+
27
+ .pc-addons-group-links__group-title {
28
+ font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
29
+ line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
30
+ color: var(--g-color-text-primary);
31
+ margin-bottom: var(--footer-margin-s);
32
+ }
33
+
34
+ .pc-addons-group-links__item-wrapper {
35
+ margin-bottom: var(--footer-margin-s);
36
+ }
37
+
38
+ .pc-addons-group-links__item-wrapper:last-of-type {
39
+ margin-bottom: 0;
40
+ }
41
+
42
+ .pc-addons-group-links__item {
43
+ font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
44
+ line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
45
+ }
46
+
47
+ .pc-addons-group-links__item:focus {
48
+ outline: 2px solid var(--g-color-line-focus);
49
+ outline-offset: 0;
50
+ }
51
+
52
+ .pc-addons-group-links__item:focus:not(:focus-visible) {
53
+ outline: 0;
54
+ }
55
+
56
+ .pc-addons-group-links__item_underline:not(:last-child) {
57
+ margin-right: var(--footer-margin-m);
58
+ }
59
+
60
+ .pc-addons-group-links__item_social:not(:last-child) {
61
+ margin-right: 8px;
62
+ }
63
+
64
+ @media (max-width: 769px) {
65
+ .pc-addons-group-links__item_underline:not(:last-child) {
66
+ margin-bottom: var(--footer-margin-s);
67
+ }
68
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { EnrichedLinkProps } from '../../../../EnrichedLink/EnrichedLink';
3
+ export interface GroupLinksProps {
4
+ columnGroup: GroupLinkColumn;
5
+ className?: string;
6
+ }
7
+ export interface GroupLinkColumn {
8
+ title?: string;
9
+ items: EnrichedLinkProps[];
10
+ }
11
+ declare const GroupLinks: ({ columnGroup: { title, items }, className }: GroupLinksProps) => React.JSX.Element;
12
+ export default GroupLinks;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const react_1 = tslib_1.__importDefault(require("react"));
5
+ const cn_1 = require("../../../../../utils/cn");
6
+ const EnrichedLink_1 = require("../../../../EnrichedLink/EnrichedLink");
7
+ const b = (0, cn_1.block)('group-links');
8
+ const GroupLinks = ({ columnGroup: { title, items }, className }) => {
9
+ return (react_1.default.createElement("div", { className: b(null, className), key: title },
10
+ react_1.default.createElement("ul", { className: b('group') },
11
+ title && react_1.default.createElement("h5", { className: b('group-title') }, title),
12
+ items.map((item) => (react_1.default.createElement("li", { key: item.title, className: b('item-wrapper') },
13
+ react_1.default.createElement(EnrichedLink_1.EnrichedLink, Object.assign({ className: b('item') }, item))))))));
14
+ };
15
+ exports.default = GroupLinks;
@@ -0,0 +1,3 @@
1
+ export * from './Footer';
2
+ export * from './GroupLinks/GroupLinks';
3
+ export * from './models';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Footer"), exports);
5
+ tslib_1.__exportStar(require("./GroupLinks/GroupLinks"), exports);
6
+ tslib_1.__exportStar(require("./models"), exports);
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import type { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
3
+ import type { EnrichedLinkProps } from '../../../EnrichedLink/EnrichedLink';
4
+ import { LangSwitchProps } from '../../components/LangSwitch';
5
+ import type { GroupLinkColumn } from './GroupLinks/GroupLinks';
6
+ export type FooterType = 'simple' | 'default';
7
+ export type FooterMedia = {
8
+ item: React.ReactNode;
9
+ md?: number;
10
+ position: 'left' | 'right';
11
+ };
12
+ export interface FooterProps extends ClassNameProps {
13
+ type?: FooterType;
14
+ underline?: {
15
+ leftItems?: EnrichedLinkProps[];
16
+ rightItems?: EnrichedLinkProps[];
17
+ copyright?: string;
18
+ langSwitch?: Pick<LangSwitchProps, 'text' | 'showText' | 'items'>;
19
+ };
20
+ columns?: GroupLinkColumn[][];
21
+ customItems?: React.ReactNode;
22
+ media?: FooterMedia;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ :root {
2
+ --footer-margin-xs: 12px;
3
+ --footer-margin-s: 16px;
4
+ --footer-margin-m: 24px;
5
+ --footer-margin-l: 32px;
6
+ --footer-margin-xl: 48px;
7
+ }
@@ -0,0 +1,172 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .pc-addons-header {
4
+ --g-scrollbar-width: 8px;
5
+ --g-color-scroll-handle: var(--g-color-base-generic);
6
+ --g-color-scroll-handle-hover: var(--g-color-line-generic);
7
+ position: relative;
8
+ width: 100%;
9
+ max-width: min(100% - 32px, 1296px);
10
+ margin: 0 auto;
11
+ padding: 12px 32px 0 32px;
12
+ background: var(--pc-transparent);
13
+ border-radius: var(--pc-addons-navigation-border-radius);
14
+ z-index: calc(var(--pc-addons-navigation-popup-z-index) + 1);
15
+ }
16
+
17
+ .pc-addons-header_with-background {
18
+ background: var(--g-color-base-background);
19
+ }
20
+
21
+ .pc-addons-header_with-background.pc-addons-header_with-shadow {
22
+ box-shadow: 0 4px 24px var(--g-color-base-generic);
23
+ }
24
+
25
+ .pc-addons-header_one-row {
26
+ padding-bottom: 12px;
27
+ }
28
+
29
+ .pc-addons-header__container {
30
+ display: flex;
31
+ justify-content: space-between;
32
+ height: 36px;
33
+ }
34
+
35
+ .pc-addons-header__left, .pc-addons-header__right {
36
+ display: flex;
37
+ align-items: center;
38
+ }
39
+
40
+ .pc-addons-header__left {
41
+ margin-right: 32px;
42
+ }
43
+
44
+ .pc-addons-header__right {
45
+ justify-content: flex-end;
46
+ width: 100%;
47
+ }
48
+
49
+ .pc-addons-header__icons-container {
50
+ width: 100%;
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: flex-end;
54
+ }
55
+
56
+ .pc-addons-header__buttons {
57
+ display: flex;
58
+ margin-left: 8px;
59
+ }
60
+
61
+ .pc-addons-header__icon {
62
+ color: var(--g-color-text-hint);
63
+ transition: color 0.2s;
64
+ }
65
+
66
+ .pc-addons-header__user {
67
+ margin-left: 12px;
68
+ }
69
+
70
+ @media (max-width: 768px) {
71
+ .pc-addons-header__user {
72
+ display: none;
73
+ }
74
+ }
75
+ .pc-addons-header__back {
76
+ position: relative;
77
+ left: 2px;
78
+ }
79
+
80
+ .pc-addons-header__back-icon {
81
+ color: var(--g-color-text-hint);
82
+ }
83
+
84
+ .pc-addons-header__back {
85
+ display: none;
86
+ }
87
+
88
+ .pc-addons-header__back:hover:before {
89
+ background: none;
90
+ }
91
+
92
+ .pc-addons-header__back:hover .pc-addons-header__icon {
93
+ color: var(--g-color-text-complementary);
94
+ }
95
+
96
+ .pc-addons-header__scroller {
97
+ margin-top: 12px;
98
+ }
99
+
100
+ @media (max-width: 768px) {
101
+ .pc-addons-header__scroller {
102
+ display: none;
103
+ }
104
+ }
105
+ .pc-addons-header__popup {
106
+ --yc-popup-border-width: 0;
107
+ --yc-popup-border-color: none;
108
+ border-radius: var(--pc-addons-navigation-border-radius);
109
+ box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
110
+ --yc-popover-max-width: 1296px;
111
+ --yc-popover-padding: 20px;
112
+ width: var(--yc-popover-max-width);
113
+ left: 0;
114
+ box-shadow: 0 4px 24px var(--g-color-base-generic-hover), 0 2px 8px var(--g-color-base-generic-hover);
115
+ }
116
+
117
+ .pc-addons-header__popup_with-background {
118
+ border-radius: 0 0 var(--pc-addons-navigation-border-radius) var(--pc-addons-navigation-border-radius);
119
+ }
120
+
121
+ .pc-addons-header__scroll-arrow {
122
+ height: var(--pc-addons-arrow-size);
123
+ color: var(--g-color-text-hint);
124
+ }
125
+
126
+ .pc-addons-header__user-popup {
127
+ --yc-popup-border-width: 0;
128
+ --yc-popup-border-color: none;
129
+ border-radius: var(--g-border-radius-m);
130
+ box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
131
+ }
132
+
133
+ @media (max-width: 1081px) {
134
+ .pc-addons-header__left {
135
+ margin-right: 0;
136
+ }
137
+ }
138
+ @media (min-width: 769px) {
139
+ .pc-addons-header__logo-img {
140
+ height: 30px;
141
+ }
142
+ }
143
+ @media (max-width: 768px) {
144
+ .pc-addons-header {
145
+ max-width: 100%;
146
+ padding: 16px 40px 16px 48px;
147
+ border-top-left-radius: 0;
148
+ border-top-right-radius: 0;
149
+ }
150
+ .pc-addons-header__left {
151
+ margin-right: 12px;
152
+ }
153
+ .pc-addons-header__icons-container {
154
+ flex-direction: row-reverse;
155
+ justify-content: flex-start;
156
+ }
157
+ .pc-addons-header_search .pc-addons-header__logo {
158
+ display: none;
159
+ }
160
+ .pc-addons-header_search .pc-addons-header__back {
161
+ display: block;
162
+ }
163
+ }
164
+ @media (max-width: 576px) {
165
+ .pc-addons-header {
166
+ padding-left: 24px;
167
+ padding-right: 16px;
168
+ }
169
+ .pc-addons-header__container {
170
+ height: 36px;
171
+ }
172
+ }
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { NavigationData, SetupRouteChangeHandler } from '../../models';
4
+ export declare const MOBILE_ICON_SIZE = 24;
5
+ export interface CustomElements {
6
+ left?: ReactNode;
7
+ right?: ReactNode;
8
+ actions?: ReactNode;
9
+ }
10
+ export interface HeaderProps extends ClassNameProps {
11
+ data: NavigationData;
12
+ customElements?: CustomElements;
13
+ renderSearch?: (props: {
14
+ onActiveToggle: (isActive: boolean) => void;
15
+ }) => ReactNode;
16
+ setupRouteChangeHandler?: SetupRouteChangeHandler;
17
+ }
18
+ export declare const Header: ({ data, customElements, setupRouteChangeHandler, renderSearch, className, }: HeaderProps) => React.JSX.Element;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Header = exports.MOBILE_ICON_SIZE = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importStar(require("react"));
6
+ const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
7
+ const icons_1 = require("@gravity-ui/icons");
8
+ const uikit_1 = require("@gravity-ui/uikit");
9
+ const cn_1 = require("../../../../utils/cn");
10
+ const ButtonsContainer_1 = require("../../components/ButtonsContainer/ButtonsContainer");
11
+ const LangSwitch_1 = require("../../components/LangSwitch");
12
+ const Logo_1 = tslib_1.__importDefault(require("../../components/Logo/Logo"));
13
+ const MobileNavigation_1 = require("../../components/MobileNavigation/MobileNavigation");
14
+ const Navigation_1 = require("../../components/Navigation/Navigation");
15
+ const analytics_1 = require("../../contexts/analytics");
16
+ const mobile_1 = require("../../contexts/mobile");
17
+ const route_change_1 = require("../../contexts/route-change");
18
+ const theme_1 = require("../../contexts/theme");
19
+ const b = (0, cn_1.block)('header');
20
+ exports.MOBILE_ICON_SIZE = 24;
21
+ const Header = ({ data, customElements, setupRouteChangeHandler, renderSearch, className, }) => {
22
+ const { logo, langSwitchItems, buttons: buttonConfigs, navigation } = data;
23
+ const headerRef = (0, react_1.useRef)(null);
24
+ const [withBackground, setWithBackground] = (0, react_1.useState)(false);
25
+ const [withShadow, setWithShadow] = (0, react_1.useState)(true);
26
+ const [isSearchMode, setIsSearchMode] = (0, react_1.useState)(false);
27
+ const [isPopupOpen, setIsPopupOpen] = (0, react_1.useState)(false);
28
+ const [isMobileNavigationOpen, setIsMobileNavigationOpen] = (0, react_1.useState)(false);
29
+ const [pageHasScroll, setPageHasScroll] = (0, react_1.useState)(false);
30
+ const langSwitchActiveItem = (0, react_1.useMemo)(() => langSwitchItems === null || langSwitchItems === void 0 ? void 0 : langSwitchItems.find(({ active }) => active), [langSwitchItems]);
31
+ const { left, right, actions } = customElements || {};
32
+ const analytics = (0, react_1.useContext)(analytics_1.AnalyticsContext);
33
+ const isMobile = (0, react_1.useContext)(mobile_1.MobileContext);
34
+ const theme = (0, react_1.useContext)(theme_1.ThemeContext);
35
+ const buttons = buttonConfigs === null || buttonConfigs === void 0 ? void 0 : buttonConfigs.map((_a) => {
36
+ var { analyticsEvents } = _a, button = tslib_1.__rest(_a, ["analyticsEvents"]);
37
+ return (Object.assign(Object.assign({}, button), { onClick: analyticsEvents
38
+ ? () => {
39
+ var _a;
40
+ (_a = analytics === null || analytics === void 0 ? void 0 : analytics.sendEvents) === null || _a === void 0 ? void 0 : _a.call(analytics, Array.isArray(analyticsEvents) ? analyticsEvents : [analyticsEvents]);
41
+ }
42
+ : undefined }));
43
+ });
44
+ const showButtonsContainer = isMobile
45
+ ? !navigation && buttons && buttons.length === 1
46
+ : Boolean(buttons);
47
+ const toggleSearch = (0, react_1.useCallback)((isActive) => setIsSearchMode(isActive), []);
48
+ const handleOpenPopup = (0, react_1.useCallback)(() => {
49
+ setIsPopupOpen(true);
50
+ }, []);
51
+ const handleClosePopup = (0, react_1.useCallback)(() => {
52
+ setIsPopupOpen(false);
53
+ }, []);
54
+ const toggleMobileNavigationPopup = (0, react_1.useCallback)((isOpened) => {
55
+ setIsMobileNavigationOpen(isOpened);
56
+ // disable header's shadow on mobile with opened menu and if page was scrolled
57
+ if (isOpened && pageHasScroll) {
58
+ setWithShadow(false);
59
+ }
60
+ }, [pageHasScroll]);
61
+ const onMenuScroll = (0, react_1.useCallback)((scrollTop) => {
62
+ // enable header's shadow on mobile if mobile menu started to scroll
63
+ setWithShadow(scrollTop > 0);
64
+ if (!pageHasScroll) {
65
+ setWithBackground(scrollTop > 0);
66
+ }
67
+ }, [pageHasScroll]);
68
+ (0, react_1.useEffect)(() => {
69
+ const onScroll = () => {
70
+ const scrollTop = window.pageYOffset;
71
+ if (scrollTop === 0 && withBackground) {
72
+ setWithBackground(false);
73
+ }
74
+ else if (scrollTop > 0 && !withBackground) {
75
+ setWithBackground(true);
76
+ }
77
+ if (scrollTop === 0 && pageHasScroll) {
78
+ setPageHasScroll(false);
79
+ }
80
+ else if (scrollTop > 0 && !pageHasScroll) {
81
+ setPageHasScroll(true);
82
+ }
83
+ };
84
+ window.addEventListener('scroll', onScroll);
85
+ onScroll();
86
+ });
87
+ (0, react_1.useEffect)(() => setupRouteChangeHandler === null || setupRouteChangeHandler === void 0 ? void 0 : setupRouteChangeHandler(() => {
88
+ handleClosePopup();
89
+ setIsMobileNavigationOpen(false);
90
+ }), [setupRouteChangeHandler, handleClosePopup]);
91
+ return (react_1.default.createElement(route_change_1.RouteChangeHandlerContext.Provider, { value: setupRouteChangeHandler },
92
+ react_1.default.createElement("header", { className: b({
93
+ 'with-background': withBackground,
94
+ 'with-shadow': withShadow,
95
+ search: isSearchMode,
96
+ 'open-popup': isPopupOpen,
97
+ 'one-row': !navigation,
98
+ }, className), ref: headerRef },
99
+ react_1.default.createElement("div", { className: b('container') },
100
+ react_1.default.createElement("div", { className: b('left') },
101
+ logo && (react_1.default.createElement(Logo_1.default, Object.assign({}, logo, { theme: theme, className: b('logo'), imageClassName: b('logo-img') }))),
102
+ isMobile && (react_1.default.createElement(uikit_1.Button, { view: "flat", size: "l", className: b('back') },
103
+ react_1.default.createElement(uikit_1.Icon, { data: icons_1.ChevronLeft, size: exports.MOBILE_ICON_SIZE }))),
104
+ left),
105
+ react_1.default.createElement("div", { className: b('right') },
106
+ react_1.default.createElement("div", { className: b('icons-container') },
107
+ renderSearch && renderSearch({ onActiveToggle: toggleSearch }),
108
+ langSwitchItems && (react_1.default.createElement(LangSwitch_1.LangSwitch, { text: langSwitchActiveItem === null || langSwitchActiveItem === void 0 ? void 0 : langSwitchActiveItem.title, iconClassName: b('icon'), isSearchMode: isSearchMode, items: langSwitchItems, showText: !isMobile, isMobile: isMobile }))),
109
+ showButtonsContainer && (react_1.default.createElement(ButtonsContainer_1.ButtonsContainer, { buttons: buttons, className: b('buttons') }, actions)),
110
+ right,
111
+ navigation ? (react_1.default.createElement(MobileNavigation_1.MobileNavigation, { toogleOpen: toggleMobileNavigationPopup, isOpened: isMobileNavigationOpen, isSearchOpen: isSearchMode, data: navigation, buttons: buttons, onMenuScroll: onMenuScroll, popupClassName: b('user-popup'), customElements: customElements })) : null)),
112
+ navigation ? (react_1.default.createElement("div", { className: b('scroller') },
113
+ react_1.default.createElement(gravity_ui_page_constructor_1.OverflowScroller, { arrowClassName: b('scroll-arrow'), arrowSize: 14 },
114
+ react_1.default.createElement(Navigation_1.Navigation, { data: navigation, headerRef: headerRef, handleOpenPopup: handleOpenPopup, handleClosePopup: handleClosePopup, withBackground: withBackground })))) : null)));
115
+ };
116
+ exports.Header = Header;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { AnalyticsContextProps } from '../../contexts/analytics';
3
+ import { DeviceContextProps } from '../../contexts/device';
4
+ import { LocationContextProps } from '../../contexts/location';
5
+ import { MobileContextProps } from '../../contexts/mobile';
6
+ import { ThemeContextProps } from '../../contexts/theme';
7
+ import { HeaderProps as HeaderComponentProps } from './Header';
8
+ export interface HeaderProps extends HeaderComponentProps {
9
+ isMobile?: MobileContextProps;
10
+ location?: LocationContextProps;
11
+ analytics?: AnalyticsContextProps;
12
+ device?: DeviceContextProps;
13
+ theme?: ThemeContextProps;
14
+ }
15
+ export declare const Header: (props: HeaderProps) => React.JSX.Element;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Header = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importStar(require("react"));
6
+ const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
7
+ const device_1 = require("../../contexts/device");
8
+ const location_1 = require("../../contexts/location");
9
+ const mobile_1 = require("../../contexts/mobile");
10
+ const theme_1 = require("../../contexts/theme");
11
+ const Header_1 = require("./Header");
12
+ const Header = (props) => {
13
+ const { isMobile, theme = gravity_ui_page_constructor_1.Theme.Light, location = {}, analytics = {}, device = {} } = props, rest = tslib_1.__rest(props, ["isMobile", "theme", "location", "analytics", "device"]);
14
+ /* eslint-disable react/jsx-key */
15
+ const context = [
16
+ react_1.default.createElement(theme_1.ThemeContext.Provider, { value: theme }),
17
+ react_1.default.createElement(location_1.LocationContext.Provider, { value: location }),
18
+ react_1.default.createElement(mobile_1.MobileContext.Provider, { value: Boolean(isMobile) }),
19
+ react_1.default.createElement(device_1.DeviceContext.Provider, { value: device }),
20
+ react_1.default.createElement(gravity_ui_page_constructor_1.AnalyticsContext.Provider, { value: analytics }),
21
+ ].reduceRight((prev, provider) => react_1.default.cloneElement(provider, {}, prev), react_1.default.createElement(Header_1.Header, Object.assign({}, rest)));
22
+ /* eslint-enable react/jsx-key */
23
+ return react_1.default.createElement(react_1.Fragment, null, context);
24
+ };
25
+ exports.Header = Header;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { AnalyticsEvent } from '../models';
3
+ export interface AnalyticsContextProps {
4
+ sendEvents?: (events: AnalyticsEvent[]) => void;
5
+ }
6
+ export declare const AnalyticsContext: React.Context<AnalyticsContextProps | undefined>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnalyticsContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ exports.AnalyticsContext = react_1.default.createContext({});
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export type DeviceContextProps = {
3
+ model?: string;
4
+ };
5
+ export declare const DeviceContext: React.Context<DeviceContextProps>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeviceContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ exports.DeviceContext = react_1.default.createContext({});
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export type LocationContextProps = {
3
+ search?: string;
4
+ hash?: string;
5
+ pathname?: string;
6
+ hostname?: string;
7
+ asPath?: string;
8
+ };
9
+ export declare const LocationContext: React.Context<LocationContextProps>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocationContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ exports.LocationContext = react_1.default.createContext({});
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export type MobileContextProps = boolean;
3
+ export declare const MobileContext: React.Context<boolean>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MobileContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ exports.MobileContext = react_1.default.createContext(false);
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export type NavigationSection = string | undefined;
3
+ export declare const NavigationSectionContext: React.Context<NavigationSection>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NavigationSectionContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ exports.NavigationSectionContext = react_1.default.createContext(undefined);
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export type RouteChangeHandlerContextProps = (handler: () => void) => void;
3
+ export declare const RouteChangeHandlerContext: React.Context<RouteChangeHandlerContextProps | undefined>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RouteChangeHandlerContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ exports.RouteChangeHandlerContext = react_1.default.createContext(undefined);
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { Theme } from '@doyourjob/gravity-ui-page-constructor';
3
+ export type ThemeContextProps = Theme;
4
+ export declare const ThemeContext: React.Context<Theme>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThemeContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
7
+ exports.ThemeContext = react_1.default.createContext(gravity_ui_page_constructor_1.Theme.Light);
@@ -0,0 +1,4 @@
1
+ export * from './containers/Header';
2
+ export * from './containers/Footer';
3
+ export * from './components/LangSwitch';
4
+ export * from './models';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./containers/Header"), exports);
5
+ tslib_1.__exportStar(require("./containers/Footer"), exports);
6
+ tslib_1.__exportStar(require("./components/LangSwitch"), exports);
7
+ tslib_1.__exportStar(require("./models"), exports);