@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.
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/build/cjs/components/EnrichedLink/EnrichedLink.css +94 -0
- package/build/cjs/components/EnrichedLink/EnrichedLink.d.ts +17 -0
- package/build/cjs/components/EnrichedLink/EnrichedLink.js +38 -0
- package/build/cjs/components/Navigation/components/ButtonsContainer/ButtonsContainer.css +12 -0
- package/build/cjs/components/Navigation/components/ButtonsContainer/ButtonsContainer.d.ts +15 -0
- package/build/cjs/components/Navigation/components/ButtonsContainer/ButtonsContainer.js +17 -0
- package/build/cjs/components/Navigation/components/LangSwitch/LangSwitch.css +62 -0
- package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.css +62 -0
- package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.d.ts +7 -0
- package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.js +23 -0
- package/build/cjs/components/Navigation/components/LangSwitch/index.d.ts +17 -0
- package/build/cjs/components/Navigation/components/LangSwitch/index.js +27 -0
- package/build/cjs/components/Navigation/components/Logo/Logo.css +53 -0
- package/build/cjs/components/Navigation/components/Logo/Logo.d.ts +9 -0
- package/build/cjs/components/Navigation/components/Logo/Logo.js +15 -0
- package/build/cjs/components/Navigation/components/Logo/i18n/en.json +4 -0
- package/build/cjs/components/Navigation/components/Logo/i18n/index.d.ts +2 -0
- package/build/cjs/components/Navigation/components/Logo/i18n/index.js +8 -0
- package/build/cjs/components/Navigation/components/Logo/i18n/ru.json +4 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigation.css +47 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigation.d.ts +16 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigation.js +26 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.css +75 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +7 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +45 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.css +55 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.d.ts +9 -0
- package/build/cjs/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.js +47 -0
- package/build/cjs/components/Navigation/components/Navigation/Navigation.css +28 -0
- package/build/cjs/components/Navigation/components/Navigation/Navigation.d.ts +13 -0
- package/build/cjs/components/Navigation/components/Navigation/Navigation.js +74 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.css +81 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +14 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +57 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.d.ts +12 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +11 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.css +20 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.d.ts +11 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.js +20 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.css +111 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.d.ts +12 -0
- package/build/cjs/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.js +46 -0
- package/build/cjs/components/Navigation/components/SearchNotFound/SearchNotFound.css +7 -0
- package/build/cjs/components/Navigation/components/SearchNotFound/SearchNotFound.d.ts +8 -0
- package/build/cjs/components/Navigation/components/SearchNotFound/SearchNotFound.js +22 -0
- package/build/cjs/components/Navigation/components/SearchNotFound/i18n/en.json +4 -0
- package/build/cjs/components/Navigation/components/SearchNotFound/i18n/index.d.ts +2 -0
- package/build/cjs/components/Navigation/components/SearchNotFound/i18n/index.js +8 -0
- package/build/cjs/components/Navigation/components/SearchNotFound/i18n/ru.json +4 -0
- package/build/cjs/components/Navigation/components/SearchResult/SearchResult.css +8 -0
- package/build/cjs/components/Navigation/components/SearchResult/SearchResult.d.ts +10 -0
- package/build/cjs/components/Navigation/components/SearchResult/SearchResult.js +25 -0
- package/build/cjs/components/Navigation/components/SearchResult/i18n/en.json +12 -0
- package/build/cjs/components/Navigation/components/SearchResult/i18n/index.d.ts +2 -0
- package/build/cjs/components/Navigation/components/SearchResult/i18n/index.js +8 -0
- package/build/cjs/components/Navigation/components/SearchResult/i18n/ru.json +11 -0
- package/build/cjs/components/Navigation/components/Tag/Tag.css +21 -0
- package/build/cjs/components/Navigation/components/Tag/Tag.d.ts +6 -0
- package/build/cjs/components/Navigation/components/Tag/Tag.js +22 -0
- package/build/cjs/components/Navigation/components/popups/LargePopup/LargePopup.css +71 -0
- package/build/cjs/components/Navigation/components/popups/LargePopup/LargePopup.d.ts +6 -0
- package/build/cjs/components/Navigation/components/popups/LargePopup/LargePopup.js +78 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopup/MediumPopup.css +6 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopup/MediumPopup.d.ts +7 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopup/MediumPopup.js +16 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.css +37 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.d.ts +7 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.js +54 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.css +7 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.d.ts +7 -0
- package/build/cjs/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.js +18 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupCategory/PopupCategory.css +43 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupCategory/PopupCategory.d.ts +9 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupCategory/PopupCategory.js +13 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupGroup/PopupGroup.css +27 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupGroup/PopupGroup.d.ts +11 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupGroup/PopupGroup.js +21 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.css +17 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.d.ts +8 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.js +20 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupTitle/PopupTitle.d.ts +4 -0
- package/build/cjs/components/Navigation/components/popups/components/PopupTitle/PopupTitle.js +19 -0
- package/build/cjs/components/Navigation/components/popups/components/Search/Search.css +38 -0
- package/build/cjs/components/Navigation/components/popups/components/Search/Search.d.ts +17 -0
- package/build/cjs/components/Navigation/components/popups/components/Search/Search.js +47 -0
- package/build/cjs/components/Navigation/components/popups/components/Search/i18n/en.json +5 -0
- package/build/cjs/components/Navigation/components/popups/components/Search/i18n/index.d.ts +2 -0
- package/build/cjs/components/Navigation/components/popups/components/Search/i18n/index.js +8 -0
- package/build/cjs/components/Navigation/components/popups/components/Search/i18n/ru.json +5 -0
- package/build/cjs/components/Navigation/constants.d.ts +7 -0
- package/build/cjs/components/Navigation/constants.js +11 -0
- package/build/cjs/components/Navigation/containers/Footer/Footer.css +104 -0
- package/build/cjs/components/Navigation/containers/Footer/Footer.d.ts +3 -0
- package/build/cjs/components/Navigation/containers/Footer/Footer.js +58 -0
- package/build/cjs/components/Navigation/containers/Footer/GroupLinks/GroupLinks.css +68 -0
- package/build/cjs/components/Navigation/containers/Footer/GroupLinks/GroupLinks.d.ts +12 -0
- package/build/cjs/components/Navigation/containers/Footer/GroupLinks/GroupLinks.js +15 -0
- package/build/cjs/components/Navigation/containers/Footer/index.d.ts +3 -0
- package/build/cjs/components/Navigation/containers/Footer/index.js +6 -0
- package/build/cjs/components/Navigation/containers/Footer/models.d.ts +23 -0
- package/build/cjs/components/Navigation/containers/Footer/models.js +2 -0
- package/build/cjs/components/Navigation/containers/Footer/variables.css +7 -0
- package/build/cjs/components/Navigation/containers/Header/Header.css +172 -0
- package/build/cjs/components/Navigation/containers/Header/Header.d.ts +18 -0
- package/build/cjs/components/Navigation/containers/Header/Header.js +116 -0
- package/build/cjs/components/Navigation/containers/Header/index.d.ts +15 -0
- package/build/cjs/components/Navigation/containers/Header/index.js +25 -0
- package/build/cjs/components/Navigation/contexts/analytics.d.ts +6 -0
- package/build/cjs/components/Navigation/contexts/analytics.js +6 -0
- package/build/cjs/components/Navigation/contexts/device.d.ts +5 -0
- package/build/cjs/components/Navigation/contexts/device.js +6 -0
- package/build/cjs/components/Navigation/contexts/location.d.ts +9 -0
- package/build/cjs/components/Navigation/contexts/location.js +6 -0
- package/build/cjs/components/Navigation/contexts/mobile.d.ts +3 -0
- package/build/cjs/components/Navigation/contexts/mobile.js +6 -0
- package/build/cjs/components/Navigation/contexts/navigation-section.d.ts +3 -0
- package/build/cjs/components/Navigation/contexts/navigation-section.js +6 -0
- package/build/cjs/components/Navigation/contexts/route-change.d.ts +3 -0
- package/build/cjs/components/Navigation/contexts/route-change.js +6 -0
- package/build/cjs/components/Navigation/contexts/theme.d.ts +4 -0
- package/build/cjs/components/Navigation/contexts/theme.js +7 -0
- package/build/cjs/components/Navigation/index.d.ts +4 -0
- package/build/cjs/components/Navigation/index.js +7 -0
- package/build/cjs/components/Navigation/models.d.ts +89 -0
- package/build/cjs/components/Navigation/models.js +22 -0
- package/build/cjs/components/Navigation/styles/mixins.css +0 -0
- package/build/cjs/components/Navigation/styles/variables.css +14 -0
- package/build/cjs/components/Navigation/utils.d.ts +18 -0
- package/build/cjs/components/Navigation/utils.js +32 -0
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/components/index.js +5 -0
- package/build/cjs/constants.d.ts +3 -0
- package/build/cjs/constants.js +6 -0
- package/build/cjs/context/mobileContext/MobileContext.d.ts +2 -0
- package/build/cjs/context/mobileContext/MobileContext.js +6 -0
- package/build/cjs/context/mobileContext/index.d.ts +1 -0
- package/build/cjs/context/mobileContext/index.js +4 -0
- package/build/cjs/context/theme/ThemeContext.d.ts +10 -0
- package/build/cjs/context/theme/ThemeContext.js +15 -0
- package/build/cjs/context/theme/index.d.ts +3 -0
- package/build/cjs/context/theme/index.js +6 -0
- package/build/cjs/context/theme/useTheme.d.ts +2 -0
- package/build/cjs/context/theme/useTheme.js +11 -0
- package/build/cjs/context/theme/withTheme.d.ts +6 -0
- package/build/cjs/context/theme/withTheme.js +19 -0
- package/build/cjs/hooks/useIsCurrentPage.d.ts +1 -0
- package/build/cjs/hooks/useIsCurrentPage.js +13 -0
- package/build/cjs/hooks/useIsIPhone.d.ts +1 -0
- package/build/cjs/hooks/useIsIPhone.js +10 -0
- package/build/cjs/i18n.d.ts +2 -0
- package/build/cjs/i18n.js +12 -0
- package/build/cjs/index.d.ts +2 -0
- package/build/cjs/index.js +8 -0
- package/build/cjs/models/index.d.ts +3 -0
- package/build/cjs/models/index.js +2 -0
- package/build/cjs/utils/FocusTrap.d.ts +10 -0
- package/build/cjs/utils/FocusTrap.js +105 -0
- package/build/cjs/utils/cn.d.ts +5 -0
- package/build/cjs/utils/cn.js +9 -0
- package/build/cjs/utils/configure.d.ts +12 -0
- package/build/cjs/utils/configure.js +26 -0
- package/build/cjs/utils/registerKeyset.d.ts +5 -0
- package/build/cjs/utils/registerKeyset.js +9 -0
- package/build/esm/components/EnrichedLink/EnrichedLink.css +94 -0
- package/build/esm/components/EnrichedLink/EnrichedLink.d.ts +18 -0
- package/build/esm/components/EnrichedLink/EnrichedLink.js +34 -0
- package/build/esm/components/Navigation/components/ButtonsContainer/ButtonsContainer.css +12 -0
- package/build/esm/components/Navigation/components/ButtonsContainer/ButtonsContainer.d.ts +16 -0
- package/build/esm/components/Navigation/components/ButtonsContainer/ButtonsContainer.js +13 -0
- package/build/esm/components/Navigation/components/LangSwitch/LangSwitch.css +62 -0
- package/build/esm/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.css +62 -0
- package/build/esm/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.d.ts +8 -0
- package/build/esm/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.js +19 -0
- package/build/esm/components/Navigation/components/LangSwitch/index.d.ts +18 -0
- package/build/esm/components/Navigation/components/LangSwitch/index.js +23 -0
- package/build/esm/components/Navigation/components/Logo/Logo.css +53 -0
- package/build/esm/components/Navigation/components/Logo/Logo.d.ts +10 -0
- package/build/esm/components/Navigation/components/Logo/Logo.js +13 -0
- package/build/esm/components/Navigation/components/Logo/i18n/en.json +4 -0
- package/build/esm/components/Navigation/components/Logo/i18n/index.d.ts +2 -0
- package/build/esm/components/Navigation/components/Logo/i18n/index.js +5 -0
- package/build/esm/components/Navigation/components/Logo/i18n/ru.json +4 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigation.css +47 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigation.d.ts +17 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigation.js +22 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.css +75 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +8 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +41 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.css +55 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.d.ts +10 -0
- package/build/esm/components/Navigation/components/MobileNavigation/MobileNavigationPopup/MobileNavigationPopup.js +43 -0
- package/build/esm/components/Navigation/components/Navigation/Navigation.css +28 -0
- package/build/esm/components/Navigation/components/Navigation/Navigation.d.ts +14 -0
- package/build/esm/components/Navigation/components/Navigation/Navigation.js +70 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.css +81 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +15 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +53 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.d.ts +12 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +6 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.css +20 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.d.ts +12 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationPopup/NavigationPopup.js +16 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.css +111 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.d.ts +13 -0
- package/build/esm/components/Navigation/components/Navigation/NavigationPopupItem/NavigationPopupItem.js +42 -0
- package/build/esm/components/Navigation/components/SearchNotFound/SearchNotFound.css +7 -0
- package/build/esm/components/Navigation/components/SearchNotFound/SearchNotFound.d.ts +9 -0
- package/build/esm/components/Navigation/components/SearchNotFound/SearchNotFound.js +18 -0
- package/build/esm/components/Navigation/components/SearchNotFound/i18n/en.json +4 -0
- package/build/esm/components/Navigation/components/SearchNotFound/i18n/index.d.ts +2 -0
- package/build/esm/components/Navigation/components/SearchNotFound/i18n/index.js +5 -0
- package/build/esm/components/Navigation/components/SearchNotFound/i18n/ru.json +4 -0
- package/build/esm/components/Navigation/components/SearchResult/SearchResult.css +8 -0
- package/build/esm/components/Navigation/components/SearchResult/SearchResult.d.ts +11 -0
- package/build/esm/components/Navigation/components/SearchResult/SearchResult.js +21 -0
- package/build/esm/components/Navigation/components/SearchResult/i18n/en.json +12 -0
- package/build/esm/components/Navigation/components/SearchResult/i18n/index.d.ts +2 -0
- package/build/esm/components/Navigation/components/SearchResult/i18n/index.js +5 -0
- package/build/esm/components/Navigation/components/SearchResult/i18n/ru.json +11 -0
- package/build/esm/components/Navigation/components/Tag/Tag.css +21 -0
- package/build/esm/components/Navigation/components/Tag/Tag.d.ts +7 -0
- package/build/esm/components/Navigation/components/Tag/Tag.js +18 -0
- package/build/esm/components/Navigation/components/popups/LargePopup/LargePopup.css +71 -0
- package/build/esm/components/Navigation/components/popups/LargePopup/LargePopup.d.ts +7 -0
- package/build/esm/components/Navigation/components/popups/LargePopup/LargePopup.js +74 -0
- package/build/esm/components/Navigation/components/popups/MediumPopup/MediumPopup.css +6 -0
- package/build/esm/components/Navigation/components/popups/MediumPopup/MediumPopup.d.ts +8 -0
- package/build/esm/components/Navigation/components/popups/MediumPopup/MediumPopup.js +12 -0
- package/build/esm/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.css +37 -0
- package/build/esm/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.d.ts +8 -0
- package/build/esm/components/Navigation/components/popups/MediumPopupWithCategories/MediumPopupWithCategories.js +50 -0
- package/build/esm/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.css +7 -0
- package/build/esm/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.d.ts +8 -0
- package/build/esm/components/Navigation/components/popups/MediumPopupWithFloors/MediumPopupWithFloors.js +14 -0
- package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.css +43 -0
- package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.d.ts +10 -0
- package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.js +9 -0
- package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.css +27 -0
- package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.d.ts +12 -0
- package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.js +18 -0
- package/build/esm/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.css +17 -0
- package/build/esm/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.d.ts +9 -0
- package/build/esm/components/Navigation/components/popups/components/PopupSecondaryGroup/PopupSecondaryGroup.js +17 -0
- package/build/esm/components/Navigation/components/popups/components/PopupTitle/PopupTitle.d.ts +4 -0
- package/build/esm/components/Navigation/components/popups/components/PopupTitle/PopupTitle.js +14 -0
- package/build/esm/components/Navigation/components/popups/components/Search/Search.css +38 -0
- package/build/esm/components/Navigation/components/popups/components/Search/Search.d.ts +18 -0
- package/build/esm/components/Navigation/components/popups/components/Search/Search.js +45 -0
- package/build/esm/components/Navigation/components/popups/components/Search/i18n/en.json +5 -0
- package/build/esm/components/Navigation/components/popups/components/Search/i18n/index.d.ts +2 -0
- package/build/esm/components/Navigation/components/popups/components/Search/i18n/index.js +5 -0
- package/build/esm/components/Navigation/components/popups/components/Search/i18n/ru.json +5 -0
- package/build/esm/components/Navigation/constants.d.ts +7 -0
- package/build/esm/components/Navigation/constants.js +8 -0
- package/build/esm/components/Navigation/containers/Footer/Footer.css +104 -0
- package/build/esm/components/Navigation/containers/Footer/Footer.d.ts +4 -0
- package/build/esm/components/Navigation/containers/Footer/Footer.js +54 -0
- package/build/esm/components/Navigation/containers/Footer/GroupLinks/GroupLinks.css +68 -0
- package/build/esm/components/Navigation/containers/Footer/GroupLinks/GroupLinks.d.ts +13 -0
- package/build/esm/components/Navigation/containers/Footer/GroupLinks/GroupLinks.js +13 -0
- package/build/esm/components/Navigation/containers/Footer/index.d.ts +3 -0
- package/build/esm/components/Navigation/containers/Footer/index.js +3 -0
- package/build/esm/components/Navigation/containers/Footer/models.d.ts +23 -0
- package/build/esm/components/Navigation/containers/Footer/models.js +1 -0
- package/build/esm/components/Navigation/containers/Footer/variables.css +7 -0
- package/build/esm/components/Navigation/containers/Header/Header.css +172 -0
- package/build/esm/components/Navigation/containers/Header/Header.d.ts +19 -0
- package/build/esm/components/Navigation/containers/Header/Header.js +113 -0
- package/build/esm/components/Navigation/containers/Header/index.d.ts +15 -0
- package/build/esm/components/Navigation/containers/Header/index.js +21 -0
- package/build/esm/components/Navigation/contexts/analytics.d.ts +6 -0
- package/build/esm/components/Navigation/contexts/analytics.js +2 -0
- package/build/esm/components/Navigation/contexts/device.d.ts +5 -0
- package/build/esm/components/Navigation/contexts/device.js +2 -0
- package/build/esm/components/Navigation/contexts/location.d.ts +9 -0
- package/build/esm/components/Navigation/contexts/location.js +2 -0
- package/build/esm/components/Navigation/contexts/mobile.d.ts +3 -0
- package/build/esm/components/Navigation/contexts/mobile.js +2 -0
- package/build/esm/components/Navigation/contexts/navigation-section.d.ts +3 -0
- package/build/esm/components/Navigation/contexts/navigation-section.js +2 -0
- package/build/esm/components/Navigation/contexts/route-change.d.ts +3 -0
- package/build/esm/components/Navigation/contexts/route-change.js +2 -0
- package/build/esm/components/Navigation/contexts/theme.d.ts +4 -0
- package/build/esm/components/Navigation/contexts/theme.js +3 -0
- package/build/esm/components/Navigation/index.d.ts +4 -0
- package/build/esm/components/Navigation/index.js +4 -0
- package/build/esm/components/Navigation/models.d.ts +89 -0
- package/build/esm/components/Navigation/models.js +19 -0
- package/build/esm/components/Navigation/styles/mixins.css +0 -0
- package/build/esm/components/Navigation/styles/variables.css +14 -0
- package/build/esm/components/Navigation/utils.d.ts +18 -0
- package/build/esm/components/Navigation/utils.js +25 -0
- package/build/esm/components/index.d.ts +2 -0
- package/build/esm/components/index.js +2 -0
- package/build/esm/constants.d.ts +3 -0
- package/build/esm/constants.js +3 -0
- package/build/esm/context/mobileContext/MobileContext.d.ts +2 -0
- package/build/esm/context/mobileContext/MobileContext.js +2 -0
- package/build/esm/context/mobileContext/index.d.ts +1 -0
- package/build/esm/context/mobileContext/index.js +1 -0
- package/build/esm/context/theme/ThemeContext.d.ts +10 -0
- package/build/esm/context/theme/ThemeContext.js +11 -0
- package/build/esm/context/theme/index.d.ts +3 -0
- package/build/esm/context/theme/index.js +3 -0
- package/build/esm/context/theme/useTheme.d.ts +2 -0
- package/build/esm/context/theme/useTheme.js +6 -0
- package/build/esm/context/theme/withTheme.d.ts +6 -0
- package/build/esm/context/theme/withTheme.js +14 -0
- package/build/esm/hooks/useIsCurrentPage.d.ts +1 -0
- package/build/esm/hooks/useIsCurrentPage.js +8 -0
- package/build/esm/hooks/useIsIPhone.d.ts +1 -0
- package/build/esm/hooks/useIsIPhone.js +6 -0
- package/build/esm/i18n.d.ts +2 -0
- package/build/esm/i18n.js +9 -0
- package/build/esm/index.d.ts +2 -0
- package/build/esm/index.js +3 -0
- package/build/esm/models/index.d.ts +3 -0
- package/build/esm/models/index.js +1 -0
- package/build/esm/utils/FocusTrap.d.ts +10 -0
- package/build/esm/utils/FocusTrap.js +99 -0
- package/build/esm/utils/cn.d.ts +5 -0
- package/build/esm/utils/cn.js +6 -0
- package/build/esm/utils/configure.d.ts +12 -0
- package/build/esm/utils/configure.js +20 -0
- package/build/esm/utils/registerKeyset.d.ts +5 -0
- package/build/esm/utils/registerKeyset.js +5 -0
- package/package.json +152 -0
- package/styles/.gitkeep +0 -0
- package/styles/mixins.scss +1 -0
- package/styles/storybook/common.scss +37 -0
- package/styles/storybook/index.scss +20 -0
- package/styles/storybook/palette.scss +75 -0
- package/styles/storybook/typography.scss +139 -0
- package/styles/styles.css +1 -0
- package/styles/styles.scss +1 -0
- package/styles/variables.scss +3 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-navigation-popup-item {
|
|
4
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
5
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
6
|
+
margin-bottom: 2px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.pc-addons-navigation-popup-item__content {
|
|
10
|
+
outline: none;
|
|
11
|
+
color: inherit;
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
display: flex;
|
|
14
|
+
border-radius: var(--g-border-radius-xl);
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.utilityfocus .pc-addons-navigation-popup-item__content:focus {
|
|
19
|
+
outline: 2px solid #ffdb4d;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.pc-addons-navigation-popup-item__content:focus {
|
|
23
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
24
|
+
outline-offset: -2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pc-addons-navigation-popup-item__content:focus:not(:focus-visible) {
|
|
28
|
+
outline: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pc-addons-navigation-popup-item__content_padding_default {
|
|
32
|
+
padding: 12px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pc-addons-navigation-popup-item__content_padding_s {
|
|
36
|
+
padding: 6px 12px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pc-addons-navigation-popup-item__content:hover, .pc-addons-navigation-popup-item__content:active {
|
|
40
|
+
color: var(--g-color-base-brand);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pc-addons-navigation-popup-item__content_hover:hover, .pc-addons-navigation-popup-item__content_hover:active {
|
|
44
|
+
color: inherit;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pc-addons-navigation-popup-item__content_hover:hover {
|
|
48
|
+
background-color: var(--g-color-base-simple-hover);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pc-addons-navigation-popup-item__content_disable {
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pc-addons-navigation-popup-item__icon {
|
|
56
|
+
color: var(--g-color-base-brand);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pc-addons-navigation-popup-item__icon-container {
|
|
60
|
+
position: absolute;
|
|
61
|
+
width: 20px;
|
|
62
|
+
height: 20px;
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.pc-addons-navigation-popup-item__container_with-margin {
|
|
69
|
+
margin-left: 28px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.pc-addons-navigation-popup-item__description {
|
|
73
|
+
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
74
|
+
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
75
|
+
display: block;
|
|
76
|
+
margin-top: 2px;
|
|
77
|
+
color: var(--g-color-text-secondary);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.pc-addons-navigation-popup-item__tag {
|
|
81
|
+
position: relative;
|
|
82
|
+
top: -2px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pc-addons-navigation-popup-item__image {
|
|
86
|
+
display: block;
|
|
87
|
+
position: relative;
|
|
88
|
+
top: 2px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.pc-addons-navigation-popup-item__image_size_m {
|
|
92
|
+
width: 18px;
|
|
93
|
+
height: 18px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.pc-addons-navigation-popup-item__image_size_xm {
|
|
97
|
+
width: 16px;
|
|
98
|
+
height: 16px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.pc-addons-navigation-popup-item__image_size_s {
|
|
102
|
+
width: 14px;
|
|
103
|
+
height: 14px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.pc-addons-navigation-popup-item__image-container {
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
min-width: 20px;
|
|
110
|
+
margin-right: 8px;
|
|
111
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GridColumnSizesType } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import { NavigationItem } from '../../../models';
|
|
4
|
+
export interface NavigationPopupItemProps extends Partial<NavigationItem> {
|
|
5
|
+
hover?: boolean;
|
|
6
|
+
sizes?: GridColumnSizesType;
|
|
7
|
+
className?: string;
|
|
8
|
+
padding?: 'default' | 's';
|
|
9
|
+
imageSize?: 's' | 'xm' | 'm';
|
|
10
|
+
target?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const NavigationPopupItem: (props: NavigationPopupItemProps) => React.JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationPopupItem = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
+
const useIsCurrentPage_1 = require("../../../../../hooks/useIsCurrentPage");
|
|
9
|
+
const cn_1 = require("../../../../../utils/cn");
|
|
10
|
+
const constants_1 = require("../../../constants");
|
|
11
|
+
const analytics_1 = require("../../../contexts/analytics");
|
|
12
|
+
const location_1 = require("../../../contexts/location");
|
|
13
|
+
const navigation_section_1 = require("../../../contexts/navigation-section");
|
|
14
|
+
const models_1 = require("../../../models");
|
|
15
|
+
const Tag_1 = require("../../Tag/Tag");
|
|
16
|
+
const b = (0, cn_1.block)('navigation-popup-item');
|
|
17
|
+
const NavigationPopupItem = (props) => {
|
|
18
|
+
const { icon, url, target, title, tag, description, image, imageSize = 'm', hover, className, sizes = constants_1.DefaultCategorizedItemSizes, padding = 'default', } = props;
|
|
19
|
+
const navigationSection = (0, react_1.useContext)(navigation_section_1.NavigationSectionContext);
|
|
20
|
+
const { sendEvents } = (0, react_1.useContext)(analytics_1.AnalyticsContext) || {};
|
|
21
|
+
const { hostname } = (0, react_1.useContext)(location_1.LocationContext) || {};
|
|
22
|
+
const linkProps = url ? (0, gravity_ui_page_constructor_1.getLinkProps)(url, hostname, target) : {};
|
|
23
|
+
const handleOnClick = (0, react_1.useCallback)(() => {
|
|
24
|
+
sendEvents === null || sendEvents === void 0 ? void 0 : sendEvents([
|
|
25
|
+
{
|
|
26
|
+
name: models_1.AnalyticsEventType.PopupItemClick,
|
|
27
|
+
params: { url, section: navigationSection },
|
|
28
|
+
},
|
|
29
|
+
]);
|
|
30
|
+
}, [sendEvents, navigationSection, url]);
|
|
31
|
+
const navigationTag = tag && react_1.default.createElement(Tag_1.NavigationTag, Object.assign({ className: b('tag'), size: "s" }, tag));
|
|
32
|
+
const isCurrentPage = (0, useIsCurrentPage_1.useIsCurrentPage)(url);
|
|
33
|
+
return (react_1.default.createElement(gravity_ui_page_constructor_1.Col, { className: b(null, className), sizes: sizes },
|
|
34
|
+
react_1.default.createElement("a", Object.assign({ className: b('content', { hover, padding, disable: !url }), href: url }, linkProps, { onClick: handleOnClick, "aria-current": isCurrentPage ? 'page' : undefined }),
|
|
35
|
+
icon && (react_1.default.createElement("div", { className: b('icon-container') },
|
|
36
|
+
react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icon, size: 16 }))),
|
|
37
|
+
image && (react_1.default.createElement("div", { className: b('image-container') },
|
|
38
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Image, { className: b('image', { size: imageSize }), src: image }))),
|
|
39
|
+
react_1.default.createElement("div", { className: b('container', { 'with-margin': Boolean(icon) }) },
|
|
40
|
+
react_1.default.createElement("div", { className: b('title-tag-wrapper') },
|
|
41
|
+
react_1.default.createElement("span", { className: b('title') }, title),
|
|
42
|
+
"\u00A0",
|
|
43
|
+
navigationTag),
|
|
44
|
+
description && react_1.default.createElement(gravity_ui_page_constructor_1.HTML, { className: b('description') }, description)))));
|
|
45
|
+
};
|
|
46
|
+
exports.NavigationPopupItem = NavigationPopupItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextSize } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
interface SearchNotFoundProps {
|
|
4
|
+
notFoundDescription?: string;
|
|
5
|
+
size?: TextSize;
|
|
6
|
+
}
|
|
7
|
+
export declare const SearchNotFound: (props: SearchNotFoundProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchNotFound = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
+
const cn_1 = require("../../../../utils/cn");
|
|
8
|
+
const i18n_1 = tslib_1.__importDefault(require("./i18n"));
|
|
9
|
+
const b = (0, cn_1.block)('search-not-found');
|
|
10
|
+
const SearchNotFound = (props) => {
|
|
11
|
+
const { notFoundDescription, size = 's' } = props;
|
|
12
|
+
const title = {
|
|
13
|
+
text: (0, i18n_1.default)('search-not-found-title'),
|
|
14
|
+
textSize: size,
|
|
15
|
+
};
|
|
16
|
+
return (react_1.default.createElement(gravity_ui_page_constructor_1.Row, { className: b() },
|
|
17
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Title, { colSizes: {
|
|
18
|
+
[gravity_ui_page_constructor_1.GridColumnSize.Lg]: 9,
|
|
19
|
+
[gravity_ui_page_constructor_1.GridColumnSize.All]: 12,
|
|
20
|
+
}, title: title, subtitle: notFoundDescription || (0, i18n_1.default)('search-not-found-description'), className: b('title') })));
|
|
21
|
+
};
|
|
22
|
+
exports.SearchNotFound = SearchNotFound;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const registerKeyset_1 = require("../../../../../utils/registerKeyset");
|
|
5
|
+
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
|
+
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
+
const COMPONENT = 'SearchFound';
|
|
8
|
+
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NavigationItem } from '../../models';
|
|
3
|
+
interface SearchResultProps {
|
|
4
|
+
value: string;
|
|
5
|
+
data: NavigationItem[];
|
|
6
|
+
section?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SearchResult: ({ value, data, section, className }: SearchResultProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchResult = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
const NavigationItemsList_1 = require("../Navigation/NavigationItemsList/NavigationItemsList");
|
|
9
|
+
const SearchNotFound_1 = require("../SearchNotFound/SearchNotFound");
|
|
10
|
+
const i18n_1 = tslib_1.__importDefault(require("./i18n"));
|
|
11
|
+
const b = (0, gravity_ui_page_constructor_1.block)('search-result');
|
|
12
|
+
const SearchResult = ({ value, data, section, className }) => {
|
|
13
|
+
const result = (0, utils_1.applySearch)(value, data);
|
|
14
|
+
const title = {
|
|
15
|
+
text: (0, i18n_1.default)('search-found', { count: result.length }),
|
|
16
|
+
textSize: 'xs',
|
|
17
|
+
};
|
|
18
|
+
return (react_1.default.createElement("div", { className: b() }, result.length ? (react_1.default.createElement(react_1.Fragment, null,
|
|
19
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null,
|
|
20
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Title, { className: b('title'), title: title, colSizes: { all: 12 } })),
|
|
21
|
+
react_1.default.createElement("div", null,
|
|
22
|
+
react_1.default.createElement(NavigationItemsList_1.NavigationItemsList, { items: result, section: section, className: className })))) : (react_1.default.createElement("div", { className: b('container') },
|
|
23
|
+
react_1.default.createElement(SearchNotFound_1.SearchNotFound, { notFoundDescription: (0, i18n_1.default)('search-not-found'), size: "xs" })))));
|
|
24
|
+
};
|
|
25
|
+
exports.SearchResult = SearchResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const registerKeyset_1 = require("../../../../../utils/registerKeyset");
|
|
5
|
+
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
|
+
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
+
const COMPONENT = 'SearchResult';
|
|
8
|
+
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
@@ -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,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import { NavigationTag as NavigationTagModel } from '../../models';
|
|
4
|
+
export interface NavigationTagProps extends NavigationTagModel, ClassNameProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const NavigationTag: ({ text, color, textColor, className, size, }: NavigationTagProps) => React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationTag = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const cn_1 = require("../../../../utils/cn");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
const b = (0, cn_1.block)('navigation-tag');
|
|
9
|
+
const getColor = (color) => {
|
|
10
|
+
switch (color) {
|
|
11
|
+
case models_1.NavigationTagColor.Yellow:
|
|
12
|
+
return 'var(--pc-addons-navigation-color-tag-yellow)';
|
|
13
|
+
case models_1.NavigationTagColor.Blue:
|
|
14
|
+
return 'var(--pc-addons-navigation-color-tag-blue)';
|
|
15
|
+
case models_1.NavigationTagColor.Green:
|
|
16
|
+
return 'var(--pc-addons-navigation-color-tag-green)';
|
|
17
|
+
default:
|
|
18
|
+
return color;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const NavigationTag = ({ text, color = models_1.NavigationTagColor.Yellow, textColor, className, size = 'm', }) => (react_1.default.createElement("div", { className: b({ size }, className), style: { backgroundColor: getColor(color), color: textColor } }, text));
|
|
22
|
+
exports.NavigationTag = NavigationTag;
|
|
@@ -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,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CategorizedPopupData, NavigationSectionData } from '../../../models';
|
|
3
|
+
export interface LargePopupProps extends Omit<NavigationSectionData, 'data'> {
|
|
4
|
+
data: CategorizedPopupData;
|
|
5
|
+
}
|
|
6
|
+
export declare const LargePopup: (props: LargePopupProps) => React.JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LargePopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
8
|
+
const cn_1 = require("../../../../../utils/cn");
|
|
9
|
+
const utils_1 = require("../../../utils");
|
|
10
|
+
const SearchResult_1 = require("../../SearchResult/SearchResult");
|
|
11
|
+
const PopupCategory_1 = require("../components/PopupCategory/PopupCategory");
|
|
12
|
+
const PopupGroup_1 = require("../components/PopupGroup/PopupGroup");
|
|
13
|
+
const PopupSecondaryGroup_1 = require("../components/PopupSecondaryGroup/PopupSecondaryGroup");
|
|
14
|
+
const Search_1 = tslib_1.__importDefault(require("../components/Search/Search"));
|
|
15
|
+
const b = (0, cn_1.block)('large-popup');
|
|
16
|
+
const LARGE_POPUP_INDENT = 240;
|
|
17
|
+
const LargePopup = (props) => {
|
|
18
|
+
const { data, section, placeholder, links } = props;
|
|
19
|
+
const { categories } = data;
|
|
20
|
+
const [currentCategory, setCurrentCategory] = (0, react_1.useState)(Object.values(categories)[0]);
|
|
21
|
+
const [search, setSearch] = (0, react_1.useState)('');
|
|
22
|
+
const categoriesRef = (0, react_1.useRef)(null);
|
|
23
|
+
const [maxHeightCategories, setMaxHeightCategories] = (0, react_1.useState)(0);
|
|
24
|
+
const [minHeightCategories, setMinHeightCategories] = (0, react_1.useState)(355);
|
|
25
|
+
const [categoriesWithScroll, setCategoriesWithScroll] = (0, react_1.useState)(false);
|
|
26
|
+
const rightSideRef = (0, react_1.useRef)(null);
|
|
27
|
+
const rightSideContentRef = (0, react_1.useRef)(null);
|
|
28
|
+
const controlsRef = (0, react_1.useRef)(null);
|
|
29
|
+
const currentCategoryData = categories[currentCategory.slug];
|
|
30
|
+
const flatList = (0, react_1.useMemo)(() => {
|
|
31
|
+
const searchableItems = Object.entries(categories).reduce((result, [slug, { groups }]) => {
|
|
32
|
+
// eslint-disable-next-line no-param-reassign
|
|
33
|
+
result[slug] = groups[0].items;
|
|
34
|
+
return result;
|
|
35
|
+
}, {});
|
|
36
|
+
return (0, utils_1.getFlatList)(searchableItems);
|
|
37
|
+
}, [categories]);
|
|
38
|
+
const onSearch = (0, react_1.useCallback)((value) => setSearch(value), []);
|
|
39
|
+
const changeCategory = (0, react_1.useCallback)((value) => {
|
|
40
|
+
const rightSideCurrent = rightSideRef === null || rightSideRef === void 0 ? void 0 : rightSideRef.current;
|
|
41
|
+
if (rightSideCurrent) {
|
|
42
|
+
rightSideCurrent.scrollTop = 0;
|
|
43
|
+
}
|
|
44
|
+
setCurrentCategory(value);
|
|
45
|
+
}, []);
|
|
46
|
+
(0, react_1.useEffect)(() => {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
const maxHeight = window.innerHeight - (0, utils_1.getHeaderHeight)(false) - LARGE_POPUP_INDENT;
|
|
49
|
+
const rightColumnHeight = (_a = rightSideContentRef === null || rightSideContentRef === void 0 ? void 0 : rightSideContentRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
|
50
|
+
const controlsHeight = (_b = controlsRef === null || controlsRef === void 0 ? void 0 : controlsRef.current) === null || _b === void 0 ? void 0 : _b.clientHeight;
|
|
51
|
+
setMaxHeightCategories(maxHeight);
|
|
52
|
+
if (rightColumnHeight && controlsHeight) {
|
|
53
|
+
setMinHeightCategories(rightColumnHeight - controlsHeight);
|
|
54
|
+
}
|
|
55
|
+
if (categoriesRef.current) {
|
|
56
|
+
if (categoriesRef.current.scrollHeight > maxHeight) {
|
|
57
|
+
setCategoriesWithScroll(true);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, []);
|
|
61
|
+
return (react_1.default.createElement(react_1.Fragment, null,
|
|
62
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null,
|
|
63
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Col, { className: b('left'), sizes: { [gravity_ui_page_constructor_1.GridColumnSize.Lg]: 3, [gravity_ui_page_constructor_1.GridColumnSize.All]: 4 } },
|
|
64
|
+
react_1.default.createElement("ul", { className: b('categories', { 'with-scroll': categoriesWithScroll }), ref: categoriesRef, style: {
|
|
65
|
+
maxHeight: `${maxHeightCategories}px`,
|
|
66
|
+
minHeight: `${minHeightCategories}px`,
|
|
67
|
+
} }, Object.values(categories).map((category) => (react_1.default.createElement(PopupCategory_1.PopupCategory, { data: category, onClick: changeCategory, key: category.slug, isActive: currentCategory.slug === category.slug })))),
|
|
68
|
+
react_1.default.createElement("div", { className: b('controls'), ref: controlsRef },
|
|
69
|
+
react_1.default.createElement("div", { className: b('links') }, links &&
|
|
70
|
+
links.map((link) => (react_1.default.createElement(gravity_ui_page_constructor_1.Link, { className: b('link'), url: link.url, text: link.text, textSize: "m", key: link.url, theme: "normal", arrow: true })))),
|
|
71
|
+
placeholder && (react_1.default.createElement(Search_1.default, { initialValue: "", onSubmit: onSearch, className: b('search'), placeholder: placeholder, value: search, size: "s", customSearchIcon: icons_1.Magnifier })))),
|
|
72
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Col, { className: b('right'), sizes: { [gravity_ui_page_constructor_1.GridColumnSize.Lg]: 9, [gravity_ui_page_constructor_1.GridColumnSize.All]: 8 }, ref: rightSideRef },
|
|
73
|
+
react_1.default.createElement("div", { className: b('right-content'), ref: rightSideContentRef }, search ? (react_1.default.createElement(SearchResult_1.SearchResult, { value: search, data: flatList, section: section, className: b('items') })) : (react_1.default.createElement(react_1.Fragment, null, currentCategoryData.groups.map((group, index) => {
|
|
74
|
+
const key = group.title || group.url || index;
|
|
75
|
+
return index ? (react_1.default.createElement(PopupSecondaryGroup_1.PopupSecondaryGroup, Object.assign({}, group, { key: key }))) : (react_1.default.createElement(PopupGroup_1.PopupGroup, Object.assign({}, group, { section: section, key: key })));
|
|
76
|
+
}))))))));
|
|
77
|
+
};
|
|
78
|
+
exports.LargePopup = LargePopup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediumPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
+
const cn_1 = require("../../../../../utils/cn");
|
|
8
|
+
const NavigationPopupItem_1 = require("../../Navigation/NavigationPopupItem/NavigationPopupItem");
|
|
9
|
+
const b = (0, cn_1.block)('medium-popup');
|
|
10
|
+
const MediumPopup = ({ data }) => (react_1.default.createElement(gravity_ui_page_constructor_1.Row, null,
|
|
11
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Col, { className: b() }, data.groups.map((dataItem) => dataItem.items.map((item) => (react_1.default.createElement(NavigationPopupItem_1.NavigationPopupItem, Object.assign({}, item, { key: item.title, hover: true, imageSize: dataItem.imageSize, sizes: {
|
|
12
|
+
[gravity_ui_page_constructor_1.GridColumnSize.Xl]: 3,
|
|
13
|
+
[gravity_ui_page_constructor_1.GridColumnSize.Md]: 4,
|
|
14
|
+
[gravity_ui_page_constructor_1.GridColumnSize.All]: 12,
|
|
15
|
+
} }))))))));
|
|
16
|
+
exports.MediumPopup = MediumPopup;
|
|
@@ -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,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopupData } from '../../../models';
|
|
3
|
+
interface MediumPopupWithCategoriesProps {
|
|
4
|
+
data: PopupData;
|
|
5
|
+
}
|
|
6
|
+
export declare const MediumPopupWithCategories: ({ data }: MediumPopupWithCategoriesProps) => React.JSX.Element;
|
|
7
|
+
export {};
|