@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,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,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,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,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,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
|
+
};
|
package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.css
ADDED
|
@@ -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 {};
|
package/build/esm/components/Navigation/components/popups/components/PopupCategory/PopupCategory.js
ADDED
|
@@ -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
|
+
};
|
package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.css
ADDED
|
@@ -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
|
+
}
|
package/build/esm/components/Navigation/components/popups/components/PopupGroup/PopupGroup.d.ts
ADDED
|
@@ -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
|
+
};
|