@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,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,19 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { NavigationData, SetupRouteChangeHandler } from '../../models';
4
+ import './Header.css';
5
+ export declare const MOBILE_ICON_SIZE = 24;
6
+ export interface CustomElements {
7
+ left?: ReactNode;
8
+ right?: ReactNode;
9
+ actions?: ReactNode;
10
+ }
11
+ export interface HeaderProps extends ClassNameProps {
12
+ data: NavigationData;
13
+ customElements?: CustomElements;
14
+ renderSearch?: (props: {
15
+ onActiveToggle: (isActive: boolean) => void;
16
+ }) => ReactNode;
17
+ setupRouteChangeHandler?: SetupRouteChangeHandler;
18
+ }
19
+ export declare const Header: ({ data, customElements, setupRouteChangeHandler, renderSearch, className, }: HeaderProps) => React.JSX.Element;
@@ -0,0 +1,113 @@
1
+ import { __rest } from "tslib";
2
+ import React, { useCallback, useContext, useEffect, useMemo, useRef, useState, } from 'react';
3
+ import { OverflowScroller } from '@doyourjob/gravity-ui-page-constructor';
4
+ import { ChevronLeft } from '@gravity-ui/icons';
5
+ import { Button, Icon } from '@gravity-ui/uikit';
6
+ import { block } from '../../../../utils/cn';
7
+ import { ButtonsContainer } from '../../components/ButtonsContainer/ButtonsContainer';
8
+ import { LangSwitch } from '../../components/LangSwitch';
9
+ import Logo from '../../components/Logo/Logo';
10
+ import { MobileNavigation } from '../../components/MobileNavigation/MobileNavigation';
11
+ import { Navigation } from '../../components/Navigation/Navigation';
12
+ import { AnalyticsContext } from '../../contexts/analytics';
13
+ import { MobileContext } from '../../contexts/mobile';
14
+ import { RouteChangeHandlerContext } from '../../contexts/route-change';
15
+ import { ThemeContext } from '../../contexts/theme';
16
+ import './Header.css';
17
+ const b = block('header');
18
+ export const MOBILE_ICON_SIZE = 24;
19
+ export const Header = ({ data, customElements, setupRouteChangeHandler, renderSearch, className, }) => {
20
+ const { logo, langSwitchItems, buttons: buttonConfigs, navigation } = data;
21
+ const headerRef = useRef(null);
22
+ const [withBackground, setWithBackground] = useState(false);
23
+ const [withShadow, setWithShadow] = useState(true);
24
+ const [isSearchMode, setIsSearchMode] = useState(false);
25
+ const [isPopupOpen, setIsPopupOpen] = useState(false);
26
+ const [isMobileNavigationOpen, setIsMobileNavigationOpen] = useState(false);
27
+ const [pageHasScroll, setPageHasScroll] = useState(false);
28
+ const langSwitchActiveItem = useMemo(() => langSwitchItems === null || langSwitchItems === void 0 ? void 0 : langSwitchItems.find(({ active }) => active), [langSwitchItems]);
29
+ const { left, right, actions } = customElements || {};
30
+ const analytics = useContext(AnalyticsContext);
31
+ const isMobile = useContext(MobileContext);
32
+ const theme = useContext(ThemeContext);
33
+ const buttons = buttonConfigs === null || buttonConfigs === void 0 ? void 0 : buttonConfigs.map((_a) => {
34
+ var { analyticsEvents } = _a, button = __rest(_a, ["analyticsEvents"]);
35
+ return (Object.assign(Object.assign({}, button), { onClick: analyticsEvents
36
+ ? () => {
37
+ var _a;
38
+ (_a = analytics === null || analytics === void 0 ? void 0 : analytics.sendEvents) === null || _a === void 0 ? void 0 : _a.call(analytics, Array.isArray(analyticsEvents) ? analyticsEvents : [analyticsEvents]);
39
+ }
40
+ : undefined }));
41
+ });
42
+ const showButtonsContainer = isMobile
43
+ ? !navigation && buttons && buttons.length === 1
44
+ : Boolean(buttons);
45
+ const toggleSearch = useCallback((isActive) => setIsSearchMode(isActive), []);
46
+ const handleOpenPopup = useCallback(() => {
47
+ setIsPopupOpen(true);
48
+ }, []);
49
+ const handleClosePopup = useCallback(() => {
50
+ setIsPopupOpen(false);
51
+ }, []);
52
+ const toggleMobileNavigationPopup = useCallback((isOpened) => {
53
+ setIsMobileNavigationOpen(isOpened);
54
+ // disable header's shadow on mobile with opened menu and if page was scrolled
55
+ if (isOpened && pageHasScroll) {
56
+ setWithShadow(false);
57
+ }
58
+ }, [pageHasScroll]);
59
+ const onMenuScroll = useCallback((scrollTop) => {
60
+ // enable header's shadow on mobile if mobile menu started to scroll
61
+ setWithShadow(scrollTop > 0);
62
+ if (!pageHasScroll) {
63
+ setWithBackground(scrollTop > 0);
64
+ }
65
+ }, [pageHasScroll]);
66
+ useEffect(() => {
67
+ const onScroll = () => {
68
+ const scrollTop = window.pageYOffset;
69
+ if (scrollTop === 0 && withBackground) {
70
+ setWithBackground(false);
71
+ }
72
+ else if (scrollTop > 0 && !withBackground) {
73
+ setWithBackground(true);
74
+ }
75
+ if (scrollTop === 0 && pageHasScroll) {
76
+ setPageHasScroll(false);
77
+ }
78
+ else if (scrollTop > 0 && !pageHasScroll) {
79
+ setPageHasScroll(true);
80
+ }
81
+ };
82
+ window.addEventListener('scroll', onScroll);
83
+ onScroll();
84
+ });
85
+ useEffect(() => setupRouteChangeHandler === null || setupRouteChangeHandler === void 0 ? void 0 : setupRouteChangeHandler(() => {
86
+ handleClosePopup();
87
+ setIsMobileNavigationOpen(false);
88
+ }), [setupRouteChangeHandler, handleClosePopup]);
89
+ return (React.createElement(RouteChangeHandlerContext.Provider, { value: setupRouteChangeHandler },
90
+ React.createElement("header", { className: b({
91
+ 'with-background': withBackground,
92
+ 'with-shadow': withShadow,
93
+ search: isSearchMode,
94
+ 'open-popup': isPopupOpen,
95
+ 'one-row': !navigation,
96
+ }, className), ref: headerRef },
97
+ React.createElement("div", { className: b('container') },
98
+ React.createElement("div", { className: b('left') },
99
+ logo && (React.createElement(Logo, Object.assign({}, logo, { theme: theme, className: b('logo'), imageClassName: b('logo-img') }))),
100
+ isMobile && (React.createElement(Button, { view: "flat", size: "l", className: b('back') },
101
+ React.createElement(Icon, { data: ChevronLeft, size: MOBILE_ICON_SIZE }))),
102
+ left),
103
+ React.createElement("div", { className: b('right') },
104
+ React.createElement("div", { className: b('icons-container') },
105
+ renderSearch && renderSearch({ onActiveToggle: toggleSearch }),
106
+ langSwitchItems && (React.createElement(LangSwitch, { text: langSwitchActiveItem === null || langSwitchActiveItem === void 0 ? void 0 : langSwitchActiveItem.title, iconClassName: b('icon'), isSearchMode: isSearchMode, items: langSwitchItems, showText: !isMobile, isMobile: isMobile }))),
107
+ showButtonsContainer && (React.createElement(ButtonsContainer, { buttons: buttons, className: b('buttons') }, actions)),
108
+ right,
109
+ navigation ? (React.createElement(MobileNavigation, { toogleOpen: toggleMobileNavigationPopup, isOpened: isMobileNavigationOpen, isSearchOpen: isSearchMode, data: navigation, buttons: buttons, onMenuScroll: onMenuScroll, popupClassName: b('user-popup'), customElements: customElements })) : null)),
110
+ navigation ? (React.createElement("div", { className: b('scroller') },
111
+ React.createElement(OverflowScroller, { arrowClassName: b('scroll-arrow'), arrowSize: 14 },
112
+ React.createElement(Navigation, { data: navigation, headerRef: headerRef, handleOpenPopup: handleOpenPopup, handleClosePopup: handleClosePopup, withBackground: withBackground })))) : null)));
113
+ };
@@ -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,21 @@
1
+ import { __rest } from "tslib";
2
+ import React, { Fragment } from 'react';
3
+ import { AnalyticsContext, Theme } from '@doyourjob/gravity-ui-page-constructor';
4
+ import { DeviceContext } from '../../contexts/device';
5
+ import { LocationContext } from '../../contexts/location';
6
+ import { MobileContext } from '../../contexts/mobile';
7
+ import { ThemeContext } from '../../contexts/theme';
8
+ import { Header as HeaderComponent } from './Header';
9
+ export const Header = (props) => {
10
+ const { isMobile, theme = Theme.Light, location = {}, analytics = {}, device = {} } = props, rest = __rest(props, ["isMobile", "theme", "location", "analytics", "device"]);
11
+ /* eslint-disable react/jsx-key */
12
+ const context = [
13
+ React.createElement(ThemeContext.Provider, { value: theme }),
14
+ React.createElement(LocationContext.Provider, { value: location }),
15
+ React.createElement(MobileContext.Provider, { value: Boolean(isMobile) }),
16
+ React.createElement(DeviceContext.Provider, { value: device }),
17
+ React.createElement(AnalyticsContext.Provider, { value: analytics }),
18
+ ].reduceRight((prev, provider) => React.cloneElement(provider, {}, prev), React.createElement(HeaderComponent, Object.assign({}, rest)));
19
+ /* eslint-enable react/jsx-key */
20
+ return React.createElement(Fragment, null, context);
21
+ };
@@ -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,2 @@
1
+ import React from 'react';
2
+ export const AnalyticsContext = React.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,2 @@
1
+ import React from 'react';
2
+ export const DeviceContext = React.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,2 @@
1
+ import React from 'react';
2
+ export const LocationContext = React.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,2 @@
1
+ import React from 'react';
2
+ export const MobileContext = React.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,2 @@
1
+ import React from 'react';
2
+ export const NavigationSectionContext = React.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,2 @@
1
+ import React from 'react';
2
+ export const RouteChangeHandlerContext = React.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,3 @@
1
+ import React from 'react';
2
+ import { Theme } from '@doyourjob/gravity-ui-page-constructor';
3
+ export const ThemeContext = React.createContext(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,4 @@
1
+ export * from './containers/Header';
2
+ export * from './containers/Footer';
3
+ export * from './components/LangSwitch';
4
+ export * from './models';
@@ -0,0 +1,89 @@
1
+ import { AnalyticsEvent as PCAnalyticsEvent } from '@doyourjob/gravity-ui-page-constructor';
2
+ import type { ButtonProps, LinkProps } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { SVGIconData } from '@gravity-ui/uikit/build/esm/components/Icon/types';
4
+ export declare enum AnalyticsEventType {
5
+ ItemClick = "item-click",
6
+ PopupItemClick = "popup-item-click"
7
+ }
8
+ export declare enum NavigationItemType {
9
+ LargePopup = "large-popup",
10
+ MediumPopup = "medium-popup",
11
+ MediumPopupWithCategories = "medium-popup-with-categories",
12
+ MediumPopupWithFloors = "medium-popup-with-floors",
13
+ Link = "link"
14
+ }
15
+ export declare enum NavigationTagColor {
16
+ Green = "green",
17
+ Yellow = "yellow",
18
+ Blue = "blue"
19
+ }
20
+ export interface LogoData {
21
+ href?: string;
22
+ src?: string;
23
+ width?: number;
24
+ title?: string;
25
+ text?: string;
26
+ alt?: string;
27
+ }
28
+ export interface LangSwitchItem {
29
+ title: string;
30
+ description?: string;
31
+ url?: string;
32
+ active?: boolean;
33
+ icon?: SVGIconData;
34
+ }
35
+ export interface NavigationData {
36
+ navigation: NavigationSectionData[];
37
+ logo: LogoData;
38
+ buttons: ButtonProps[];
39
+ langSwitchItems?: LangSwitchItem[];
40
+ }
41
+ export interface AnalyticsEvent extends PCAnalyticsEvent {
42
+ params?: Partial<Record<string, string>>;
43
+ }
44
+ export type SetupRouteChangeHandler = (handler: () => void) => void;
45
+ export interface NavigationTag {
46
+ text: string;
47
+ color?: string;
48
+ textColor?: string;
49
+ size?: 's' | 'm';
50
+ }
51
+ export interface NavigationItem {
52
+ title: string;
53
+ slug: string;
54
+ url: string;
55
+ description?: string;
56
+ icon?: string;
57
+ image?: string | null;
58
+ tag?: NavigationTag;
59
+ }
60
+ export interface CategoryGroupData {
61
+ title?: string;
62
+ items: NavigationItem[];
63
+ imageSize?: 's' | 'xm' | 'm';
64
+ url?: string;
65
+ showItemDescriptions?: 'yes' | 'no';
66
+ showItemIcons?: 'yes' | 'no';
67
+ backgroundColor?: string;
68
+ }
69
+ export interface CategoryData {
70
+ slug: string;
71
+ title: string;
72
+ description?: string;
73
+ groups: CategoryGroupData[];
74
+ }
75
+ export interface CategorizedPopupData {
76
+ categories: Record<string, CategoryData>;
77
+ }
78
+ export interface PopupData {
79
+ groups: CategoryGroupData[];
80
+ }
81
+ export interface NavigationSectionData {
82
+ title: string;
83
+ data?: PopupData | CategorizedPopupData;
84
+ type: NavigationItemType;
85
+ section?: string;
86
+ link?: LinkProps;
87
+ links?: LinkProps[];
88
+ placeholder?: string;
89
+ }
@@ -0,0 +1,19 @@
1
+ export var AnalyticsEventType;
2
+ (function (AnalyticsEventType) {
3
+ AnalyticsEventType["ItemClick"] = "item-click";
4
+ AnalyticsEventType["PopupItemClick"] = "popup-item-click";
5
+ })(AnalyticsEventType || (AnalyticsEventType = {}));
6
+ export var NavigationItemType;
7
+ (function (NavigationItemType) {
8
+ NavigationItemType["LargePopup"] = "large-popup";
9
+ NavigationItemType["MediumPopup"] = "medium-popup";
10
+ NavigationItemType["MediumPopupWithCategories"] = "medium-popup-with-categories";
11
+ NavigationItemType["MediumPopupWithFloors"] = "medium-popup-with-floors";
12
+ NavigationItemType["Link"] = "link";
13
+ })(NavigationItemType || (NavigationItemType = {}));
14
+ export var NavigationTagColor;
15
+ (function (NavigationTagColor) {
16
+ NavigationTagColor["Green"] = "green";
17
+ NavigationTagColor["Yellow"] = "yellow";
18
+ NavigationTagColor["Blue"] = "blue";
19
+ })(NavigationTagColor || (NavigationTagColor = {}));
@@ -0,0 +1,14 @@
1
+ :root {
2
+ --pc-addons-navigation-header-height: 64px;
3
+ --pc-addons-navigation-search-input-indent: 10px;
4
+ --pc-addons-navigation-popup-padding: 7px;
5
+ --pc-addons-navigation-popup-z-index: 99;
6
+ --pc-addons-arrow-size: 20px;
7
+ }
8
+
9
+ .g-root {
10
+ --pc-addons-navigation-color-tag-yellow: var(--g-color-base-warning-light);
11
+ --pc-addons-navigation-color-tag-green: var(--g-color-base-positive-light);
12
+ --pc-addons-navigation-color-tag-blue: var(--g-color-base-info-light);
13
+ --pc-addons-navigation-border-radius: var(--pc-border-radius, 24px);
14
+ }
@@ -0,0 +1,18 @@
1
+ import { NavigationItem } from './models';
2
+ export declare const getIconSize: (isMobile?: boolean) => 16 | 24;
3
+ export declare const SERVICES_PREFIX = "services";
4
+ export declare const SOLUTIONS_PREFIX = "solutions";
5
+ export interface MobileLargePopupDataItem {
6
+ id: number;
7
+ description: string;
8
+ slug: string;
9
+ url: string;
10
+ title: string;
11
+ }
12
+ export interface MobileLargePopupData {
13
+ items: MobileLargePopupDataItem[];
14
+ }
15
+ export type NaviationItemsMap = Record<string, NavigationItem[]>;
16
+ export declare const getHeaderHeight: (isMobile: boolean) => 68 | 94;
17
+ export declare function getFlatList(dataByKeys: NaviationItemsMap, key?: keyof NavigationItem): NavigationItem[];
18
+ export declare function applySearch(searchRaw: string, navigationItems: NavigationItem[]): NavigationItem[];
@@ -0,0 +1,25 @@
1
+ export const getIconSize = (isMobile) => {
2
+ return isMobile ? 24 : 16;
3
+ };
4
+ export const SERVICES_PREFIX = 'services';
5
+ export const SOLUTIONS_PREFIX = 'solutions';
6
+ export const getHeaderHeight = (isMobile) => {
7
+ return isMobile ? 68 : 94;
8
+ };
9
+ export function getFlatList(dataByKeys, key = 'slug') {
10
+ const navigationItems = {};
11
+ Object.values(dataByKeys).forEach((dataByKey) => {
12
+ dataByKey.forEach((data) => {
13
+ if (data[key]) {
14
+ navigationItems[data[key]] = data;
15
+ }
16
+ });
17
+ });
18
+ return Object.values(navigationItems);
19
+ }
20
+ export function applySearch(searchRaw, navigationItems) {
21
+ const search = searchRaw.toLowerCase();
22
+ return navigationItems.filter(({ title, slug, description }) => (title && title.toLowerCase().includes(search)) ||
23
+ slug.includes(search) ||
24
+ (description && description.toLowerCase().includes(search)));
25
+ }
@@ -0,0 +1,2 @@
1
+ export * from './EnrichedLink/EnrichedLink';
2
+ export * from './Navigation';
@@ -0,0 +1,2 @@
1
+ export * from './EnrichedLink/EnrichedLink';
2
+ export * from './Navigation';
@@ -0,0 +1,3 @@
1
+ import { Theme } from '@doyourjob/gravity-ui-page-constructor';
2
+ export declare const DEFAULT_THEME = Theme.Light;
3
+ export declare const UIKIT_ROOT_CLASS = "g-root";
@@ -0,0 +1,3 @@
1
+ import { Theme } from '@doyourjob/gravity-ui-page-constructor';
2
+ export const DEFAULT_THEME = Theme.Light;
3
+ export const UIKIT_ROOT_CLASS = 'g-root';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const MobileContext: React.Context<boolean>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export const MobileContext = React.createContext(false);
@@ -0,0 +1 @@
1
+ export * from './MobileContext';
@@ -0,0 +1 @@
1
+ export * from './MobileContext';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export declare enum Theme {
3
+ Light = "light",
4
+ Dark = "dark"
5
+ }
6
+ export interface ThemeContextProps {
7
+ theme: Theme;
8
+ }
9
+ export declare const initialValue: ThemeContextProps;
10
+ export declare const ThemeContext: React.Context<ThemeContextProps>;