@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 YANDEX LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @gravity-ui/page-constructor-addons · [](https://www.npmjs.com/package/@gravity-ui/page-constructor-addons) [](https://github.com/gravity-ui/page-constructor-addons/actions/workflows/ci.yml?query=branch:main) [](https://github.com/gravity-ui/page-constructor-addons/actions/workflows/release.yml?query=branch:main) [](https://preview.yandexcloud.dev/page-constructor-addons/)
|
|
2
|
+
|
|
3
|
+
# Page constructor addons
|
|
4
|
+
|
|
5
|
+
`page-constructor-addons` it is a set of components and plugins working with [@gravity-ui/page-constrcutor](https://github.com/gravity-ui/page-constructor) and extending it's functionality.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install @gravity-ui/page-constructor-addons
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Development
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm ci
|
|
17
|
+
|
|
18
|
+
npm run dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Run Tests
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run test
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Build
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm run build
|
|
31
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-enriched-link {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
list-style: none;
|
|
7
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
8
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
9
|
+
display: flex;
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pc-addons-enriched-link_type_default {
|
|
14
|
+
outline: none;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
color: inherit;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
border-radius: var(--g-focus-border-radius);
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.utilityfocus .pc-addons-enriched-link_type_default:focus {
|
|
25
|
+
outline: 2px solid #ffdb4d;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pc-addons-enriched-link_type_default:focus {
|
|
29
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
30
|
+
outline-offset: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pc-addons-enriched-link_type_default:focus:not(:focus-visible) {
|
|
34
|
+
outline: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.pc-addons-enriched-link_type_default:hover, .pc-addons-enriched-link_type_default:active {
|
|
38
|
+
--pc-text-header-color: var(--g-color-text-link);
|
|
39
|
+
color: var(--g-color-text-link);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mobile .pc-addons-enriched-link_type_default:hover, .mobile .pc-addons-enriched-link_type_default:active {
|
|
43
|
+
--pc-text-header-color: inherit;
|
|
44
|
+
color: inherit;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pc-addons-enriched-link_type_icon {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
width: 40px;
|
|
52
|
+
height: 40px;
|
|
53
|
+
transition: all 0.3s ease;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
background-color: var(--g-color-base-generic);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.pc-addons-enriched-link_type_icon:not(:last-child) {
|
|
59
|
+
margin-right: 8px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.pc-addons-enriched-link_type_icon svg {
|
|
63
|
+
color: var(--g-color-text-dark-primary);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.pc-addons-enriched-link_type_icon:hover {
|
|
67
|
+
background-color: var(--g-color-base-generic-hover);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pc-addons-enriched-link_left-icon {
|
|
71
|
+
padding-left: 26px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pc-addons-enriched-link__icon {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: 2px;
|
|
77
|
+
left: 0;
|
|
78
|
+
color: var(--g-color-base-brand);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.pc-addons-enriched-link__title {
|
|
82
|
+
color: var(--g-color-text-primary);
|
|
83
|
+
line-height: 18px;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pc-addons-enriched-link__title:hover {
|
|
89
|
+
color: var(--g-color-text-primary);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.pc-addons-enriched-link:hover .pc-addons-enriched-link__title {
|
|
93
|
+
color: var(--g-color-text-link);
|
|
94
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import type { IconData } from '@gravity-ui/uikit';
|
|
4
|
+
export interface EnrichedLinkProps extends ClassNameProps {
|
|
5
|
+
title: string;
|
|
6
|
+
url: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
type?: EnrichedLinkType;
|
|
9
|
+
icon?: IconData;
|
|
10
|
+
blank?: boolean;
|
|
11
|
+
noreferrer?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare enum EnrichedLinkType {
|
|
14
|
+
Default = "default",
|
|
15
|
+
OnlyIcon = "icon"
|
|
16
|
+
}
|
|
17
|
+
export declare const EnrichedLink: React.FC<EnrichedLinkProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnrichedLink = exports.EnrichedLinkType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
|
+
const cn_1 = require("../../utils/cn");
|
|
8
|
+
const b = (0, cn_1.block)('enriched-link');
|
|
9
|
+
const ICON_SIZE = 16;
|
|
10
|
+
const SOCIAL_ICON_SIZE = 24;
|
|
11
|
+
var EnrichedLinkType;
|
|
12
|
+
(function (EnrichedLinkType) {
|
|
13
|
+
EnrichedLinkType["Default"] = "default";
|
|
14
|
+
EnrichedLinkType["OnlyIcon"] = "icon";
|
|
15
|
+
})(EnrichedLinkType = exports.EnrichedLinkType || (exports.EnrichedLinkType = {}));
|
|
16
|
+
const getLinkProps = (props) => {
|
|
17
|
+
const { url, blank, noreferrer, onClick } = props;
|
|
18
|
+
const res = {
|
|
19
|
+
href: url,
|
|
20
|
+
target: blank ? '_blank' : undefined,
|
|
21
|
+
onClick,
|
|
22
|
+
};
|
|
23
|
+
if (noreferrer || blank) {
|
|
24
|
+
res.rel = 'noopener noreferrer';
|
|
25
|
+
}
|
|
26
|
+
return res;
|
|
27
|
+
};
|
|
28
|
+
const EnrichedLink = (props) => {
|
|
29
|
+
const { type, title, icon, className } = props;
|
|
30
|
+
if (type === EnrichedLinkType.OnlyIcon) {
|
|
31
|
+
return (react_1.default.createElement(uikit_1.Link, Object.assign({}, getLinkProps(props), { className: b({ type }, className), title: title, "data-router": "off" }), icon && react_1.default.createElement(uikit_1.Icon, { data: icon, size: SOCIAL_ICON_SIZE })));
|
|
32
|
+
}
|
|
33
|
+
return (react_1.default.createElement(uikit_1.Link, Object.assign({}, getLinkProps(props), { className: b({ type, ['left-icon']: Boolean(icon) }, className) }),
|
|
34
|
+
icon && react_1.default.createElement(uikit_1.Icon, { data: icon, size: ICON_SIZE, className: b('icon') }),
|
|
35
|
+
react_1.default.createElement("div", { className: b('content') },
|
|
36
|
+
react_1.default.createElement("div", { className: b('title') }, title))));
|
|
37
|
+
};
|
|
38
|
+
exports.EnrichedLink = EnrichedLink;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import type { ButtonProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import type { ButtonWidth } from '@gravity-ui/uikit';
|
|
4
|
+
export declare enum ButtonsContainerDirection {
|
|
5
|
+
Row = "row",
|
|
6
|
+
Column = "column"
|
|
7
|
+
}
|
|
8
|
+
interface ButtonsContainerProps extends PropsWithChildren {
|
|
9
|
+
buttons: ButtonProps[];
|
|
10
|
+
className?: string;
|
|
11
|
+
width?: ButtonWidth;
|
|
12
|
+
direction?: ButtonsContainerDirection;
|
|
13
|
+
}
|
|
14
|
+
export declare const ButtonsContainer: ({ buttons, className, width, direction, children, }: ButtonsContainerProps) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ButtonsContainer = exports.ButtonsContainerDirection = 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
|
+
var ButtonsContainerDirection;
|
|
9
|
+
(function (ButtonsContainerDirection) {
|
|
10
|
+
ButtonsContainerDirection["Row"] = "row";
|
|
11
|
+
ButtonsContainerDirection["Column"] = "column";
|
|
12
|
+
})(ButtonsContainerDirection = exports.ButtonsContainerDirection || (exports.ButtonsContainerDirection = {}));
|
|
13
|
+
const b = (0, cn_1.block)('buttons-container');
|
|
14
|
+
const ButtonsContainer = ({ buttons, className, width, direction = ButtonsContainerDirection.Row, children, }) => (react_1.default.createElement("div", { className: b({ direction }, className) }, buttons === null || buttons === void 0 ? void 0 :
|
|
15
|
+
buttons.map((button) => (react_1.default.createElement(gravity_ui_page_constructor_1.Button, Object.assign({}, button, { size: "l", className: b('item'), key: button.text, width: width })))),
|
|
16
|
+
children));
|
|
17
|
+
exports.ButtonsContainer = ButtonsContainer;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-lang-switch {
|
|
4
|
+
margin-left: 1px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pc-addons-lang-switch:hover:before {
|
|
8
|
+
background: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.pc-addons-lang-switch:hover .pc-addons-lang-switch__icon {
|
|
12
|
+
color: var(--g-color-text-complementary);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pc-addons-lang-switch_size_m {
|
|
16
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
17
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pc-addons-lang-switch__icon {
|
|
21
|
+
position: relative;
|
|
22
|
+
top: -1px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pc-addons-lang-switch__popup {
|
|
26
|
+
--yc-popup-border-width: 0;
|
|
27
|
+
--yc-popup-border-color: none;
|
|
28
|
+
border-radius: var(--g-border-radius-l);
|
|
29
|
+
box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
|
|
30
|
+
padding: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pc-addons-lang-switch__text {
|
|
34
|
+
position: relative;
|
|
35
|
+
top: -1px;
|
|
36
|
+
margin-right: 3px;
|
|
37
|
+
margin-left: -7px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (max-width: 1080px) {
|
|
41
|
+
.pc-addons-lang-switch:not(.pc-addons-lang-switch_show-text) {
|
|
42
|
+
width: 24px;
|
|
43
|
+
margin-left: 8px;
|
|
44
|
+
}
|
|
45
|
+
.pc-addons-lang-switch:not(.pc-addons-lang-switch_show-text) .pc-addons-lang-switch__text {
|
|
46
|
+
top: 0;
|
|
47
|
+
margin-left: 25px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
@media (max-width: 768px) {
|
|
51
|
+
.pc-addons-lang-switch:not(.pc-addons-lang-switch_show-text) {
|
|
52
|
+
width: 36px;
|
|
53
|
+
}
|
|
54
|
+
.pc-addons-lang-switch_search {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
@media (max-width: 576px) {
|
|
59
|
+
.pc-addons-lang-switch {
|
|
60
|
+
margin-right: 2px;
|
|
61
|
+
}
|
|
62
|
+
}
|
package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.css
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-lang-switch-popup {
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
margin: calc(-1 * var(--yc-popover-padding));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pc-addons-lang-switch-popup__item {
|
|
9
|
+
color: inherit;
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
border-radius: var(--g-focus-border-radius);
|
|
12
|
+
display: block;
|
|
13
|
+
padding: 6px 12px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pc-addons-lang-switch-popup__item:focus {
|
|
17
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
18
|
+
outline-offset: -2px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pc-addons-lang-switch-popup__item:focus:not(:focus-visible) {
|
|
22
|
+
outline: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pc-addons-lang-switch-popup__item:first-child {
|
|
26
|
+
padding-top: 12px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pc-addons-lang-switch-popup__item:last-child {
|
|
30
|
+
padding-bottom: 12px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pc-addons-lang-switch-popup__item:hover {
|
|
34
|
+
background: var(--g-color-base-generic);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.pc-addons-lang-switch-popup__icon {
|
|
38
|
+
margin-top: 2px;
|
|
39
|
+
width: 20px;
|
|
40
|
+
height: 14px;
|
|
41
|
+
margin-right: 6px;
|
|
42
|
+
border: 1px solid var(--g-color-line-generic);
|
|
43
|
+
border-radius: 3px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.pc-addons-lang-switch-popup__lang {
|
|
47
|
+
color: var(--g-color-text-secondary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pc-addons-lang-switch-popup__row {
|
|
51
|
+
display: flex;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pc-addons-lang-switch-popup__name, .pc-addons-lang-switch-popup__icon-check {
|
|
55
|
+
color: var(--g-color-text-primary);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.pc-addons-lang-switch-popup__text {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
margin-right: 8px;
|
|
62
|
+
}
|
package/build/cjs/components/Navigation/components/LangSwitch/LangSwitchPopup/LangSwitchPopup.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LangSwitchPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const Check_1 = tslib_1.__importDefault(require("@gravity-ui/icons/Check"));
|
|
7
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
+
const cn_1 = require("../../../../../utils/cn");
|
|
9
|
+
const b = (0, cn_1.block)('lang-switch-popup');
|
|
10
|
+
const LangSwitchPopup = ({ items }) => {
|
|
11
|
+
return (react_1.default.createElement("div", { className: b() }, items.map(({ title, description, active, url, icon }) => {
|
|
12
|
+
return (
|
|
13
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
14
|
+
react_1.default.createElement("a", { className: b('item'), key: description, href: active ? undefined : url },
|
|
15
|
+
react_1.default.createElement("div", { className: b('row') },
|
|
16
|
+
icon && (react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icon, width: 18, height: 12 })),
|
|
17
|
+
react_1.default.createElement("div", { className: b('text') },
|
|
18
|
+
react_1.default.createElement("span", { className: b('name') }, title),
|
|
19
|
+
react_1.default.createElement("span", { className: b('lang') }, description)),
|
|
20
|
+
active && (react_1.default.createElement(uikit_1.Icon, { className: b('icon-check'), data: Check_1.default, width: 16, height: 16 })))));
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
23
|
+
exports.LangSwitchPopup = LangSwitchPopup;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonProps, PopupPlacement } from '@gravity-ui/uikit';
|
|
3
|
+
import { LangSwitchItem } from '../../models';
|
|
4
|
+
export interface LangSwitchProps {
|
|
5
|
+
text?: string;
|
|
6
|
+
iconClassName?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
isSearchMode?: boolean;
|
|
9
|
+
direction?: PopupPlacement;
|
|
10
|
+
tooltipClassName?: string;
|
|
11
|
+
showText?: boolean;
|
|
12
|
+
size?: ButtonProps['size'];
|
|
13
|
+
iconSize?: number;
|
|
14
|
+
isMobile?: boolean;
|
|
15
|
+
items: LangSwitchItem[];
|
|
16
|
+
}
|
|
17
|
+
export declare const LangSwitch: ({ text, iconClassName, isSearchMode, direction, className, size, iconSize, items, showText, isMobile, }: LangSwitchProps) => React.JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LangSwitch = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const Globe_1 = tslib_1.__importDefault(require("@gravity-ui/icons/Globe"));
|
|
7
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
+
const cn_1 = require("../../../../utils/cn");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
const LangSwitchPopup_1 = require("./LangSwitchPopup/LangSwitchPopup");
|
|
11
|
+
const b = (0, cn_1.block)('lang-switch');
|
|
12
|
+
const langSwitchTooltipId = 'lang-switch-tooltip-id';
|
|
13
|
+
const LangSwitch = ({ text, iconClassName, isSearchMode, direction = 'bottom', className, size, iconSize, items, showText, isMobile, }) => {
|
|
14
|
+
const tooltipRef = (0, react_1.useRef)(null);
|
|
15
|
+
const buttonRef = (0, react_1.useRef)(null);
|
|
16
|
+
const tooltipOffset = isMobile ? [0, 12] : [0, 14];
|
|
17
|
+
const [isOpened, setIsOpened] = (0, react_1.useState)(false);
|
|
18
|
+
return (react_1.default.createElement(uikit_1.Popover, { className: className, ref: tooltipRef, openOnHover: false, hasArrow: false, placement: direction, content: react_1.default.createElement(LangSwitchPopup_1.LangSwitchPopup, { items: items }), tooltipOffset: tooltipOffset, tooltipClassName: b('popup'), tooltipId: langSwitchTooltipId, focusTrap: true,
|
|
19
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
20
|
+
autoFocus: true, onOpenChange: setIsOpened, disablePortal: true, restoreFocusRef: buttonRef }, ({ onClick }) => (react_1.default.createElement(uikit_1.Button, { view: "flat", size: size || (isMobile ? 'l' : 's'), className: b({ search: isSearchMode, 'show-text': showText, size }), onClick: onClick, extraProps: {
|
|
21
|
+
'aria-expanded': isOpened,
|
|
22
|
+
'aria-controls': langSwitchTooltipId,
|
|
23
|
+
}, ref: buttonRef },
|
|
24
|
+
showText && react_1.default.createElement("span", { className: b('text') }, text),
|
|
25
|
+
react_1.default.createElement(uikit_1.Icon, { className: b('icon', iconClassName), data: Globe_1.default, size: iconSize || (0, utils_1.getIconSize)(isMobile) })))));
|
|
26
|
+
};
|
|
27
|
+
exports.LangSwitch = LangSwitch;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.pc-addons-logo__text {
|
|
2
|
+
margin: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* use this for style redefinitions to awoid problems with
|
|
6
|
+
unpredictable css rules order in build */
|
|
7
|
+
.pc-addons-logo {
|
|
8
|
+
width: 214px;
|
|
9
|
+
outline: none;
|
|
10
|
+
color: inherit;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
border-radius: var(--g-focus-border-radius);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.utilityfocus .pc-addons-logo:focus {
|
|
18
|
+
outline: 2px solid #ffdb4d;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pc-addons-logo:focus {
|
|
22
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
23
|
+
outline-offset: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pc-addons-logo:focus:not(:focus-visible) {
|
|
27
|
+
outline: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pc-addons-logo_mobile {
|
|
31
|
+
width: 141px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.pc-addons-logo__img {
|
|
35
|
+
display: block;
|
|
36
|
+
margin: 0;
|
|
37
|
+
height: 32px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pc-addons-logo__text {
|
|
41
|
+
font-size: var(--g-text-header-1-font-size, var(--pc-text-header-1-font-size));
|
|
42
|
+
line-height: var(--g-text-header-1-line-height, var(--pc-text-header-1-line-height));
|
|
43
|
+
color: var(--pc-text-header-color);
|
|
44
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
45
|
+
margin-left: 12px;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (max-width: 369px) {
|
|
50
|
+
.pc-addons-logo__img {
|
|
51
|
+
height: 30px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClassNameProps, Theme } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import { LogoData } from '../../models';
|
|
4
|
+
export interface LogoProps extends LogoData, ClassNameProps {
|
|
5
|
+
theme?: Theme;
|
|
6
|
+
imageClassName?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Logo: React.FC<LogoProps>;
|
|
9
|
+
export default Logo;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const cn_1 = require("../../../../utils/cn");
|
|
6
|
+
const mobile_1 = require("../../contexts/mobile");
|
|
7
|
+
const i18n_1 = tslib_1.__importDefault(require("./i18n"));
|
|
8
|
+
const b = (0, cn_1.block)('logo');
|
|
9
|
+
const Logo = ({ href = '/', src, className, imageClassName, title, text, alt, width, }) => {
|
|
10
|
+
const isMobile = (0, react_1.useContext)(mobile_1.MobileContext);
|
|
11
|
+
return (react_1.default.createElement("a", { href: href, className: b({ mobile: isMobile }, className), title: title || (0, i18n_1.default)('link-title'), style: width ? { width } : {} },
|
|
12
|
+
src && (react_1.default.createElement("img", { className: b('img', imageClassName), alt: alt || (0, i18n_1.default)('image-alt'), src: src })),
|
|
13
|
+
text && react_1.default.createElement("span", { className: b('text') }, text)));
|
|
14
|
+
};
|
|
15
|
+
exports.default = Logo;
|
|
@@ -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 = 'Logo';
|
|
8
|
+
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-mobile-navigation {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
list-style: none;
|
|
7
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
8
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.pc-addons-mobile-navigation__icon {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pc-addons-mobile-navigation__icon:hover:before {
|
|
16
|
+
background: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pc-addons-mobile-navigation__icon:hover .pc-addons-mobile-navigation__icon {
|
|
20
|
+
color: var(--g-color-text-complementary);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pc-addons-mobile-navigation__icon-icon {
|
|
24
|
+
position: relative;
|
|
25
|
+
top: 3px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pc-addons-mobile-navigation__icon_hidden {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.pc-addons-mobile-navigation__user {
|
|
33
|
+
margin-top: 24px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.pc-addons-mobile-navigation__buttons {
|
|
37
|
+
margin-top: 8px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (max-width: 769px) {
|
|
41
|
+
.pc-addons-mobile-navigation__icon {
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
.pc-addons-mobile-navigation__icon_hidden {
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import { CustomElements } from '../../containers/Header/Header';
|
|
4
|
+
import { NavigationSectionData } from '../../models';
|
|
5
|
+
interface MobileNavigationProps {
|
|
6
|
+
isOpened: boolean;
|
|
7
|
+
toogleOpen: (isOpened: boolean) => void;
|
|
8
|
+
isSearchOpen: boolean;
|
|
9
|
+
data: NavigationSectionData[];
|
|
10
|
+
onMenuScroll: (scrollTop: number) => void;
|
|
11
|
+
popupClassName?: string;
|
|
12
|
+
buttons?: ButtonProps[];
|
|
13
|
+
customElements?: CustomElements;
|
|
14
|
+
}
|
|
15
|
+
export declare const MobileNavigation: ({ isOpened, toogleOpen, isSearchOpen, data, buttons, onMenuScroll, customElements: { actions, right }, }: MobileNavigationProps) => React.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MobileNavigation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
7
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
+
const cn_1 = require("../../../../utils/cn");
|
|
9
|
+
const Header_1 = require("../../containers/Header/Header");
|
|
10
|
+
const ButtonsContainer_1 = require("../ButtonsContainer/ButtonsContainer");
|
|
11
|
+
const MobileNavigationItem_1 = require("./MobileNavigationItem/MobileNavigationItem");
|
|
12
|
+
const MobileNavigationPopup_1 = require("./MobileNavigationPopup/MobileNavigationPopup");
|
|
13
|
+
const b = (0, cn_1.block)('mobile-navigation');
|
|
14
|
+
const MobileNavigation = ({ isOpened, toogleOpen, isSearchOpen, data, buttons, onMenuScroll, customElements: { actions, right } = {}, }) => (react_1.default.createElement("div", { className: b() },
|
|
15
|
+
react_1.default.createElement(uikit_1.Button, { view: "flat", size: "l", className: b('icon', { hidden: isSearchOpen }), onClick: (e) => {
|
|
16
|
+
e.stopPropagation();
|
|
17
|
+
toogleOpen(!isOpened);
|
|
18
|
+
} },
|
|
19
|
+
react_1.default.createElement(uikit_1.Icon, { data: isOpened ? icons_1.Xmark : icons_1.Bars, size: Header_1.MOBILE_ICON_SIZE })),
|
|
20
|
+
react_1.default.createElement(MobileNavigationPopup_1.MobileNavigationPopup, { isOpened: isOpened, onClose: () => toogleOpen(false), onMenuScroll: onMenuScroll },
|
|
21
|
+
react_1.default.createElement("nav", null,
|
|
22
|
+
react_1.default.createElement("ul", { className: b() }, data.map((item) => (react_1.default.createElement("li", { className: b(), key: item.title },
|
|
23
|
+
react_1.default.createElement(MobileNavigationItem_1.MobileNavigationItem, { data: item }))))),
|
|
24
|
+
buttons && (react_1.default.createElement(ButtonsContainer_1.ButtonsContainer, { buttons: buttons, className: b('buttons'), width: "max", direction: ButtonsContainer_1.ButtonsContainerDirection.Column }, actions)),
|
|
25
|
+
right))));
|
|
26
|
+
exports.MobileNavigation = MobileNavigation;
|