@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,7 @@
1
+ .pc-addons-search-not-found .yfm {
2
+ display: block;
3
+ }
4
+
5
+ .pc-addons-search-not-found__title {
6
+ width: 100%;
7
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { TextSize } from '@doyourjob/gravity-ui-page-constructor';
3
+ import './SearchNotFound.css';
4
+ interface SearchNotFoundProps {
5
+ notFoundDescription?: string;
6
+ size?: TextSize;
7
+ }
8
+ export declare const SearchNotFound: (props: SearchNotFoundProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { GridColumnSize, Row, Title } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { block } from '../../../../utils/cn';
4
+ import i18n from './i18n';
5
+ import './SearchNotFound.css';
6
+ const b = block('search-not-found');
7
+ export const SearchNotFound = (props) => {
8
+ const { notFoundDescription, size = 's' } = props;
9
+ const title = {
10
+ text: i18n('search-not-found-title'),
11
+ textSize: size,
12
+ };
13
+ return (React.createElement(Row, { className: b() },
14
+ React.createElement(Title, { colSizes: {
15
+ [GridColumnSize.Lg]: 9,
16
+ [GridColumnSize.All]: 12,
17
+ }, title: title, subtitle: notFoundDescription || i18n('search-not-found-description'), className: b('title') })));
18
+ };
@@ -0,0 +1,4 @@
1
+ {
2
+ "search-not-found-title": "Nothing was found",
3
+ "search-not-found-description": "Please check the spelling or try another keyword."
4
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { registerKeyset } from '../../../../../utils/registerKeyset';
2
+ import en from './en.json';
3
+ import ru from './ru.json';
4
+ const COMPONENT = 'SearchFound';
5
+ export default registerKeyset({ en, ru }, COMPONENT);
@@ -0,0 +1,4 @@
1
+ {
2
+ "search-not-found-title": "По вашему запросу ничего не найдено",
3
+ "search-not-found-description": "Пожалуйста, проверьте правильность написания или попробуйте другие ключевые слова."
4
+ }
@@ -0,0 +1,8 @@
1
+ .pc-addons-search-result__title {
2
+ margin-bottom: 8px;
3
+ padding: 8px 12px;
4
+ }
5
+
6
+ .pc-addons-search-result__container {
7
+ padding: 8px 12px;
8
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { NavigationItem } from '../../models';
3
+ import './SearchResult.css';
4
+ interface SearchResultProps {
5
+ value: string;
6
+ data: NavigationItem[];
7
+ section?: string;
8
+ className?: string;
9
+ }
10
+ export declare const SearchResult: ({ value, data, section, className }: SearchResultProps) => React.JSX.Element;
11
+ export {};
@@ -0,0 +1,21 @@
1
+ import React, { Fragment } from 'react';
2
+ import { Row, Title, block } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { applySearch } from '../../utils';
4
+ import { NavigationItemsList } from '../Navigation/NavigationItemsList/NavigationItemsList';
5
+ import { SearchNotFound } from '../SearchNotFound/SearchNotFound';
6
+ import i18n from './i18n';
7
+ import './SearchResult.css';
8
+ const b = block('search-result');
9
+ export const SearchResult = ({ value, data, section, className }) => {
10
+ const result = applySearch(value, data);
11
+ const title = {
12
+ text: i18n('search-found', { count: result.length }),
13
+ textSize: 'xs',
14
+ };
15
+ return (React.createElement("div", { className: b() }, result.length ? (React.createElement(Fragment, null,
16
+ React.createElement(Row, null,
17
+ React.createElement(Title, { className: b('title'), title: title, colSizes: { all: 12 } })),
18
+ React.createElement("div", null,
19
+ React.createElement(NavigationItemsList, { items: result, section: section, className: className })))) : (React.createElement("div", { className: b('container') },
20
+ React.createElement(SearchNotFound, { notFoundDescription: i18n('search-not-found'), size: "xs" })))));
21
+ };
@@ -0,0 +1,12 @@
1
+ {
2
+ "search-found": [
3
+ "{{count}} item found",
4
+ "{{count}} items found",
5
+ "{{count}} items found",
6
+ "",
7
+ "",
8
+ ""
9
+ ],
10
+
11
+ "search-not-found": "Please check the spelling or try another keyword."
12
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { registerKeyset } from '../../../../../utils/registerKeyset';
2
+ import en from './en.json';
3
+ import ru from './ru.json';
4
+ const COMPONENT = 'SearchResult';
5
+ export default registerKeyset({ en, ru }, COMPONENT);
@@ -0,0 +1,11 @@
1
+ {
2
+ "search-found": [
3
+ "Найдено {{count}} элемента",
4
+ "Найдено {{count}} элемента",
5
+ "Найдено {{count}} элементов",
6
+ "",
7
+ "",
8
+ ""
9
+ ],
10
+ "search-not-found": "Пожалуйста, проверьте правильность написания или попробуйте другие ключевые слова."
11
+ }
@@ -0,0 +1,21 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .pc-addons-navigation-tag {
4
+ font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
5
+ line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
6
+ display: inline-block;
7
+ padding: 0 8px;
8
+ border-radius: 2px;
9
+ height: 20px;
10
+ line-height: 20px;
11
+ border-radius: 4px;
12
+ text-transform: capitalize;
13
+ }
14
+
15
+ .pc-addons-navigation-tag_size_s {
16
+ font-size: var(--g-text-caption-2-font-size, var(--pc-text-caption-2-font-size));
17
+ line-height: var(--g-text-caption-2-line-height, var(--pc-text-caption-2-line-height));
18
+ padding: 0 4px;
19
+ height: 16px;
20
+ line-height: 16px;
21
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { NavigationTag as NavigationTagModel } from '../../models';
4
+ import './Tag.css';
5
+ export interface NavigationTagProps extends NavigationTagModel, ClassNameProps {
6
+ }
7
+ export declare const NavigationTag: ({ text, color, textColor, className, size, }: NavigationTagProps) => React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { block } from '../../../../utils/cn';
3
+ import { NavigationTagColor } from '../../models';
4
+ import './Tag.css';
5
+ const b = block('navigation-tag');
6
+ const getColor = (color) => {
7
+ switch (color) {
8
+ case NavigationTagColor.Yellow:
9
+ return 'var(--pc-addons-navigation-color-tag-yellow)';
10
+ case NavigationTagColor.Blue:
11
+ return 'var(--pc-addons-navigation-color-tag-blue)';
12
+ case NavigationTagColor.Green:
13
+ return 'var(--pc-addons-navigation-color-tag-green)';
14
+ default:
15
+ return color;
16
+ }
17
+ };
18
+ export const NavigationTag = ({ text, color = NavigationTagColor.Yellow, textColor, className, size = 'm', }) => (React.createElement("div", { className: b({ size }, className), style: { backgroundColor: getColor(color), color: textColor } }, text));
@@ -0,0 +1,71 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ :root {
4
+ --pc-addons-navigation-header-height: 64px;
5
+ --pc-addons-navigation-search-input-indent: 10px;
6
+ --pc-addons-navigation-popup-padding: 7px;
7
+ --pc-addons-navigation-popup-z-index: 99;
8
+ --pc-addons-arrow-size: 20px;
9
+ }
10
+
11
+ .g-root {
12
+ --pc-addons-navigation-color-tag-yellow: var(--g-color-base-warning-light);
13
+ --pc-addons-navigation-color-tag-green: var(--g-color-base-positive-light);
14
+ --pc-addons-navigation-color-tag-blue: var(--g-color-base-info-light);
15
+ --pc-addons-navigation-border-radius: var(--pc-border-radius, 24px);
16
+ }
17
+
18
+ .pc-addons-large-popup__categories {
19
+ margin: 0;
20
+ padding: 0;
21
+ list-style: none;
22
+ font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
23
+ line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
24
+ max-height: calc(100vh - var(--pc-addons-navigation-header-height) - 224px);
25
+ overflow: auto;
26
+ width: 100%;
27
+ }
28
+
29
+ .pc-addons-large-popup__categories_with-scroll {
30
+ padding-right: 8px;
31
+ }
32
+
33
+ .pc-addons-large-popup__links {
34
+ margin-top: 24px;
35
+ }
36
+
37
+ .pc-addons-large-popup__link {
38
+ margin: 0 0 4px;
39
+ padding: 8px 12px;
40
+ }
41
+
42
+ .pc-addons-large-popup__search {
43
+ margin-top: 16px;
44
+ }
45
+
46
+ .pc-addons-large-popup__title {
47
+ margin-bottom: 8px;
48
+ padding: var(--pc-addons-navigation-popup-padding) 12px;
49
+ }
50
+
51
+ .pc-addons-large-popup__left {
52
+ display: flex;
53
+ flex-flow: column wrap;
54
+ justify-content: space-between;
55
+ padding-right: 48px;
56
+ }
57
+
58
+ .pc-addons-large-popup__controls {
59
+ max-width: 100%;
60
+ }
61
+
62
+ .pc-addons-large-popup__right {
63
+ max-height: calc(100vh - var(--pc-addons-navigation-header-height) - 64px);
64
+ overflow: auto;
65
+ overflow-y: auto;
66
+ padding-left: 16px;
67
+ }
68
+
69
+ .pc-addons-large-popup__items.row.row {
70
+ margin-left: -16px;
71
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { CategorizedPopupData, NavigationSectionData } from '../../../models';
3
+ import './LargePopup.css';
4
+ export interface LargePopupProps extends Omit<NavigationSectionData, 'data'> {
5
+ data: CategorizedPopupData;
6
+ }
7
+ export declare const LargePopup: (props: LargePopupProps) => React.JSX.Element;
@@ -0,0 +1,74 @@
1
+ import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
+ import { Col, GridColumnSize, Link, Row } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { Magnifier } from '@gravity-ui/icons';
4
+ import { block } from '../../../../../utils/cn';
5
+ import { getFlatList, getHeaderHeight } from '../../../utils';
6
+ import { SearchResult } from '../../SearchResult/SearchResult';
7
+ import { PopupCategory } from '../components/PopupCategory/PopupCategory';
8
+ import { PopupGroup } from '../components/PopupGroup/PopupGroup';
9
+ import { PopupSecondaryGroup } from '../components/PopupSecondaryGroup/PopupSecondaryGroup';
10
+ import Search from '../components/Search/Search';
11
+ import './LargePopup.css';
12
+ const b = block('large-popup');
13
+ const LARGE_POPUP_INDENT = 240;
14
+ export const LargePopup = (props) => {
15
+ const { data, section, placeholder, links } = props;
16
+ const { categories } = data;
17
+ const [currentCategory, setCurrentCategory] = useState(Object.values(categories)[0]);
18
+ const [search, setSearch] = useState('');
19
+ const categoriesRef = useRef(null);
20
+ const [maxHeightCategories, setMaxHeightCategories] = useState(0);
21
+ const [minHeightCategories, setMinHeightCategories] = useState(355);
22
+ const [categoriesWithScroll, setCategoriesWithScroll] = useState(false);
23
+ const rightSideRef = useRef(null);
24
+ const rightSideContentRef = useRef(null);
25
+ const controlsRef = useRef(null);
26
+ const currentCategoryData = categories[currentCategory.slug];
27
+ const flatList = useMemo(() => {
28
+ const searchableItems = Object.entries(categories).reduce((result, [slug, { groups }]) => {
29
+ // eslint-disable-next-line no-param-reassign
30
+ result[slug] = groups[0].items;
31
+ return result;
32
+ }, {});
33
+ return getFlatList(searchableItems);
34
+ }, [categories]);
35
+ const onSearch = useCallback((value) => setSearch(value), []);
36
+ const changeCategory = useCallback((value) => {
37
+ const rightSideCurrent = rightSideRef === null || rightSideRef === void 0 ? void 0 : rightSideRef.current;
38
+ if (rightSideCurrent) {
39
+ rightSideCurrent.scrollTop = 0;
40
+ }
41
+ setCurrentCategory(value);
42
+ }, []);
43
+ useEffect(() => {
44
+ var _a, _b;
45
+ const maxHeight = window.innerHeight - getHeaderHeight(false) - LARGE_POPUP_INDENT;
46
+ const rightColumnHeight = (_a = rightSideContentRef === null || rightSideContentRef === void 0 ? void 0 : rightSideContentRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
47
+ const controlsHeight = (_b = controlsRef === null || controlsRef === void 0 ? void 0 : controlsRef.current) === null || _b === void 0 ? void 0 : _b.clientHeight;
48
+ setMaxHeightCategories(maxHeight);
49
+ if (rightColumnHeight && controlsHeight) {
50
+ setMinHeightCategories(rightColumnHeight - controlsHeight);
51
+ }
52
+ if (categoriesRef.current) {
53
+ if (categoriesRef.current.scrollHeight > maxHeight) {
54
+ setCategoriesWithScroll(true);
55
+ }
56
+ }
57
+ }, []);
58
+ return (React.createElement(Fragment, null,
59
+ React.createElement(Row, null,
60
+ React.createElement(Col, { className: b('left'), sizes: { [GridColumnSize.Lg]: 3, [GridColumnSize.All]: 4 } },
61
+ React.createElement("ul", { className: b('categories', { 'with-scroll': categoriesWithScroll }), ref: categoriesRef, style: {
62
+ maxHeight: `${maxHeightCategories}px`,
63
+ minHeight: `${minHeightCategories}px`,
64
+ } }, Object.values(categories).map((category) => (React.createElement(PopupCategory, { data: category, onClick: changeCategory, key: category.slug, isActive: currentCategory.slug === category.slug })))),
65
+ React.createElement("div", { className: b('controls'), ref: controlsRef },
66
+ React.createElement("div", { className: b('links') }, links &&
67
+ links.map((link) => (React.createElement(Link, { className: b('link'), url: link.url, text: link.text, textSize: "m", key: link.url, theme: "normal", arrow: true })))),
68
+ placeholder && (React.createElement(Search, { initialValue: "", onSubmit: onSearch, className: b('search'), placeholder: placeholder, value: search, size: "s", customSearchIcon: Magnifier })))),
69
+ React.createElement(Col, { className: b('right'), sizes: { [GridColumnSize.Lg]: 9, [GridColumnSize.All]: 8 }, ref: rightSideRef },
70
+ React.createElement("div", { className: b('right-content'), ref: rightSideContentRef }, search ? (React.createElement(SearchResult, { value: search, data: flatList, section: section, className: b('items') })) : (React.createElement(Fragment, null, currentCategoryData.groups.map((group, index) => {
71
+ const key = group.title || group.url || index;
72
+ return index ? (React.createElement(PopupSecondaryGroup, Object.assign({}, group, { key: key }))) : (React.createElement(PopupGroup, Object.assign({}, group, { section: section, key: key })));
73
+ }))))))));
74
+ };
@@ -0,0 +1,6 @@
1
+ .pc-addons-medium-popup {
2
+ max-height: calc(100vh - var(--pc-addons-navigation-header-height) - 64px);
3
+ overflow: auto;
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { PopupData } from '../../../models';
3
+ import './MediumPopup.css';
4
+ interface MediumPopupProps {
5
+ data: PopupData;
6
+ }
7
+ export declare const MediumPopup: ({ data }: MediumPopupProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { Col, GridColumnSize, Row } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { block } from '../../../../../utils/cn';
4
+ import { NavigationPopupItem } from '../../Navigation/NavigationPopupItem/NavigationPopupItem';
5
+ import './MediumPopup.css';
6
+ const b = block('medium-popup');
7
+ export const MediumPopup = ({ data }) => (React.createElement(Row, null,
8
+ React.createElement(Col, { className: b() }, data.groups.map((dataItem) => dataItem.items.map((item) => (React.createElement(NavigationPopupItem, Object.assign({}, item, { key: item.title, hover: true, imageSize: dataItem.imageSize, sizes: {
9
+ [GridColumnSize.Xl]: 3,
10
+ [GridColumnSize.Md]: 4,
11
+ [GridColumnSize.All]: 12,
12
+ } }))))))));
@@ -0,0 +1,37 @@
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
+ }
15
+
16
+ .pc-addons-medium-popup-with-categories {
17
+ max-height: calc(100vh - var(--pc-addons-navigation-header-height) - 64px);
18
+ overflow: auto;
19
+ display: flex;
20
+ padding: 0 8px;
21
+ }
22
+
23
+ .pc-addons-medium-popup-with-categories__title {
24
+ margin-bottom: 8px;
25
+ padding: var(--pc-addons-navigation-popup-padding) 20px;
26
+ }
27
+
28
+ .pc-addons-medium-popup-with-categories__items {
29
+ display: flex;
30
+ flex-wrap: wrap;
31
+ }
32
+
33
+ @media (max-width: 1080px) {
34
+ .pc-addons-medium-popup-with-categories__col:not(:first-child) {
35
+ padding-top: 16px;
36
+ }
37
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { PopupData } from '../../../models';
3
+ import './MediumPopupWithCategories.css';
4
+ interface MediumPopupWithCategoriesProps {
5
+ data: PopupData;
6
+ }
7
+ export declare const MediumPopupWithCategories: ({ data }: MediumPopupWithCategoriesProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,50 @@
1
+ import React, { useMemo } from 'react';
2
+ import { BREAKPOINTS, Col, GridColumnSize, Row, Title, useWindowBreakpoint, } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { block } from '../../../../../utils/cn';
4
+ import { NavigationPopupItem, } from '../../Navigation/NavigationPopupItem/NavigationPopupItem';
5
+ import './MediumPopupWithCategories.css';
6
+ const b = block('medium-popup-with-categories');
7
+ export const MediumPopupWithCategories = ({ data }) => {
8
+ const breakpoint = useWindowBreakpoint();
9
+ const itemsArrays = data.groups.map((dataItem) => dataItem.items.map((item) => (Object.assign(Object.assign({}, item), { imageSize: dataItem.imageSize }))));
10
+ const isDesktop = breakpoint > BREAKPOINTS.lg;
11
+ const maxLength = Math.max(...itemsArrays.map((item) => item.length));
12
+ const desktopItemsArray = useMemo(() => {
13
+ const itemsArray = [];
14
+ for (let i = 0; i < maxLength; i += 2) {
15
+ for (let j = 0; j < 2; j++) {
16
+ itemsArray.push(itemsArrays[j][i]);
17
+ itemsArray.push(itemsArrays[j][i + 1]);
18
+ }
19
+ }
20
+ return itemsArray;
21
+ }, [itemsArrays, maxLength]);
22
+ return (React.createElement(Row, { className: b() },
23
+ data.groups.map(({ title, items, imageSize }) => (React.createElement(Col, { key: title, className: b('col'), sizes: {
24
+ [GridColumnSize.Xl]: 6,
25
+ [GridColumnSize.Lg]: 12,
26
+ [GridColumnSize.All]: 12,
27
+ } },
28
+ title && (React.createElement(Row, null,
29
+ React.createElement(Col, { className: b('title') },
30
+ React.createElement(Title, { title: { text: title, textSize: 'xs' } })))),
31
+ !isDesktop && (React.createElement("div", null,
32
+ React.createElement(Row, null, items.map((item) => (React.createElement(NavigationPopupItem, Object.assign({}, item, { hover: true, imageSize: imageSize, sizes: {
33
+ [GridColumnSize.Lg]: 6,
34
+ [GridColumnSize.Md]: 4,
35
+ [GridColumnSize.All]: 4,
36
+ }, key: item.title })))))))))),
37
+ isDesktop && (React.createElement(Col, { className: b('items') },
38
+ React.createElement("div", null,
39
+ React.createElement(Row, null, desktopItemsArray.map((item, index) => {
40
+ return typeof item === 'undefined' ? (React.createElement(Col, { sizes: {
41
+ [GridColumnSize.Xl]: 3,
42
+ [GridColumnSize.Md]: 4,
43
+ [GridColumnSize.All]: 12,
44
+ }, key: index })) : (React.createElement(NavigationPopupItem, Object.assign({}, item, { key: item.title, hover: true, sizes: {
45
+ [GridColumnSize.Xl]: 3,
46
+ [GridColumnSize.Md]: 4,
47
+ [GridColumnSize.All]: 12,
48
+ } })));
49
+ })))))));
50
+ };
@@ -0,0 +1,7 @@
1
+ .pc-addons-medium-popup-with-floors {
2
+ max-height: calc(100vh - var(--pc-addons-navigation-header-height) - 64px);
3
+ overflow: auto;
4
+ overflow-y: auto;
5
+ padding-left: 12px;
6
+ margin-right: -12px;
7
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { PopupData } from '../../../models';
3
+ import './MediumPopupWithFloors.css';
4
+ interface MediumPopupWithFloorsProps {
5
+ data: PopupData;
6
+ }
7
+ export declare const MediumPopupWithFloors: ({ data }: MediumPopupWithFloorsProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { GridColumnSize } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { block } from '../../../../../utils/cn';
4
+ import { PopupGroup } from '../components/PopupGroup/PopupGroup';
5
+ import './MediumPopupWithFloors.css';
6
+ const b = block('medium-popup-with-floors');
7
+ const DefaultItemSizes = {
8
+ [GridColumnSize.Lg]: 3,
9
+ [GridColumnSize.Sm]: 4,
10
+ [GridColumnSize.All]: 12,
11
+ };
12
+ export const MediumPopupWithFloors = ({ data }) => {
13
+ return (React.createElement("div", { className: b() }, data.groups.map((group, index) => (React.createElement(PopupGroup, Object.assign({}, group, { key: group.title || group.url || index, sizes: DefaultItemSizes, withFixItems: true, withPadding: true }))))));
14
+ };
@@ -0,0 +1,43 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .pc-addons-popup-category {
4
+ margin-bottom: 4px;
5
+ }
6
+
7
+ .pc-addons-popup-category__button {
8
+ display: inline-block;
9
+ margin: 0;
10
+ padding: 0;
11
+ font: inherit;
12
+ border: none;
13
+ outline: none;
14
+ color: inherit;
15
+ background: none;
16
+ cursor: pointer;
17
+ padding: 8px 12px;
18
+ width: 100%;
19
+ text-align: initial;
20
+ cursor: pointer;
21
+ border-radius: var(--g-border-radius-l);
22
+ }
23
+
24
+ .pc-addons-popup-category__button:focus {
25
+ outline: 2px solid var(--g-color-line-focus);
26
+ outline-offset: -2px;
27
+ }
28
+
29
+ .pc-addons-popup-category__button:focus:not(:focus-visible) {
30
+ outline: 0;
31
+ }
32
+
33
+ .pc-addons-popup-category__button:hover {
34
+ background-color: var(--g-color-base-simple-hover);
35
+ }
36
+
37
+ .pc-addons-popup-category__button_active {
38
+ background-color: var(--g-color-base-selection);
39
+ }
40
+
41
+ .pc-addons-popup-category__button_active:hover {
42
+ background-color: var(--g-color-base-selection-hover);
43
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { CategoryData } from '../../../../models';
3
+ import './PopupCategory.css';
4
+ interface ExtraPopupCategoryProps {
5
+ data: CategoryData;
6
+ onClick: (category: CategoryData) => void;
7
+ isActive: boolean;
8
+ }
9
+ export declare const PopupCategory: ({ data, onClick, isActive }: ExtraPopupCategoryProps) => React.JSX.Element;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { block } from '../../../../../../utils/cn';
3
+ import './PopupCategory.css';
4
+ const b = block('popup-category');
5
+ export const PopupCategory = ({ data, onClick, isActive }) => {
6
+ const { title } = data;
7
+ return (React.createElement("li", { className: b(), key: title, "aria-current": isActive || undefined },
8
+ React.createElement("button", { className: b('button', { active: isActive }), onClick: () => onClick(data) }, title)));
9
+ };
@@ -0,0 +1,27 @@
1
+ .pc-addons-popup-group {
2
+ margin-left: -12px;
3
+ padding-left: 12px;
4
+ border-radius: var(--g-border-radius-xl);
5
+ }
6
+
7
+ .pc-addons-popup-group + .pc-addons-popup-group {
8
+ margin-top: 12px;
9
+ }
10
+
11
+ .pc-addons-popup-group__title {
12
+ margin-bottom: 8px;
13
+ padding: var(--pc-addons-navigation-popup-padding) 12px;
14
+ }
15
+
16
+ .pc-addons-popup-group__items.row.row.row {
17
+ margin-left: -16px;
18
+ }
19
+
20
+ .pc-addons-popup-group__items_fix.row.row.row {
21
+ margin-left: -12px;
22
+ }
23
+
24
+ .pc-addons-popup-group__padding {
25
+ padding-top: 8px;
26
+ padding-bottom: 8px;
27
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { GridColumnSizesType } from '@doyourjob/gravity-ui-page-constructor';
3
+ import { CategoryGroupData } from '../../../../models';
4
+ import './PopupGroup.css';
5
+ type PopupGroupProps = CategoryGroupData & {
6
+ section?: string;
7
+ sizes?: GridColumnSizesType;
8
+ withFixItems?: boolean;
9
+ withPadding?: boolean;
10
+ };
11
+ export declare const PopupGroup: ({ sizes, section, withFixItems, withPadding, ...group }: PopupGroupProps) => React.JSX.Element;
12
+ export {};
@@ -0,0 +1,18 @@
1
+ import { __rest } from "tslib";
2
+ import React, { useMemo } from 'react';
3
+ import { Col, Row } from '@doyourjob/gravity-ui-page-constructor';
4
+ import { block } from '../../../../../../utils/cn';
5
+ import { NavigationItemsList } from '../../../Navigation/NavigationItemsList/NavigationItemsList';
6
+ import { PopupTitle } from '../PopupTitle/PopupTitle';
7
+ import './PopupGroup.css';
8
+ const b = block('popup-group');
9
+ export const PopupGroup = (_a) => {
10
+ var { sizes, section, withFixItems, withPadding } = _a, group = __rest(_a, ["sizes", "section", "withFixItems", "withPadding"]);
11
+ const items = useMemo(() => group.items.map((item) => (Object.assign(Object.assign({}, item), { description: group.showItemDescriptions === 'no' ? undefined : item.description, icon: group.showItemIcons === 'no' ? undefined : item.icon, image: group.showItemIcons === 'no' ? undefined : item.image }))), [group.items, group.showItemDescriptions, group.showItemIcons]);
12
+ return (React.createElement("div", { className: withPadding ? [b(), b('padding')].join(' ') : b(), style: { backgroundColor: group.backgroundColor } },
13
+ group.title && (React.createElement(Row, null,
14
+ React.createElement(Col, { className: b('title') },
15
+ React.createElement(PopupTitle, Object.assign({}, group))))),
16
+ React.createElement("div", null,
17
+ React.createElement(NavigationItemsList, { items: items, section: section, sizes: sizes, className: withFixItems ? [b('items'), b('items_fix')].join(' ') : b('items') }))));
18
+ };